Method and system for intelligently predicting complaint risk of user

By acquiring user event logs and generating serialized sentences, and using the Transformer model for risk label prediction, the problem of existing technologies being unable to understand the combination of text semantics and behavioral data is solved, achieving higher accuracy and robustness in complaint risk prediction.

CN121638880APending Publication Date: 2026-03-10BEIJING TEDDY MOBILE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511709807.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies, when predicting user complaint risks, cannot deeply understand the semantics of unstructured text, nor can they effectively combine text semantics with users' structured behavioral data, resulting in insufficient accuracy and interpretability of the prediction model.

Method used

By acquiring multiple event logs from users, converting them into discrete levels and generating tokens for discrete events, these tokens are aggregated based on the user's unique identifier to form a serialized sentence of the complete behavioral trajectory, and a pre-trained Transformer model is used to predict risk labels, including whether there is a complaint or not.

Benefits of technology

It improves the accuracy of predicting user complaint risks, captures the temporal dynamics and automated interactive features of user behavior, and significantly enhances the accuracy and robustness of risk prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121638880A_ABST
    Figure CN121638880A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for intelligently predicting the complaint risk of a user, and the method comprises the steps: obtaining a plurality of event logs related to a to-be-subjected-risk prediction user, and the event logs comprise continuous numerical value feature data, classification feature data and event occurrence time information; converting the continuous numerical value features into a preset discrete grade; combining the discrete grade with the classification feature data to generate a Token of a discrete event; aggregating Tokens of all discrete events on the basis of the unique identifier of the user, and splicing the Tokens of the discrete events on the basis of the occurrence time information of the events to obtain a serialized sentence of a complete behavior trajectory of the user to be subjected to risk prediction in a specific time period; the serialized sentences are input into a pre-trained Transform model, a risk label corresponding to a user to be predicted is output, and the risk label comprises complaint or non-complaint. The technical problem that the risk prediction accuracy is limited by effectively utilizing time sequence information in a user behavior sequence is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information processing technology, and specifically to a method and system for intelligently predicting user complaint risks. Background Technology

[0002] In industries such as call centers, finance, and e-commerce, predicting and proactively intervening in potential customer complaints is crucial for reducing customer churn and improving service quality. Currently, identifying high-risk complainants primarily relies on the following technologies, but all have significant shortcomings: 1. Keyword-based text analysis: Identify risks by statistically analyzing negative keywords such as "complaint," "spam," and "problem" that appear in recorded call transcripts (ASR) or text messages.

[0003] This method fails to understand contextual semantics. For example, it cannot distinguish whether a user is complaining "your product is garbage" or saying "finally, I don't have to get spam calls anymore." Its ability to understand synonyms, irony, and colloquial expressions is almost zero, resulting in low accuracy and a high false positive rate.

[0004] 2. Machine Learning Based on Structured Behavioral Data: This approach analyzes user behavior logs, such as call frequency, call duration, and number of call blockings, and uses traditional machine learning models like XGBoost and decision trees for prediction. However, this method completely ignores the true intentions and emotions expressed by users during calls or text messages. For example, a frequent caller might be a loyal user seeking help, or an angry user repeatedly calling because their problem isn't being resolved. Behavioral data cannot distinguish between these two scenarios.

[0005] 3. Isolated General Sentiment Analysis: This involves performing a simple sentiment analysis (positive / negative) on the call text alone and using it as a risk factor. Without considering the user's behavioral context, the value of sentiment information is limited. A user with multiple blocked records, even if exhibiting neutral sentiment during a call, faces a significantly higher risk of being reported than a user with normal behavior.

[0006] In summary, the relevant technologies either fail to deeply understand the semantics of unstructured text or fail to effectively combine text semantics with users' structured behavioral data, resulting in room for improvement in the accuracy and interpretability of the prediction models. Summary of the Invention

[0007] The main objective of this invention is to provide a method and system for intelligently predicting user complaint risks, in order to address the shortcomings of related technologies.

