Training of a user classification model, user classification method, apparatus, medium, device
By combining a feature sequence encoder and a dynamic weight generation network, the problem of weight setting relying on experience in user classification models is solved, enabling dynamic adjustment and improving the model's accuracy and business adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TONGDUN NETWORK TECH CO LTD
- Filing Date
- 2026-02-03
- Publication Date
- 2026-06-09
AI Technical Summary
Existing user classification models lack a dynamic weight learning mechanism in multi-stage prediction, causing weight settings to rely on empirical design and fail to adapt, thus affecting model accuracy.
A training method based on a feature sequence encoder, a stage transition probability predictor, and a dynamic weight generation network is adopted. By encoding user feature sequences, stage loss weights are predicted, and a target loss function is constructed for model training to achieve dynamic weight adjustment.
It improves the accuracy of the user classification model and can dynamically adjust the loss weight based on stage performance and business ROI, thereby improving the overall convergence quality of the model and the consistency of business metrics.
Smart Images

Figure CN122173994A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of big data processing technology, and more specifically, to a training method for a user classification model, a training device for a user classification model, a user classification method, a computer-readable storage medium, and an electronic device. Background Technology
[0002] Most existing user classification models employ multi-task learning. Specifically, in practical applications, to predict behavior at multiple stages simultaneously, a multi-task learning structure treats the prediction at each stage as a different task and improves overall performance by sharing underlying representations. However, this method has the following drawbacks: weight settings are often based on empirical design, and the dynamic adjustment of weight allocation and stage importance across different stages lacks an automated learning mechanism, resulting in lower accuracy for the obtained user classification model.
[0003] It should be noted that the information in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0004] The purpose of this disclosure is to provide a training method for a user classification model, a training device for a user classification model, a user classification method, a computer-readable storage medium, and an electronic device, thereby overcoming, to at least a certain extent, the problem of low accuracy of user classification models due to limitations and defects in related technologies.
[0005] According to one aspect of this disclosure, a method for training a user classification model is provided, comprising: encoding a first user feature sequence of classified users based on a feature sequence encoder in the user classification model to be trained, to obtain a first user vector containing the user behavior patterns of the classified users; classifying the first user vector based on a stage transition probability predictor in the user classification model to be trained, to obtain the current stage loss of the classified users at different stages; predicting the weights of the current stage loss based on a dynamic weight generation network in the user classification model to be trained, to obtain stage loss weights at different stages; constructing a target loss function based on the stage loss weights and the current stage loss, and training the user classification model to be trained based on the target loss function to obtain a trained user classification model.
[0006] In one exemplary embodiment of this disclosure, encoding a first user feature sequence of classified users to obtain a first user vector containing the user behavior patterns of the classified users includes: acquiring first user data of the classified users; wherein the first user data includes first user behavior data and first user attribute data; the first user behavior data includes the behavior data of the classified users at different stages; performing embedding mapping processing on the first user behavior data and the first user attribute data to obtain a first user feature sequence; the first user feature sequence includes at least one of a first stage sequence feature, a first user static feature, a first behavior time interval feature, and a first data channel feature; and encoding the first user feature sequence of the classified users based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users.
[0007] In an exemplary embodiment of this disclosure, the feature sequence encoder is an attention-based encoder; wherein, encoding a first user feature sequence of classified users based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users includes: encoding the first user feature sequence based on a first position encoding module to obtain a first position vector, and superimposing the first user feature sequence and the first position vector to obtain a first input feature vector; encoding the first input feature vector based on a first rotation feature encoding module to obtain a first encoding result, and decoding the first encoding result based on a first feature decoding module to obtain a first encoding matrix; transforming the first encoding matrix based on a first linear transformation layer to obtain a first logical matrix, and mapping the first logical matrix based on a first classification layer to obtain the first user vector containing the user behavior patterns of the classified users.
[0008] In one exemplary embodiment of this disclosure, encoding a first input feature vector based on a first rotation feature encoding module to obtain a first encoding result includes: calculating a first attention mechanism for the first input feature vector based on a first multi-head self-attention module, and performing residual connection and normalization processing on the first attention mechanism based on a first residual connection and normalization module to obtain a first normalization processing result; performing linearization processing on the first normalization processing result based on a first feedforward neural network to obtain a first linearization processing result, and performing residual connection and normalization processing on the first linearization processing result based on a second residual connection and normalization module to obtain the first encoding result.
[0009] In an exemplary embodiment of this disclosure, a first attention mechanism based on a first multi-head self-attention module to calculate the first input vector includes: linearly fusing the first input feature vector to obtain a first query vector, a first key vector, and a first value vector; adjusting the relative angles of the first query vector and the first key vector based on a preset first rotation matrix to obtain an adjusted first query vector and an adjusted first key vector; calculating a first outer product vector of the adjusted first query vector and the adjusted first key vector to obtain a first similarity between the adjusted first query vector and the adjusted first key vector; normalizing the first similarity to obtain a first weight matrix; and calculating a second outer product vector of the first weight matrix and the first value vector to obtain the first attention mechanism; wherein the first attention mechanism is used to interact with user behavior at different stages.
[0010] In one exemplary embodiment of this disclosure, the feature sequence encoder is a time-series feature-based encoder; wherein, encoding a first user feature sequence of classified users based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users includes: performing a linear transformation on the first user feature sequence of the classified users to obtain a transformed feature sequence, and traversing the transformed feature sequence based on a preset time step to extract features from the transformed feature sequence to obtain a first user vector containing the user behavior patterns of the classified users.
[0011] In one exemplary embodiment of this disclosure, classifying the first user vector to obtain the current stage loss of the classified user at different stages includes: classifying the first user vector to obtain the conversion probability prediction value of the classified user at different stages; constructing a stage loss function for different stages based on the conversion probability prediction value and the actual conversion probability of the classified user at different stages; and determining the current stage loss based on the stage loss function.
[0012] In one exemplary embodiment of this disclosure, classifying a first user vector to obtain predicted conversion probabilities for the classified user at different stages includes: classifying the first user vector based on a first-stage conversion probability predictor to obtain a first-stage conversion probability for the classified user in the outbound call stage; classifying the first user vector based on a second-stage conversion probability predictor to obtain a second-stage conversion probability for the classified user in the call answering stage; classifying the first user vector based on a third-stage conversion probability predictor to obtain a third-stage conversion probability for the classified user in the SMS receiving stage; classifying the first user vector based on a fourth-stage conversion probability predictor to obtain a fourth-stage conversion probability for the classified user in the SMS viewing stage; classifying the first user vector based on a fifth-stage conversion probability predictor to obtain a fifth-stage conversion probability for the classified user in the information confirmation stage; and classifying the first user vector based on a sixth-stage conversion probability predictor to obtain a sixth-stage conversion probability for the classified user in the product payment stage.
[0013] In one exemplary embodiment of this disclosure, predicting the weights of the current stage loss to obtain stage loss weights corresponding to the current stage loss includes: determining real-time business metrics of the classified users at different stages based on the first user data of the classified users; determining loss trend vectors at different stages based on the current stage loss and the historical stage loss of the user classification model to be trained during the historical model training stage; constructing multi-dimensional feature input datasets at different stages based on the current stage loss, real-time business metrics, and loss trend vectors; and inputting the multi-dimensional feature input datasets into the dynamic weight generation network to predict the weights of the current stage loss to obtain stage loss weights corresponding to the current stage loss.
[0014] According to one aspect of this disclosure, a user classification method is provided, comprising: acquiring second user data of a user to be classified, and performing embedding mapping processing on the second user data to obtain a second user feature sequence; the second user feature sequence includes at least one of a second user static feature, a second behavioral time interval feature, and a second data channel feature; encoding the second user feature sequence based on a feature sequence encoder in a trained user classification model to obtain a second user vector containing the user behavior patterns of the user to be classified; classifying the second user vector based on a stage conversion probability predictor in the trained user classification model to obtain user intention prediction results of the user to be classified at different stages; predicting the weights of the user intention prediction results at different stages based on a dynamic weight generation network in the trained user classification model to obtain conversion rate weight values at different stages; weighted summing of the user intention prediction results at different stages and the conversion rate weight values to obtain a comprehensive user intention score, and classifying the user to be classified according to the comprehensive user intention score.
[0015] According to one aspect of this disclosure, a training apparatus for a user classification model is provided, comprising: a first user vector determination module, configured to encode a first user feature sequence of a classified user based on a feature sequence encoder in the user classification model to be trained, to obtain a first user vector containing the user behavior patterns of the classified user; a current stage loss determination module, configured to classify the first user vector based on a stage transition probability predictor in the user classification model to be trained, to obtain the current stage loss of the classified user in different stages; a stage loss weight determination module, configured to predict the weights of the current stage loss based on a dynamic weight generation network in the user classification model to be trained, to obtain stage loss weights in different stages; and a user classification model training module, configured to construct a target loss function based on the stage loss weights and the current stage loss, and train the user classification model to be trained based on the target loss function to obtain a trained user classification model.
[0016] According to one aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a training method for a user classification model as described in any one of the preceding claims, and a user classification method as described in any one of the preceding claims.
[0017] According to one aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute a training method for a user classification model according to any one of the preceding claims, and a user classification method according to any one of the preceding claims, by executing the executable instructions.
[0018] This disclosure provides a training method for a user classification model. The method encodes the first user feature sequence of classified users using a feature sequence encoder in the user classification model to obtain a first user vector containing the user behavior patterns of the classified users. Then, the first user vector is classified using a stage transition probability predictor in the user classification model to obtain the current stage loss of the classified users at different stages. Next, the weights of the current stage loss are predicted using a dynamic weight generation network in the user classification model to obtain stage loss weights for different stages. Finally, a target loss function is constructed based on the stage loss weights and the current stage loss, and the user classification model is trained using the target loss function to obtain a trained user classification model. Because the weights of the current stage loss can be predicted using a dynamic weight generation network, the low accuracy of stage loss weights caused by empirical design can be avoided, thus improving the accuracy of the obtained user classification model.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0021] Figure 1 The diagram illustrates a flowchart of a training method for a user classification model according to an exemplary embodiment of the present disclosure.
[0022] Figure 2 The diagram schematically illustrates an example structure of a user classification model to be trained according to an exemplary embodiment of the present disclosure.
[0023] Figure 3 The diagram schematically illustrates an example structure of a feature sequence encoder according to an exemplary embodiment of the present disclosure.
[0024] Figure 4 An example diagram schematically illustrates a first rotation encoding module according to an exemplary embodiment of the present disclosure.
[0025] Figure 5 An example diagram is shown schematically of a stage transition probability predictor according to an exemplary embodiment of the present disclosure.
[0026] Figure 6 The diagram illustrates a scenario example of a specific prediction process for the transition probabilities at each stage according to an exemplary embodiment of the present disclosure.
[0027] Figure 7 The diagram illustrates a flowchart of a user classification method according to an example embodiment of the present disclosure.
[0028] Figure 8 The diagram schematically illustrates a structural example of a training apparatus for a user classification model according to an exemplary embodiment of the present disclosure.
[0029] Figure 9 The diagram schematically illustrates a structural example of a user classification device according to an exemplary embodiment of the present disclosure.
[0030] Figure 10 The illustration shows an example diagram of an electronic device for implementing a user classification model and / or a user classification method according to an example embodiment of the present disclosure. Detailed Implementation
[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0032] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0033] With the widespread application of digital and intelligent technologies in the insurance industry, insurance product marketing is gradually shifting from traditional manual channels to precision marketing models based on big data and machine learning. In practical applications, the core issue in insurance marketing is how to filter out users with genuine purchasing intent from a vast potential customer base and effectively allocate outbound call resources to improve conversion rates and overall marketing revenue. To achieve this, actual business operations often involve multiple processes, including modeling user behavioral data, predicting intent at various behavioral stages based on the constructed model, and estimating the probability of final paid conversion. Based on this, the performance of different users at various marketing behavior stages, such as answering calls, effective communication, and clicking on SMS messages, can be determined based on the intent prediction results, and resource optimization and outbound call decisions can be made based on the probability estimation results. Furthermore, typical marketing intent prediction methods mainly use traditional machine learning models (such as logistic regression, decision trees, and XGBoost) or deep learning methods to model the final conversion probability. In the specific prediction process, these models typically fit user conversion tags using the behavioral characteristics of historical samples, generating corresponding prediction scores for ranking and target audience selection.
[0034] In one example embodiment, in the insurance intention prediction scenario, user conversion is typically a multi-stage process; meanwhile, for the multi-stage behavior in the user conversion process, the main methods developed by the industry and academia include the following different implementations.
[0035] The first implementation approach is multi-task learning modeling. Specifically, in practical applications, to simultaneously predict behavior across multiple stages, some methods employ a multi-task learning structure, treating predictions at each stage as different tasks and improving overall performance by sharing underlying representations. Additionally, some research uses different loss functions or weighting strategies for joint training targeting different objectives. However, these methods suffer from the following drawbacks: weight settings are often manually fixed or based on experience, lacking an automated learning mechanism for the dynamic adjustment of weight allocation and stage importance across different stages (i.e., lacking a mechanism for dynamic adjustment based on model performance and business KPI ratios). Therefore, it is difficult to achieve real-time adaptive optimization of losses at different stages and the final target gain.
[0036] The second implementation method is a hierarchical prediction model. Specifically, in practical applications, some studies construct hierarchical models to predict behavior at different stages, such as first modeling the probability of receiving calls and then predicting SMS clicks. This method is relatively intuitive, but it suffers from the problem of a lack of clear joint optimization objectives between the various prediction models. However, this approach lacks an automatic adjustment mechanism for the changing importance of stages over time, performance, and business objectives. Therefore, it cannot dynamically adjust the learning focus based on the real-time performance of different task stages and the stage's contribution to the business.
[0037] The third approach is the causal effect uplift model. Specifically, in marketing, causal inference techniques like the uplift model are used to estimate the marginal impact of a marketing intervention (such as sending promotional text messages) on improved user behavior. This type of method calculates the difference in conversion rates between intervention and non-intervention, thus measuring the incremental effect of the marketing action (treatment). This focus on incremental impact is theoretically important, but standard uplift modeling typically relies on explicit control group data, making it difficult to directly apply in multi-stage, complex behavioral sequences where randomized experimental control groups are lacking. Furthermore, traditional uplift models and individual treatment effect (ITE) estimation methods often focus on inferring incremental effects in a single stage or treatment, limiting their ability to analyze the comprehensive impact across multiple behavioral stages. However, this approach has the following drawbacks: firstly, traditional uplift / ITE methods lack effective generalization in complex multi-stage contexts; secondly, while traditional uplift methods are applicable to single treatments, they lack effective theoretical and practical application for causal effects and inter-stage interactions in multi-stage insurance scenarios without randomized control groups, resulting in lower accuracy of the predicted results.
[0038] The fourth approach is behavioral sequence modeling. Specifically, to address the problem of the difficulty in directly transferring and applying complex behavioral sequences, relevant technical solutions propose modeling methods for behavioral sequences. In particular, in the direction of sequence behavior modeling, commonly used deep models (such as recurrent neural network models, long short-term memory network models, and Transformer models) can capture the temporal dependencies of behavioral context, but they are mainly used to fit correlation relationships rather than estimate causal contributions, and they do not perform in-depth optimization for the dynamic adjustment of the correlation and importance of multi-stage objectives. Furthermore, deep behavioral sequence models are mostly used for correlation fitting rather than dynamic learning of causal contributions and stage-specific effects. Based on this, existing models tend to fit the overall picture rather than breaking down stage objectives and allowing the model to automatically allocate learning capabilities according to the performance of different task stages.
[0039] In some relevant example embodiments, although existing insurance intention prediction and user behavior modeling technologies can improve conversion rates to some extent, they still have significant limitations in their technical implementation. These shortcomings affect the final prediction accuracy and marketing effectiveness from multiple dimensions, including model structure, loss design, business indicator fusion, and adaptability. Specifically, these limitations can be manifested in the following aspects: Firstly, the weights of multi-stage models are fixed or manually set, lacking adaptive optimization capabilities. That is, in the solutions described above, most multi-stage intention prediction methods use fixed weights to combine multi-stage losses. However, this fixed weight scheme does not adjust according to changes in model stage performance, its own error trend, or business indicators during training. This leads to the following problems: ① It cannot automatically weaken the interference when there is a lot of noise in some stages during the early stages of training; ② It cannot automatically strengthen the model's focus when performance declines in some stages; ③ It cannot achieve a dynamic balance between business objectives and training objectives among multi-stage objectives. Therefore, the fixed weight method cannot adapt to changes in the importance and business value of each stage, which greatly reduces the overall optimization effect and business adaptability of the model. It can be inferred that prediction based on multi-stage model weights lacks a dynamic weight learning mechanism, which means that the multi-stage loss function cannot be adaptively adjusted according to the importance of each stage and the changes in model performance, thereby reducing the model's convergence speed, generalization performance, and business KPI performance.
[0040] On the other hand, existing models struggle to adaptively adjust stage objectives by incorporating real-time business metrics (such as return on investment). Specifically, existing models typically focus only on internal error metrics within the training set (such as the overall model loss function Loss or the area under the ROC curve, AUC), without integrating real-time business metrics (such as conversion revenue increment and ROI) into the training process. This leads to the following problems: ① The model may be sensitive to error reduction but contribute nothing to improving business revenue; ② Stage priorities align with business KPIs, causing resource imbalance; ③ The contribution of different stages to improving final revenue cannot be linked to the loss term. Therefore, it can be inferred that existing methods lack a linkage mechanism between model training loss and business revenue metrics, making it difficult to achieve simultaneous optimization of predictive performance and actual business results.
[0041] On the other hand, existing multi-task solutions cannot dynamically adjust the learning focus based on training performance between stages. That is, in existing multi-task learning or multi-stage prediction solutions, the training focus of the model is determined by manual setting or preset rules, and does not automatically adjust the allocation of learning resources (e.g., higher weights, greater gradient attention, etc.) according to performance changes during training (e.g., poor performance in a certain stage). This leads to the following problems: ① It is difficult to automatically handle the differences in training difficulty at different stages; ② The model cannot adaptively adjust when the data distribution changes; ③ It is easy to cause underfitting or overfitting in a certain stage, affecting the overall generalization. It can be inferred that the lack of a weight adjustment mechanism based on dynamic training feedback in existing methods makes it difficult for the model to synergistically improve multi-stage performance.
[0042] Based on this, this exemplary embodiment first provides a method for training a user classification model, which can run on a server, server cluster, or cloud server, etc. Of course, those skilled in the art can also run the method disclosed herein on other platforms as needed, and this exemplary embodiment does not impose any special limitations on this. Specifically, refer to... Figure 1 As shown, the training method for this user classification model may include the following steps:
[0043] Step S110. Based on the feature sequence encoder in the user classification model to be trained, encode the first user feature sequence of the classified users to obtain a first user vector containing the user behavior patterns of the classified users.
[0044] Step S120. Classify the first user vector based on the stage transition probability predictor in the user classification model to be trained, and obtain the current stage loss of the classified user in different stages;
[0045] Step S130. Based on the dynamic weight generation network in the user classification model to be trained, predict the weights of the current stage loss to obtain the stage loss weights under different stages.
[0046] Step S140. Construct a target loss function based on the stage loss weights and the current stage loss, and train the user classification model to be trained based on the target loss function to obtain the trained user classification model.
[0047] In the training method of the user classification model described above, the first user feature sequence of the classified users is encoded by the feature sequence encoder in the user classification model to be trained, so as to obtain the first user vector containing the user behavior rules of the classified users. Then, the first user vector is classified by the stage transition probability predictor in the user classification model to be trained, so as to obtain the current stage loss of the classified users in different stages. Then, the weight of the current stage loss is predicted by the dynamic weight generation network in the user classification model to be trained, so as to obtain the stage loss weight in different stages. Finally, a target loss function is constructed based on the stage loss weight and the current stage loss, and the user classification model to be trained is trained based on the target loss function to obtain the trained user classification model. Since the weight of the current stage loss can be predicted by the dynamic weight generation network, the problem of low accuracy of stage loss weight caused by empirical design can be avoided, thus improving the accuracy of the obtained user classification model.
[0048] The training method of the user classification model described in the exemplary embodiments of this disclosure will be explained and described in detail below with reference to the accompanying drawings.
[0049] First, the technical implementation principles of the exemplary embodiments of this disclosure will be explained and described. Specifically, the training method of the user classification model described in the exemplary embodiments of this disclosure constructs a learning mechanism that can adaptively adjust the loss weights of multiple stages. This allows the model to automatically and dynamically adjust the loss weights of each stage during training based on stage performance, business ROI (Return on Investment), and loss trends, thereby improving the overall convergence quality of the model and the consistency of business indicators. Furthermore, the training method of the user classification model described in the exemplary embodiments of this disclosure can also realize a real-time linkage mechanism between the training objective and business indicators, so that the loss weights not only reflect the prediction error but also the magnitude of the stage's contribution to business revenue, thereby guiding the model to automatically favor the high-business-value stages for reinforcement learning.
[0050] Secondly, the training system for the user classification model involved in the example embodiments of this disclosure will be explained and described.
[0051] Specifically, the user classification model training system described in the exemplary embodiments of this disclosure may include an edge computing server and a cloud platform computing server; the edge computing server and the cloud platform computing server can communicate and connect via a wired network or a wireless network; in practical applications, the edge computing server can be used to acquire first user data of classified users and preprocess the first user data; the preprocessing described herein may include, but is not limited to, denoising and deduplication; based on this, the first user behavior data and the first user attribute data need to be embedded and mapped to obtain a first user feature sequence; at the same time, the cloud platform computing server can be used to train the user classification model to be trained based on the first user feature sequence to obtain a trained user classification model, and perform user classification based on the trained user classification model.
[0052] It should be added that, since data preprocessing and the specific determination of user feature sequences can be carried out on edge computing servers, the computational burden on cloud platform computing servers can be reduced. At the same time, the bandwidth resources required for data transmission can also be reduced, thereby improving model training efficiency and / or user classification efficiency while reducing computational burden and bandwidth resources.
[0053] Furthermore, the user classification model to be trained involved in the exemplary embodiments of this disclosure will be explained and described. Specifically, refer to... Figure 2 As shown, the user classification model to be trained described here may include a feature sequence encoder 210, a stage transition probability predictor 220, and a dynamic weight generation network 230; meanwhile, the role of each model layer in the user classification process will be detailed in detail later, and will not be elaborated further here.
[0054] In one example embodiment, the feature sequence encoder described above can be an encoder based on a bidirectional long short-term memory network or an encoder based on a Transformer; this example does not impose any special limitations on this. Taking a Transformer-based encoder as an example, the feature sequence encoder may include a first position encoding module, a first rotation feature encoding module, a first feature decoding module, a first linear transformation layer, and a first classification layer. For details, please refer to... Figure 3 As shown; the first rotation feature encoding module described here includes a first multi-head self-attention module, a first residual connection and normalization module, a first feedforward neural network, and a second residual connection and normalization module. For details, please refer to [reference needed]. Figure 4 As shown.
[0055] In one example embodiment, the stage transition probability predictor described above may include multiple probability predictors, the specific number of which can be determined according to the actual number of stages; this example does not impose any special limitation on this. Furthermore, taking a stage number of 6 as an example, a specific example diagram of the stage transition probability predictor can be found here. Figure 5 As shown.
[0056] The following will combine Figures 2-5 right Figure 1 The specific implementation process of the training method for the user classification model shown will be further explained and illustrated. Specifically:
[0057] In step S110, based on the feature sequence encoder in the user classification model to be trained, the first user feature sequence of the classified users is encoded to obtain a first user vector containing the user behavior patterns of the classified users.
[0058] In this embodiment of the disclosure, the specific process of determining the first user vector can be implemented as follows: First user data of classified users is obtained; wherein, the first user data includes first user behavior data and first user attribute data; the first user behavior data includes the behavior data of the classified users in different stages; the first user behavior data and the first user attribute data are subjected to embedding mapping processing to obtain a first user feature sequence; the first user feature sequence includes at least one of a first stage sequence feature, a first user static feature, a first behavior time interval feature, and a first data channel feature; the first user feature sequence of the classified users is encoded based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users.
[0059] In this embodiment of the disclosure, the first user data can be obtained from a corresponding database or data storage cluster. The database described herein can be a relational database (e.g., MySQL), and the data storage cluster can be, for example, a Hive cluster or a Hadoop cluster; this example does not impose any special limitations on these. Furthermore, the obtained first user data needs to be preprocessed. This preprocessing process may include, but is not limited to, denoising and deduplication of the first user behavior data within the first user data. For example, during denoising, abnormal data, such as records with a behavior time of 0 or undefined behavior types, can be removed. Similarly, during deduplication, duplicate behavior records of the same user at the same time can be removed.
[0060] In this embodiment, the first user behavior data can be used to characterize user behavior data at various stages; wherein, the stages described herein may include, but are not limited to: outbound call stage, call answering stage, SMS receiving stage, SMS viewing stage, information confirmation stage, and product payment stage, etc.; correspondingly, the first user behavior data may include, but are not limited to, call answering behavior, SMS receiving behavior, SMS viewing behavior, information confirmation behavior, and product payment behavior, etc. Meanwhile, the first user attribute data may include, but is not limited to: user gender, user age, user's channel, and user's most recent active time, etc., and may also include user identifier, user address, and user occupation, etc., which are not specifically limited in this example.
[0061] In this embodiment of the disclosure, the specific process for determining the first-stage sequence features can be carried out on a per-user basis. All valid behavior records of that user are sorted from earliest to latest according to the time of occurrence of the behavior. Discrete behavior names (such as AI outbound call answering, valid dialogue) are mapped to abbreviations / identifiers (such as call, talk) that the model can recognize, ultimately generating a unique behavior sequence for each user (i.e., the first-stage sequence features). These first-stage sequence features may include [call (outbound call stage), talk (call answering stage), get_sms (SMS receiving stage), click_sms (SMS viewing stage), gift (information confirmation stage)]. [pay (product payment stage)] etc.; Meanwhile, the first user static feature can characterize the user's inherent attributes, such as gender, age, registration channel, user level, and the time of the most recent platform activity; the first behavior time interval feature can be used to characterize the time difference between two adjacent user behaviors (e.g., how long after answering an outbound call does an effective conversation begin), the duration of a single behavior, and other temporal characteristics, reflecting the rhythmic patterns of user behavior; the first data channel feature can be used to characterize the channel attributes of each user behavior (e.g., whether the outbound call channel is an official channel / partner channel, or the SMS channel is an SMS gateway / third-party platform, etc.), reflecting the impact of the channel on user behavior. In practical applications, the specific implementation of the embedding mapping processing can be based on the Embedding embedding mapping layer or on the BERT embedding mapping layer; this example does not impose any special restrictions on this.
[0062] In this embodiment of the disclosure, the feature sequence encoder described above can be an attention-based encoder. Under this premise, the specific determination process of the first user vector can be implemented as follows: The first user feature sequence is encoded using a first position encoding module to obtain a first position vector, and the first user feature sequence and the first position vector are superimposed to obtain a first input feature vector; the first input feature vector is encoded using a first rotation feature encoding module to obtain a first encoding result, and the first encoding result is decoded using a first feature decoding module to obtain a first encoding matrix; the first encoding matrix is transformed using a first linear transformation layer to obtain a first logical matrix, and the first logical matrix is mapped using a first classification layer to obtain a first user vector containing the user behavior patterns of the classified users. That is, in practical applications, the first user feature sequence EmbeddingSeq is first encoded with position to compensate for the lack of built-in temporal information in the Transformer, then the attention weights between behaviors are calculated using a multi-head self-attention layer, and after transformation by a feedforward neural network, the corresponding vector (or the mean of all time step vectors) is taken as the global behavior representation h_seq to obtain the required first user vector.
[0063] In one example embodiment, the encoding of the first input feature vector based on the first rotation feature encoding module to obtain the first encoding result can be achieved in the following way: a first attention mechanism is calculated based on the first multi-head self-attention module for the first input feature vector, and the first attention mechanism is subjected to residual connection and normalization processing based on the first residual connection and normalization module to obtain the first normalization processing result; the first normalization processing result is linearized based on the first feedforward neural network to obtain the first linearization processing result, and the first linearization processing result is subjected to residual connection and normalization processing based on the second residual connection and normalization module to obtain the first encoding result.
[0064] In one example embodiment, the first attention mechanism based on the first multi-head self-attention module to calculate the first input vector can be implemented as follows: The first input feature vector is linearly fused to obtain a first query vector, a first key vector, and a first value vector; the relative angles of the first query vector and the first key vector are adjusted based on a preset first rotation matrix to obtain adjusted first query vectors and adjusted first key vectors; a first outer product vector of the adjusted first query vector and the adjusted first key vector is calculated to obtain a first similarity between the adjusted first query vector and the adjusted first key vector; the first similarity is normalized to obtain a first weight matrix; and a second outer product vector of the first weight matrix and the first value vector is calculated to obtain the first attention mechanism; wherein, the first attention mechanism is used to interact with user behavior at different stages.
[0065] In this embodiment of the disclosure, the feature sequence encoder described above can also be a temporal feature-based encoder. Under this premise, the first user vector can also be implemented in the following way: a linear transformation is performed on the first user feature sequence of the classified users to obtain a transformed feature sequence, and the transformed feature sequence is traversed based on a preset time step to extract features from the transformed feature sequence, thereby obtaining a first user vector containing the user behavior patterns of the classified users. Specifically, in practical applications, the first user feature sequence EmbeddingSeq can be sequentially input into the input layer of a long short-term memory network. Through gating operations of the forget gate, input gate, and output gate, irrelevant behavioral information is filtered out, key temporal features are retained, and finally, the hidden state of the last time step of the long short-term memory network is taken as the global behavioral representation h_seq as the required first user vector.
[0066] In step S120, the first user vector is classified based on the stage transition probability predictor in the user classification model to be trained, so as to obtain the current stage loss of the classified user in different stages.
[0067] Specifically, the process of determining the loss at the current stage can be implemented as follows: classify the first user vector to obtain the predicted conversion probability values of the classified users at different stages; construct stage loss functions for different stages based on the predicted conversion probability values and the actual conversion probabilities of the classified users at different stages, and determine the loss at the current stage based on the stage loss functions.
[0068] In one example embodiment, classifying the first user vector to obtain the predicted conversion probability values of the classified users at different stages can be achieved as follows: classifying the first user vector based on a first-stage conversion probability predictor to obtain the first-stage conversion probability of the classified users in the outbound call stage. Based on the second-stage conversion probability predictor, the first user vector is classified to obtain the second-stage conversion probability of the classified user during the call answering stage. Based on the third-stage conversion probability predictor, the first user vector is classified to obtain the third-stage conversion probability of the classified user in the SMS receiving stage. Based on the fourth-stage conversion probability predictor, the first user vector is classified to obtain the fourth-stage conversion probability of the classified user in the SMS viewing stage. Based on the fifth-stage conversion probability predictor, the first user vector is classified to obtain the fifth-stage conversion probability of the classified user in the information confirmation stage. Based on the sixth-stage conversion probability predictor, the first user vector is classified to obtain the sixth-stage conversion probability of the classified user in the product payment stage. ).
[0069] The following will further explain and illustrate the specific process for determining the loss at the current stage. Specifically, in practical applications, core business stages requiring independent prediction can be identified based on the actual business chain. These core business stages can include, as described above, outbound calling, call answering, SMS receiving, SMS viewing, information confirmation, and product payment stages, etc. Each stage corresponds to a binary prediction target (conversion / non-conversion). Furthermore, a lightweight prediction sub-network (i.e., a stage conversion probability predictor) is designed for each stage. The input to all prediction branches is the first user vector h_seq described above, and the output is the conversion probability for that stage (value 0-1). The stage conversion probability predictor described here is typically a 1-2 layer fully connected network with a sigmoid activation function, ensuring that the output is a probability value. For specific scenario examples of conversion probabilities at each stage, please refer to... Figure 6 As shown.
[0070] Furthermore, after obtaining the conversion probabilities of different business stages, stage loss functions can be constructed for different stages; among them, the stage loss functions recorded here may include, but are not limited to, the Binary Cross-Entropy (BCE) loss function, the Ranking Loss function, and the AUC-related loss, etc. In actual application, you can choose according to actual needs. This example does not impose any special restrictions on this; at the same time, the Binary Cross-Entropy (BCE) loss function recorded here is the most commonly used binary classification loss, which is suitable for basic conversion probability prediction; the Ranking Loss function recorded here is suitable for scenarios that require ranking the conversion probability of users, optimizing the goal of "predicting higher conversion probability of users with higher conversion probability than users with lower conversion probability"; the AUC-related loss recorded here directly uses AUC (the core indicator for measuring the model's ability to distinguish) as the optimization target, making the loss optimization closer to the business evaluation standard. Furthermore, taking the Binary Cross-Entropy loss function as an example, the specific loss function can be shown in the following formula (1):
[0071] ; Formula (1)
[0072] in, Let be the stage loss function for the i-th stage; Let be the actual conversion probability of the i-th stage; Let be the predicted conversion probability value for the i-th stage.
[0073] In step S130, the weights of the current stage loss are predicted based on the dynamic weight generation network in the user classification model to be trained, so as to obtain the stage loss weights under different stages.
[0074] Specifically, the process of determining the stage loss weights can be implemented as follows: Based on the first user data of the classified users, determine the real-time business indicators of the classified users at different stages; based on the current stage loss and the historical stage loss of the user classification model to be trained during the historical model training stage, determine the loss trend vector at different stages; based on the current stage loss, real-time business indicators, and loss trend vector, construct a multi-dimensional feature input dataset for different stages; input the multi-dimensional feature input dataset into the dynamic weight generation network to predict the weights of the current stage loss, thereby obtaining the stage loss weights corresponding to the current stage loss.
[0075] The following will further explain and illustrate the specific determination process of the stage loss weights. Specifically, since the loss weights of traditional multi-task models need to be manually set, they cannot adapt to the changes in the learning state of each stage during training (such as the loss remaining high in a certain stage or the business KPI suddenly dropping in a certain stage). The dynamic weight generation network WeightNet is a lightweight fully connected learning network. Its core is to automatically learn the weights of the loss of each stage by integrating training dynamic information and business indicator information, so that the weights can be dynamically adjusted according to the model training state and business needs. Its core mathematical logic is: to generate the scores of each stage through two fully connected layers + ReLU activation, and then to ensure that the weights meet the constraints of "non-negative and sum to 1" through Softmax normalization, so as to ensure the rationality of the total loss calculation. Under this premise, it is first necessary to construct a multi-dimensional feature input dataset under different stages; the multi-dimensional feature input dataset recorded here can be shown in the following formula (2):
[0076] ; Formula (2)
[0077] in, Input the dataset with multidimensional features. , , , , and For the current stage loss under different stages, , , , , and Real-time business metrics at different stages; , , , , as well as This represents the loss trend vector at different stages.
[0078] In one example embodiment, the real-time business metrics recorded above for different stages can be used to characterize the real-time business metrics of each stage, such as the validation set AUC, stage conversion rate, ROI (return on investment), click-through rate, etc., for each different stage, reflecting the actual business revenue of each stage. Specifically, they can be calculated according to actual needs, and this example does not impose any special restrictions on this. Furthermore, the loss trend vector recorded above, the trend of the loss of each stage in the most recent k training cycles (that is, the historical stage loss of the user classification model to be trained in the historical model training stage), can be specifically calculated using the following formula (3):
[0079] ; Formula (3)
[0080] in, The loss trend in the i-th stage. The current stage loss is the loss of the i-th stage. The historical stage loss is the i-th stage.
[0081] In one example embodiment, a multidimensional feature input dataset is input into a dynamic weight generation network to predict the weights of the current stage loss, thereby obtaining the stage loss weights corresponding to the current stage loss. This can be achieved using the following formulas (4) and (5):
[0082] ; Formula (4)
[0083] ; Formula (5)
[0084] in, The predicted weight values for the i-th stage are as follows. Input the dataset with multidimensional features; as well as The weights and biases of the first fully connected layer are given. as well as The weights and biases of the second fully connected layer are defined by ReLU, which is the activation function (introducing non-linearity to allow the network to learn complex state-weight mappings); furthermore, Let be the stage loss weight for the i-th stage.
[0085] In step S140, a target loss function is constructed based on the stage loss weights and the current stage loss, and the user classification model to be trained is trained based on the target loss function to obtain the trained user classification model.
[0086] Specifically, the target loss function described here can be represented by the following formula (6):
[0087] ; Formula (6)
[0088] in, The target loss function, also known as the total loss function, is the sole optimization objective for joint training of the model. By weighted summing of the loss values at each stage with the dynamic weights generated by WeightNet, the goal is to "automatically tilt the loss weights towards stages with learning difficulties and low business value." In practical applications, stages with higher losses, worse KPIs, and more unfavorable trends correspond to... The larger the value, the higher its proportion in the total loss, and the model will prioritize optimizing the prediction bias at this stage during training.
[0089] Furthermore, during model training, backpropagation can be used. Backpropagation is a core training mechanism for deep learning models; it calculates the gradient of the total loss with respect to all network parameters and uses an optimizer to update the parameters along the gradient descent direction, achieving iterative learning of the model. Moreover, a key feature of the user classification model to be trained described in this example embodiment is joint backpropagation. The gradient of the total loss function is simultaneously propagated back to all trainable parameters in the feature sequence encoder (SeqEncoder), each stage prediction branch (i.e., the stage transformation probability predictor), and the dynamic weight generation network (WeightNet), allowing the three model layers to collaboratively optimize and adapt to each other during training, avoiding overall performance degradation caused by optimizing a single module.
[0090] Thus, the training method for the user classification model described in the exemplary embodiments of this disclosure has been fully implemented. Furthermore, the exemplary embodiments of this disclosure also provide a user classification method. Specifically, refer to... Figure 7 As shown, this user classification method may include the following steps:
[0091] Step S710: Obtain second user data of the user to be classified, and perform embedding mapping processing on the second user data to obtain a second user feature sequence; the second user feature sequence includes at least one of second user static features, second behavior time interval features, and second data channel features;
[0092] Step S720: Based on the feature sequence encoder in the trained user classification model, the second user feature sequence is encoded to obtain a second user vector containing the user behavior patterns of the user to be classified.
[0093] Step S730: Based on the stage conversion probability predictor in the trained user classification model, classify the second user vector to obtain the user intention prediction results of the user to be classified at different stages.
[0094] Step S740: Based on the dynamic weight generation network in the trained user classification model, predict the weights of the user intention prediction results at different stages to obtain the conversion rate weight values at different stages.
[0095] Step S750: The user intention prediction results and conversion rate weight values at different stages are weighted and summed to obtain the user comprehensive intention score, and the user to be classified is classified according to the user comprehensive intention score.
[0096] The following will further explain and illustrate the specific classification process. Specifically, the process for determining the user's overall intention score can be shown in the following formula (7):
[0097] ; Formula (7)
[0098] in, To calculate the user's overall intention score, These are the conversion rate weight values for different stages. The results of user intention prediction at different stages.
[0099] Thus, the methods described in the exemplary embodiments of this disclosure have been fully implemented. Based on the foregoing description, the methods described in the exemplary embodiments of this disclosure have at least the following advantages: Firstly, the model can automatically adjust the loss weights of each stage during multi-stage behavior prediction training based on real-time loss, business indicators, and trend changes, eliminating the need for manual experience to set fixed weight parameters; secondly, the close integration of the loss optimization process with actual business KPIs (such as ROI and conversion revenue at each stage) makes the model training objectives more consistent with business results, and the final prediction results are more aligned with business objectives; thirdly, the automatic weight generation mechanism can be used in conjunction with traditional deep learning machines (such as LSTM, Transformer, etc.), thereby significantly improving the model's ability to express multi-stage nonlinear complex relationships and enhancing prediction accuracy and generalization performance.
[0100] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein.
[0101] This disclosure also provides an example embodiment of a training apparatus for a user classification model. Specifically, refer to... Figure 8 As shown, the training device for the user classification model may include a first user vector determination module 810, a current stage loss determination module 820, a stage loss weight determination module 830, and a user classification model training module 840.
[0102] The first user vector determination module 810 can be used to encode the first user feature sequence of the classified users based on the feature sequence encoder in the user classification model to be trained, to obtain a first user vector containing the user behavior patterns of the classified users; the current stage loss determination module 820 can be used to classify the first user vector based on the stage transition probability predictor in the user classification model to be trained, to obtain the current stage loss of the classified users in different stages; the stage loss weight determination module 830 can be used to predict the weight of the current stage loss based on the dynamic weight generation network in the user classification model to be trained, to obtain the stage loss weight in different stages; the user classification model training module 840 can be used to construct a target loss function based on the stage loss weight and the current stage loss, and train the user classification model to be trained based on the target loss function to obtain the trained user classification model.
[0103] In one exemplary embodiment of this disclosure, encoding a first user feature sequence of classified users to obtain a first user vector containing the user behavior patterns of the classified users includes: acquiring first user data of the classified users; wherein the first user data includes first user behavior data and first user attribute data; the first user behavior data includes the behavior data of the classified users at different stages; performing embedding mapping processing on the first user behavior data and the first user attribute data to obtain a first user feature sequence; the first user feature sequence includes at least one of a first stage sequence feature, a first user static feature, a first behavior time interval feature, and a first data channel feature; and encoding the first user feature sequence of the classified users based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users.
[0104] In an exemplary embodiment of this disclosure, the feature sequence encoder is an attention-based encoder; wherein, encoding a first user feature sequence of classified users based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users includes: encoding the first user feature sequence based on a first position encoding module to obtain a first position vector, and superimposing the first user feature sequence and the first position vector to obtain a first input feature vector; encoding the first input feature vector based on a first rotation feature encoding module to obtain a first encoding result, and decoding the first encoding result based on a first feature decoding module to obtain a first encoding matrix; transforming the first encoding matrix based on a first linear transformation layer to obtain a first logical matrix, and mapping the first logical matrix based on a first classification layer to obtain the first user vector containing the user behavior patterns of the classified users.
[0105] In one exemplary embodiment of this disclosure, encoding a first input feature vector based on a first rotation feature encoding module to obtain a first encoding result includes: calculating a first attention mechanism for the first input feature vector based on a first multi-head self-attention module, and performing residual connection and normalization processing on the first attention mechanism based on a first residual connection and normalization module to obtain a first normalization processing result; performing linearization processing on the first normalization processing result based on a first feedforward neural network to obtain a first linearization processing result, and performing residual connection and normalization processing on the first linearization processing result based on a second residual connection and normalization module to obtain the first encoding result.
[0106] In an exemplary embodiment of this disclosure, a first attention mechanism based on a first multi-head self-attention module to calculate the first input vector includes: linearly fusing the first input feature vector to obtain a first query vector, a first key vector, and a first value vector; adjusting the relative angles of the first query vector and the first key vector based on a preset first rotation matrix to obtain an adjusted first query vector and an adjusted first key vector; calculating a first outer product vector of the adjusted first query vector and the adjusted first key vector to obtain a first similarity between the adjusted first query vector and the adjusted first key vector; normalizing the first similarity to obtain a first weight matrix; and calculating a second outer product vector of the first weight matrix and the first value vector to obtain the first attention mechanism; wherein the first attention mechanism is used to interact with user behavior at different stages.
[0107] In one exemplary embodiment of this disclosure, the feature sequence encoder is a time-series feature-based encoder; wherein, encoding a first user feature sequence of classified users based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users includes: performing a linear transformation on the first user feature sequence of the classified users to obtain a transformed feature sequence, and traversing the transformed feature sequence based on a preset time step to extract features from the transformed feature sequence to obtain a first user vector containing the user behavior patterns of the classified users.
[0108] In one exemplary embodiment of this disclosure, classifying the first user vector to obtain the current stage loss of the classified user at different stages includes: classifying the first user vector to obtain the conversion probability prediction value of the classified user at different stages; constructing a stage loss function for different stages based on the conversion probability prediction value and the actual conversion probability of the classified user at different stages; and determining the current stage loss based on the stage loss function.
[0109] In one exemplary embodiment of this disclosure, classifying a first user vector to obtain predicted conversion probabilities for the classified user at different stages includes: classifying the first user vector based on a first-stage conversion probability predictor to obtain a first-stage conversion probability for the classified user in the outbound call stage; classifying the first user vector based on a second-stage conversion probability predictor to obtain a second-stage conversion probability for the classified user in the call answering stage; classifying the first user vector based on a third-stage conversion probability predictor to obtain a third-stage conversion probability for the classified user in the SMS receiving stage; classifying the first user vector based on a fourth-stage conversion probability predictor to obtain a fourth-stage conversion probability for the classified user in the SMS viewing stage; classifying the first user vector based on a fifth-stage conversion probability predictor to obtain a fifth-stage conversion probability for the classified user in the information confirmation stage; and classifying the first user vector based on a sixth-stage conversion probability predictor to obtain a sixth-stage conversion probability for the classified user in the product payment stage.
[0110] In one exemplary embodiment of this disclosure, predicting the weights of the current stage loss to obtain stage loss weights corresponding to the current stage loss includes: determining real-time business metrics of the classified users at different stages based on the first user data of the classified users; determining loss trend vectors at different stages based on the current stage loss and the historical stage loss of the user classification model to be trained during the historical model training stage; constructing multi-dimensional feature input datasets at different stages based on the current stage loss, real-time business metrics, and loss trend vectors; and inputting the multi-dimensional feature input datasets into the dynamic weight generation network to predict the weights of the current stage loss to obtain stage loss weights corresponding to the current stage loss.
[0111] This disclosure also provides a user classification device through exemplary embodiments. Specifically, refer to... Figure 9As shown, the user classification device may include a second user feature sequence determination module 910, a second user vector determination module 920, a user intention prediction result determination module 930, a conversion rate weight value determination module 940, and a user classification module 950.
[0112] The second user feature sequence determination module 910 can be used to acquire second user data of the user to be classified, and perform embedding mapping processing on the second user data to obtain a second user feature sequence; the second user feature sequence includes at least one of second user static features, second behavior time interval features, and second data channel features; the second user vector determination module 920 can be used to encode the second user feature sequence based on the feature sequence encoder in the trained user classification model to obtain a second user vector containing the user behavior patterns of the user to be classified; the user intention prediction result determination module 930 can be used to determine the user intention prediction result based on the training model. The stage conversion probability predictor in the completed user classification model classifies the second user vector to obtain the user intention prediction results of the user to be classified at different stages; the conversion rate weight value determination module 940 can be used to predict the weights of the user intention prediction results at different stages based on the dynamic weight generation network in the trained user classification model to obtain the conversion rate weight values at different stages; the user classification module 950 can be used to perform weighted summation of the user intention prediction results at different stages and the conversion rate weight values to obtain the user comprehensive intention score, and classify the user to be classified according to the user comprehensive intention score.
[0113] The training device for the aforementioned user classification model and the specific details of each module within the user classification device have been described in detail in the corresponding user classification model training method and user classification method, so they will not be repeated here.
[0114] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0115] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0116] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.
[0117] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0118] The following reference Figure 10 To describe an electronic device 1000 according to such an embodiment of the present disclosure. Figure 10 The electronic device 1000 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0119] like Figure 10 As shown, the electronic device 1000 is manifested in the form of a general-purpose computing device. The components of the electronic device 1000 may include, but are not limited to: at least one processing unit 1010, at least one storage unit 1020, a bus 1030 connecting different system components (including storage unit 1020 and processing unit 1010), and a display unit 1040.
[0120] The storage unit stores program code that can be executed by the processing unit 1010, causing the processing unit 1010 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 1010 can perform actions such as... Figure 1 Step S110: Based on the feature sequence encoder in the user classification model to be trained, the first user feature sequence of the classified users is encoded to obtain a first user vector containing the user behavior patterns of the classified users; Step S120: Based on the stage conversion probability predictor in the user classification model to be trained, the first user vector is classified to obtain the current stage loss of the classified users in different stages; Step S130: Based on the dynamic weight generation network in the user classification model to be trained, the weights of the current stage loss are predicted to obtain the stage loss weights in different stages; Step S140: Based on the stage loss weights and the current stage loss, a target loss function is constructed, and the user classification model to be trained is trained based on the target loss function to obtain the trained user classification model.
[0121] For example, the processing unit 1010 can perform actions such as Figure 7Step S710: Obtain second user data of the user to be classified, and perform embedding mapping processing on the second user data to obtain a second user feature sequence; the second user feature sequence includes at least one of second user static features, second behavior time interval features, and second data channel features; Step S720: Encode the second user feature sequence based on the feature sequence encoder in the trained user classification model to obtain a second user vector containing the user behavior patterns of the user to be classified; Step S730: Classify the second user vector based on the stage conversion probability predictor in the trained user classification model to obtain the user intention prediction results of the user to be classified at different stages; Step S740: Predict the weights of the user intention prediction results at different stages based on the dynamic weight generation network in the trained user classification model to obtain the conversion rate weight values at different stages; Step S750: Weight and sum the user intention prediction results and conversion rate weight values at different stages to obtain a comprehensive user intention score, and classify the user to be classified according to the comprehensive user intention score.
[0122] Storage unit 1020 may include readable media in the form of volatile storage units, such as random access memory (RAM) 10201 and / or cache memory 10202, and may further include read-only memory (ROM) 10203.
[0123] Storage unit 1020 may also include a program / utility 10204 having a set (at least one) program module 10205, such program module 10205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0124] Bus 1030 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.
[0125] Electronic device 1000 can also communicate with one or more external devices 1100 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1000, and / or any device that enables electronic device 1000 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1050. Furthermore, electronic device 1000 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1060. As shown, network adapter 1060 communicates with other modules of electronic device 1000 via bus 1030. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0126] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0127] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of this disclosure described in the "Exemplary Methods" section above.
[0128] The program product for implementing the above-described method according to embodiments of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0129] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0130] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0131] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0132] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0133] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0134] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention described herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not invented by this disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A method for training a user classification model, characterized in that, include: Based on the feature sequence encoder in the user classification model to be trained, the first user feature sequence of the classified users is encoded to obtain the first user vector containing the user behavior pattern of the classified users. The first user vector is classified based on the stage transition probability predictor in the user classification model to be trained, and the current stage loss of the classified user under different stages is obtained. The dynamic weight generation network in the user classification model to be trained predicts the weight of the loss in the current stage, and obtains the stage loss weights under different stages. A target loss function is constructed based on the stage loss weights and the current stage loss, and the user classification model to be trained is trained based on the target loss function to obtain the trained user classification model.
2. The training method for the user classification model according to claim 1, characterized in that, Encoding the first user feature sequence of the classified users yields a first user vector containing the user behavior patterns of the classified users, including: Obtain first user data of categorized users; wherein, the first user data includes first user behavior data and first user attribute data; the first user behavior data includes the behavior data of the categorized users at different stages; The first user behavior data and the first user attribute data are embedded and mapped to obtain a first user feature sequence; the first user feature sequence includes at least one of a first stage sequence feature, a first user static feature, a first behavior time interval feature, and a first data channel feature. The first user feature sequence of the classified users is encoded based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users.
3. The training method for the user classification model according to claim 2, characterized in that, The feature sequence encoder is an attention-based encoder; Specifically, the first user feature sequence of the classified users is encoded based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users, including: The first user feature sequence is encoded using the first position encoding module to obtain the first position vector, and the first user feature sequence and the first position vector are superimposed to obtain the first input feature vector. The first input feature vector is encoded using the first rotation feature encoding module to obtain the first encoding result, and the first encoding result is decoded using the first feature decoding module to obtain the first encoding matrix. The first encoding matrix is transformed by the first linear transformation layer to obtain the first logical matrix, and the first logical matrix is mapped by the first classification layer to obtain the first user vector containing the user behavior patterns of the classified users.
4. The training method for the user classification model according to claim 3, characterized in that, The first encoding result is obtained by encoding the first input feature vector based on the first rotation feature encoding module, including: The first attention mechanism is calculated based on the first multi-head self-attention module, and the first attention mechanism is subjected to residual connection and normalization processing based on the first residual connection and normalization module to obtain the first normalization processing result. The first normalization result is linearized based on the first feedforward neural network to obtain the first linearized result. The first linearized result is then subjected to residual connection and normalization based on the second residual connection and normalization module to obtain the first encoding result.
5. The training method for the user classification model according to claim 4, characterized in that, The first attention mechanism, which calculates the first input vector based on the first multi-head self-attention module, includes: The first input feature vector is linearly fused to obtain a first query vector, a first key vector, and a first value vector. The relative angles of the first query vector and the first key vector are adjusted based on a preset first rotation matrix to obtain an adjusted first query vector and an adjusted first key vector. Calculate the first outer product vector of the adjusted first query vector and the adjusted first key vector to obtain the first similarity between the adjusted first query vector and the adjusted first key vector; The first similarity is normalized to obtain a first weight matrix, and the second outer product vector of the first weight matrix and the first value vector is calculated to obtain the first attention mechanism; wherein, the first attention mechanism is used to interact with user behavior at different stages.
6. The training method for the user classification model according to claim 2, characterized in that, The feature sequence encoder is a temporal feature-based encoder; Specifically, the first user feature sequence of the classified users is encoded based on the feature sequence encoder to obtain a first user vector containing the user behavior patterns of the classified users, including: A linear transformation is performed on the first user feature sequence of the classified users to obtain a transformed feature sequence. The transformed feature sequence is then traversed based on a preset time step to extract features from the transformed feature sequence, thereby obtaining a first user vector containing the user behavior patterns of the classified users.
7. The training method for the user classification model according to claim 1, characterized in that, The first user vector is classified to obtain the current stage loss of the classified user at different stages, including: The first user vector is classified to obtain the predicted conversion probability values of the classified users at different stages. Based on the predicted conversion probability and the actual conversion probability of the classified users at different stages, a stage loss function is constructed for each stage, and the current stage loss is determined based on the stage loss function.
8. The training method for the user classification model according to claim 7, characterized in that, The first user vector is classified to obtain the predicted conversion probability values of the classified users at different stages, including: The first user vector is classified based on the first-stage conversion probability predictor to obtain the first-stage conversion probability of the classified user in the outbound call stage. The first user vector is classified based on the second-stage conversion probability predictor to obtain the second-stage conversion probability of the classified user in the telephone answering stage. The first user vector is classified based on the third-stage conversion probability predictor to obtain the third-stage conversion probability of the classified user in the SMS receiving stage. The first user vector is classified based on the fourth-stage conversion probability predictor to obtain the fourth-stage conversion probability of the classified user in the SMS viewing stage. The first user vector is classified based on the fifth-stage conversion probability predictor to obtain the fifth-stage conversion probability of the classified user in the information confirmation stage. The first user vector is classified based on the sixth-stage conversion probability predictor to obtain the sixth-stage conversion probability of the classified user in the product payment stage.
9. The training method for the user classification model according to claim 1, characterized in that, The weights of the current stage loss are predicted to obtain the stage loss weights corresponding to the current stage loss, including: Based on the first user data of the classified users, determine the real-time business indicators of the classified users at different stages; Based on the current stage loss and the historical stage loss of the user classification model to be trained in the historical model training stage, determine the loss trend vector under different stages; Based on the current stage loss, real-time business metrics, and loss trend vector, construct a multi-dimensional feature input dataset for different stages; The multidimensional feature input dataset is input into the dynamic weight generation network to predict the weights of the current stage loss, thereby obtaining the stage loss weights corresponding to the current stage loss.
10. A user classification method, characterized in that, include: Second user data of users to be classified is obtained, and the second user data is embedded and mapped to obtain a second user feature sequence; the second user feature sequence includes at least one of second user static features, second behavior time interval features, and second data channel features; Based on the feature sequence encoder in the trained user classification model, the second user feature sequence is encoded to obtain a second user vector containing the user behavior patterns of the user to be classified. The second user vector is classified based on the stage conversion probability predictor in the trained user classification model to obtain the user intention prediction results of the user to be classified at different stages. The dynamic weight generation network in the trained user classification model predicts the weights of the user intention prediction results at different stages, and obtains the conversion rate weight values at different stages. The user intention prediction results and conversion rate weight values at different stages are weighted and summed to obtain the user comprehensive intention score, and the user to be classified is classified according to the user comprehensive intention score.
11. A training device for a user classification model, characterized in that, include: The first user vector determination module is used to encode the first user feature sequence of the classified users based on the feature sequence encoder in the user classification model to be trained, so as to obtain a first user vector containing the user behavior pattern of the classified users. The current stage loss determination module is used to classify the first user vector based on the stage transition probability predictor in the user classification model to be trained, and to obtain the current stage loss of the classified user in different stages. The stage loss weight determination module is used to predict the weight of the current stage loss based on the dynamic weight generation network in the user classification model to be trained, so as to obtain the stage loss weight under different stages. The user classification model training module is used to construct a target loss function based on the stage loss weights and the current stage loss, and to train the user classification model to be trained based on the target loss function to obtain the trained user classification model.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the training method of the user classification model according to any one of claims 1-9, and the user classification method according to claim 10.
13. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the training method of the user classification model according to any one of claims 1-9, and the user classification method according to claim 10, by executing the executable instructions.