Task assignment model training method, task assignment method and device

By building a binary graph structure and performing feature encoding and decoding, the solution difficulty and generalization problems of traditional task dispatch models in massive customer scenarios are solved, and fast and efficient dispatch solution generation is achieved.

CN119647866APending Publication Date: 2025-03-18BEIJING JINGDONG YUANSHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411719060.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

When facing a massive customer base, the solution of traditional task allocation models is difficult and lacks generalization.

Method used

By building a binary graph structure, feature encoding and decoding are performed, the target dispatch scheme is determined, and the task dispatch model is trained based on historical data.

Benefits of technology

It reduces the difficulty of solving the model, improves the generalization of the model, and can quickly generate dispatch solutions in a large number of customers' online scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647866A_ABST
    Figure CN119647866A_ABST
Patent Text Reader

Abstract

The invention discloses a task assignment model training method and a task assignment method and device, and relates to the technical field of computers. One specific embodiment of the task assignment model training method comprises the steps of constructing a bipartite graph structure based on acquired historical customer service data and historical task data; performing feature coding on the bipartite graph structure to obtain a customer service feature code and an event feature code; decoding the customer service feature code and the event feature code, determining a target assignment scheme according to a decoding result, and training based on historical customer service data, historical task data and the target assignment scheme to obtain a task assignment model; therefore, the solving difficulty of the model can be reduced, and the generalization of the model is improved. A specific embodiment of the task allocation method comprises the steps of inputting acquired to-be-allocated customer service data and to-be-allocated task data into a task allocation model to obtain a final allocation scheme; task assignment is carried out based on the final assignment scheme; the dispatching time is shortened, and the dispatching efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a training method for a task assignment model, a task assignment method and a device. Background Art

[0002] In the scenario of task assignment for logistics customer service personnel, the traditional task assignment method is to solve through modeling such as mixed integer programming or to calculate based on meta-heuristic methods such as genetic algorithms.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the related art:

[0004] When faced with a massive customer base, the variables and constraints are more complex, the model is difficult to solve, and the model is not generalizable. Summary of the invention

[0005] In view of this, the embodiments of the present invention provide a training method, a task assignment method and a device for a task assignment model, which can encode the input data through a bipartite graph structure in a scenario where a large number of customers are calling in. When the number of customer service calls changes, the encoding process is not affected, thereby reducing the difficulty of solving the model and improving the generalization of the model.

[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for training a task assignment model is provided, comprising:

[0007] Build a bipartite graph structure based on the historical customer service data and historical task data obtained;

[0008] Perform feature encoding on the bipartite graph structure to obtain customer service feature encoding and event feature encoding;

[0009] The customer service feature coding and event feature coding are decoded, and the target assignment plan is determined according to the decoding results. The task assignment model is obtained based on the historical customer service data, historical task data and the target assignment plan training.

[0010] Optionally, a bipartite graph structure is constructed based on the acquired historical customer service data and historical task data, including:

[0011] Extract customer service portrait features, incoming event features, and processing time features from historical customer service data and historical task data;

[0012] Map the customer service profile features to customer service nodes, map the incoming event features to event nodes, and map the processing time features to edges;

[0013] A bipartite graph structure is constructed based on customer service nodes, event nodes, and edges.

[0014] Optionally, feature encoding is performed on the bipartite graph structure to obtain customer service feature encoding and event feature encoding, including:

[0015] Based on the graph attention mechanism, each original node feature in the bipartite graph structure is aggregated to obtain the node aggregation feature corresponding to each original node feature; the original node features include customer service node features and event node features;

[0016] The residual connection network is used to add each original node feature to the node aggregation feature corresponding to the original node feature to generate the node enhancement feature corresponding to each original node feature;

[0017] The node enhanced features corresponding to each original node feature are standardized to obtain customer service feature coding and event feature coding.

[0018] Optionally, feature aggregation is performed on each original node feature in the bipartite graph structure based on a graph attention mechanism to obtain node aggregation features corresponding to each original node feature, including:

[0019] Determine the adjacent node features and adjacent edge features of each original node feature in the bipartite graph structure;

[0020] The graph attention mechanism is used to adjust the weight of each adjacent node feature and adjacent edge feature to obtain the contribution of each adjacent node feature and adjacent edge feature relative to the original node feature;

[0021] Adjacent node features and adjacent edge features are aggregated based on the contribution of each adjacent node feature and adjacent edge feature to the original node feature to obtain the node aggregation feature corresponding to each original node feature.

[0022] Optionally, decoding the customer service feature code and the event feature code, and determining a target allocation scheme according to the decoding result, includes:

[0023] Decoding the customer service feature code and the event feature code based on a pre-configured mask decoder to obtain a decoding result; wherein the mask decoder is pre-configured based on a Markov decision process;

[0024] A target dispatching scheme is determined by using a dispatching strategy according to the decoding result; wherein the dispatching strategy includes a greedy search strategy and a beam search strategy.

[0025] According to a second aspect of an embodiment of the present invention, a task dispatching method is provided, comprising:

[0026] Obtain customer service data and task data to be assigned;

[0027] Inputting the customer service data to be assigned and the task data to be assigned into the task assignment model, and the task assignment model outputs a final assignment plan; wherein the task assignment model is obtained by any method in the first aspect of the embodiment of the present invention;

[0028] Tasks are assigned based on the final assignment plan.

[0029] According to a third aspect of an embodiment of the present invention, there is provided a training device for a task assignment model, comprising:

[0030] A construction module is used to construct a bipartite graph structure based on the acquired historical customer service data and historical task data;

[0031] The encoding module is used to perform feature encoding on the bipartite graph structure to obtain customer service feature encoding and event feature encoding;

[0032] The training module is used to decode the customer service feature code and the event feature code, determine the target allocation plan according to the decoding results, and obtain the task allocation model based on the historical customer service data, historical task data and the target allocation plan training.

[0033] According to a fourth aspect of an embodiment of the present invention, there is provided a task dispatching device, comprising:

[0034] The acquisition module is used to obtain customer service data and task data to be assigned;

[0035] A determination module, used for inputting the customer service data to be assigned and the task data to be assigned into a task assignment model, and the task assignment model outputs a final assignment plan; wherein the task assignment model is obtained by any method in the first aspect of the embodiment of the present invention;

[0036] The dispatching module is used to dispatch tasks based on the final dispatching plan.

[0037] According to a fifth aspect of an embodiment of the present invention, there is provided an electronic device, including:

[0038] one or more processors;

[0039] a storage device for storing one or more programs,

[0040] When one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.

[0041] According to a sixth aspect of an embodiment of the present invention, there is provided a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method of any of the above embodiments is implemented.

[0042] According to a seventh aspect of an embodiment of the present invention, there is provided a computer program product, including a computer program, which implements the method of any of the above embodiments when the computer program is executed by a processor.

[0043] An embodiment of the above invention has the following advantages or beneficial effects: by constructing a bipartite graph structure based on the acquired historical customer service data and historical task data; performing feature encoding on the bipartite graph structure to obtain customer service feature encoding and event feature encoding; decoding the customer service feature encoding and event feature encoding, determining the target dispatching scheme according to the decoding results, and training the task dispatching model based on the historical customer service data, historical task data and the target dispatching scheme; thereby, in the scenario of massive customer calls, the input data can be encoded by the bipartite graph structure, and when the number of customer service calls changes, the encoding process is not affected, thereby reducing the difficulty of solving the model and improving the generalization of the model. By obtaining the customer service data to be dispatched and the task data to be dispatched; inputting the customer service data to be dispatched and the task data to be dispatched into the task dispatching model, the task dispatching model outputs the final dispatching scheme; wherein the task dispatching model is obtained by any method in the first aspect of the embodiment of the present invention; performing task dispatching based on the final dispatching scheme; the task dispatching method of this embodiment can achieve the effect of millisecond-level solution, meet the scenario of massive customer calls, shorten the dispatching time, and improve the dispatching efficiency.

[0044] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0046] Figure 1 is a schematic diagram of the main process of a training method for a task assignment model according to an embodiment of the present invention;