[0008] To achieve the above objectives, according to a first aspect of the present invention, a method for intelligently predicting user complaint risks is provided, comprising: acquiring multiple event logs associated with a user to be risk-predicted, the event logs including continuous numerical feature data, categorical feature data, and event occurrence time information; converting the continuous numerical features into preset discrete levels; combining the discrete levels with the categorical feature data to generate discrete event tokens; aggregating all discrete event tokens based on the user's unique identifier, and concatenating the discrete event tokens based on the event occurrence time information to obtain a serialized sentence of the complete behavioral trajectory of the user to be risk-predicted within a specific time period; inputting the serialized sentence into a pre-trained Transformer model, and outputting a risk label corresponding to the user to be predicted, wherein the risk label includes either a complaint or no complaint.

[0009] Optionally, the Transformer model includes: a model configuration layer providing parameters, wherein a DistilBertConfig configuration file is created based on a custom vocabulary; the vocab_size parameter in the configuration file has a value equal to the total number of tokens in the custom vocabulary; the maximum sequence input length parameter is determined based on training samples; a word embedding layer serving as the model's input transformation module, the size of which is directly determined by the vocab_size parameter of the model configuration layer, used to convert each action token in the serialized sentence into a unique corresponding vector representation; a multi-layer Transformer encoder for feature extraction, obtaining the token vector sequence output by the word embedding layer, wherein the number of layers in the Transformer encoder is defined by the DistilBertConfig configuration file; this encoder captures the global association features of different action tokens in the token vector sequence through a built-in self-attention mechanism; and a classifier for output prediction, obtaining the output of the multi-layer Transformer encoder and mapping the features output by the encoder to risk prediction results.

[0010] Optionally, the method for training the Transformer model includes: dynamically adjusting the model parameters of the Transformer model based on the current custom vocabulary, wherein the value of the vocab_size parameter in the configuration file is set to the total number of tokens in the current custom vocabulary; adjusting the maximum sequence input length parameter in the configuration file according to the length distribution of serialized sentences in the training samples; initializing the parameters of the Transformer model based on the configuration file; training the Transformer model using serialized sentences generated from the training samples as input and corresponding risk labels as output, wherein the loss function is determined based on the ratio of positive samples to negative samples in the training samples.

[0011] Optionally, when determining the loss function based on the ratio of positive to negative samples in the training samples, the weights of positive and negative samples are determined based on the ratio of positive to negative samples; the weights of positive and negative samples are substituted into the cross-entropy loss function so that the model assigns a higher penalty weight to the prediction error of positive samples with fewer samples during the training process.

[0012] Optionally, when training the Transformer model, after the sequential sentences generated based on the training samples are converted into token vector sequences through a word embedding layer, features are extracted through a multi-layer Transformer encoder. The encoder automatically captures the global correlation features between different behavior tokens through a self-attention mechanism. The global behavior features output by the multi-layer Transformer encoder are fed into the classifier, which maps the features to the probability prediction results of complaint or no complaint. The error between the prediction results and the true risk labels is calculated through a weighted cross-entropy loss function. Then, all parameters of the Transformer encoder and the classifier are updated through a backpropagation algorithm. The training is iterated repeatedly until the loss function value converges, thus completing the model training.

[0013] Optionally, when defining the custom vocabulary, the method includes: traversing all user event log samples and extracting discrete event tokens from the behavior logs; supplementing the extracted discrete event tokens with preset tokens; performing uniqueness verification on the tokens after supplementing with preset tokens and deleting duplicate tokens.

[0014] According to a second aspect of the present invention, a system for intelligently predicting user complaint risks is provided, comprising: an event log acquisition unit, configured to acquire multiple event logs associated with a user to be risk-predicted, the event logs including continuous numerical feature data, categorical feature data, and event occurrence time information; a processing unit, configured to convert the continuous numerical features into preset discrete levels; and combine the discrete levels with the categorical feature data to generate a token for a discrete event; aggregate all the tokens for discrete events based on the user's unique identifier, and concatenate the tokens for discrete events based on the event occurrence time information to obtain a serialized sentence of the complete behavioral trajectory of the user to be risk-predicted within a specific time period; and a prediction unit, configured to input the serialized sentence into a pre-trained Transformer model and output a risk label corresponding to the user to be predicted, wherein the risk label includes a complaint or no complaint.

