Customer service event dynamic scheduling method based on time sequence modeling
By adopting a dynamic scheduling method for customer service events based on time-series modeling, and utilizing an improved Transformer model and decision tree ensemble algorithm, the problem of insufficient scheduling capability in the power grid telephone service system was solved, achieving efficient resource matching and service optimization, and improving user satisfaction and system intelligence.
Patent Information
- Application Number
- CN202511018475.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-11-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing power grid telephone service system lacks sufficient dispatching capabilities when faced with complex customer demands and massive service data. It lacks dynamic perception and intelligent allocation mechanisms, resulting in a decline in service quality and user satisfaction. The dispatching priority division lacks a scientific basis, system feedback information is not used for strategy optimization, and there is a lack of a closed loop between dispatching and learning.
A dynamic scheduling method for customer service events based on time-series modeling is adopted, which integrates an improved Transformer model and an improved decision tree ensemble algorithm. By constructing a multi-dimensional time-series representation of service events, a scheduling priority scoring function, and an interpretable path recording mechanism, dynamic sorting, resource matching, and scheduling optimization of customer service tasks are achieved.
It significantly improves the intelligence and stability of the scheduling system, enhances the ability to represent events, improves the accuracy of resource matching and service efficiency, has continuous learning and adaptive capabilities, and promotes the intelligent transformation of the customer service system.
Smart Images