[0047] Figure 2 is a flow chart of a method for training a task assignment model according to an optional embodiment of the present invention;

[0048] Figure 3 is a schematic diagram of a task dispatching method according to an embodiment of the present invention;

[0049] Figure 4 is a schematic diagram of main modules of a training device for a task allocation model according to an embodiment of the present invention;

[0050] Figure 5 is a schematic diagram of main modules of a task dispatching device according to an embodiment of the present invention;

[0051] Figure 6is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0052] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0054] It should be noted that the acquisition, storage and application of personal information etc. involved in the embodiments of the present invention are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0055] In the task assignment scenario of logistics customer service personnel, the traditional task assignment method is to solve through modeling such as mixed integer programming or calculate based on meta-heuristic methods such as genetic algorithms. When facing a massive customer base, the variables and constraints are more complex, the model is more difficult to solve, and the model is not generalizable.

[0056] In view of this, according to a first aspect of an embodiment of the present invention, a method for training a task assignment model is provided.

[0057] Figure 1 FIG. 1 is a schematic diagram of the main process of the training method of the task allocation model according to an embodiment of the present invention. Figure 1 As shown, the training method of the task assignment model according to an embodiment of the present invention mainly includes the following steps S101 to S103.

[0058] Step S101, constructing a bipartite graph structure based on the acquired historical customer service data and historical task data.

[0059] Historical customer service data includes various characteristic information about customer service representatives, such as basic information about the customer service representative (such as name, work number, work experience), performance indicators (such as average processing time, resolution rate, customer satisfaction), and historical records of interaction with customers (such as types of events handled and customer feedback); these data can be used to build a comprehensive portrait of each customer service representative, reflecting their ability and efficiency in handling tasks. Historical task data includes information on various tasks assigned to customer service in the past. These task data may include the type of task, complexity, processing time, customer demand characteristics, and task priority. By analyzing these historical task data, the matching relationship between different types of tasks and customer service capabilities can be identified, thereby providing data support for subsequent task assignments.

[0060] The constructed bipartite graph structure consists of two types of nodes, one is the customer service node, which represents different customer service representatives; the other is the event node, which represents the task to be assigned; the edge represents the relationship between customer service and the task, which can be weighted by processing time or matching degree. By constructing a bipartite graph structure, the interaction mode and dependency relationship between customer service and tasks can be captured intuitively. In the specific implementation, customer service features are first extracted from historical customer service data to form customer service nodes; task features are extracted from historical task data to form event nodes; according to the allocation of historical tasks, edges are established between customer service nodes and event nodes, and the weight of the edge can be quantified according to the actual processing time or customer service processing efficiency. This embodiment not only enhances the accuracy and efficiency of task assignment, but also provides a solid foundation for subsequent feature encoding and decoding.

[0061] Step S102, feature encoding is performed on the bipartite graph structure to obtain customer service feature encoding and event feature encoding.

[0062] Customer service feature coding involves aggregating the multi-dimensional features of customer service nodes. Each customer service node usually includes multiple features, such as the history of answering tasks, processing time, customer satisfaction, skills and expertise, etc. Event feature coding involves aggregating the multi-dimensional features of event nodes, mainly including information such as event type, priority, complexity and processing results.

[0063] Specifically, the bipartite graph structure can be feature encoded based on the graph neural network (GNN). First, a graph neural network model is constructed to aggregate the features of the customer service node and the event node respectively through the graph attention mechanism. In this process, the model calculates the attention weights between each node and weights the importance of each neighbor node to the central node, thereby realizing the dynamic aggregation of information. For example, for the customer service node, the network will integrate its historical processing records, satisfaction, professional skills and other information, and extract more contextual features through interaction with the event node. It can not only capture the complex relationship between nodes, but also effectively reflect the dynamic interaction between customer service and events, thereby generating high-quality customer service feature encoding and event feature encoding.

[0064] In addition, a feature mapping method based on deep learning can be used to first perform a preliminary mapping of the features of the customer service nodes and event nodes, and then use a multi-layer perceptron (MLP) to transform and extract the original features of each node; this can effectively improve the expressive power of the coding and ensure that the generated customer service feature coding and event feature coding fully reflect the diversity and complexity of the nodes.