[0015] According to a third aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing the computer to perform the method described in any one of the first aspects.

[0016] According to a fourth aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the at least one processor to perform the method described in any implementation of the first aspect.

[0017] This embodiment presents a method and system for intelligently predicting user complaint risks. The method includes acquiring multiple event logs associated with the user to be risk-predicted. The event logs include continuous numerical feature data, categorical feature data, and event occurrence time information. The continuous numerical features are converted into preset discrete levels. The discrete levels are combined with the categorical feature data to generate discrete event tokens. All discrete event tokens are aggregated based on the user's unique identifier, and the tokens are concatenated based on the event occurrence time information to obtain a serialized sentence representing the complete behavioral trajectory of the user to be risk-predicted within a specific time period. The serialized sentence is input into a pre-trained Transformer model, which outputs a risk label corresponding to the user to be predicted, where the risk label includes either a complaint or no complaint. Effectively utilizing the temporal information in the user's behavioral sequence helps improve the accuracy of risk prediction. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is a flowchart of the method for intelligently predicting user complaint risks according to an embodiment of the present invention; Figure 2 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of the invention described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0022] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0023] According to embodiments of the present invention, a method for intelligently predicting user complaint risks is provided, such as... Figure 1 As shown, steps 101 to 103 are included below: Step 101: Obtain multiple event logs associated with the user to be risk predicted. The event logs include continuous numerical feature data, categorical feature data, and event occurrence time information.

[0024] In this step, multiple event logs associated with the user to be predicted are obtained. These event logs include call behavior data recorded by the user on platforms such as voice lines / call centers, and SMS uplink and downlink data. By tokenizing user behavior, a behavior sequence can be constructed. Behavioral data includes call logs, transaction records, and app click streams. Each event log contains continuous numerical features, categorical features, and the time information of the event occurrence.

[0025] Continuous numerical characteristics refer to features that take continuous real numbers, can be obtained through quantitative measurement, and have a clear size or numerical order relationship between different values. Their value range can cover any value within a certain interval and can accurately reflect the degree, magnitude, or scale difference of things.

[0026] Categorical features are features that take discrete category labels, have no continuous numerical meaning, and are only used to distinguish different attributes or states of things. Their value range is a finite number of fixed categories, and the categories are independent of each other and there is no numerical size or order relationship between them.

[0027] For example, call risk score and transaction amount are continuous numerical features; whether a call is blocked is a categorical feature.

[0028] Step 102: Convert the continuous numerical features into preset discrete levels; combine the discrete levels with the classification feature data to generate a token for discrete events; aggregate all tokens for discrete events based on the user's unique identifier, and concatenate the tokens for discrete events based on the time information of the events to obtain a serialized sentence of the complete behavioral trajectory of the user to be risk-predicted within a specific time period.

[0029] In this step, each record in the event log is processed as follows: First, the continuous numerical features are converted into preset discrete levels (such as SCORE_LOW, SCORE_MID, SCORE_HIGH) through bucketing. Then, the discrete level is combined with classification features (such as VOLLEY_T / VOLLEY_F corresponding to whether the call was intercepted) to generate a unique discrete event token. All generated discrete event tokens are aggregated according to the user's user ID, and the discrete event tokens are arranged strictly according to the order of events determined by the time information corresponding to each event log. Finally, spaces are concatenated to form a serialized sentence representing the complete behavioral trajectory of the user within a specific time period.

[0030] Step 103: Input the serialized sentence into the pre-trained Transformer model and output the risk label corresponding to the user to be predicted, wherein the risk label includes complaint or no complaint.

[0031] In this step, a pre-trained neural network model based on the Transformer architecture is loaded, and risk labels are output, such as 1 - complaint and 0 - no complaint.