Figure CN120911845A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and intelligent scheduling, and particularly relates to a customer service event dynamic scheduling method based on time series modeling. BACKGROUND
[0002] With the full start of the power supply service grid telephone system, more and more cities have realized the basic coverage of telephone management of all power grid employees. This measure enhances the control ability of power supply enterprises to the front-line service situation, and provides a foundation support for improving customer response efficiency and power grid service quality. However, the traditional management mode gradually shows the problems of insufficient scheduling ability and service response lag when facing complex customer demand and huge service data.
[0003] As an important bridge connecting power supply enterprises and end users, the front-line operation of the power grid is strongly dependent on the on-site response and telephone communication ability of grid employees at all levels. Although the service coverage is improved, due to the huge amount of tasks of grassroots grid, there are differences in service ability and response efficiency among different grid employees, which directly affects the service quality. At the same time, the management system is still dominated by human experience, lacking dynamic perception and intelligent allocation mechanism, resulting in limited supervision radius and rough scheduling granularity, making it difficult to accurately identify potential service risks and high-pressure customer demand, and limiting the further improvement of the overall service level.
[0004] The customer service system generates a large amount of call data every day, covering complaints, repairs, consultations and other interactive scenarios, with rich information but loose structure. At the same time, there are also heterogeneous data resources such as historical work orders, user archives, power outage information and service logs in the power system. These data differ in structure, standard and other aspects, forming an "information island", lacking linkage, hindering the tracking of customer demands and the closed-loop response of business processes.
[0005] The existing scheduling method is difficult to comprehensively judge the customer's historical behavior, real-time demand state and resource availability, and is still based on static rules and human experience, which cannot adapt to the rapidly changing multi-source data driven demand. Even if some areas introduce preliminary informationization auxiliary tools, due to the lack of time series modeling, resource state perception and customer level dynamic identification ability, the scheduling model has weak generalization ability, and the intelligent system is difficult to land. The scheduling priority division lacks scientific basis, and some high-risk customers cannot be responded in time, affecting user satisfaction. The system feedback information is not involved in the strategy optimization, and there is no closed loop between scheduling and learning, which further weakens the self-adaptive evolution ability of the system.
[0006] Therefore, how to build an intelligent scheduling method that can automatically identify service event characteristics, scientifically evaluate priority, dynamically match agent resources, and has the ability of path explanation and feedback optimization on the basis of the current power grid telephone service system is a key technical problem to be solved in the field of power service. Building a customer service event dynamic scheduling model based on time series modeling will help promote the transformation of the power dispatching system from manual experience to data intelligence, and improve the scientific nature, real-time nature and user satisfaction of power supply services. SUMMARY
[0007] One object of the present application is to provide a customer service event dynamic scheduling method based on time series modeling. The present application integrates an improved Transformer model with a dynamic memory mechanism and an improved decision tree ensemble algorithm with scoring path explanation capability, and realizes dynamic ordering, resource matching and scheduling optimization of customer service tasks by building a multi-dimensional time series representation of service events, a scheduling priority scoring function and an interpretable path recording mechanism. This method has the advantages of fine service event modeling, clear scoring basis, traceable scheduling path, feedback-driven self-learning, etc., and is suitable for intelligent customer service scenarios in high-response-demand industries such as power.
[0008] According to the customer service event dynamic scheduling method based on time series modeling, the method comprises the following steps:
[0009] S1, collect the original business data in the customer service system, and perform field structuring and time stamp ascending sorting to build a service event sequence;
[0010] S2, input the service event sequence into the improved Transformer model to perform event sequence semantic modeling operation, wherein the improved Transformer model introduces a dynamic memory module to output an event semantic feature vector;
[0011] S3, for the current event to be processed, based on the event semantic feature vector, a multi-scale time window is built, and the multi-scale time window takes the trigger time of the current event to be processed as the benchmark to generate a time feature vector;
[0012] S4, joint feature vectors are generated by concatenating the event semantic feature vector and the time feature vector;
[0013] S5, input the joint feature vector into the improved decision tree ensemble algorithm to perform feature split judgment and leaf node output calculation to generate a scheduling priority score value, and record the decision path and the corresponding feature node index;
[0014] S6, according to the scheduling priority score value and the current online service agent state, performing a service event queue operation, generating a service event scheduling list, and storing the decision path and the corresponding feature node index into a scheduling explanation structure body;
[0015] S7, collecting service event execution feedback information, writing into a feedback sample buffer area, updating the improved Transform model and the improved decision tree integrated algorithm.
[0016] The improved Transform model and the improved decision tree integrated algorithm are introduced, a time sequence modeling and dynamic scheduling mechanism for customer service scenarios is constructed, and the mechanism has significant practical value and application advantages. First, through the structuring and time sequence modeling of the original business data, the evolution relationship between service events can be accurately captured, and the event representation capability can be effectively enhanced. Second, the Transform model with a dynamic memory mechanism improves the modeling capability of the model for long-time dependency, so that the scheduling decision is more global and context-sensitive. Third, the joint feature vector constructed by fusing time features is combined with the improved decision tree scoring mechanism, which realizes efficient priority determination and provides interpretability through the path recording mechanism. The scheduling list generation process considers the linkage of agent state and scoring result, which significantly improves the accuracy of resource matching and service efficiency. Finally, through the feedback sample buffer and model updating mechanism, the strategy closed-loop optimization is realized, which has the ability of continuous learning and self-adaptation, effectively improving the intelligence and stability of the overall scheduling system.
[0017] Optionally, the improved Transform model specifically includes a time coding unit, a feature alignment unit and an extended attention fusion unit.
[0018] The time coding unit receives the timestamp field of the event node in the service event sequence, performs a period position coding operation to generate a time position coding vector, and splices the time position coding vector with the remaining structured fields except the timestamp field to obtain a time-enhanced event input vector.
[0019] The feature alignment unit performs uniform dimension mapping and normalization processing on the time-enhanced event input vector representation, and outputs a service event feature representation vector.
[0020] The extended attention fusion unit specifically includes a multi-head attention structure and a dynamic memory module, the multi-head attention structure includes multiple attention sub-layers, and each attention sub-layer includes a query vector generation component, a key-value vector generation component and an attention weighting calculation component.
[0021] The improved Transformer model effectively improves the modeling ability of service event sequences by introducing a time encoding unit, a feature alignment unit, and an extended attention fusion unit. The time encoding unit uses a timestamp and period position encoding mechanism to construct a time position vector, enhancing the model's perception of event timing distribution and time dependence. The feature alignment unit uses uniform mapping and normalization processing to ensure consistency of time encoding features from different sources in subsequent processing, improving the accuracy of feature fusion. The extended attention fusion unit combines multi-head attention structure and dynamic memory mechanism to strengthen the model's semantic attention to key service events and achieve deeper context association modeling. The overall structure improves the semantic expression quality of event sequences, providing more discriminative feature input for subsequent scheduling priority scoring and enhancing the intelligence and controllability of system scheduling.
[0022] Optionally, the extended attention fusion unit specifically includes a multi-head attention structure and a dynamic memory module, the multi-head attention structure includes a plurality of attention sub-layers, each attention sub-layer includes a query vector generation component, a key-value vector generation component, and an attention weighting calculation component:
[0023] The query vector generation component receives a service event feature representation vector to generate a query vector;
[0024] The key-value vector generation component receives the remaining service event feature representation vectors in the same service event sequence and the historical event features cached in the dynamic memory module to generate key vectors and value vectors;
[0025] The dynamic memory module is a sliding window structure that updates event representation cache by time step, provides historical event features to the key-value vector, and the historical event features are within the window range provided by the component;
[0026] The attention weighting calculation component performs relevance calculation on the query vector and the key-value vector based on an extended scoring mechanism and executes a weighted aggregation operation.
[0027] The extended attention fusion unit significantly enhances the modeling capability of the model on the context of service events by combining a multi-head attention structure with a dynamic memory module. The query vector, the key vector, and the value vector are generated based on the current event, the same sequence event, and the event features cached in the sliding window, respectively, so that the attention mechanism can introduce historical event semantic information while focusing on the current input, improving the temporal integrity of the event feature representation. The attention weighting calculation component uses an extended scoring mechanism to evaluate the relevance of the query vector and the key value vector, and realizes dynamic aggregation, thereby strengthening the model's expression capability for key event relationships. This structure effectively solves the problems of weak context dependence and insufficient use of historical information in the process of semantic expression of service events, providing more rich and accurate semantic feature support for subsequent scheduling decisions.
[0028] Optionally, the S2 specifically comprises:
[0029] S21, input the service event sequence into the improved Transformer model, extract the structured fields of each event node in the service event sequence, the structured fields of the event node including event type encoding, task state encoding, customer level encoding and resource number encoding, splice the structured fields of the event node to form an initial event representation vector x t :
[0030] x t =[e t ,s t ,c t ,r t ];
[0031] Wherein, e t is the event type encoding, s t is the task state encoding, c t is the customer level encoding, and r t is the resource number encoding.
[0032] S22, input the timestamp field of the event node in the service event sequence into the time encoding unit, perform the period position encoding operation to generate the time position encoding vector, and splice it with the initial event representation vector according to the feature dimension to form a time-enhanced event input vector;
[0033] S23, input the time-enhanced event input vector into the feature alignment unit, perform uniform dimension mapping and normalization processing, and output a service event feature representation vector, the service event feature representation vector being uniform in dimension and scale.
[0034] S24, input the service event feature representation vector as a query vector to a query vector generation component to generate a query vector, input the remaining service event feature representation vectors in the same service event sequence and the historical event features cached in the dynamic memory module as modeling inputs to a key-value vector generation component to generate a key vector and a value vector, and the dynamic memory module updates the historical feature cache according to a sliding time window rule;
[0035] S25, perform relevance calculation on the query vector and the key vector based on an extended scoring mechanism:
[0036]
[0037] wherein, α ij is a relevance score of event i and event j, Q i is the query vector, K j is the key vector, W is a scoring weight matrix, φ(Δt ij ) is an event offset function between event i and event j, and d is a scaling function.
[0038] S26, perform normalization processing on α ij , and perform weighted aggregation on the value vector to generate an event semantic feature vector y i in combination with a gating mechanism:
[0039] y i = σ(W g Q i )⊙(∑ j softmax j (α ij )W v V j )+(1-σ(W g Q i ))⊙Q i ;
[0040] wherein, σ(·) is a Sigmoid function, W g is a gating weight matrix, W v is a value vector mapping matrix, V j is a value vector, softmax j (·) is a softmax normalization function.
[0041] The improved Transformer model effectively improves the expression ability of the service event time sequence dependence and semantic association by combining the structured event field coding, time coding and attention fusion mechanism. By splicing multiple structured elements such as event type, task state, customer level and resource coding, an accurate event representation vector is constructed, and further combined with periodic time coding to strengthen the embedding expression of time characteristics, the improved Transformer model enhances the ability to identify the event time sequence position. Subsequently, the attention mechanism with query-key value structure is used to introduce the historical event representation and event interval perception function in the dynamic memory module, and the fine-grained event correlation modeling is realized by expanding the scoring calculation. Finally, combined with the gating control mechanism, the weighted aggregation is performed to effectively extract the global context semantic features, generate service event semantic vectors with higher discriminability, provide high-quality input for subsequent scheduling priority scoring, and significantly improve the accuracy and generalization ability of the overall scheduling strategy.
[0042] Optionally, the S3 specifically comprises:
[0043] S31, obtaining an event semantic feature vector and a trigger time of a current to-be-processed event;
[0044] S32, based on the context time sequence state reflected by the event semantic feature vector, setting a plurality of forward sliding time window scales, and taking the trigger time of the current to-be-processed event as a reference benchmark, constructing a plurality of multi-scale time windows;
[0045] S33, for each multi-scale time window, extracting historical service events with timestamps located in the multi-scale time window from the service event sequence to form a service event subsequence;
[0046] S34, for each service event subsequence under the multi-scale time window, extracting time sequence statistical features, the time sequence statistical features including average response delay, historical scheduling density, average resource utilization state;
[0047] S35, concatenating all time sequence statistical feature results according to the multi-scale time window number order to generate a time feature vector.
[0048] By constructing multi-scale time windows and extracting the corresponding time series statistical features, the model's perception ability of the time context of service events is effectively enhanced. This method sets multiple sliding time windows based on the trigger time of the current event to be processed, extracts the event subsequence within the window from the historical service events, and calculates key feature indicators such as average response delay, historical scheduling density, and resource utilization at different time scales. By integrating multi-scale statistical features, a time feature vector is formed to express the dynamic changes in the service environment, which not only enriches the scheduling input feature dimension but also improves the model's understanding of service rhythm, load pressure, and resource status, providing more comprehensive time context support for scheduling priority scoring and enhancing the timeliness and adaptability of the overall scheduling model.
[0049] Optionally, the improved decision tree ensemble algorithm specifically includes:
[0050] The improved decision tree ensemble algorithm is composed of M regression trees, which take joint feature vectors as input, perform feature division based on the feature dimension of the joint feature vector, and generate a regression tree structure. The regression tree is composed of internal nodes and leaf nodes, and the leaf node outputs the scheduling priority score value.
[0051] The improved decision tree ensemble algorithm dynamically adjusts the integration and fusion weight of the regression tree according to the system resource saturation state. If the system resource utilization rate exceeds the set threshold, the fusion weight of the subtree with a higher split frequency in the response delay field in the joint feature vector is increased.
[0052] The improved decision tree ensemble algorithm executes a path structure control strategy based on the customer level field in the joint feature vector. For high-level customer service events, all regression paths are expanded, and for low-level customer service events, path pruning and node merging operations are performed.
[0053] In the internal node division process of the improved decision tree ensemble algorithm, the historical response delay deviation of the service event is introduced as an auxiliary factor, and the information gain calculation is used to determine the feature split priority.
[0054] The improved decision tree ensemble algorithm includes a path record module for recording the path information of service events from the root node to the leaf node in each regression tree. The path information includes the feature field index of the visited node, the split threshold, and the path number, which can be used to construct a scheduling explanation structure.
[0055] The improved decision tree integration algorithm realizes an intelligent scheduling scoring mechanism for resource status, customer level and feedback information by fusing multiple regression tree structures. The method not only takes a joint feature vector as input, performs high-dimensional feature division and leaf node scoring output, but also introduces a system resource saturation perception mechanism to dynamically adjust the sub-tree fusion weight, effectively improving the rationality and scheduling efficiency of resource allocation. At the same time, according to the customer level field, a path control strategy is designed to make high-level customer service events maintain the complete decision path, and low-level customer service events execute pruning compression, so as to balance service fairness and resource optimization. In the feature division, the response delay bias is further introduced as an auxiliary factor to improve the accuracy of split priority judgment. Through the path recording module, the access path of each service event from the root node to the leaf node is tracked, and an explanation structure body that can be used for tracing and display is constructed, which significantly enhances the transparency and explainability of the model.
[0056] Optionally, the S5 specifically includes:
[0057] S51, input the joint feature vector into each regression tree in the improved decision tree integration algorithm, and each regression tree starts from the root node, judges the path direction at each internal node according to the value of the joint feature vector feature dimension and the split threshold value, and reaches the leaf node;
[0058] S52, at each internal node, for the joint feature vector feature dimension, extract a sample set S containing the internal node, S is divided into a left subset S L and a right subset S R , calculate the average response delay of the left subset, the right subset and the sample set, and construct a feature division priority scoring function:
[0059]
[0060] Wherein, Φ(d j ) is the feature division priority score value of the joint feature vector feature dimension d j , IG(·) is the information gain, λ is the response delay bias adjustment coefficient, is the average response delay of the left subset, is the average response delay of the right subset, is the average response delay of the sample set; calculate the feature division priority score value of all joint feature vector feature dimensions, select the joint feature vector feature dimension with the highest feature division priority score as the division feature of the current internal node, and construct the final split path;
[0061] S53, according to the customer level field in the joint feature vector, perform control strategy on the path structure, if it is a high-level customer, reserve all path structures, if it is a low-level customer, only reserve the path whose feature division priority score is greater than the set threshold, and prune or node merge the remaining paths;
[0062] S54, after the joint feature vector passes through each regression tree, output the score value at the leaf node:
[0063]
[0064] Wherein, f i is the ith joint feature vector, is the score value output by the mth regression tree to f i is the process of performing path judgment and node traversal on f by the mth regression tree as a decision function, and output the score value; i
[0065] S55, count the number of times the response delay field appears in the split node in each regression tree, calculate the fusion weight and output the scheduling priority score value:
[0066]
[0067] Wherein, S i is the scheduling priority score value of the ith joint feature vector, M is the number of regression trees, ρ m is the number of times the response delay field appears in the split node in the mth regression tree, ρ k is the number of times the response delay field appears in the split node in the kth regression tree;
[0068] S56, record the path node information of the service event in each regression tree, including feature field index, split threshold, path node number and path sequence number.
[0069] By constructing multiple regression trees and fusing delay sensitivity weights, the precise scoring and dynamic weighting of the joint feature vector of service events are realized. In each tree, the feature split priority function is constructed according to the scoring function of the joint feature dimension and the average response delay difference, which improves the rationality of split decision. At the same time, the customer level control mechanism is introduced, the complete path structure of high-level service events is retained, and the pruning and merging of low-level service events are performed, which balances the service fairness and efficiency. In the scoring stage, the model not only outputs the scoring value of each tree, but also constructs the delay sensitive fusion weight by counting the appearance frequency of the response delay field in each split node, and completes the harmonic output of the final scoring value. Combined with the path record module, the scoring path information can be saved completely, which improves the traceability and explainability of the scoring result. The method significantly enhances the flexibility, explainability and timeliness correlation ability of the scheduling scoring mechanism.
[0070] Optionally, the S6 specifically includes:
[0071] S61, a set of to-be-processed service events is collected, wherein each to-be-processed service event includes a corresponding joint feature vector and a scheduling priority score value;
[0072] S62, a set of online service agents is collected, wherein each online service agent includes a service capability vector, an idle state and a regional label;
[0073] S63, a service queue operation is performed, the set of to-be-processed service events is sorted in descending order according to the scheduling priority score value, a descending service event queue is generated, and each to-be-processed service event is assigned a matchable online service agent to form a scheduling matching pair:
[0074] S64, all scheduling matching pairs are output as a service event scheduling list according to the matching sequence;
[0075] S65, for each to-be-processed service event in the service event scheduling list, the path node information recorded in each regression tree in the improved decision tree integration algorithm is extracted to construct a scheduling explanation structure unit;
[0076] S66, all scheduling explanation structure units are summarized and stored in a scheduling explanation structure body.
[0077] By constructing a score-driven service event queue and a dynamic matching mechanism based on the state of the agent, the intelligentization and explainability of the scheduling decision are realized. The method first sorts the service events to be processed in descending order based on the score value, constructs a service priority queue, and ensures that high priority events are processed first. Then, combined with the ability vector, idle state and geographic label of the service agent, the one-to-one matching of service events and agents is performed to generate an executable scheduling list, improving the efficiency and accuracy of resource allocation. At the same time, through the path recording mechanism, the path node number of each event in the regression tree is extracted as an explanation structure unit, and finally the scheduling explanation structure body is formed to realize the process tracing and visual explanation of the scheduling behavior. This method improves the transparency and user trust of the scheduling result, and provides structured support for subsequent strategy optimization and intelligent analysis.
[0078] The beneficial effects of the present application are:
[0079] The present application is different from the traditional customer service scheduling method relying on static rules or experience-driven, and through the construction of an intelligent scheduling mechanism based on time sequence modeling, the dynamic understanding and adaptive scheduling control of service events are realized. In the service event modeling stage, the present application proposes an improved Transformer model with dynamic memory mechanism to construct a service event sequence representation with structured fields and time embedding, enhancing the modeling ability of the context relationship and historical dependence characteristics between events. The model introduces historical service information and time offset perception by extending the attention fusion mechanism, realizing the dynamic capture of key associations of events, and providing high-quality semantic feature input for the scoring layer.
[0080] In the scheduling scoring stage, the present application introduces an improved decision tree ensemble algorithm with path explainability, which constructs a delay-aware feature partition priority function to explicitly encode the time delay deviation of service events into the tree structure, enhancing the timeliness association between scoring and scheduling strategies. The algorithm not only dynamically adjusts the fusion weight combined with the system resource saturation, but also controls the path expansion depth through the customer level field, taking into account service fairness and response efficiency. At the same time, a multi-scale time window is constructed during the scheduling execution process and historical subsequence statistical features are extracted to generate a high-dimensional time feature vector, which is spliced with semantic features and input into the scoring module, significantly improving the sensitivity of the model to service rhythm and resource state in complex environments.
[0081] In addition, the application introduces a sorting + matching linkage mechanism in the dispatch queue generation stage, dynamically matches service resources based on the scoring results and agent capability labels, and forms an optimized service event dispatch list. In cooperation with the path record module, the system tracks and structures the output of the feature split path, threshold and node number corresponding to each scoring result, constructs a dispatch explanation structure, realizes scoring path visualization and dispatch result tracing, and provides support for decision optimization and service accountability. In the execution feedback stage, the application uses a feedback sample caching mechanism to collect real dispatch results and scoring deviations, and performs joint incremental updating of the Transformer model and the decision tree integration algorithm to form a closed-loop optimization process, significantly improving the self-learning ability and dynamic adaptability of the system.
[0082] Through the above design, the application not only improves the accuracy, interpretability and timeliness of customer service scheduling, but also has model self-evolution ability and resource allocation flexibility, and is suitable for intelligent agent scheduling, resource load balancing and customer response optimization in high-frequency service scenarios such as power supply, promoting the intelligent transformation of the customer service system from static rule driving to data driving and feedback driving integration. BRIEF DESCRIPTION OF DRAWINGS
[0083] The accompanying drawings are included to provide a further understanding of the application, and constitute a part of the specification, together with the embodiments of the application, to explain the application, and do not constitute a limitation on the application. In the drawings:
[0084] Fig. 1 A flowchart of a customer service event dynamic scheduling method based on time series modeling proposed by the application;
[0085] Fig. 2 An improved Transformer model structure diagram of a customer service event dynamic scheduling method based on time series modeling proposed by the application;
[0086] Fig. 3 An improved decision tree integration algorithm flowchart of a customer service event dynamic scheduling method based on time series modeling proposed by the application. DETAILED DESCRIPTION
[0087] The application will now be described in further detail with reference to the drawings. These drawings are simplified schematic diagrams, and only illustrate the basic structure of the application in a schematic manner, and therefore only show the components related to the application.
[0088] Reference Figs. 1-3 A customer service event dynamic scheduling method based on time series modeling includes the following steps:
[0089] S1, collect original business data in a customer service system, and perform field structuring and time stamp ascending sorting to construct a service event sequence;
[0090] S2, input the service event sequence into the improved Transformer model, perform an event sequence semantic modeling operation, the improved Transformer model introduces a dynamic memory module, and output an event semantic feature vector;
[0091] S3, for the current event to be processed, based on the event semantic feature vector, a multi-scale time window is constructed, the multi-scale time window takes the current event trigger time as the reference, and a time feature vector is generated;
[0092] S4, the event semantic feature vector and the time feature vector are spliced to generate a joint feature vector;
[0093] S5, input the joint feature vector into the improved decision tree integration algorithm, perform feature splitting judgment and leaf node output calculation, generate a scheduling priority score value, and record the decision path and the corresponding feature node index;
[0094] S6, according to the scheduling priority score value and the current online service agent state, perform a service event queue operation, generate a service event scheduling list, and store the decision path and the corresponding feature node index into a scheduling explanation structure;
[0095] S7, collect service event execution feedback information, write it into a feedback sample buffer area, and update the improved Transformer model and the improved decision tree integration algorithm.
[0096] In the embodiment, the improved Transformer model specifically includes a time coding unit, a feature alignment unit, and an extended attention fusion unit:
[0097] The time coding unit receives the timestamp field of the event node in the service event sequence, performs a period position coding operation to generate a time position coding vector, and splices it with the remaining structured fields except the timestamp field to obtain a time-enhanced event input vector;
[0098] The feature alignment unit performs uniform dimension mapping and normalization processing on the time-enhanced event input vector representation, and outputs a service event feature representation vector;
[0099] The extended attention fusion unit specifically includes a multi-head attention structure and a dynamic memory module, the multi-head attention structure includes multiple attention sub-layers, and each attention sub-layer includes a query vector generation component, a key-value vector generation component, and an attention weighting calculation component.
[0100] In the embodiment, the extended attention fusion unit specifically comprises a multi-head attention structure and a dynamic memory module, the multi-head attention structure comprises a plurality of attention sub-layers, each attention sub-layer comprises a query vector generation component, a key-value vector generation component and an attention weighting calculation component:
[0101] The query vector generation component receives a service event feature representation vector to generate a query vector;
[0102] The key-value vector generation component receives the remaining service event feature representation vectors in the same service event sequence and the historical event features cached in the dynamic memory module to generate a key vector and a value vector;
[0103] The dynamic memory module is a sliding window structure, and the event representation cache is updated by time step, and the historical event features are provided to the key-value vector generation component, and the historical event features are within the window range provided by the component;
[0104] The attention weighting calculation component performs relevance calculation on the query vector and the key-value vector based on an extended scoring mechanism, and performs a weighted aggregation operation.
[0105] In the embodiment, S2 specifically comprises:
[0106] S21, input the service event sequence into the improved Transformer model, extract the structured fields of each event node in the service event sequence, the structured fields of the event node include event type encoding, task state encoding, customer level encoding and resource number encoding, splice the structured fields of the event node to form an initial event representation vector x t :
[0107] x t =[e t ,s t ,c t ,r t ];
[0108] Wherein, e t is event type encoding, s t is task state encoding, c t is customer level encoding, and r t is resource number encoding;
[0109] S22, input the timestamp field of the event node in the service event sequence into the time encoding unit, perform a period position encoding operation to generate a time position encoding vector, and splice the initial event representation vector by feature dimension to form a time enhanced event input vector;
[0110] S23, input the time-enhanced event vector into the feature alignment unit, perform unified dimension mapping and normalization processing, and output a service event feature representation vector, which is unified in dimension and scale;
[0111] S24, input the service event feature representation vector as a query vector into the query vector generation component to generate a query vector, and input the query vector, the event feature representation vectors of the remaining service events in the same service event sequence, and the historical event features cached in the dynamic memory module into the key-value vector generation component to generate a key vector and a value vector. The dynamic memory module updates the historical feature cache according to a sliding time window rule;
[0112] S25, perform relevance calculation on the query vector and the key vector based on an extended scoring mechanism:
[0113]
[0114] wherein, α ij is the relevance score of event i and event j, Q i is the query vector, K j is the key vector, W is the scoring weight matrix, φ(Δt ij ) is the event offset function between event i and event j, and d is the scaling function.
[0115] S26, perform normalization processing on α ij , and perform weighted aggregation on the value vector to generate an event semantic feature vector y i in combination with a gating mechanism:
[0116] y i = σ(W g Q i )⊙(∑ j softmax j (α ij )W v V j )+(1-σ(W g Q i ))⊙Q i ;
[0117] wherein, σ(·) is a Sigmoid function, W g is a gating weight matrix, W v is a value vector mapping matrix, V j is a value vector, softmax j (·) is a softmax normalization function.
[0118] In the embodiment, the S3 specifically comprises:
[0119] S31, acquire an event semantic feature vector and a trigger time of a current to-be-processed event;
[0120] S32, based on a context timing state reflected by the event semantic feature vector, set a plurality of forward sliding time window scales, and construct a multi-scale time window with the trigger time of the current to-be-processed event as a reference benchmark;
[0121] S33, for each multi-scale time window, extract historical service events with timestamps located in the multi-scale time window from the service event sequence to form a service event subsequence;
[0122] S34, for the service event subsequence under each multi-scale time window, extract timing statistical features, including average response delay, historical scheduling density, and average resource utilization state;
[0123] S35, splice all timing statistical feature results according to the multi-scale time window number order to generate a time feature vector.
[0124] In this embodiment, the improved decision tree integration algorithm specifically includes:
[0125] The improved decision tree integration algorithm is composed of M regression trees, which take the joint feature vector as input, perform feature division based on the feature dimension of the joint feature vector, generate a regression tree structure, and are composed of internal nodes and leaf nodes. The leaf node outputs a scheduling priority score value;
[0126] The improved decision tree integration algorithm dynamically adjusts the integration fusion weight of the regression tree according to the system resource saturation state. If the system resource utilization rate exceeds a set threshold, the fusion weight of the subtree with a higher split frequency in the response delay field in the joint feature vector is increased;
[0127] The improved decision tree integration algorithm performs a path structure control strategy according to the customer level field in the joint feature vector, keeps all regression paths expanded for high-level customer service events, and performs path pruning and node merging operations for low-level customer service events;
[0128] In the internal node division process of the improved decision tree integration algorithm, the historical response delay deviation of the service event is introduced as an auxiliary factor, and the information gain calculation is used to determine the feature split priority;
[0129] The improved decision tree integration algorithm includes a path record module for recording path information of a service event from a root node to a leaf node in each regression tree, the path information including a feature field index of an accessed node, a split threshold, and a path number, and a scheduling explanation structure body can be derived.
[0130] In this embodiment, S5 specifically includes:
[0131] S51, input the joint feature vector into each regression tree in the improved decision tree ensemble algorithm, and each regression tree starts from a root node, judges the path direction at each internal node according to the value of the joint feature vector feature dimension and the split threshold value, and ends until reaching a leaf node;
[0132] S52, at each internal node, for the joint feature vector feature dimension, extract a sample set S containing the internal node, split S into a left subset S L and a right subset S R , calculate the average response delay of the left subset, the right subset and the sample set, and construct a feature division priority score function:
[0133]
[0134] wherein Φ(d j ) is the feature division priority score value of the joint feature vector feature dimension d j , IG(·) is the information gain, λ is the response delay bias adjustment coefficient, is the average response delay of the left subset, is the average response delay of the right subset, is the average response delay of the sample set; calculate the feature division priority score values of all joint feature vector feature dimensions, select the joint feature vector feature dimension with the highest feature division priority score as the division feature of the current internal node, and construct a final split path;
[0135] S53, according to the customer level field in the joint feature vector, perform a control strategy on the path structure, if it is a high-level customer, retain all path structures; if it is a low-level customer, only retain the paths with feature division priority scores greater than a set threshold, and prune or node merge the remaining paths;
[0136] S54, after the joint feature vector passes through each regression tree, output a score value at the leaf node:
[0137]
[0138] wherein f i is the i-th joint feature vector, is the score value output by the m-th regression tree for f i , is the process of the m-th regression tree as a decision function, performing path judgment and node traversal on f i , and outputting a score value;
[0139] S55, count the number of times the response delay field appears in the split nodes in each regression tree, calculate the fusion weight and output the scheduling priority score value:
[0140]
[0141] wherein S i is the scheduling priority score value of the ith joint feature vector, M is the number of regression trees, p m is the number of times the response delay field appears in the split nodes in the mth regression tree, p k is the number of times the response delay field appears in the split nodes in the kth regression tree.
[0142] S56, record the path node information of the service event in each regression tree, including the feature field index, the split threshold, the path node number and the path sequence number.
[0143] In this embodiment, the S6 specifically includes:
[0144] S61, collect a set of service events to be processed, wherein each service event to be processed includes a corresponding joint feature vector and a scheduling priority score value;
[0145] S62, collect a set of online service agents, wherein each online service agent includes a service capability vector, an idle state and a regional label;
[0146] S63, perform a service queue operation, perform descending order sorting on the set of service events to be processed according to the scheduling priority score value, generate a descending service event queue, and sequentially traverse the descending service event queue to assign a matchable online service agent to each service event to be processed, forming a scheduling matching pair:
[0147] S64, output all scheduling matching pairs in the matching sequence as a service event scheduling list;
[0148] S65, for each service event to be processed in the service event scheduling list, extract the path node information of the service event to be processed recorded in the improved decision tree integration algorithm in each regression tree, and construct a scheduling explanation structure unit;
[0149] S66, aggregate all scheduling explanation structure units and store them in a scheduling explanation structure body.
[0150] Example 1:
[0151] To verify the feasibility and technical advantages of the application in actual power supply service scheduling scenarios, we selected a customer service center of a power supply company in a prefecture-level city in East China as a pilot unit, deployed an intelligent scheduling system based on the "customer service event dynamic scheduling method based on time series modeling" proposed by the application, and upgraded its original hotline attendant scheduling system. The customer service center handles more than 2800 service requests per day, including electricity fault repair, temporary power outage consultation, power supply business handling, equipment inspection response, and elderly customer telephone follow-up, covering urban core areas, industrial parks, suburban rural areas, and key customer areas. The pilot area has 24 scheduling grids and 41 attendants, including main duty officers, regional service officers, and comprehensive attendants. The service resource allocation is complex, the customer level span is large, and the business response fault tolerance rate is high.
[0152] Before the system is deployed, hotline scheduling is responded to by manually reviewing work order information and attendant shift schedules. The tasks are mainly assigned by manually judging the static priority, customer level, and attendant idle state. The scheduling efficiency is low, the tasks are lagging, and the resource mismatching is serious. Especially during high-load periods (such as heavy rain and large-scale planned power outages), service delay complaints increase significantly. To solve this problem, the power supply company and our team jointly embedded the intelligent scheduling system of the application into the "customer unified acceptance system" and "intelligent service grid platform" in October 2024.
[0153] After the system goes online, the service event data is first structured, including event type coding, task state coding, customer level coding, resource calling coding, etc. The time series input is constructed with event timestamp information as the basic input feature of the model. By introducing an improved Transformer model, the system models the event context state while dynamically associating historical events through a sliding memory module, achieving semantic modeling of the state evolution trend between events. The event semantic vector output by the model is input into an improved decision tree ensemble algorithm after concatenating multi-scale time window statistical features (such as average delay, scheduling density, and resource conflict rate) for scoring, and the scheduling priority of the task is evaluated comprehensively.
[0154] Unlike traditional scoring, which directly calls idle attendants, the system constructs a service event queue based on the scoring results and dynamically matches the ability vector, working state, and geographic location label of the current online attendant. Through the "scoring + resource matching degree" double-constraint scheduling mechanism, the system generates a service event scheduling list. At the same time, the system automatically records the scoring path and feature node index during the scoring process, constructs a scheduling explanation structure unit for each event, and supports subsequent scheduling behavior tracing, abnormal backtracking, and attendant evaluation.
[0155] The system adopts an asynchronous scheduling architecture, supporting more than 75 real-time scoring per second, with an average core scoring module calculation time of less than 38 ms, ensuring real-time response capability under continuous service event inflow during peak periods. During the peak period from 17:30 to 18:30 on November 7, 2024, the system successfully scheduled and completed 1147 response events, with an average response time of less than 8.7 minutes, and an average response time of 6.1 minutes for high-priority events, significantly lower than the average of 15.8 minutes in the manual scheduling phase before the pilot.
[0156] In addition, the system introduces a feedback sample caching mechanism, comparing and analyzing the system score value after each scheduling execution with the actual customer feedback, constructing a score deviation distribution graph to guide model weight fine-tuning. During continuous operation from October 2024 to January 2025, the system collected 21149 feedback data, of which 6783 were used for model adjustment, and performed 8 rounds of fine-tuning, with the scheduling score accuracy improving from 87.2% at the initial stage to 92.4% in the stable stage. During the model evolution process, we observed a linear improvement trend in high-priority event scheduling response capability and overall service satisfaction.
[0157] To ensure the system's feasibility and high availability, we adopted a modular deployment scheme, deploying data collection, scoring, matching, feedback, and explainability modules on the company's intranet server and edge computing nodes, ensuring the natural integration of scheduling models and service execution without affecting the original business flow. At the same time, the system connects with the work order system, power grid state perception system, and customer service evaluation system through open API interfaces, achieving task synchronization and data sharing between multiple systems.
[0158] The following are the core operating data collected within 90 days of the system going online:
[0159] Table 1 Comparison of system service scheduling performance before and after the implementation of the present scheme
[0160]
[0161] As can be seen from Table 1, the system has significantly improved the core scheduling performance compared to the traditional system. The average response time has been shortened from 21.6 minutes to 11.2 minutes, a reduction of 48.1%; the response time for high-priority events has been further compressed from 15.4 minutes to 6.1 minutes, a reduction of 60.4%. These data indicate that the system's priority processing capability for high-priority events has been significantly enhanced, effectively alleviating the problem of processing lag for critical users and high-pressure demands.
[0162] In terms of resource allocation, the accuracy rate of agent resource matching improved from 74.5% to 93.2%, indicating that the system's dual-constraint mechanism based on scoring and capability matching more effectively maximizes resource utilization. Regarding customer satisfaction, the percentage of satisfied or higher ratings increased from 70.3% to 88.7%, a rise of 18.4 percentage points, reflecting users' high recognition of scheduling efficiency and service experience. Furthermore, the scheduling error rate significantly decreased to 0.9%, and the proportion of duplicate scheduling decreased to 2.8%, indicating significant optimization of the system's scheduling logic and more stable operation. More importantly, the system can completely record the scheduling interpretation path, making scheduling behavior transparent and providing structural support for quality inspection, accountability, and iterative optimization.
[0163] In summary, the experimental results, obtained through 90 days of continuous deployment and operation in a real-world power service hotline scenario, demonstrate that the proposed time-series modeling-based dynamic scheduling method for customer service events exhibits significant advantages in customer service management. This method, through deep semantic modeling, temporal feature fusion, and an interpretable decision path scoring mechanism, effectively addresses issues such as response lag, priority misjudgment, and coarse resource matching in traditional customer service scheduling, significantly improving scheduling efficiency, customer satisfaction, and system transparency. Furthermore, the feedback-driven model optimization capability provides a technical foundation for long-term deployment and intelligent evolution, possessing broad prospects for widespread application in more industry service scheduling scenarios.
[0164] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A dynamic scheduling method for customer service events based on time series modeling, characterized in that, The method comprises the following steps: S1, collecting original service data in a customer service system, and performing field structuring and time stamp ascending order sorting to construct a service event sequence; S2, inputting the service event sequence into an improved Transformer model to perform event sequence semantic modeling, wherein the improved Transformer model introduces a dynamic memory module, and outputs an event semantic feature vector; S3, for a current event to be processed, based on the event semantic feature vector, a multi-scale time window is constructed, wherein the multi-scale time window takes the trigger time of the current event to be processed as a reference to generate a time feature vector; S4, the event semantic feature vector and the time feature vector are spliced to generate a joint feature vector; S5, the joint feature vector is input into an improved decision tree integration algorithm to perform feature splitting judgment and leaf node output calculation, generate a scheduling priority score value, and record the decision path and corresponding feature node index; S6, according to the scheduling priority score value and the current online service representative state, performing a service event queue operation to generate a service event scheduling list, and storing the decision path and corresponding feature node index into a scheduling explanation structure; S7, collecting service event execution feedback information, writing into a feedback sample buffer area, updating the improved Transformer model and the improved decision tree integration algorithm.
2. The method of claim 1, wherein, The improved Transformer model specifically includes a time coding unit, a feature alignment unit and an extended attention fusion unit: The time coding unit receives the time stamp field of the event node in the service event sequence, performs a period position coding operation to generate a time position coding vector, and splices the time stamp field with the remaining structured fields to obtain a time-enhanced event input vector; The feature alignment unit performs uniform dimension mapping and normalization processing on the time-enhanced event input vector representation to output a service event feature representation vector; The extended attention fusion unit specifically includes a multi-head attention structure and a dynamic memory module, and the multi-head attention structure includes a plurality of attention sub-layers, each attention sub-layer including a query vector generation component, a key-value vector generation component and an attention weighting calculation component.
3. The method of claim 1, wherein, The extended attention fusion unit specifically includes a multi-head attention structure and a dynamic memory module, and the multi-head attention structure includes a plurality of attention sub-layers, each attention sub-layer including a query vector generation component, a key-value vector generation component and an attention weighting calculation component: The query vector generation component receives the service event feature representation vector to generate a query vector; The key-value vector generation component receives the remaining service event feature representation vectors in the same service event sequence and the historical event features cached in the dynamic memory module to generate a key vector and a value vector; The dynamic memory module is a sliding window structure, and the event representation cache is updated by time step to provide historical event features to the key-value vector generation component, wherein the historical event features are within the window range provided by the component; The attention weighting calculation component calculates the correlation between the query vector and the key-value vector based on an extended scoring mechanism, and performs a weighted aggregation operation.
4. The method of claim 1, wherein, The S2 specifically comprises: S21, input the service event sequence into the improved Transformer model, extract the structured fields of each event node in the service event sequence, the structured fields of the event node including event type encoding, task state encoding, customer level encoding and resource number encoding, splice the structured fields of the event node to form an initial event representation vector x t : x t = [e t , s t , c t , r t ]; where e t is an event type code, s t is a task status code, c t is a customer class code, and r t is a resource number code. S22, input the timestamp field of the event node in the service event sequence into a time coding unit, perform a period position coding operation to generate a time position coding vector, and splice the time position coding vector with the initial event representation vector according to the feature dimension to form a time-enhanced event input vector; S23, input the time-enhanced event input vector into a feature alignment unit, perform uniform dimension mapping and normalization processing, and output a service event feature representation vector, wherein the service event feature representation vector is uniform in dimension and scale; S24, input the service event feature representation vector as a query vector into a query vector generation component to generate a query vector, input the remaining service event feature representation vectors in the same service event sequence and the historical event features cached in the dynamic memory module as modeling inputs into a key-value vector generation component to generate a key vector and a value vector, and update the historical feature cache in the dynamic memory module according to a sliding time window rule; S25, perform relevance calculation on the query vector and the key vector based on an extended scoring mechanism: wherein a ij is the relevance score of event i to event j, Q i is the query vector, K j is the key vector, W is the scoring weight matrix, φ(Δt ij ) is the event offset function between event i and event j, and d is the scaling function. S26, to a ij Normalization is performed, and the value vector is aggregated with weighting, combined with a gating mechanism to generate an event semantic feature vector y i : y i = σ(W g Q i )⊙(∑ j softmax j (α ij )W v V j )+(1-σ(W g Q i ))⊙Q i ; where σ(·) is a Sigmoid function, W g is a gating weight matrix, W v is a value vector mapping matrix, V j is a value vector, softmax j (·) is a softmax normalization function.
5. The method of claim 1, wherein, The S3 specifically comprises: S31, obtain an event semantic feature vector and a trigger time of a current event to be processed; S32, based on the context time sequence state reflected by the event semantic feature vector, set a plurality of forward sliding time window scales, and take the trigger time of the current event to be processed as a reference benchmark to construct a multi-scale time window; S33, for each multi-scale time window, extract historical service events with timestamps located in the multi-scale time window from the service event sequence to form a service event subsequence; S34, for each service event subsequence under each multi-scale time window, extract time sequence statistical features, including average response delay, historical scheduling density, and average resource utilization state; S35, splice all time sequence statistical feature results according to the multi-scale time window number sequence to generate a time feature vector.
6. The method of claim 1, wherein, The improved decision tree integration algorithm specifically comprises: The improved decision tree integration algorithm is composed of M regression trees, the regression trees take the joint feature vector as input, perform feature division based on the feature dimension of the joint feature vector to generate a regression tree structure, the regression tree is composed of internal nodes and leaf nodes, and the leaf nodes output scheduling priority score values; The improved decision tree integration algorithm dynamically adjusts the integration fusion weight of the regression tree according to the system resource saturation state, if the system resource utilization rate exceeds a set threshold, the fusion weight of a subtree with a higher split frequency for the response delay field in the joint feature vector is increased; The improved decision tree integration algorithm performs a path structure control strategy according to the customer level field in the joint feature vector, keeps all regression paths expanded for high-level customer service events, and performs path pruning and node merging operations for low-level customer service events; In the internal node division process of the improved decision tree integration algorithm, the service event historical response delay deviation is introduced as an auxiliary factor to jointly calculate the information gain for determining the feature split priority. The improved decision tree ensemble algorithm comprises a path record module for recording path information of a service event from a root node to a leaf node in each regression tree, the path information comprising a feature field index of an accessed node, a split threshold and a path number, and an explanation structure of a scheduling can be derived.
7. The method of claim 1, wherein, The S5 specifically comprises: S51, inputting the joint feature vector into each regression tree in the improved decision tree ensemble algorithm, each regression tree starting from a root node, judging a path direction at each internal node according to a value of a feature dimension of the joint feature vector and a split threshold, and ending until reaching a leaf node; S52、At each internal node, for each feature dimension of the joint feature vector, extract the sample set S containing the internal node, split S into left subset S L and right subset S R , compute the average response delay of the left subset, right subset and sample set, construct a feature split priority score function: wherein, Φ(d j ) is the feature partition priority score value of the joint feature vector feature dimension d j , IG(·) is the information gain, λ is the response delay bias adjustment coefficient, is the average response delay of the left subset, is the average response delay of the right subset, is the average response delay of the sample set; the feature partition priority score values of all joint feature vector feature dimensions are calculated, the joint feature vector feature dimension with the highest feature partition priority score is selected as the partition feature of the current internal node, and the final split path is constructed; S53, performing a control strategy on the path structure according to a customer level field in the joint feature vector, reserving all path structures if the customer is a high-level customer, and reserving only a path with a feature division priority score greater than a set threshold and pruning or merging the remaining paths if the customer is a low-level customer; S54, outputting a score value at the leaf node after the joint feature vector passes through each regression tree: where f i is the i-th joint feature vector, is the m-th regression tree for f i the output score value, is the m-th regression tree as a decision function for f i the process of performing path determination and node traversal, and outputting the score value; S55, counting a number of times that a response delay field appears in a split node in each regression tree, calculating a fusion weight and outputting a scheduling priority score value: wherein S i is the scheduling priority score value of the ith joint feature vector, M is the number of regression trees, p m is the number of times the response delay field appears in split nodes in the mth regression tree, p k is the number of times the response delay field appears in split nodes in the kth regression tree. S56, recording path node information of a service event in each regression tree, comprising a feature field index, a split threshold, a path node number and a path sequence number.
8. The method of claim 1, wherein, The S6 specifically comprises: S61, collecting a set of to-be-processed service events, wherein each to-be-processed service event comprises a corresponding joint feature vector and a scheduling priority score value; S62, collecting a set of online service agents, wherein each online service agent comprises a service capability vector, an idle state and a region label; S63, performing a service queue operation, performing descending order sorting on the set of to-be-processed service events according to the scheduling priority score value, generating a descending service event queue, sequentially traversing the descending service event queue, assigning a matchable online service agent to each to-be-processed service event, and forming a scheduling matching pair: S64, outputting all scheduling matching pairs in a matching sequence as a service event scheduling list; S65, for each to-be-processed service event in the service event scheduling list, extracting path node information of the to-be-processed service event recorded in the improved decision tree ensemble algorithm, and constructing a scheduling explanation structure unit; S66, aggregating all scheduling explanation structure units and storing them in a scheduling explanation structure body.