[0065] Step S103, decoding the customer service feature code and the event feature code, determining a target allocation scheme according to the decoding result, and obtaining a task allocation model based on historical customer service data, historical task data and target allocation scheme training.

[0066] Specifically, based on the decoding strategy of the sequence-to-sequence model, the customer service feature encoding and event feature encoding can be input into a trained sequence-to-sequence model. The model extracts the context information of the input features through the encoder-decoder structure, and then generates a target dispatching scheme suitable for the current task. During the decoding process, the model dynamically adjusts the subsequent output according to the generated dispatching information, so that each decision takes into account the feedback of historical data and the change of the current state. After obtaining the target dispatching scheme, the model is trained based on these schemes and historical customer service data and historical task data, that is, the reinforcement learning algorithm is used to ensure that the model can self-adjust and optimize when new data appears. Through continuous training and updating, the task dispatching model can adapt to various customer service scenarios and improve its effectiveness and accuracy in practical applications. This dynamic model update mechanism enables the system to not only handle current dispatching needs, but also prepare for possible future situations, thereby improving the generalization of the model.

[0067] The embodiment of the present invention constructs a bipartite graph structure based on the acquired historical customer service data and historical task data; performs feature encoding on the bipartite graph structure to obtain customer service feature encoding and event feature encoding; decodes the customer service feature encoding and event feature encoding, determines a target allocation scheme according to the decoding results, and obtains a task allocation model based on the historical customer service data, historical task data, and target allocation scheme training; thereby, in a scenario where a large number of customers are incoming, the input data can be encoded through the bipartite graph structure, and the encoding process is not affected when the number of customer service lines changes, thereby reducing the difficulty of solving the model and improving the generalization of the model.

[0068] Optionally, Figure 2 FIG. 1 is a schematic diagram of a training method for a task assignment model according to an optional embodiment of the present invention. Figure 2 As shown in the figure, a bipartite graph structure is constructed based on the acquired historical customer service data and historical task data, including:

[0069] Step S201, extracting customer service portrait features, incoming event features and processing time features from historical customer service data and historical task data.

[0070] Step S202, mapping the customer service portrait features into customer service nodes, mapping the incoming event features into event nodes, and mapping the processing time features into edges.

[0071] Step S203, constructing a bipartite graph structure based on customer service nodes, event nodes and edges.

[0072] When constructing the bipartite graph structure, we first extract customer service profile features from historical customer service data, such as customer service work experience, skill level, types of events handled, customer feedback, and the average processing time of each customer service representative. At the same time, we extract incoming event features from historical task data, such as event type, complexity, priority, and processing results. The processing time feature refers to the time spent by customer service on processing a specific event, which can be calculated by analyzing the processing time in historical task records. After extracting these features, we map the customer service profile features to customer service nodes, each of which represents a specific customer service individual. We map the incoming event features to event nodes, each of which corresponds to a customer request or task. We regard the processing time features as edges, connecting customer service nodes and event nodes, indicating the time or complexity required for customer service to process a specific event. The existence of these edges provides structured information for constructing the bipartite graph, which enables a better understanding of the dynamic relationship between customer service and tasks.

[0073] You can also use real-time data streams to dynamically build a bipartite graph structure, receive and process new customer service data and task data in real time, and continuously update the graph structure using online learning. Whenever new customer service or event data comes in, the system can automatically extract new features and update the corresponding nodes and edges, so that the bipartite graph always reflects the latest business status. This dynamic construction method can better adapt to changing business needs and improve the efficiency and accuracy of task dispatching.

[0074] Optionally, feature encoding is performed on the bipartite graph structure to obtain customer service feature encoding and event feature encoding, including: based on the graph attention mechanism, feature aggregation is performed on each original node feature in the bipartite graph structure to obtain node aggregation features corresponding to each original node feature; wherein the original node features include customer service node features and event node features; each original node feature is added to the node aggregation features corresponding to the original node features using a residual connection network to generate a node enhancement feature corresponding to each original node feature; the node enhancement features corresponding to each original node feature are standardized to obtain customer service feature encoding and event feature encoding.

[0075] Specifically, the feature aggregation of each original node feature is performed through the graph attention mechanism, so that the system can dynamically assign weights to each node, thereby combining features according to the relationship and importance between nodes. Specifically, the customer service node features and event node features are input into the graph attention mechanism as original node features. The mechanism aggregates the features of adjacent nodes by calculating the attention weights between nodes, thereby forming more representative node aggregation features. These node aggregation features can capture the contextual information of the nodes in the graph structure, making subsequent feature processing more accurate. The residual connection network is used to add each original node feature to its corresponding node aggregation feature to generate node enhancement features. The introduction of residual connections can not only help maintain the information of the original features and avoid information loss in the deep network, but also effectively alleviate the problem of gradient disappearance, promote cross-layer transmission of information, and enable the model to better learn complex feature representations during training. Finally, the node enhancement features are standardized to eliminate the scale differences between features, improve the convergence speed and performance of the model, and obtain customer service feature encoding and event feature encoding, which represent the high-dimensional feature vectors of customer service nodes and event nodes respectively.

[0076] Optionally, feature aggregation is performed on each original node feature in the bipartite graph structure based on a graph attention mechanism to obtain a node aggregation feature corresponding to each original node feature, including: determining adjacent node features and adjacent edge features of each original node feature in the bipartite graph structure; adjusting the weight of each adjacent node feature and adjacent edge feature using the graph attention mechanism to obtain a contribution of each adjacent node feature and adjacent edge feature to the original node feature; and aggregating adjacent node features and adjacent edge features based on a contribution of each adjacent node feature and adjacent edge feature to the original node feature to obtain a node aggregation feature corresponding to each original node feature.