[0032] As an optional implementation of this embodiment, the Transformer model includes a model configuration layer that provides parameters, wherein a DistilBertConfig configuration file is created based on a custom vocabulary; the vocab_size parameter in the configuration file has a value equal to the total number of tokens in the custom vocabulary; the maximum sequence input length parameter is determined based on training samples; the word embedding layer, which serves as the input transformation module of the model, has its internal weight matrix size directly determined by the vocab_size parameter of the model configuration layer, and is used to convert each action token in the serialized sentence into a unique corresponding vector representation; a multi-layer Transformer encoder for feature extraction obtains the token vector sequence output by the word embedding layer, wherein the number of layers of the Transformer encoder is defined by the DistilBertConfig configuration file; this encoder captures the global association features of different action tokens in the token vector sequence through a built-in self-attention mechanism; and a classifier for output prediction obtains the output of the multi-layer Transformer encoder and maps the features output by the encoder to risk prediction results.

[0033] In this optional implementation, the neural network model based on the Transformer architecture adopts a serial structure of model configuration layer - word embedding layer - multi-layer Transformer encoder - classifier. There are clear parameter adaptation and data flow relationships between each module. The specific structural configuration includes: Model configuration layer: As the parameter basis for the model structure, a DistilBertConfig configuration file is created based on a custom vocabulary (containing all unique behavior tokens and special tokens such as [PAD], [UNK], etc.). The value of the vocab_size parameter in this configuration file is exactly equal to the total number of tokens in the custom vocabulary. At the same time, the maximum sequence input length parameter is adjusted according to the distribution of serialized sentence lengths, providing a parameter basis for the structural adaptation of the subsequent word embedding layer and encoder.

[0034] Word embedding layer: As the input transformation module of the model, the size of its internal weight matrix (N×D, where N is vocab_size and D is the vector dimension) is directly determined by the vocab_size parameter of the model configuration layer. It is used to convert each behavior token in the generated serialized sentence into a unique corresponding vector representation. This vector representation is only adapted to the exclusive behavior token features and is not interfered with by external natural language pre-training knowledge.

[0035] Multi-layer Transformer Encoder: As the core feature extraction module of the model, its structural parameters such as the number of layers and the number of attention heads are defined collaboratively by the DistilBertConfig configuration file, and its input directly receives the token vector sequence output by the word embedding layer; through the built-in self-attention mechanism, this encoder captures the global association features of different behavior tokens in the token vector sequence (such as temporal dependence, risk-related behavior combinations), realizing in-depth feature mining of user behavior sequences.

[0036] Classifier: As the output prediction module of the model, its input is directly connected to the output of the multi-layer Transformer encoder, receiving the global behavioral features extracted by the encoder; the output dimension of the classifier matches the number of categories of the user risk label (complaint 1 / no complaint 0), and is used to map the features output by the encoder to the risk prediction result, ultimately forming a complete data flow link of behavior token-vector transformation-feature extraction-risk classification.

[0037] Furthermore, the dependency between the encoder and the model configuration layer is defined by the number of stacked layers of the multi-layer Transformer encoder and the dimension of the hidden layer of each layer, which are defined by the num_hidden_layers and hidden_size parameters in the DistilBertConfig configuration file. This ensures that the encoder's feature extraction capability is adapted to the behavioral complexity of the serialized sentence (such as the number of tokens and the density of behavioral associations).

[0038] The data flow relationship between the encoder and the word embedding layer is that the length of the input sequence of the encoder is strictly matched with the length of the output sequence of the word embedding layer, while the length of the output sequence of the word embedding layer is constrained by the maximum sequence input length parameter of the model configuration layer. Together, these three factors ensure that the generated serialized sentence can be completely input into the encoder without feature truncation or redundancy.

[0039] The integration of the encoder and the attention mechanism is that the encoder directly captures the associated features of the behavior token sequence through the built-in self-attention sub-layer in each layer. That is, by calculating the attention weight between different token vectors, it prioritizes the tokens corresponding to high-risk associated behaviors (such as tokens like "VOLLEY_T-SCORE_HIGH"). The attention calculation results are directly used as the input of the subsequent feedforward neural network sub-layers. Finally, the feature extraction depth is enhanced through multi-layer stacking, providing core support for the classifier to output accurate risk prediction results.

[0040] As an optional implementation of this embodiment, the method for training the Transformer model includes: dynamically adjusting the model parameters of the Transformer model based on the current custom vocabulary, wherein the value of the vocab_size parameter in the configuration file is set to the total number of tokens in the current custom vocabulary; adjusting the maximum sequence input length parameter in the configuration file according to the length distribution of serialized sentences in the training samples; initializing the parameters of the Transformer model based on the configuration file; training the Transformer model using serialized sentences generated from the training samples as input and corresponding risk labels as output, wherein the loss function is determined based on the ratio of positive samples to negative samples in the training samples.

[0041] As an optional implementation in this embodiment, when training the Transformer model, after the serialized sentences generated based on the training samples are converted into token vector sequences through a word embedding layer, features are extracted through a multi-layer Transformer encoder. The encoder automatically captures the global correlation features between different behavior tokens through a self-attention mechanism. The global behavior features output by the multi-layer Transformer encoder are fed into the classifier, which maps the features to the probability prediction results of complaint or no complaint. The error between the prediction result and the true risk label is calculated through a weighted cross-entropy loss function. Then, all parameters of the Transformer encoder and the classifier are updated through a backpropagation algorithm. The training is iterated repeatedly until the loss function value converges, thus completing the model training.

[0042] In this optional implementation, a custom vocabulary is constructed before training. For example, a custom vocabulary is constructed based on all unique discrete event tokens (such as VOLLEY_T-SCORE_HIGH) and special tokens ([PAD], [UNK]) generated from user behavior logs. The total number of tokens in the custom vocabulary is counted, and the distribution of serialized sentence lengths after the behavior sequence is converted is analyzed. This provides a core basis for subsequent model parameter configuration, ensuring that the model can adapt to the features of the specific behavior tokens, rather than relying on general vocabulary in the natural language domain.

[0043] Model initialization involves building a completely new model without pre-trained weights, without loading any pre-trained weights from external natural language corpora. The specific steps are as follows: Create a model configuration file (using DistilBertConfig), and precisely set the value of the vocab_size parameter in the configuration file to the total number of tokens in the custom vocabulary. This ensures that the input dimension of the word embedding layer matches the size of the vocabulary, guaranteeing that each action token has a unique corresponding vector in the word embedding layer.

[0044] Synchronously adjust the maximum sequence input length parameter in the configuration file according to the length distribution of the serialized sentences to avoid truncation or redundancy of behavioral features due to sequence length mismatch during subsequent training; based on the above configuration file, randomly initialize the parameters of the Transformer model so that the parameters of all modules of the model, such as word embedding layer, attention layer, and feedforward layer, are adapted from zero to the feature learning of the exclusive behavioral token, without interference from external domain knowledge.

[0045] The training data preprocessing generates a labeled training sample set. The serialized sentences generated based on a single user behavior (composed of behavior tokens in chronological order) are associated with the risk tags ("complaint (1)" or "no complaint (0)") corresponding to the user to form a training dataset. At the same time, the ratio of positive complaint samples to negative non-complaint samples in the training dataset is counted (to provide a data basis for solving class imbalance). For example, if the ratio of positive to negative samples is 1:50, the ratio is recorded for subsequent loss function design.

[0046] The calculated weights are substituted into the cross-entropy loss function, so that the model assigns a higher penalty weight to the prediction error of positive complaint samples with fewer samples during the training process. This avoids the model from tending to predict no complaints due to the high proportion of negative samples, and ensures that the model can focus on learning the characteristics of high-risk users.