[0077] Specifically, the topological structure of the graph can be used to identify the nodes directly connected to a specific original node and the edges of these connections, thereby determining the adjacent node features and adjacent edge features of each original node feature in the bipartite graph structure. Then, the graph attention mechanism is used to adjust the weights of each adjacent node feature and adjacent edge feature. The core of the graph attention mechanism is to calculate the attention weights between the original node and its adjacent nodes, so as to reflect the importance of each adjacent feature to the original node feature. Specifically, the mechanism can dynamically generate weights based on the similarity of features and the relationship between nodes, so that more attention is paid to important features and less influence is given to less relevant features; this weighting process not only improves the accuracy of feature aggregation, but also helps the model better capture the complex relationship between nodes. Finally, based on the contribution of each adjacent node feature and adjacent edge feature, these features are aggregated to obtain the node aggregate feature corresponding to each original node feature. The aggregation operation can be weighted summation or splicing, combined with the adjusted weights to integrate each adjacent feature. This aggregate feature represents a more comprehensive representation of the original node in the graph structure, enabling it to contain effective information from surrounding nodes, thereby enhancing the performance of downstream tasks (such as task assignment models).

[0078] In addition, feature aggregation can also be achieved through a graph convolutional network (GCN), where the original node features and the features of its neighbors are fused through multi-layer convolution operations. Each layer of convolution updates the feature representation of the original node and extracts higher-order neighborhood information layer by layer, thereby gradually building a richer node feature representation. This embodiment has good scalability when processing large-scale graph data and can effectively extract complex graph structure information.

[0079] Optionally, the customer service feature code and the event feature code are decoded, and a target dispatching scheme is determined according to the decoding results, including: decoding the customer service feature code and the event feature code based on a pre-configured mask decoder to obtain a decoding result; wherein the mask decoder is pre-configured based on a Markov decision process; and determining the target dispatching scheme according to the decoding result using a dispatching strategy; wherein the dispatching strategy includes a greedy search strategy and a beam search strategy.

[0080] Specifically, the input feature encoding can be processed based on a pre-configured mask decoder. The design of the mask decoder is based on the Markov decision process (MDP), which allows the model to select the optimal next action according to the current state (i.e., the decoded part and the current feature encoding) during the decoding process. By introducing the state transition probability and reward mechanism, the mask decoder can effectively capture the potential information in the feature encoding and provide contextual basis for each decision. The decoding process can generate a decoding result. Specifically, this result can be regarded as a probability distribution of a series of decoded task allocation schemes. Each scheme represents a possible allocation result under the current feature state. The mask decoder can dynamically adjust the output according to the different input features through the learned strategy. This process not only improves the accuracy of decoding, but also provides personalized allocation schemes for specific customer service and event features. After obtaining the decoding results, the target dispatching scheme is determined by using the dispatching strategy according to the decoding results. The dispatching strategy can include greedy search strategy and beam search strategy. The greedy search strategy selects the current optimal option in each step, and the beam search strategy maintains multiple possible options in each step and finally determines the best solution by evaluating their overall quality. The flexible application of this strategy allows the model to take into account both efficiency and effectiveness when dealing with complex tasks, avoiding the degradation of global performance due to local optimality.

[0081] Reinforcement learning methods can also be used for decoding. The decoding process can be regarded as a decision sequence generation process, and the target assignment scheme can be optimized through reinforcement learning algorithms (such as Q-learning or policy gradient methods). This method can adapt to new task assignment requirements in real time in a dynamically changing environment, further improving the assignment efficiency and accuracy.

[0082] According to a second aspect of an embodiment of the present invention, a task dispatching method is provided.

[0083] Figure 3 is a schematic diagram of the main process of the task dispatching method according to an embodiment of the present invention; Figure 3 As shown, the task dispatching method according to the embodiment of the present invention mainly includes the following steps S301 to S303.

[0084] Step S301, obtaining customer service data to be assigned and task data to be assigned.

[0085] Step S302, inputting the customer service data to be assigned and the task data to be assigned into the task assignment model, and the task assignment model outputs a final assignment plan; wherein the task assignment model is obtained by any method in the first aspect of the embodiments of the present invention.

[0086] Step S303: perform task assignment based on the final assignment plan.

[0087] To obtain customer service data and task data to be assigned, relevant data can be extracted from the enterprise's customer relationship management (CRM) system and task management system. Customer service data to be assigned includes information such as the availability, skills, and historical performance indicators of each customer service; task data to be assigned includes key attributes such as customer requests to be processed, task priority, and estimated processing time. The customer service data to be assigned and the task data to be assigned are input into the task assignment model, which generates the final assignment plan based on the feature encoding and decoding process mentioned above. The task assignment model uses machine learning or deep learning algorithms and can identify the best match between customer service and tasks through training with historical data. The model can use advanced technologies such as neural networks and reinforcement learning to analyze input data, comprehensively consider the characteristics of customer service and task requirements, and output efficient assignment plans. Based on the final assignment plan, actual task assignment is carried out, and the final assignment plan is fed back to the relevant customer service personnel, and the pending tasks are automatically assigned to the corresponding customer service personnel. This process can be achieved through automatic notification, task management tools, or real-time chat systems, so that customer service can quickly obtain tasks and start processing. Effective task dispatch not only improves customer service efficiency, but also enhances customer experience, as customer requests can be responded to and resolved more quickly. At the same time, the system's dynamic adjustment capabilities can also optimize the dispatch process based on real-time feedback, further improving overall service quality.

[0088] According to a preferred embodiment of the present invention, in the actual scenario of customer service call allocation, a method of allocating incoming calls based on a graph attention mechanism is proposed. When a customer calls in, there will be a large number of loss and claim events, which need to be handled by second-line customer service with relevant skills. Therefore, the first-line customer service will upgrade the incoming call to the second line. At the same time, in order to ensure the experience, the latest outbound call time for the event will be determined, and the second-line customer service needs to make an outbound call for the event within the specified time as much as possible. In this regard, this type of problem can be abstracted as follows: the amount of events collected within a period of time is allocated to the customer service in order, and the completion time of all events is minimized without exceeding the maximum capacity of each customer service and the event volume is evenly distributed.

[0089] First, the basic model is defined. The set, parameters, and variable symbols of the basic model are shown in Table 1. Based on the above-defined sets, parameters, and variable symbols, a customer service event dispatching model is established as shown in Table 2.

[0090] Table 1 Collection, parameters, and variable symbols of the basic model

[0091]

[0092] Table 2 Customer service event dispatch model

[0093]

[0094] The mixed integer programming problem can be solved directly by commercial solvers such as Gurobi, but due to the large-scale problem scenarios, integer variables and constraints, it is usually impossible to obtain a feasible solution within the specified time. Therefore, the present invention further designs a logistics personnel task assignment method based on graph attention mechanism and deep reinforcement learning. This method uses reinforcement learning as the training framework, and establishes a reinforcement learning policy network through an encoder based on a graph attention mechanism and a mask decoder based on a Markov decision process. The algorithm framework is introduced in three parts: an encoder based on a graph attention mechanism, a mask decoder based on a Markov decision process, and the REINFORCE algorithm (policy gradient algorithm).

[0095] The original data is represented by a graph representation method of event and customer service features. First, the input data is converted into a bipartite graph structure. There are two types of nodes in the graph, event nodes and customer service nodes. Event node i has the latest outbound call time ET. i Features, customer service node n has a capacity limit R n The edge feature between event node i and customer service node n is the processing time WT of event i assigned to customer service n. ni The number of nodes and edges in the graph and the dimensions of node and edge features are related to the scale of the problem.

[0096] Based on the encoder of the graph attention mechanism, the role of the encoder in deep learning is to map the original data to another dimension, enhance the representation ability of the data, and capture the hidden features of the data. This process is usually called encoding. The encoder designed by the present invention comprises a feature mapping layer and N feature learning layers, each of which is composed of four modules: a graph attention mechanism module, a residual module, a feedforward neural network module, and a batch normalization module. The graph attention mechanism enables the encoder to better capture the relationship and dependency between nodes in the graph structure. It dynamically adjusts the influence of different nodes on the central node by calculating the attention weights between nodes, thereby improving the accuracy of feature representation. Compared with traditional convolutional neural networks (CNNs) or recurrent neural networks (RNNs), graph attention mechanisms can more effectively process data with non-Euclidean structures, such as graph data and social network data, to capture more complex relationship information. Introduce residual connections to connect multiple feature learning layers of the encoder in series. Using residual networks in series with feature learning layers can not only expand the representation ability of the encoder, but also enable information to be transmitted across layers, alleviate the gradient vanishing problem in deep networks, and improve the effect of training deep networks. Introduce batch normalization modules to accelerate convergence. Batch normalization can alleviate the problem of internal covariate shift, reduce sensitivity to initial weights, speed up model training, and has a certain regularization effect, which can reduce overfitting.

[0097] The input of the encoder is the above graph representation, and the output is the feature representation of each event node and the entire problem. The encoder feature mapping layer first performs a preliminary transformation on the original features to obtain event node features Customer Service Node Characteristics Event-Customer Service Edge Features The calculation process is as follows:

[0098]

[0099] The first module of the encoder feature learning layer is the graph attention mechanism module. Graph neural networks can propagate and aggregate information on graph nodes. Specifically, the graph neural network updates the feature representation of each node through a series of graph neural network layers, so that the feature representation of each node takes into account the characteristics of the node itself as well as the characteristics of the surrounding nodes and edges. This information aggregation and propagation method can capture the graph structure, such as the relationship between nodes and the topological structure of the graph. The key to this problem is to assign events to different customer services and sort them according to the time it takes for the customer service to handle the event, and the edges in the graph network can represent the time required for the customer service to handle the event. At the same time, due to the aggregation ability of the graph, each event can obtain the latest completion time of other events, which is more helpful for making decisions. In order to enable nodes to capture the information of surrounding nodes differently, the graph neural network adopts a graph attention mechanism, assigns different weights to each neighbor node, aggregates the neighbor node features and neighbor edge features according to the contribution, and then updates the node features. The calculation process of the graph attention mechanism is as follows: First, the importance of the features of neighbor node j to event node i and neighbor node i is calculated. ij , use the LeakyReLU activation function for nonlinear transformation:

[0100]

[0101] In order to compare the contributions of different neighbor nodes, the importance is normalized using softmax to obtain the contribution of the features of neighbor node j to node i:

[0102]

[0103] The neighbor features of node i are calculated according to the contribution α ij Perform weighted averaging and obtain the new feature h′ of node i through the activation function i :

[0104] Calculate k attention weights to capture information about neighbor features:

[0105]

[0106] If average substitution concatenation is used in the last layer of the graph neural network, the final node representation feature is obtained:

[0107]

[0108] After the data passes through the graph attention mechanism module, each node feature aggregates the neighbor node features and edge features, and then the updated node features are input into the residual network module. Residual network is a commonly used network connection method to solve the gradient vanishing problem in deep neural networks. In deep neural networks, feature mapping usually needs to go through multiple activation functions, which may cause gradient explosion or gradient vanishing problems. The residual connection avoids the gradient vanishing problem by directly adding the input and output. The network calculation process of the residual connection can be expressed as: y = x + f (x), where x is the input, f (x) is the output after the current network layer, and y is the final output result of the network layer.

[0109] The third module of the feature learning layer is the feedforward neural network. The feedforward neural network is one of the basic network types, consisting of multiple neurons, and each layer of neurons is fully connected to the neurons in the next layer. The feedforward neural network usually consists of an input layer, a hidden layer, and an output layer, and information propagation is iterated through the following formula,

[0110] z (l) =W (l) a (l-1) +b (l)

[0111] a (l) =f l (z (l) )

[0112] Among them, a (l) is the output of the lth layer of neurons, z (l) is the net input of the neurons in layer l, f l (·) is the activation function of the lth layer.

[0113] Finally, the batch normalization layer is also required to normalize the data. Batch normalization is a method to accelerate neural network training. During the training of deep neural networks, the distribution of data entering each layer may change, making the network training process difficult. Batch normalization accelerates the network training process by standardizing the input data of each layer. Given a small batch sample set containing K samples, the calculation process is as follows:

[0114]

[0115] Among them, μ B is the mean of the k net inputs of layer l, is the variance of the k net inputs of layer l, ∈ is a very small amount to prevent the variance from being 0, BN γ,β (z (l)) is to perform batch normalization on the net input of layer l, normalizing the distribution of the net input of the same batch of samples in layer l to a normal distribution. γ and β are trainable parameters.