[0047] During end-to-end training, feature learning and parameter optimization based on the Transformer architecture are performed using a multi-layer Transformer encoder + classifier model structure. This includes inputting serialized sentences into the model, which are then converted into a token vector sequence via a word embedding layer (the vector dimension is defined by the model configuration file, e.g., 768 dimensions). The token vector sequence is then input into a multi-layer Transformer encoder (using the Transformer encoder's attention mechanism). The encoder automatically captures global correlation features between different behavioral tokens (e.g., the combination of "high-risk call token + large transaction token") through a self-attention mechanism, reducing manual feature engineering by eliminating the need for manually designed cross-features. The global behavioral features output by the encoder are fed into the classifier, which maps the features to a probability prediction of complaint or no complaint. The error between the predicted result and the true risk label is calculated using a weighted cross-entropy loss function. The backpropagation algorithm is then used to update all parameters of the Transformer encoder's attention layer, feedforward layer, and classifier. This iterative training continues until the loss function converges, completing the model training.

[0048] If new user behavior data is added (generating new serialized sentences and risk labels), the updated positive and negative sample ratios are re-executed, and the loss weights are adjusted. At the same time, it is checked whether the length of the new serialized sentence exceeds the original maximum sequence input length. If it does, the parameter in the model configuration file is updated, and the model is incrementally trained based on the updated configuration and weights to ensure that the model always adapts to the latest behavioral data features and sample distribution.

[0049] As an optional implementation of this embodiment, when determining the loss function based on the ratio of positive to negative samples in the training samples, the weights of positive and negative samples are determined based on the ratio of positive to negative samples; the weights of positive and negative samples are substituted into the cross-entropy loss function so that the model assigns a higher penalty weight to the prediction error of positive samples with fewer samples during the training process.

[0050] In this optional implementation, when designing the loss function, to address the challenge of imbalanced categories when using weighted cross-entropy to adapt to the problem of far fewer complaining users than non-complaining users, a weighted cross-entropy loss function is designed: based on the statistical ratio of positive and negative samples, the loss weights for the two classes of samples are calculated according to the rule "complaint category weight / non-complaint category weight = number of negative samples / number of positive samples". For example, if the ratio of positive to negative samples is 1:50, then the weight of the complaint category is set to 50, and the weight of the non-complaint category is set to 1. This avoids the model from tending to predict the labels corresponding to negative samples due to an excessively high proportion of negative samples.

[0051] As an optional implementation of this embodiment, when defining the custom vocabulary, the method includes: traversing all user event log samples and extracting discrete event tokens from the behavior logs; supplementing the extracted discrete event tokens with preset tokens; performing uniqueness verification on the tokens after supplementing with preset tokens and deleting duplicate tokens.

[0052] In this optional implementation, before model training, all unique discrete event tokens are extracted by traversing all user event log samples. For example, feature processing is first performed on user-related event logs (such as call logs, transaction records, etc.) to generate discrete event tokens that uniquely identify specific behaviors; this is a core component of the vocabulary. For continuous numerical features in the event log (such as call risk score, transaction amount), the bucketing operation is used to convert them into preset discrete levels (such as SCORE_LOW, SCORE_MID, SCORE_HIGH). The discretized continuous feature levels are combined with the classification features in the logs (such as VOLLEY_T / VOLLEY_F corresponding to whether a call was intercepted) to generate a unique discrete event token. The above operation is repeated for all the event logs of the users to be analyzed, and all the initially generated discrete event tokens are collected.

[0053] Furthermore, special tokens (vocabulary function supplement) are added to adapt to the model's needs. To ensure that the Transformer model can properly handle behavior sequences (such as length alignment and compatibility with abnormal behaviors), pre-set special tokens need to be added on the basis of the first step. Specifically, these include: Padding Token ([PAD]) is used to adjust behavior sequences of different lengths to a uniform input length for the model, avoiding training or inference errors caused by sequence length mismatch; Unknown Token ([UNK]) is used to map abnormal behaviors that occur during training / inference but were not included in the first step (such as undefined new types of behavior), ensuring the model's compatibility with unknown behaviors.

[0054] Furthermore, uniqueness checks are performed on the discrete event tokens and the set of special tokens, and completely duplicate tokens are deleted (for example, only one of the repeated "VOLLEY_T-SCORE_HIGH" is kept); the total number of tokens after deduplication (i.e., the vocabulary size) is counted, and this size will serve as the core basis for the subsequent configuration of the Transformer model word embedding layer parameters, that is, the input dimension of the word embedding layer matches the vocabulary size.

[0055] This embodiment achieves the following significant benefits by serializing structured behavior logs and applying a Transformer model for learning: 1. Capturing temporal dynamics: It fully preserves the chronological order of user behavior, enabling the model to learn complex patterns based on time evolution, such as deteriorating trends in behavior and repeated failures, which is something that traditional aggregated feature methods cannot achieve.

[0056] 2. Automated Feature Interaction Learning: The self-attention mechanism can automatically discover which combinations of behavioral tokens are high-risk signals, eliminating a lot of tedious work in manually designing cross features and combined features.

[0057] 3. Higher prediction accuracy: Because the model can "understand" the internal logic of user behavior trajectories at a deeper level, it performs better in distinguishing easily confused users (such as those with similar aggregate features but different behavioral sequence patterns), which significantly improves the accuracy and robustness of risk prediction.

[0058] 4. The solution is highly versatile: This method is not only applicable to call complaint prediction, but can also be easily transferred to various prediction scenarios based on user behavior sequences, such as fraudulent transaction identification in the financial field and purchase intent prediction in the e-commerce field.

[0059] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0060] According to an embodiment of the present invention, a user complaint risk prediction system is also provided, characterized in that it includes: an event log acquisition unit, used to acquire multiple event logs associated with the user to be risk predicted, the event logs including continuous numerical feature data, classification feature data, and event occurrence time information; a processing unit, used to convert the continuous numerical features into preset discrete levels; and combine the discrete levels with the classification feature data to generate discrete event tokens; aggregate all discrete event tokens based on the user's unique identifier, and concatenate the discrete event tokens based on the event occurrence time information to obtain a serialized sentence of the complete behavioral trajectory of the user to be risk predicted within a specific time period; and a prediction unit, used to input the serialized sentence into a pre-trained Transformer model and output a risk label corresponding to the user to be predicted, wherein the risk label includes complaint or no complaint.