[0116] In summary, the encoder re-represents the original data through a series of nonlinear transformations to obtain features with stronger expressive power, and finally obtains the encoding of each node With graph encoding The overall calculation process of the encoder is as follows:

[0117]

[0118] in, is the net input of the ith node, is the activation value of node 1 at layer l-1, is the hidden layer state of the edge from node i to node j, BN l It is batch normalization of the net input of the l-th layer node. is the mean of the activation values ​​of all nodes in the lth layer, which is used as the feature representation of the entire graph.

[0119] Mask decoder based on Markov decision process. Since there is a latest outbound call event, it is necessary to estimate the outbound call time of each event when assigning events to customer service. The processing time of the event is related to the assigned customer service. Therefore, the customer service event dispatching model is essentially to find an optimal order π=(π1,…,π n ), the Markov decision process can be used to model the sequential decision task. The Markov decision process describes a sequential decision task by defining elements such as state space, action space, state transfer matrix and reward function, usually using the tuple {X t ,A,P,R}.

[0120] State Space X t Represents the state of the environment characteristics described by the problem at stage t. In this problem, the state consists of three types of characteristics: node characteristics Graph Features Decoding context feature h C Node features and graph features are output by the decoder, and the decoding context features change with the stage. In each stage, the events dispatched are related to the processing completion time of the previous event, so the features of the artifacts selected in the previous stage are used as decoding context features. In the initial stage, a scientifically learned parameter vector v is set f Replace the features of the selection event in the previous stage.

[0121]

[0122] The action space is the events that have not been assigned in the current stage. The action selection is related to the current state and can be expressed by probability distribution. Therefore, the probability p(π) of the entire Markov decision process generating trajectory π is:

[0123]

[0124] The reward function is a function of the final ranking π, and its calculation method is equivalent to the objective function of the optimization problem.

[0125] For the above Markov decision process, this method designs a decoder based on a multi-head attention with mask mechanism. During the decoding process, the selected event cannot be selected at the current stage, so the decoder designs a mask mechanism to remove illegal actions in the action space, so that the agent can only choose specific actions. The decoder is divided into two layers, one is a multi-head mask attention mechanism, which nonlinearly maps the environmental state of the current stage, and the other is a single-head mask attention mechanism, which calculates the attention weights of the features after state mapping and the features of each node, and regards the attention weights as the probability of the event being selected.

[0126] The multi-head attention mechanism layer is As input, h s Further representation of h′ s is the output. Let M be the number of attention heads, d in is the input vector The dimension, d out is the output vector h′ s The parameter has M query transformation matrices M transformation matrices M value transformation matrix and an output matrix W out , is the number of heads of the multi-head attention mechanism. W out They are of dimension d q ×2*d in , d k ×d in , d v ×d in , d out ×d v The matrix of The calculation process of decoding step t is as follows:

[0127] Calculate the state vector h under the mth attention s The query vector of the node is represented by The key vector and value vector of :

[0128]

[0129] Calculate the state vector h under the mth attention s Compatibility with the i-th node:

[0130]

[0131] Calculate the attention weight under the mth attention

[0132]

[0133] Calculate the mth attention, h s The representation vector h sm :

[0134]

[0135] Aggregate the representation vector under M attentions:

[0136]

[0137] The single-head masked attention mechanism layer is h′ s , As input, with probability distribution P = {p1,…,p n} is the output. According to the output of the encoder and decoder multi-head mask attention mechanism, h′ s The dimension is d out , The dimension is d in The learnable parameters are W Q ,W K Parameter C is used to trim u s′i The calculation process is as follows:

[0138] Calculate h′ s The query vector is The key vector of:

[0139]

[0140] Calculate h′ s , Compatibility:

[0141]

[0142] Calculate the probability p of each workpiece being selected i :

[0143]

[0144] This method uses the gradient ascent-based reinforcement learning algorithm REINFORCE algorithm to train the policy function to maximize the cumulative reward. The algorithm updates the policy function by sampling trajectories and calculating gradients. Specifically, the REINFORCE algorithm includes the following steps: first, define the policy function, use the encoder based on the graph attention mechanism and the mask decoder based on the multi-head attention mechanism as the policy function; then sample the trajectory, use the current policy function to sample a trajectory in the environment, that is, a series of states, actions and rewards, and find the global optimal solution through a random sampling strategy; calculate the reward, calculate the cumulative reward on the trajectory, let s be an instance of the customer service event dispatching problem, input the instance s into the policy function to obtain the trajectory distribution p θ (π|s). L(π|s) is the objective function value when the event of instance s is arranged as π. is L(π|s) with probability p θ The expected objective function value under (π|s), Calculate the gradient, the goal is to maximize the instance s in the trajectory probability distribution p θ The expected objective function value under (π|s) is obtained by sampling the trajectory, and the gradient is obtained by the derivative of the log-likelihood function:

[0145]

[0146] Then, update the policy function and use the gradient to update the parameters of the policy function. α is the learning rate. Repeat the steps to sample the trajectory to update the policy function until the policy function converges.

[0147] The experimental environment of the algorithm framework proposed in this embodiment is a 64-bit PC, the CPU is Intel Core i7-10510U, the main frequency is 2.30GHz, the RAM is 16GB, the GPU is AMD, and the video memory is 8G. Gurobi9.5.1 is used to solve the mixed integer programming problem, and the encoder-decoder is built using the python language and torch2.3.1 deep learning framework. The specific experimental settings are as follows:

[0148] The problem parameters are set as follows: problem scale: 10 employees, 100 events; the time it takes for an employee to handle an event WT ni It obeys the uniform distribution U(0,1). The encoder-decoder parameters are set as follows. The encoder-decoder network initialization weight matrix obeys the uniform distribution Where d is the input dimension; the encoder-decoder hidden layer dimension is 256; the number of encoder feature learning layers is 2. The training parameters are set as follows: the number of training rounds is 50; 1000 instances are randomly selected in each round and trained in 20 batches, with a batch size of 50; the optimizer uses the Adam optimizer; the learning rate is 0.005; the sample size of the validation set is 10,000 instances.