[0061] According to embodiments of the present invention, the present invention also provides an electronic device, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to implement the methods described in any of the above embodiments.

[0062] According to embodiments of the present invention, the present invention also provides a readable storage medium storing computer instructions that enable a computer to perform the methods described in any of the above embodiments when executed.

[0063] According to embodiments of the present invention, the present invention also provides a computer program product that, when executed by a processor, can implement the methods described in any of the above embodiments.

[0064] Figure 2 A schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices.

[0065] like Figure 2 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. The RAM 303 may also store various programs and data required for the operation of the electronic device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0066] Multiple components in electronic device 300 are connected to I / O interface 305, including: input unit 306, such as keyboard, mouse, etc.; output unit 307, such as various types of displays, speakers, etc.; storage unit 308, such as disk, optical disk, etc.; and communication unit 309, such as network card, modem, wireless transceiver, etc. Communication unit 309 allows electronic device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0067] The computing unit 301 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as the object matching method. For example, in some embodiments, the object matching method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the methods described above may be performed.

[0068] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0069] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0070] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

Claims

1. A method for intelligently predicting user complaint risks, characterized in that, The method comprises the following steps: Obtain a plurality of event logs associated with a user to be predicted, the event logs comprising continuous numerical feature data, categorical feature data, and time information of event occurrence; Convert the continuous numerical feature data into a preset discrete level, and combine the discrete level with the categorical feature data to generate a Token of a discrete event; aggregate all Tokens of the discrete events based on a unique identifier of the user, and splice the Tokens of the discrete events based on the time information of event occurrence to obtain a serialized sentence of a complete behavior track of the user to be predicted within a specific time period; Input the serialized sentence into a pre-trained Transformer model to output a risk label corresponding to the user to be predicted, wherein the risk label comprises a complaint or no complaint.

2. The method of intelligently predicting user complaint risk according to claim 1, wherein, The Transformer model comprises: A model configuration layer for providing parameters, wherein a DistilBertConfig configuration file is created based on a custom vocabulary table; the value of the vocab_size parameter in the configuration file is equal to the total number of Tokens in the custom vocabulary table; and the maximum sequence input length parameter is determined based on training samples; A word embedding layer as an input conversion module of the model, the size of the internal weight matrix of which is directly determined by the vocab_size parameter of the model configuration layer, and which is used to convert each behavior Token in the serialized sentence into a unique corresponding vector representation; A multi-layer Transformer encoder for feature extraction, which obtains a Token vector sequence output by the word embedding layer, wherein the number of layers of the Transformer encoder is defined by the DistilBertConfig configuration file; and the encoder captures global correlation features of different behavior Tokens in the Token vector sequence through an internal self-attention mechanism; A classifier for output prediction, which obtains the output of the multi-layer Transformer encoder and maps the features output by the encoder to a risk prediction result. 3.The method of intelligently predicting a user complaint risk according to claim 2, wherein, The method for training the Transformer model comprises: Dynamically adjusting the model parameters of the Transformer model based on the current custom vocabulary table, wherein the value of the vocab_size parameter in the configuration file is set to the total number of Tokens in the current custom vocabulary table; the maximum sequence input length parameter in the configuration file is adjusted according to the length distribution of the serialized sentences in the training samples; and the Transformer model is parameterized based on the configuration file; Training the Transformer model based on the serialized sentences generated from the training samples as input and the corresponding risk labels as output, wherein the loss function is determined based on the ratio of the number of positive samples to the number of negative samples in the training samples.

4. The method of intelligently predicting user complaint risk of claim 3, wherein, When determining the loss function based on the ratio of the number of positive samples to the number of negative samples in the training samples, the positive sample weight and the negative sample weight are determined based on the ratio of the number of positive samples to the number of negative samples. The positive sample weight and the negative sample weight are substituted into the cross-entropy loss function, so that the prediction error of the model for the positive sample with less sample quantity in the training process is given a higher penalty weight.

5. The method of intelligently predicting user complaint risk of claim 4, wherein, When training the Transformer model, After the serialized sentence generated based on the training sample is converted into a Token vector sequence through the word embedding layer, the feature is extracted through the multi-layer Transformer encoder, wherein the encoder automatically captures the global correlation feature between different behavior Tokens through the self-attention mechanism; The global behavior feature output by the multi-layer Transformer encoder is transmitted to the classifier, and the classifier maps the feature to a probability prediction result of complaint or non-complaint; Through the weighted cross-entropy loss function, the error between the prediction result and the true risk label is calculated, and then the back propagation algorithm is used to update all parameters of the Transformer encoder and the classifier, and the training is repeatedly iterated until the loss function value converges, and the model training is completed.

6. The method of intelligently predicting user complaint risk of claim 5, wherein, In defining the custom vocabulary, the method comprises: Traversing all user event log samples to extract discrete event Tokens from the behavior log; Supplementing the preset Token with the extracted discrete event Token; Performing uniqueness check on the Token after supplementing the preset Token, and deleting the duplicate Token.

7. A system for intelligently predicting risk of user complaint, characterized in that, It comprises: An event log acquisition unit configured to acquire a plurality of event logs associated with a user to be predicted for risk, the event logs comprising continuous numerical feature data, categorical feature data, and time information of event occurrence; A processing unit configured to convert the continuous numerical feature data into a preset discrete level, combine the discrete level with the categorical feature data to generate a Token of discrete event, aggregate all Tokens of discrete event based on a unique identifier of the user, and splice the Tokens of discrete event based on the time information of event occurrence to obtain a serialized sentence of complete behavior track of the user to be predicted for risk within a specific time period; A prediction unit configured to input the serialized sentence into a pre-trained Transformer model to output a risk label corresponding to the user to be predicted, wherein the risk label comprises complaint or non-complaint.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing the computer to execute the method of any one of claims 1-6.

9. An electronic device, comprising: It comprises: At least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to cause the at least one processor to execute the method of any one of claims 1-6.

10. A computer program product, characterised in that, The computer program, when executed by the processor, implements the method of any one of claims 1-6. The computer program, when executed by the processor, implements the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Risk prediction method and system for time series data

    CN111382930A

  • Channel complaint risk determination method and device, equipment, medium and product

    CN115879959A

  • Customer complaint probability prediction method and device, equipment and storage medium

    CN120822653A