[0149] According to the experimental setting, when the model was trained for 600-800 batches, that is, 30-40 rounds, it had converged, so the training process overhead was not large. This embodiment compares the solution efficiency of Gurobi and RL algorithms in terms of solution speed and solution time. Regarding the algorithm solution time, this experiment generated 11 instances with event quantities of [50, 60, ..., 150]. The solution time of Gorubi increases linearly with the increase of the problem scale. When the event quantity reaches 140, Gurobi cannot obtain a feasible solution within 60s; this embodiment can obtain a solution within 0.01s in all scenarios. Regarding the algorithm solution quality, when the event quantity is less than 90, the total processing time calculated by this embodiment is slightly higher than that of Gurobi, but when the event quantity is greater than 90, the total processing time calculated by this embodiment is stably lower than that of Gurobi, and a better solution is obtained.

[0150] According to a third aspect of an embodiment of the present invention, a training device for a task allocation model is provided.

[0151] Figure 4 is a schematic diagram of the main modules of the training device of the task allocation model according to an embodiment of the present invention, such as Figure 4 As shown, a training device 400 for a task assignment model includes:

[0152] Construction module 401, used to construct a bipartite graph structure based on the acquired historical customer service data and historical task data;

[0153] The encoding module 402 is used to perform feature encoding on the bipartite graph structure to obtain customer service feature encoding and event feature encoding;

[0154] The training module 403 is used to decode the customer service feature code and the event feature code, determine the target allocation plan according to the decoding result, and obtain the task allocation model based on the historical customer service data, historical task data and the target allocation plan training.

[0155] Optionally, the construction module 401 is further used for:

[0156] Extract customer service portrait features, incoming event features, and processing time features from historical customer service data and historical task data;

[0157] Map the customer service profile features to customer service nodes, map the incoming event features to event nodes, and map the processing time features to edges;

[0158] A bipartite graph structure is constructed based on customer service nodes, event nodes, and edges.

[0159] Optionally, the encoding module 402 is further configured to:

[0160] Based on the graph attention mechanism, each original node feature in the bipartite graph structure is aggregated to obtain the node aggregation feature corresponding to each original node feature; the original node features include customer service node features and event node features;

[0161] The residual connection network is used to add each original node feature to the node aggregation feature corresponding to the original node feature to generate the node enhancement feature corresponding to each original node feature;

[0162] The node enhanced features corresponding to each original node feature are standardized to obtain customer service feature coding and event feature coding.

[0163] Optionally, the encoding module 402 is further configured to:

[0164] Determine the adjacent node features and adjacent edge features of each original node feature in the bipartite graph structure;

[0165] The graph attention mechanism is used to adjust the weight of each adjacent node feature and adjacent edge feature to obtain the contribution of each adjacent node feature and adjacent edge feature relative to the original node feature;

[0166] Adjacent node features and adjacent edge features are aggregated based on the contribution of each adjacent node feature and adjacent edge feature to the original node feature to obtain the node aggregation feature corresponding to each original node feature.

[0167] Optionally, the training module 403 is further used for:

[0168] Decoding the customer service feature code and the event feature code based on a pre-configured mask decoder to obtain a decoding result; wherein the mask decoder is pre-configured based on a Markov decision process;

[0169] A target dispatching scheme is determined by using a dispatching strategy according to the decoding result; wherein the dispatching strategy includes a greedy search strategy and a beam search strategy.

[0170] It should be noted that the specific implementation content of the training device for the task allocation model in the embodiment of the present invention has been described in detail in the above training method for the task allocation model, so the repeated content will not be described again here.

[0171] According to a fourth aspect of an embodiment of the present invention, a task dispatching device is provided.

[0172] Figure 5 is a schematic diagram of the main modules of the task dispatching device according to an embodiment of the present invention, such as Figure 5 As shown, a task dispatching device 500 includes:

[0173] The acquisition module 501 is used to acquire customer service data to be assigned and task data to be assigned;

[0174] The determination module 502 is used to input the customer service data to be assigned and the task data to be assigned into the task assignment model, and the task assignment model outputs a final assignment plan; wherein the task assignment model is obtained by any method in the first aspect of the embodiment of the present invention;

[0175] The dispatching module 503 is used to dispatch tasks based on the final dispatching solution.

[0176] It should be noted that the specific implementation content of the task dispatching device in the embodiment of the present invention has been described in detail in the above task dispatching method, so the repeated content will not be described again here.

[0177] According to a fifth aspect of an embodiment of the present invention, there is provided an electronic device, including:

[0178] one or more processors;

[0179] a storage device for storing one or more programs,

[0180] When one or more programs are executed by one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present invention and / or the second aspect of the embodiment of the present invention.

[0181] According to a sixth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention and / or the second aspect of the embodiment of the present invention is implemented.

[0182] According to a seventh aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, which, when executed by a processor, implements the method provided by the first aspect of the embodiment of the present invention and / or the second aspect of the embodiment of the present invention.

[0183] Figure 6 An exemplary system architecture 600 is shown to which the method for training a task allocation model or the apparatus for training a task allocation model according to an embodiment of the present invention can be applied.

[0184] like Figure 6As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0185] Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0186] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0187] The server 605 may be a server that provides various services, such as a background management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 601, 602, and 603. The background management server may analyze and process the received data such as the model training request, and feed back the processing results (such as the task assignment model - only an example) to the terminal device.

[0188] It should be noted that the training method of the task allocation model provided in the embodiment of the present invention is generally run by the server 605 , and accordingly, the training device of the task allocation model is generally set in the server 605 .

[0189] It should be noted that the task dispatching method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the task dispatching device is generally disposed in the server 605 .

[0190] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0191] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0192] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can execute various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0193] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 runs a communication process via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0194] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for running the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is run by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are run.

[0195] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0196] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually run basically in parallel, and they can sometimes run in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that runs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0197] The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The modules described may also be set in a processor, for example, they may be described as: a processor includes a construction module, an encoding module, and a training module. The names of these modules do not, in some cases, constitute a limitation on the module itself. For example, the construction module may also be described as a "module for constructing a bipartite graph structure based on the acquired historical customer service data and historical task data." Alternatively, a processor includes an acquisition module, a determination module, and a dispatch module. The names of these modules do not, in some cases, constitute a limitation on the module itself. For example, the acquisition module may also be described as a "module for acquiring customer service data to be dispatched and task data to be dispatched."

[0198] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes: constructing a bipartite graph structure based on the acquired historical customer service data and historical task data; performing feature encoding on the bipartite graph structure to obtain customer service feature encoding and event feature encoding; decoding the customer service feature encoding and event feature encoding, determining the target dispatching scheme according to the decoding result, and obtaining a task dispatching model based on the historical customer service data, historical task data and target dispatching scheme training. Alternatively, the device implements the following method: obtaining customer service data to be dispatched and task data to be dispatched; inputting the customer service data to be dispatched and the task data to be dispatched into the task dispatching model, and the task dispatching model outputs the final dispatching scheme; wherein the task dispatching model is obtained by any method in the first aspect of the embodiment of the present invention; and dispatching tasks based on the final dispatching scheme.

[0199] The computer program product provided by an embodiment of the present invention includes a computer program, which, when executed by a processor, implements the training method of the task assignment model in the embodiment of the first aspect of the present invention and / or the task assignment method in the embodiment of the second aspect of the present invention.

[0200] According to the technical solution of the embodiment of the present invention, the following advantages or beneficial effects are achieved: by constructing a bipartite graph structure based on the acquired historical customer service data and historical task data; performing feature encoding on the bipartite graph structure to obtain customer service feature encoding and event feature encoding; decoding the customer service feature encoding and event feature encoding, determining the target dispatching scheme according to the decoding results, and training the task dispatching model based on the historical customer service data, historical task data and the target dispatching scheme; thereby, in the scenario of massive customer incoming calls, the input data can be encoded by the bipartite graph structure, and the encoding process is not affected when the number of customer service incoming calls changes, thereby reducing the difficulty of solving the model and improving the generalization of the model. By obtaining the customer service data to be dispatched and the task data to be dispatched; inputting the customer service data to be dispatched and the task data to be dispatched into the task dispatching model, the task dispatching model outputs the final dispatching scheme; wherein the task dispatching model is obtained by any method in the first aspect of the embodiment of the present invention; and dispatching tasks based on the final dispatching scheme; the task dispatching method of this embodiment can achieve the effect of millisecond-level solution, meet the scenario of massive customer incoming calls, shorten the dispatching time, and improve the dispatching efficiency.

[0201] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0202] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

Claims

1. A training method for a task assignment model, characterized in that: include: Build a bipartite graph structure based on the historical customer service data and historical task data obtained; Performing feature coding on the bipartite graph structure to obtain customer service feature coding and event feature coding; The customer service feature code and the event feature code are decoded, a target allocation scheme is determined according to the decoding result, and a task allocation model is obtained by training based on the historical customer service data, historical task data and the target allocation scheme.

2. The method according to claim 1, characterized in that: A bipartite graph structure is constructed based on the historical customer service data and historical task data obtained, including: Extracting customer service portrait features, incoming event features, and processing time features from the historical customer service data and historical task data; Mapping the customer service portrait feature into a customer service node, mapping the incoming event feature into an event node, and mapping the processing time feature into an edge; A bipartite graph structure is constructed based on the customer service nodes, event nodes and edges.

3. The method according to claim 1, characterized in that The bipartite graph structure is feature-encoded to obtain customer service feature coding and event feature coding, including: Based on the graph attention mechanism, each original node feature in the bipartite graph structure is subjected to feature aggregation to obtain a node aggregation feature corresponding to each original node feature; wherein the original node features include customer service node features and event node features; Using a residual connection network, each of the original node features is added to the node aggregation feature corresponding to the original node feature to generate a node enhancement feature corresponding to each of the original node features; The node enhancement feature corresponding to each of the original node features is standardized to obtain a customer service feature code and an event feature code.

4. The method according to claim 3, characterized in that Based on the graph attention mechanism, each original node feature in the bipartite graph structure is feature aggregated to obtain node aggregation features corresponding to each original node feature, including: Determine adjacent node features and adjacent edge features of each original node feature in the bipartite graph structure; The weight of each of the adjacent node features and the adjacent edge features is adjusted by using a graph attention mechanism to obtain a contribution of each of the adjacent node features and the adjacent edge features to the original node features; The adjacent node features and adjacent edge features are aggregated based on the contribution of each of the adjacent node features and adjacent edge features to the original node features to obtain a node aggregation feature corresponding to each original node feature.

5. The method according to claim 1, characterized in that Decoding the customer service feature code and the event feature code, and determining a target allocation scheme according to the decoding result, including: Decoding the customer service feature code and the event feature code based on a pre-configured mask decoder to obtain a decoding result; wherein the mask decoder is pre-configured based on a Markov decision process; A target dispatching scheme is determined according to the decoding result using a dispatching strategy; wherein the dispatching strategy includes a greedy search strategy and a beam search strategy.

6. A task assignment method, characterized in that: include: Obtain customer service data and task data to be assigned; The customer service data to be assigned and the task data to be assigned are input into a task assignment model, and the task assignment model outputs a final assignment plan; wherein the task assignment model is obtained by any method described in claims 1 to 5; Task allocation is performed based on the final allocation plan.

7. A training device for a task assignment model, characterized in that: include: A construction module is used to construct a bipartite graph structure based on the acquired historical customer service data and historical task data; An encoding module, used for performing feature encoding on the bipartite graph structure to obtain a customer service feature code and an event feature code; The training module is used to decode the customer service feature code and the event feature code, determine the target allocation plan according to the decoding result, and obtain the task allocation model based on the historical customer service data, historical task data and the target allocation plan training.

8. A task dispatching device, characterized in that: include: The acquisition module is used to obtain customer service data and task data to be assigned; A determination module, used for inputting the customer service data to be assigned and the task data to be assigned into a task assignment model, and the task assignment model outputs a final assignment plan; wherein the task assignment model is obtained by any method described in claims 1 to 5; The dispatching module is used to dispatch tasks based on the final dispatching solution.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.