An e-commerce automatic customer service sentiment analysis method based on deep learning
By constructing an order service trajectory table and a heterogeneous relationship graph for fulfillment negotiation, and combining it with an improved GraphSAGE model, the problem of insufficient modeling of emotion changes in customer service sentiment analysis on e-commerce platforms was solved, achieving more accurate emotion recognition and risk assessment, and improving the response quality and service stability of automated customer service systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 浙江讯盟科技有限公司
- Filing Date
- 2026-03-20
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies in e-commerce platform customer service sentiment analysis struggle to effectively model the correlation between order fulfillment status, after-sales processing status, refund progress status, compensation processing status, and customer service response status and changes in user emotions, leading to inaccurate emotion recognition.
By constructing an order service trajectory baseline, a negotiation disturbance sequence, and a heterogeneous correlation graph of performance negotiation, and combining an improved GraphSAGE model with a counterfactual trajectory analysis mechanism, we can identify the emotional change process and risk status in multi-round interactions of e-commerce customer service.
It improves the pertinence and interpretability of emotion judgment, enhances the ability to express complex emotional evolution relationships, can identify the actual causes of emotion changes, and improves the response quality and service stability of automated customer service systems.
Smart Images

Figure CN122492213A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent customer service data processing technology, and in particular to a deep learning-based method for sentiment analysis in automated e-commerce customer service. Background Technology
[0002] As e-commerce platforms continue to expand their transaction volume, users generate a large amount of customer service interaction data during order fulfillment, logistics, refund processing, compensation processing, and after-sales negotiation. Automated customer service systems have gradually become an important technical means for e-commerce platforms to improve service efficiency and reduce labor costs. In existing technologies, sentiment analysis of customer service dialogues typically focuses on user inquiry texts or customer service response texts. It identifies the user's current emotion through keyword matching, sentiment dictionary statistics, or deep learning classification models, and uses this to assist in generating customer service response strategies. Although some technical solutions can analyze conversation content by combining contextual turn information, they still mainly focus on judging the sentiment tendency of the text semantics itself. The modeling of the correlation between order fulfillment status, after-sales processing status, refund progress status, compensation processing status, and customer service response status and changes in user emotions is still insufficient, making it difficult to truly reflect the business basis of emotion formation and evolution in e-commerce customer service scenarios.
[0003] Therefore, how to provide a deep learning-based method for sentiment analysis in automated e-commerce customer service is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] One objective of this invention is to propose a deep learning-based method for sentiment analysis in automated e-commerce customer service. This invention constructs an order service trajectory table, a negotiation disturbance sequence, and a heterogeneous correlation graph of performance negotiation. Combined with an improved GraphSAGE model and a counterfactual trajectory analysis mechanism, it achieves accurate identification of the emotional change process and risk status in multi-round interactions of e-commerce customer service, thereby improving the pertinence, interpretability, and reliability of automated handling of sentiment judgment.
[0005] A deep learning-based sentiment analysis method for automated e-commerce customer service, according to an embodiment of the present invention, includes the following steps: Step 1: Collect the original comprehensive dataset corresponding to the target order, match it with the order identifier as the association key, and link it together with the dialogue turn time as the main timeline to generate the order service trajectory base table; Step 2: Fragment each round of interaction records in the order service trajectory table, calculate the text friction value, response mismatch value, fulfillment delay value, and after-sales delay value respectively, and generate a negotiation disturbance sequence; Step 3: Construct a heterogeneous correlation graph for performance negotiation based on the order service trajectory table and the negotiation disturbance sequence; Step 4: Input the heterogeneous association graph of performance negotiation into the improved GraphSAGE model, and perform hierarchical neighborhood sampling and neighborhood aggregation on various types of nodes through the neighborhood classification sampling module, differential feature construction module, hierarchical aggregation update module and tension residual fusion module to obtain the tension propagation embedding sequence arranged by round; Step 5: Select key business nodes from the order service trajectory base table and perform fulfillment counterfactual replacement to construct multiple counterfactual order trajectories, forming a counterfactual trajectory cluster; Step 6: Use the tension propagation embedding sequence as the true trajectory, use each group of counterfactual tension propagation embeddings in the counterfactual trajectory cluster as the counterfactual trajectory, and perform merging statistics to generate the emotional risk judgment result.
[0006] Optionally, step one specifically includes: Collect the original comprehensive dataset corresponding to the target order. The original comprehensive dataset includes user inquiry text, customer service reply text, order fulfillment log, after-sales processing log, refund progress log, compensation processing log, logistics exception log, and their respective operation timestamp information. The system uses the order identifier as a unified association key to match various types of collected data. It uses the dialogue round time as the main timeline to link the fulfillment status, after-sales status, refund status, compensation status, and customer service response status corresponding to the time when the user speaks in each round. It uses a forward-keeping method to fill in missing business statuses and generates an order service trajectory table that unfolds by round.
[0007] Optionally, step two specifically involves: Each round of interaction records in the order service trajectory table is fragmented, which involves dividing each round of interaction records into a user expression segment, a customer service response segment, and a business status segment. Extract emotional reinforcement words, negation words, rhetorical question words, urging words, questioning words, concession words, compromise words, and escalation threat words from user expression segments respectively; Extract reassuring expressions, explanatory expressions, templated response expressions, compensatory expressions, expressions for transferring to human agents, and avoidance expressions from customer service responses; Extract the stagnant state, progress state, completion state, conflict state, and mismatch state from the business status segment; Based on the text repetition rate between adjacent rounds, the unresolved problem continuation rate, the proportion of customer service irrelevant answers, the density of user follow-up questions, and the duration of no change in business status, the text friction value, response mismatch value, fulfillment obstruction value, and after-sales delay value are calculated respectively. The text friction value, response mismatch value, performance delay value, and after-sales delay value corresponding to each round of interaction are combined to form the negotiation disturbance vector for that round. Arrange the negotiation perturbation vectors corresponding to the interaction records of each round in order of the round timestamps from front to back, and generate a negotiation perturbation sequence.
[0008] Optionally, step three specifically includes: Based on the order service trajectory table and the negotiation disturbance sequence, a heterogeneous correlation graph for fulfillment negotiation is constructed. The construction of this graph specifically includes: Map each round of user expression segment to a user expression node, map each round of customer service response segment to a customer service response node, and map the fulfillment event, after-sales action, and refund status corresponding to the current round to fulfillment event node, after-sales action node, and refund status node, respectively. Establish progressive edges between adjacent rounds, and construct negotiation tension nodes based on the overall tension level of each round's interaction records during the order negotiation process; Establish a response correspondence edge between the user expression node and the customer service response node, establish a performance impact edge between the performance event node and the negotiation tension node, establish a mitigation impact edge between the after-sales action node and the negotiation tension node, and establish a fund feedback edge between the refund status node and the negotiation tension node. The negotiation disturbance sequence is written into the user expression node, customer service response node, and negotiation tension node of the corresponding round as node attributes.
[0009] Optionally, the improved GraphSAGE model is specifically as follows: Input the heterogeneous association graph of performance negotiation into the neighborhood classification sampling module, and use the negotiation tension node corresponding to each round as the target update node. Divide the adjacent nodes of the target update node in the heterogeneous association graph into user semantic neighborhood, customer service response neighborhood, performance event neighborhood, after-sales action neighborhood and refund status neighborhood according to node type. Shallow sampling is performed on the user semantic neighborhood and the customer service response neighborhood. The shallow sampling is to retain the nearest neighbor nodes that are directly related to the user's request expression and the customer service response expression in the current round and the adjacent rounds. Deep sampling is performed on the neighborhood of the performance event and the neighborhood of the refund status. The deep sampling is to extract performance progress change information and refund flow change information that persist across multiple rounds. Intermediate-level sampling is performed on the after-sales action neighborhood. The intermediate-level sampling is to extract the action acceptance information in the after-sales intervention process, and output the sampled node sets in various neighborhoods as the fractal neighborhood sampling results according to the round correspondence. The sampling results of the fractal neighborhood are input into the differential feature construction module. Combined with the negotiated perturbation sequence and the node attributes written to each node, differential feature extraction is performed on each target update node and its neighboring nodes in the corresponding sampling neighborhood one by one to obtain the differential aggregation result. The differential aggregation results are input into the hierarchical aggregation update module to independently aggregate the differential aggregation results in the user semantic neighborhood, customer service response neighborhood, fulfillment event neighborhood, after-sales action neighborhood, and refund status neighborhood. During the aggregation process, intra-category aggregation is first performed on the differential features in the same neighborhood to form user semantic aggregation results, customer service response aggregation results, fulfillment event aggregation results, after-sales action aggregation results, and refund status aggregation results. The user semantic aggregation results, customer service response aggregation results, fulfillment event aggregation results, after-sales action aggregation results, and refund status aggregation results are concatenated and updated with the original node representation of the current target update node to generate the tension propagation intermediate representation of the current layer. The intermediate representation of tension propagation is input into the tension residual fusion module. Residual retention processing is performed on the negotiation tension nodes corresponding to each round. The residual retention processing is to perform weighted fusion of the overall tension level in the negotiation tension node representation of the previous layer and the intermediate representation of tension propagation representing the current neighborhood propagation result in the negotiation tension node representation of the current layer according to the preset weight. The negotiation tension node representations of each round after residual fusion are arranged according to the time sequence of the rounds to generate the tension propagation embedding sequence.
[0010] Optionally, the differential feature extraction specifically includes: Read the node attribute information corresponding to the current target update node according to the round to which the target update node belongs; According to the neighborhood type, read the node attribute information of the user semantic neighborhood node, customer service response neighborhood node, fulfillment event neighborhood node, after-sales action neighborhood node and refund status neighborhood node connected to the current target update node respectively; Align the attribute information of each neighbor node with the attribute information of the target update node in rounds. For each neighbor node in the user semantic neighborhood, compare the changes in text friction value and performance obstruction value between the current neighbor node and the target update node to obtain user semantic differential features. For each neighbor node in the customer service response neighborhood, compare the changes in response mismatch value and after-sales delay value between the current neighbor node and the target update node to obtain the customer service response differential characteristics. For each neighbor node in the neighborhood of the performance event, compare the differences between the current neighbor node and the target update node in terms of performance status progress, performance status stagnation, and conflict status changes to obtain the performance event differential features; For each neighbor node in the after-sales action neighborhood, compare the differences between the current neighbor node and the target update node in the after-sales processing stage, after-sales processing response, and after-sales delay level to obtain the after-sales action differential features; For each neighbor node in the refund status neighborhood, compare the differences between the current neighbor node and the target update node in the refund processing stage, refund arrival progress, and refund stagnation degree to obtain the refund status difference features; The correspondence between the response category of the current round of customer service response nodes and the request category of the current round of user expression nodes is checked to generate response deviation characteristics; The user semantic differential features, customer service response differential features, fulfillment event differential features, after-sales action differential features, refund status differential features, and response deviation features corresponding to the same target update node are concatenated and integrated in a unified order to form the differential aggregation result corresponding to the current target update node.
[0011] Optionally, step five specifically includes: Select key business nodes from the order service trajectory table to perform counterfactual replacement of fulfillment and construct multiple counterfactual order trajectories. The key business nodes include logistics stagnation status nodes, refund review status nodes, compensation pending status nodes, customer service templated reply nodes, and after-sales non-response status nodes. Replace the logistics standstill status node with the logistics progress status node, replace the refund review status node with the refund received status node, replace the compensation pending status node with the compensation executed status node, replace the customer service template reply node with the valid explanation reply node or compensation reply node, and replace the after-sales non-response status node with the after-sales accepted status node. In each counterfactual order trajectory, only a single key business node is changed while keeping the content of the remaining rounds and the remaining business nodes unchanged, forming a counterfactual trajectory cluster.
[0012] Optionally, step six specifically includes: The tension propagation embedding sequence is used as the true trajectory, and each set of counterfactual tension propagation embeddings in the counterfactual trajectory cluster is used as the counterfactual trajectory. The difference between the actual trajectory and each counterfactual trajectory in terms of negotiation tension value is calculated round by round, as well as the number of rounds in which the difference is continuously less than a preset threshold. The results are then weighted according to preset weights to obtain a comprehensive gap index. Different comprehensive gap indices are grouped and statistically analyzed according to performance, refund, compensation, customer service response, and after-sales actions to generate an emotion cause difference matrix; Various comprehensive negative indices are compared with preset emotional risk thresholds to generate emotional risk assessment results. The emotional risk assessment results include mild fluctuation state, automatically soothing state, high risk escalation state, or cautious handling state.
[0013] The beneficial effects of this invention are: This invention provides a deep learning-based sentiment analysis method for automated customer service in e-commerce. It models the real interaction links throughout the entire e-commerce order service process, moving beyond static sentiment judgment based on single-round user text or partial conversation semantics. Instead, it uses order identifiers as the main link, uniformly matching and jointly linking user inquiry text, customer service reply text, order fulfillment logs, after-sales processing logs, refund progress logs, compensation processing logs, logistics anomaly logs, and corresponding timestamp information to construct a round-by-round order service trajectory table. This allows sentiment analysis results to be directly based on the real business state, thereby significantly improving the consistency between sentiment recognition and order processing scenarios.
[0014] By fragmenting each round of interaction records and extracting text friction values, response mismatch values, fulfillment delay values, and after-sales delay values, this invention can meticulously depict the formation path, accumulation process, and amplification trend of user dissatisfaction during multiple rounds of negotiation. This avoids the problem of existing technologies relying solely on emotional words or semantic tendencies while ignoring the source of business conflict. Furthermore, this invention constructs a heterogeneous relational graph for fulfillment negotiation, incorporating user expressions, customer service responses, fulfillment events, after-sales actions, refund status, and negotiation tension into a unified relational structure. Combined with an improved GraphSAGE model for neighborhood classification sampling, differential feature construction, hierarchical aggregation updates, and tension residual fusion, the system can simultaneously capture the combined effects of changes in text interaction, customer service responses, fulfillment progress, after-sales processing, and refund flow on the level of negotiation tension, enhancing its ability to express complex emotional evolution relationships.
[0015] By performing counterfactual substitution on key business nodes and constructing counterfactual trajectory clusters, this invention can also identify the actual impact of different business factors on emotional changes. This allows emotional risk assessment to move beyond superficial classification and trace back to specific causes such as logistics stagnation, delayed refunds, non-execution of compensation, templated responses, or lack of after-sales response, improving the relevance and interpretability of risk assessment results. Based on the merged statistical results of real and counterfactual trajectories, emotional risk assessment results can be generated, effectively distinguishing between mild fluctuations, automatically soothing states, high-risk escalation states, and cautious handling states. This provides automated customer service systems with more accurate emotional recognition criteria and more reliable decision-making support, improving customer service response quality, reducing misjudgment rates, and enhancing the service stability and intelligence of e-commerce platforms in multi-round complex negotiation scenarios. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1This is a flowchart illustrating the overall process of a deep learning-based sentiment analysis method for automated e-commerce customer service proposed in this invention. Figure 2 This is a schematic diagram of the processing steps of the improved GraphSAGE model for a deep learning-based sentiment analysis method for automated e-commerce customer service proposed in this invention. Figure 3 This is a flowchart illustrating the differential feature extraction process of a deep learning-based sentiment analysis method for automated e-commerce customer service proposed in this invention. Detailed Implementation
[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0018] refer to Figures 1-3 A deep learning-based sentiment analysis method for automated customer service in e-commerce includes the following steps: Step 1: Collect the original comprehensive dataset corresponding to the target order, match it with the order identifier as the association key, and link it together with the dialogue turn time as the main timeline to generate the order service trajectory base table; Step 2: Fragment each round of interaction records in the order service trajectory table, calculate the text friction value, response mismatch value, fulfillment delay value, and after-sales delay value respectively, and generate a negotiation disturbance sequence; Step 3: Construct a heterogeneous correlation graph for performance negotiation based on the order service trajectory table and the negotiation disturbance sequence; Step 4: Input the heterogeneous association graph of performance negotiation into the improved GraphSAGE model, and perform hierarchical neighborhood sampling and neighborhood aggregation on various types of nodes through the neighborhood classification sampling module, differential feature construction module, hierarchical aggregation update module and tension residual fusion module to obtain the tension propagation embedding sequence arranged by round; Step 5: Select key business nodes from the order service trajectory base table and perform fulfillment counterfactual replacement to construct multiple counterfactual order trajectories, forming a counterfactual trajectory cluster; Step 6: Use the tension propagation embedding sequence as the true trajectory, use each group of counterfactual tension propagation embeddings in the counterfactual trajectory cluster as the counterfactual trajectory, and perform merging statistics to generate the emotional risk judgment result.
[0019] This step enables unified correlation analysis between text interaction information in e-commerce customer service scenarios and business statuses such as fulfillment, refunds, compensation, and after-sales service. This ensures that sentiment recognition results are no longer divorced from the order processing process itself, thereby improving the consistency between sentiment judgment and actual service status. By continuously characterizing the friction, mismatch, obstruction, and lag features in multi-round interactions, and combining the heterogeneous correlation graph of fulfillment negotiation with the improved GraphSAGE model for propagation analysis, the cumulative trend of user emotions and the degree of negotiation tension can be identified more accurately, enhancing the ability to capture implicit risks in complex multi-round conversations. Furthermore, by introducing a counterfactual substitution mechanism for key business nodes, the actual impact of different business factors on sentiment changes can be effectively distinguished, improving the pertinence and interpretability of sentiment risk assessment. This, in turn, provides a more reliable decision-making basis for automated customer service handling, judgment of the timing of human intervention, and optimization of service strategies.
[0020] In this embodiment, step one specifically includes: The system collects user inquiry texts, customer service reply texts, order fulfillment logs, after-sales processing logs, refund progress logs, compensation processing logs, logistics anomaly logs, and their corresponding operation timestamps for the target order. Among them, user inquiry texts and customer service reply texts are used to represent the interaction content during the order negotiation process; order fulfillment logs are used to represent the status changes of the order during the fulfillment process; after-sales processing logs are used to represent after-sales acceptance, after-sales flow, and after-sales processing results; refund progress logs are used to represent the status of refund application, refund review, and refund arrival; compensation processing logs are used to represent the status of compensation application, compensation review, and compensation execution; and logistics anomaly logs are used to represent the status of logistics stagnation, delivery anomalies, and receipt anomalies. The collected data is preprocessed in a standardized manner. User inquiry texts and customer service reply texts are converted into round-robin text records. Order fulfillment logs, after-sales processing logs, refund progress logs, compensation processing logs and logistics anomaly logs are converted into event-based status records. The order identifier field, status field and timestamp field in the various records are formatted in a unified manner. Using the order identifier as the unified association key, order-level matching is performed on rounded text records and event-based status records. User inquiry texts, customer service reply texts, order fulfillment logs, after-sales processing logs, refund progress logs, compensation processing logs and logistics exception logs belonging to the same target order are merged into the same order data set to form the original association record set of the target order. Using the dialogue rounds consisting of user inquiry texts and customer service reply texts as the main timeline, the original associated record set is processed by round expansion. The time when each user speaks is taken as the location time of the corresponding round, and the most recent effective performance status, after-sales status, refund status, compensation status and customer service response status before the location time are extracted to generate round status mapping results. The fulfillment status, after-sales status, refund status, compensation status, and customer service response status in the round status mapping results are respectively attached to the user inquiry text and customer service reply text of the corresponding round, so that each round of interaction records simultaneously contains user expression content, customer service response content, fulfillment status information, after-sales status information, refund status information, compensation status information, and customer service response status information, generating a round attachment record set; The missing status detection is performed on the round-attached record set. When the fulfillment status, after-sales status, refund status, compensation status or customer service response status in any round-interaction record is missing, the corresponding status value that has been attached to the same target order in the previous round is passed to the current round to complete the forward maintenance method and generate a status completion record set. The status completion record set is arranged sequentially according to the time sequence of the dialogue rounds to construct an order service trajectory base table expanded by round. Each round record in the order service trajectory base table includes order identifier, round identifier, user inquiry text, customer service reply text, fulfillment status, after-sales status, refund status, compensation status, customer service response status, and the corresponding round timestamp.
[0021] In this embodiment, step two specifically involves: Extract the user inquiry text, customer service reply text, fulfillment status, after-sales status, refund status, compensation status, and customer service response status from each round of interaction records in the order service trajectory table according to the round identifier. Then, determine the user inquiry text in each round of interaction records as the user expression segment, determine the customer service reply text corresponding to the user inquiry text in that round as the customer service response segment, and determine the fulfillment status, after-sales status, refund status, compensation status, and customer service response status attached to the user inquiry text in that round as the business status segment. Local negotiation segments are constructed centered on each round of interaction records, so that each local negotiation segment contains the user expression segment, customer service response segment, and business status segment under the same round, thus forming a negotiation analysis unit oriented towards a single round of interaction; The system performs word segmentation, part-of-speech tagging, and semantic category matching on user expression segments. It extracts emotional intensifiers, negation words, rhetorical question words, urging words, questioning words, concession words, compromise words, and escalation threat words from user expression segments. Among them, emotional intensifiers are used to represent expressions with intensified emotional intensity, negation words are used to represent negation semantics, rhetorical question words are used to represent rhetorical questioning tone, urging words are used to represent urging and pushing semantics, questioning words are used to represent doubt and accusation semantics, concession words are used to represent concession semantics, compromise words are used to represent acceptance of compromise semantics, and escalation threat words are used to represent complaint, negative review, platform intervention, and rights protection semantics. The customer service response segment is processed by word segmentation and expression category recognition. The following expressions are extracted from the customer service response segment: soothing expression, explanatory expression, templated reply expression, compensation expression, transfer to human agent expression, and avoidance expression. Among them, soothing expression is used to represent the reply content to ease the user's emotions; explanatory expression is used to represent the reply content to explain the reason, process or basis for the processing; templated reply expression is used to represent the reply content with a fixed format and repeated content; compensation expression is used to represent the content of compensation, discount, reshipment or other benefits; transfer to human agent expression is used to represent the reply content to be further processed by human customer service; and avoidance expression is used to represent the reply content that does not directly address the user's core needs. The business status segments are categorized into different states: fulfillment status, after-sales status, refund status, compensation status, and customer service response status, which are respectively classified into stagnant status, progress status, completion status, conflict status, and mismatch status. Stagnant status indicates that logistics have not progressed, after-sales have not been processed, refunds have not changed, or compensation has not been executed. Progress status indicates that logistics nodes have been updated, after-sales processes have progressed, refund processes have progressed, or compensation processing has progressed. Completion status indicates that receipt has been completed, after-sales have been resolved, refunds have been received, or compensation has been completed. Conflict status indicates that user requests are inconsistent with the platform's processing results. Mismatch status indicates that customer service response content is inconsistent with the current business status. Compare user expression segments between adjacent rounds to identify recurring words, recurring requests, and recurring emotional expressions. Determine the text repetition rate based on the degree of repetition. At the same time, combine the proportion of requests that have been raised in the current round but have not been resolved in the customer service response segment to the total number of requests in that round to determine the unresolved continuation rate. Semantic correspondence analysis is performed on the customer service response segment of the current round and the user expression segment of the corresponding round to identify the number of requests that have been actually responded to in the customer service response and the total number of requests raised in the user expression segment. The proportion of customer service replies that are not answered based on the degree of correspondence between the two is determined. At the same time, the number of new follow-up questions between the current round and the next round is counted, and the density of user follow-up questions is determined by combining the time interval between the current round and the next round. Perform continuous state tracking processing on the business state segment, count the number of rounds in which the business state of the current round has remained unchanged since its first appearance, determine the duration of the unchanged business state, and generate the state indication result corresponding to the current round based on whether there is a mismatch state, stagnation state, or conflict state in the current round. The text repetition rate, the rate of unresolved issues, and the density of follow-up questions are weighted according to preset weights to obtain the text friction value for the current round. The proportion of customer service representatives giving irrelevant answers is used as the response mismatch value for the current round of customer service responses; The duration of unchanged business status is used as the performance hindrance value for the current round of performance progress; The duration of unchanged business status and the duration of unresolved issues are weighted according to preset weights to generate the after-sales delay value for the current round. The text friction value, response mismatch value, performance delay value, and after-sales delay value corresponding to each round of interaction are combined to form the negotiation disturbance vector for that round. Arrange the negotiation perturbation vectors corresponding to the interaction records of each round in order of the round timestamps from front to back, and generate a negotiation perturbation sequence.
[0022] In this embodiment, step three specifically includes: According to the round identifier, each round of interaction record in the order service trajectory table is associated with the corresponding round perturbation vector in the negotiation perturbation sequence to generate a round association dataset; Extract user expression segments from the interaction records of each round from the round-related dataset, and map each round's user expression segment to a user expression node; Extract the customer service response segment from the interaction record of each round from the round-related dataset, and map each round's customer service response segment to a customer service response node; Extract the performance status change information from the interaction records of each round from the round association dataset, and determine the performance event corresponding to the current round based on the performance status change information. Map the performance event to the performance event node, where the performance event node is used to represent the content of the current round corresponding to the shipment, pickup, transportation, standby, delivery, abnormal receipt, receipt completion or other performance status changes. After-sales processing information is extracted from the interaction records of each round in the round association dataset. The after-sales action corresponding to the current round is determined based on the after-sales processing information. The after-sales action is mapped to the after-sales action node. The after-sales action node is used to represent the after-sales application, after-sales acceptance, after-sales review, return processing, exchange processing, after-sales completion or after-sales non-response content corresponding to the current round. Extract refund status information from the interaction records of each round from the round-related dataset, determine the refund status corresponding to the current round based on the refund status information, and map the refund status to a refund status node. The refund status node is used to represent the refund application, refund review, refund rejection, refund received or refund stalled content corresponding to the current round. Based on the overall tension level of each round of interaction records during the order negotiation process, negotiation tension nodes are constructed. The overall tension level is the weighted value of the corresponding text friction value, response mismatch value, fulfillment obstruction value, and after-sales delay value according to preset weights. Each negotiation tension node corresponds to the user expression node, customer service response node, fulfillment event node, after-sales action node, and refund status node of the corresponding round, and is used to characterize the tension state of the order negotiation relationship after the end of that round of interaction. Based on the time sequence of the rounds, round progression edges are established between user expression nodes, customer service response nodes, fulfillment event nodes, after-sales action nodes, refund status nodes, and negotiation tension nodes in adjacent rounds to represent the temporal transmission relationship of similar nodes between adjacent rounds. Establish a response correspondence edge between the user expression node and the customer service response node within the same round to represent the correspondence between the user's request content and the customer service response content in that round; Establish a performance impact edge between the performance event node and the negotiation tension node within the same round to characterize the impact of changes in performance status on the negotiation tension of the current round; Establish mitigation edges between after-sales action nodes and negotiation tension nodes within the same round to characterize the mitigation or amplification relationship between after-sales actions and the negotiation tension level of the current round. Establish a funding feedback edge between the refund status node and the negotiation tension node within the same round to characterize the impact of the refund processing progress on the negotiation tension of the current round; The negotiation perturbation vectors of the corresponding rounds in the negotiation perturbation sequence are written into the user expression node, customer service response node, and negotiation tension node of the corresponding round as node attributes. The negotiation perturbation vector written into the user expression node is used to characterize the degree of text friction in the user expression in that round, the negotiation perturbation vector written into the customer service response node is used to characterize the degree of response mismatch in the customer service response in that round, and the negotiation perturbation vector written into the negotiation tension node is used to characterize the overall perturbation degree in the order negotiation in that round. The user expression nodes, customer service response nodes, performance event nodes, after-sales action nodes, refund status nodes, negotiation tension nodes, and various edges obtained above are uniformly summarized to generate a heterogeneous relationship graph of performance negotiation.
[0023] In this embodiment, the improved GraphSAGE model is specifically as follows: Input the heterogeneous association graph of performance negotiation into the neighborhood classification sampling module, and use the negotiation tension node corresponding to each round as the target update node. Divide the adjacent nodes of the target update node in the heterogeneous association graph into user semantic neighborhood, customer service response neighborhood, performance event neighborhood, after-sales action neighborhood and refund status neighborhood according to node type. Shallow sampling is performed on the user semantic neighborhood and the customer service response neighborhood. Shallow sampling retains the nearest neighbor nodes that are directly related to the user's request and the customer service response in the current round and the adjacent rounds. Deep sampling is performed on the neighborhood of performance events and the neighborhood of refund status. Deep sampling is used to extract performance progress change information and refund flow change information that persist across multiple rounds. Intermediate-level sampling is performed on the after-sales action neighborhood. Intermediate-level sampling is used to extract action acceptance information in the after-sales intervention process, and the set of nodes sampled in various neighborhoods is output as the subtype neighborhood sampling result according to the round correspondence. The sampling results of the fractal neighborhood are input into the differential feature construction module. Combining the negotiated perturbation sequence and the node attributes written to each node, differential feature extraction is performed one by one on each of the target update node and its corresponding neighbor nodes in the sampling neighborhood. The differential feature extraction specifically includes: Read the node attribute information corresponding to the current target update node according to the round to which the target update node belongs; According to the neighborhood type, read the node attribute information of the user semantic neighborhood node, customer service response neighborhood node, fulfillment event neighborhood node, after-sales action neighborhood node and refund status neighborhood node connected to the current target update node respectively; Align the attribute information of each neighbor node with the attribute information of the target update node in rounds. For each neighbor node in the user semantic neighborhood, compare the changes in text friction value and performance obstruction value between the current neighbor node and the target update node to obtain user semantic differential features that characterize the repeated reinforcement of user demands, the continuous accumulation of emotions, and the degree of intensification of text conflict. For each neighbor node in the customer service response neighborhood, compare the changes in response mismatch value and after-sales delay value between the current neighbor node and the target update node to obtain customer service response differential features that characterize changes in customer service response strategies, continuation of templated responses, and the degree of deviation in customer service responses. For each neighbor node in the neighborhood of the performance event, compare the differences between the current neighbor node and the target update node in terms of the progress of the performance status, the stagnation of the performance status, and the changes in the conflict status, to obtain the performance event differential features used to characterize whether the performance event continues to be blocked, whether progress has occurred, and whether it has led to a continued increase in negotiation tension. For each neighbor node in the after-sales action neighborhood, compare the differences between the current neighbor node and the target update node in the after-sales processing stage, after-sales processing response, and after-sales delay, and obtain the after-sales action differential features used to characterize whether the after-sales action alleviates the current negotiation conflict, delays the after-sales processing, and forms a new state delay. For each neighbor node in the refund status neighborhood, compare the differences between the current neighbor node and the target update node in the refund processing stage, refund arrival progress, and refund stagnation degree to obtain the refund status difference feature used to characterize the impact of changes in the refund process on the current negotiation tension; The system performs a correspondence check between the response category of the current round of customer service response nodes and the request category of the current round of user expression nodes. It identifies whether the customer service response content directly covers the user's core request, whether it only repeats template-based reassurance content, and whether there are any inconsistencies between the response content and the request category. Based on this, response deviation characteristics are generated. The user semantic differential features, customer service response differential features, fulfillment event differential features, after-sales action differential features, refund status differential features, and response deviation features corresponding to the same target update node are concatenated and integrated in a unified order to form the differential aggregation result corresponding to the current target update node; The differential aggregation results are input into the hierarchical aggregation update module to independently aggregate the differential aggregation results in the user semantic neighborhood, customer service response neighborhood, fulfillment event neighborhood, after-sales action neighborhood, and refund status neighborhood. During the aggregation process, intra-category aggregation is first performed on the differential features in the same neighborhood to form user semantic aggregation results, customer service response aggregation results, fulfillment event aggregation results, after-sales action aggregation results, and refund status aggregation results. The user semantic aggregation results, customer service response aggregation results, fulfillment event aggregation results, after-sales action aggregation results, and refund status aggregation results are concatenated and updated with the original node representation of the current target update node to generate the tension propagation intermediate representation of the current layer. The intermediate representation of tension propagation is input into the tension residual fusion module. Residual retention processing is performed on the negotiation tension nodes corresponding to each round. The residual retention processing is to perform weighted fusion of the overall tension level in the negotiation tension node representation of the previous layer and the intermediate representation of tension propagation representing the current neighborhood propagation result in the negotiation tension node representation of the current layer according to the preset weight. The negotiation tension node representations of each round after residual fusion are arranged according to the time sequence of the rounds to generate the tension propagation embedding sequence.
[0024] The improved GraphSAGE model proposed in this step shares similarities with the traditional GraphSAGE model in that both use graph-structured data as input, learn node representations through a combination of neighborhood sampling and neighborhood aggregation, and do not perform a one-time computation on all neighbors in the entire graph. Instead, they select neighborhood information for the target node and then fuse and update it with the target node's own representation to obtain a new node embedding result. Both follow the basic computational path of "target node—neighbor nodes—aggregation update," retaining the inductive learning characteristics of GraphSAGE. That is, they do not rely on the unique identifier of a known node in a fixed graph, but rather on node features and their neighborhood structure relationships to generate node representations. Therefore, both are suitable for handling dynamic graph data in e-commerce customer service scenarios involving continuously increasing orders, continuously increasing session rounds, and continuously increasing business events. Simultaneously, both emphasize gradually expanding the target node's perceptible neighborhood range through multi-layer propagation, enabling the target node to obtain information from multi-hop neighbors and outputting a new representation result after each layer of propagation, which is then used for the computation of the next layer. In other words, the improved model in this step has not deviated from the core framework of the traditional GraphSAGE "sampling, aggregation, and updating". Instead, while retaining the basic mechanism, it further refines and enhances the sampling method, feature construction method, aggregation object and residual fusion method for the specific business object of the heterogeneous association graph of contract negotiation. Therefore, it is essentially still an extended application of the GraphSAGE graph representation learning technology roadmap.
[0025] The difference lies in the fact that traditional GraphSAGE models are usually geared towards relatively general homogeneous graphs or simple heterogeneous graph scenarios. They tend to adopt unified neighborhood sampling rules and unified neighborhood aggregation methods, and do not adequately consider the distinction between neighbor node types, differences in business semantics, and cross-round state transmission relationships. As a result, their neighborhood information is mostly updated in the form of general features, which makes it difficult to directly adapt to the complex heterogeneous structure in e-commerce customer service scenarios where user expressions, customer service responses, fulfillment events, after-sales actions, and refund status coexist. The improved model proposed in this step does not treat all adjacent nodes as homogeneous. Instead, it first uses the negotiation tension node as the target update node and divides its adjacent nodes into user semantic neighborhood, customer service response neighborhood, fulfillment event neighborhood, after-sales action neighborhood, and refund status neighborhood according to node type. Then, it uses shallow sampling, deep sampling, and intermediate-level sampling for different neighborhoods to form a categorized neighborhood sampling result. In the feature construction stage, it does not directly use the original node features for aggregation. Instead, it combines the negotiation perturbation sequence and node attributes to extract user semantic differential features, customer service response differential features, fulfillment event differential features, after-sales action differential features, refund status differential features, and response deviation features one by one to form a differential aggregation result. In the aggregation stage, it does not directly update after aggregation. Instead, it first performs intra-category aggregation on the differential features within the same type of neighborhood, then concatenates and updates them with the original representation of the current target update node. Finally, it further performs residual retention processing on the negotiation tension node. As can be seen, this improved model has transformed from the traditional unified neighborhood learning approach of GraphSAGE to a method of classification sampling, differential construction, classification convergence, and tension residual fusion for multi-source heterogeneous business links in e-commerce customer service.
[0026] The beneficial effect of the improvements is that the improved model proposed in this step can more accurately reflect the formation and propagation mechanisms of emotional risks in e-commerce automated customer service scenarios. Since changes in user emotions are not solely determined by the text content itself, but are simultaneously influenced by multiple factors such as fulfillment progress, refund processing, after-sales response, and the quality of customer service replies, traditional GraphSAGE, when processing different types of neighborhoods uniformly, is prone to averaging, weakening, or obscuring key business information. This improved model employs neighborhood-based sampling to extract and retain user semantic information, customer service response information, fulfillment progress information, after-sales acceptance information, and refund flow information separately, thus avoiding confusion between different business semantics. Through differential feature construction, the model not only observes a static state at a particular moment but also identifies whether textual friction intensifies between adjacent rounds, whether customer service responses continue to mismatch, whether fulfillment status continues to be hindered, whether after-sales processing lags, and whether the refund process amplifies negotiation tension, significantly enhancing its ability to characterize the cumulative trend of emotions. Through classification aggregation and node updates, the model can separately measure the strength of the influence of different neighborhoods on negotiation tension nodes, improving the specificity of graph representation. Through tension residual fusion, the overall tension level already formed in previous rounds can be preserved, preventing the multi-layered propagation process from excessively smoothing out important early conflict information. Based on these improvements, this model can improve the accuracy of identifying implicit negative emotions, escalating risks, and complex business causes in multi-round negotiation scenarios, making the final tension propagation embedding sequence more consistent with the real customer service interaction process, providing a more stable and interpretable foundational representation for subsequent counterfactual analysis and emotional risk assessment.
[0027] In this embodiment, step five specifically includes: Select key business nodes from the order service trajectory table to perform counterfactual replacement of fulfillment and construct multiple counterfactual order trajectories. Key business nodes include logistics stagnation status nodes, refund review status nodes, compensation pending status nodes, customer service templated reply nodes, and after-sales non-response status nodes. Replace the logistics standstill status node with the logistics progress status node, replace the refund review status node with the refund received status node, replace the compensation pending status node with the compensation executed status node, replace the customer service template reply node with the valid explanation reply node or compensation reply node, and replace the after-sales non-response status node with the after-sales accepted status node. In each counterfactual order trajectory, only a single key business node is changed while keeping the content of the remaining rounds and the remaining business nodes unchanged, forming a counterfactual trajectory cluster.
[0028] In this embodiment, step six specifically includes: The tension propagation embedding sequence is used as the true trajectory, and each set of counterfactual tension propagation embeddings in the counterfactual trajectory cluster is used as the counterfactual trajectory. The difference between the actual trajectory and each counterfactual trajectory in terms of negotiation tension value is calculated round by round, as well as the number of rounds in which the difference is continuously less than a preset threshold. The results are then weighted according to preset weights to obtain a comprehensive gap index. Different comprehensive gap indices are grouped and statistically analyzed according to performance, refund, compensation, customer service response, and after-sales actions to generate an emotion cause difference matrix; Various comprehensive negative indices are compared with preset emotional risk thresholds to generate emotional risk assessment results. The emotional risk assessment results include mild fluctuation state, automatically soothing state, high risk escalation state, or cautious handling state.
[0029] When the emotional risk assessment result is a state of mild fluctuation, a restatement of the request handling instruction is generated; When the emotional risk assessment result is that the situation can be automatically calmed, an interpretation-based handling instruction is generated. When the emotional risk assessment result is a high-risk escalation state, a priority transfer to manual handling instruction is generated; When the emotional risk assessment result is "cautious handling", a handling instruction is generated to provide conservative reassurance and retain the manual review interface.
[0030] Example 1: To verify the feasibility of this invention in practice, it was applied to the customer service scenario of home appliances and household goods in a comprehensive e-commerce operation center. The platform simultaneously handles multiple service tasks, including order fulfillment tracking, explanation of logistics anomalies, communication of refund progress, compensation negotiation, and after-sales processing. This operation center processes a large number of orders daily, with inquiries originating from the platform's online customer service portal, order details page inquiry portal, and after-sales negotiation portal. In actual communication, users often do not simply express emotions, but rather intertwine requests for delivery, inquiries about logistics, questions about refund progress, complaints about templated customer service responses, and demands for compensation within the same conversation. Traditional customer service quality inspection systems mainly rely on keyword recognition or single-round text sentiment classification to determine whether a user has negative emotions. These methods are prone to misjudgment when faced with situations where "the text appears restrained on the surface, but the business situation is continuously deteriorating." For example, in the first few rounds of conversation, a user might repeatedly ask, "Why isn't the logistics moving?" or "Why hasn't the refund arrived yet?" While the text may not contain overtly aggressive language, these questions often reflect ongoing business issues such as stalled order fulfillment, delayed after-sales service, and slow refund processing. If the system judges solely based on the surface emotion of the text, it may underestimate the risks of the conversation, leading the automated customer service to continue outputting generic reassurances, further exacerbating user dissatisfaction. This invention addresses this problem by simultaneously linking user inquiry text, customer service response text, order fulfillment logs, after-sales processing logs, refund progress logs, compensation processing logs, and logistics anomaly logs within the actual order service chain. It incorporates the business status of each round of conversation into the analysis, thereby achieving a more accurate identification of emotional risks.
[0031] In this scenario, the platform selected order service data from continuous operation as a sample, covering small appliances, kitchenware, cleaning supplies, and some high-priced home furnishings. A total of 68,540 valid order conversations were included, forming 423,870 rounds of valid interaction records, involving various business states such as delivery delays, transportation stagnation, abnormal receipt, refund pending review, compensation pending processing, and no after-sales response. The system first uses order identifiers as the main link to uniformly match user inquiry texts, customer service replies, and corresponding business logs under the same order. Then, it uses the conversation round time as the main timeline to complete the joint linking, generating an order service trajectory table. After this processing, each round of interaction is no longer just an isolated piece of text, but also includes the fulfillment status, after-sales status, refund status, compensation status, and customer service response status at the time of the round, which can truly reflect the order processing situation faced by the user at that time. Subsequently, the system performs fragmented processing on each round of interaction records, analyzing the user expression segment, customer service response segment, and business status segment separately, and generating text friction value, response mismatch value, fulfillment delay value, and after-sales delay value in cross-round comparisons. In this way, the cumulative trend of emotions that was originally difficult to see from a single sentence can be stably represented through the negotiation perturbation sequence.
[0032] In practical applications, this method is deployed in the customer service sentiment risk analysis chain of the operations center for near real-time identification of online conversations. When a user continuously inquires about logistics while the fulfillment status remains stagnant for an extended period, the system detects a simultaneous increase in text friction and fulfillment obstruction values within the negotiation perturbation sequence. When customer service representatives fail to address the user's core needs in multiple rounds of responses, the system identifies a continuously rising response mismatch value. When an after-sales work order has been submitted but its status remains unchanged for an extended period, the system identifies an increase in after-sales delay value. Based on these perturbations, the system further constructs a heterogeneous relational graph for fulfillment negotiation, incorporating user expressions, customer service responses, fulfillment events, after-sales actions, refund status, and negotiation tension into the same graph structure. An improved GraphSAGE model is then used for hierarchical neighborhood sampling and aggregation to obtain a tension propagation embedding sequence arranged by round. This sequence reflects not the intensity of a single statement, but rather the overall change in tension within the real business environment, making it more suitable for the risk assessment needs of automated e-commerce customer service. Next, the system selects key business nodes from the order service trajectory table, such as logistics stagnation, refund review, pending compensation, templated replies, and lack of after-sales response, and performs counterfactual substitution to construct counterfactual trajectory clusters. Then, the actual trajectories and counterfactual trajectories are merged and statistically analyzed to identify which type of business factor is the main cause of increased emotional risk. In this way, the platform not only knows "how high the user's current risk is," but also "whether the risk mainly comes from logistics stagnation, delayed refunds, after-sales delays, or customer service mismatch."
[0033] To verify the practical effectiveness of this invention, the operations center used an existing rule-based emotion recognition scheme as a control scheme and the method of this invention as an experimental scheme, conducting parallel verification on the same batch of order sessions. The control scheme mainly relied on emotion words, negative words, and the classification results of regular conversation text for recognition; the experimental scheme adopted the order service trajectory table, negotiation disturbance sequence, heterogeneous association graph of performance negotiation, improved GraphSAGE propagation analysis, and counterfactual trajectory merging statistics process of this invention. The manual quality inspection team extracted 12,000 rounds of highly controversial samples from all sessions for cross-checking, using the consensus conclusion of humans as the reference standard. The results showed that in identifying high-risk escalation conversations, the control scheme achieved an accuracy rate of 81.6%, while the method of this invention reached 92.8%. In identifying implicit risk conversations characterized by "superficially neutral text but significant subsequent escalation," the control scheme's recall rate was only 69.4%, while the method of this invention achieved 88.7%. Regarding determining the dominant emotional cause, the control scheme, lacking business chain analysis, could only provide a general negative label, while the method of this invention achieved an overall consistency rate of 90.9% for identifying risk causes related to logistics, refunds, compensation, customer service responses, and after-sales actions. More importantly, the experimental scheme reduced the proportion of ineffective reassurance responses from automated customer service from 21.3% to 8.6%, and the proportion of late human transfers from 14.8% to 5.2%, indicating that this method not only improved identification accuracy but also improved the timing control of subsequent service actions.
[0034] In a typical conversation, a user purchased a high-priced air purifier and inquired about the logistics progress multiple times. Initially, the user's responses were mainly limited to "Has it been shipped yet?" and "Why haven't there been any updates?", without any overtly aggressive language. The control scheme treated the first five rounds as a general inquiry, with the automated response system continuously outputting template-based explanations until the user expressed "I'll complain if this isn't resolved" in subsequent rounds, triggering an escalation. The method of this invention, however, identified a continuous increase in fulfillment delays starting in the third round. In the fourth round, it detected insufficient coverage of customer service responses and user demands. Combined with the continued stagnation of logistics nodes and the rising negotiation tension, the method determined a high-risk escalation state in the fifth round, attributing the main cause to "logistics stagnation + continued template-based responses." Therefore, the system triggered human intervention early. After a human customer service representative provided warehousing and distribution verification and a compensation plan, the conversation did not escalate further. Similar cases occurred 1,936 times during the sample period, with the method of this invention successfully providing early warnings 1,702 times, achieving an early warning rate of 87.9%, compared to only 61.5% for the control scheme. The table below provides comparative data for the two schemes in this embodiment.
[0035] Table 1. Comparison of the effectiveness of multi-round negotiation emotional risk identification and handling in e-commerce customer service. As shown in Table 1, the method of this invention significantly outperforms the control scheme in most key indicators. Although the average judgment time per session increased from 0.42 seconds to 0.67 seconds, this increase is still within the acceptable range for e-commerce online customer service. The resulting benefit is an 11.2 percentage point increase in the accuracy of identifying high-risk escalation sessions and a 19.3 percentage point increase in the recall rate of identifying hidden-risk sessions, indicating that this invention is better at identifying complex sessions where the text is not overtly aggressive but business conflicts accumulate. Regarding cause determination, the consistency rate of the five main business factors is close to or exceeds 89%, indicating that this invention can not only identify risks but also accurately distinguish the sources of risks, which has direct value for subsequent selection of explanation, follow-up, compensation, or manual intervention strategies. The significant decrease in the proportion of ineffective reassurance responses from automated customer service indicates that the system has reduced the occurrence of continuing to output template responses at incorrect times; the significant decrease in the proportion of late manual transfers indicates that the system can identify orders that truly require manual intervention earlier; and the simultaneous decrease in the rate of subsequent user repeat complaints and the proportion of logistics anomaly sessions escalating into complaint tickets further proves that the method of this invention has a practical effect on improving overall service stability.
[0036] In this implementation scenario, the present invention effectively solves the problems of existing technologies such as "only looking at the text, not the business status," "only being able to identify the result, but not the cause," and "being unable to reliably detect hidden escalation risks." By simultaneously including the order processing chain and the customer service interaction chain in the analysis, and combining improved graph representation learning and counterfactual trajectory analysis, it can identify the level of tension in the conversation before the user's emotions are fully manifested, and more accurately determine the core business factors causing the risk. For e-commerce platforms, this capability not only improves the adaptability of automated customer service systems to complex negotiation scenarios, but also helps reduce repeated complaints, reduce ineffective reassurance, and optimize the allocation of human agents, thereby improving overall service quality and order negotiation efficiency.
[0037] 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. An e-commerce automated customer service sentiment analysis method based on deep learning, characterized in that, Includes the following steps: Step 1: Collect the original comprehensive dataset corresponding to the target order, match it with the order identifier as the association key, and link it together with the dialogue turn time as the main timeline to generate the order service trajectory base table; Step 2: Fragment each round of interaction records in the order service trajectory table, calculate the text friction value, response mismatch value, fulfillment delay value, and after-sales delay value respectively, and generate a negotiation disturbance sequence; Step 3: Construct a heterogeneous correlation graph for performance negotiation based on the order service trajectory table and the negotiation disturbance sequence; Step 4: Input the heterogeneous association graph of performance negotiation into the improved GraphSAGE model, and perform hierarchical neighborhood sampling and neighborhood aggregation on various types of nodes through the neighborhood classification sampling module, differential feature construction module, hierarchical aggregation update module and tension residual fusion module to obtain the tension propagation embedding sequence arranged by round; Step 5: Select key business nodes from the order service trajectory base table and perform fulfillment counterfactual replacement to construct multiple counterfactual order trajectories, forming a counterfactual trajectory cluster; Step 6: Use the tension propagation embedding sequence as the true trajectory, use each group of counterfactual tension propagation embeddings in the counterfactual trajectory cluster as the counterfactual trajectory, and perform merging statistics to generate the emotional risk judgment result.
2. The deep learning-based e-commerce automated customer service sentiment analysis method of claim 1, wherein, Step one specifically involves: Collect the original comprehensive dataset corresponding to the target order. The original comprehensive dataset includes user inquiry text, customer service reply text, order fulfillment log, after-sales processing log, refund progress log, compensation processing log, logistics exception log, and their respective operation timestamp information. The system uses the order identifier as a unified association key to match various types of collected data. It uses the dialogue round time as the main timeline to link the fulfillment status, after-sales status, refund status, compensation status, and customer service response status corresponding to the time when the user speaks in each round. It uses a forward-keeping method to fill in missing business statuses and generates an order service trajectory table that unfolds by round.
3. The deep learning-based sentiment analysis method for automated e-commerce customer service as described in claim 1, characterized in that, Step two specifically involves: Each round of interaction records in the order service trajectory table is fragmented, which involves dividing each round of interaction records into a user expression segment, a customer service response segment, and a business status segment. Extract emotional reinforcement words, negation words, rhetorical question words, urging words, questioning words, concession words, compromise words, and escalation threat words from user expression segments respectively; Extract reassuring expressions, explanatory expressions, templated response expressions, compensatory expressions, expressions for transferring to human agents, and avoidance expressions from customer service responses; Extract the stagnant state, progress state, completion state, conflict state, and mismatch state from the business status segment; Based on the text repetition rate between adjacent rounds, the unresolved problem continuation rate, the proportion of customer service irrelevant answers, the density of user follow-up questions, and the duration of no change in business status, the text friction value, response mismatch value, fulfillment obstruction value, and after-sales delay value are calculated respectively. The text friction value, response mismatch value, performance delay value, and after-sales delay value corresponding to each round of interaction are combined to form the negotiation disturbance vector for that round. Arrange the negotiation perturbation vectors corresponding to the interaction records of each round in order of the round timestamps from front to back, and generate a negotiation perturbation sequence.
4. The deep learning-based sentiment analysis method for automated e-commerce customer service as described in claim 1, characterized in that, Step three specifically involves: Based on the order service trajectory table and the negotiation disturbance sequence, a heterogeneous correlation graph for fulfillment negotiation is constructed. The construction of this graph specifically includes: Map each round of user expression segment to a user expression node, map each round of customer service response segment to a customer service response node, and map the fulfillment event, after-sales action, and refund status corresponding to the current round to fulfillment event node, after-sales action node, and refund status node, respectively. Establish progressive edges between adjacent rounds, and construct negotiation tension nodes based on the overall tension level of each round's interaction records during the order negotiation process; Establish a response correspondence edge between the user expression node and the customer service response node, establish a performance impact edge between the performance event node and the negotiation tension node, establish a mitigation impact edge between the after-sales action node and the negotiation tension node, and establish a fund feedback edge between the refund status node and the negotiation tension node. The negotiation disturbance sequence is written into the user expression node, customer service response node, and negotiation tension node of the corresponding round as node attributes.
5. The deep learning-based sentiment analysis method for automated e-commerce customer service according to claim 1, characterized in that, The improved GraphSAGE model is specifically as follows: Input the heterogeneous association graph of performance negotiation into the neighborhood classification sampling module, and use the negotiation tension node corresponding to each round as the target update node. Divide the adjacent nodes of the target update node in the heterogeneous association graph into user semantic neighborhood, customer service response neighborhood, performance event neighborhood, after-sales action neighborhood and refund status neighborhood according to node type. Shallow sampling is performed on the user semantic neighborhood and the customer service response neighborhood. The shallow sampling is to retain the nearest neighbor nodes that are directly related to the user's request expression and the customer service response expression in the current round and the adjacent rounds. Deep sampling is performed on the neighborhood of the performance event and the neighborhood of the refund status. The deep sampling is to extract performance progress change information and refund flow change information that persist across multiple rounds. Intermediate-level sampling is performed on the after-sales action neighborhood. The intermediate-level sampling is to extract the action acceptance information in the after-sales intervention process, and output the sampled node sets in various neighborhoods as the fractal neighborhood sampling results according to the round correspondence. The sampling results of the fractal neighborhood are input into the differential feature construction module. Combined with the negotiated perturbation sequence and the node attributes written to each node, differential feature extraction is performed on each target update node and its neighboring nodes in the corresponding sampling neighborhood one by one to obtain the differential aggregation result. The differential aggregation results are input into the hierarchical aggregation update module to independently aggregate the differential aggregation results in the user semantic neighborhood, customer service response neighborhood, fulfillment event neighborhood, after-sales action neighborhood, and refund status neighborhood. During the aggregation process, intra-category aggregation is first performed on the differential features in the same neighborhood to form user semantic aggregation results, customer service response aggregation results, fulfillment event aggregation results, after-sales action aggregation results, and refund status aggregation results. The user semantic aggregation results, customer service response aggregation results, fulfillment event aggregation results, after-sales action aggregation results, and refund status aggregation results are concatenated and updated with the original node representation of the current target update node to generate the tension propagation intermediate representation of the current layer. The intermediate representation of tension propagation is input into the tension residual fusion module. Residual retention processing is performed on the negotiation tension nodes corresponding to each round. The residual retention processing is to perform weighted fusion of the overall tension level in the negotiation tension node representation of the previous layer and the intermediate representation of tension propagation representing the current neighborhood propagation result in the negotiation tension node representation of the current layer according to the preset weight. The negotiation tension node representations of each round after residual fusion are arranged according to the time sequence of the rounds to generate the tension propagation embedding sequence.
6. The deep learning-based e-commerce automated customer service sentiment analysis method of claim 5, wherein, The specific method for extracting the differential features is as follows: Read the node attribute information corresponding to the current target update node according to the round to which the target update node belongs; According to the neighborhood type, read the node attribute information of the user semantic neighborhood node, customer service response neighborhood node, fulfillment event neighborhood node, after-sales action neighborhood node and refund status neighborhood node connected to the current target update node respectively; Align the attribute information of each neighbor node with the attribute information of the target update node in rounds. For each neighbor node in the user semantic neighborhood, compare the changes in text friction value and performance obstruction value between the current neighbor node and the target update node to obtain user semantic differential features. For each neighbor node in the customer service response neighborhood, compare the changes in response mismatch value and after-sales delay value between the current neighbor node and the target update node to obtain the customer service response differential characteristics. For each neighbor node in the neighborhood of the performance event, compare the differences between the current neighbor node and the target update node in terms of performance status progress, performance status stagnation, and conflict status changes to obtain the performance event differential features; For each neighbor node in the after-sales action neighborhood, compare the differences between the current neighbor node and the target update node in the after-sales processing stage, after-sales processing response, and after-sales delay level to obtain the after-sales action differential features; For each neighbor node in the refund status neighborhood, compare the differences between the current neighbor node and the target update node in the refund processing stage, refund arrival progress, and refund stagnation degree to obtain the refund status difference features; The correspondence between the response category of the current round of customer service response nodes and the request category of the current round of user expression nodes is checked to generate response deviation characteristics; The user semantic differential features, customer service response differential features, fulfillment event differential features, after-sales action differential features, refund status differential features, and response deviation features corresponding to the same target update node are concatenated and integrated in a unified order to form the differential aggregation result corresponding to the current target update node.
7. The deep learning-based e-commerce automated customer service sentiment analysis method of claim 1, wherein, Step five specifically involves: Select key business nodes from the order service trajectory table to perform counterfactual replacement of fulfillment and construct multiple counterfactual order trajectories. The key business nodes include logistics stagnation status nodes, refund review status nodes, compensation pending status nodes, customer service templated reply nodes, and after-sales non-response status nodes. Replace the logistics standstill status node with the logistics progress status node, replace the refund review status node with the refund received status node, replace the compensation pending status node with the compensation executed status node, replace the customer service template reply node with the valid explanation reply node or compensation reply node, and replace the after-sales non-response status node with the after-sales accepted status node. In each counterfactual order trajectory, only a single key business node is changed while keeping the content of the remaining rounds and the remaining business nodes unchanged, forming a counterfactual trajectory cluster.
8. The deep learning-based e-commerce automated customer service sentiment analysis method of claim 1, wherein, Step six specifically involves: The tension propagation embedding sequence is used as the true trajectory, and each set of counterfactual tension propagation embeddings in the counterfactual trajectory cluster is used as the counterfactual trajectory. The difference between the actual trajectory and each counterfactual trajectory in terms of negotiation tension value is calculated round by round, as well as the number of rounds in which the difference is continuously less than a preset threshold. The results are then weighted according to preset weights to obtain a comprehensive gap index. Different comprehensive gap indices are grouped and statistically analyzed according to performance, refund, compensation, customer service response, and after-sales actions to generate an emotion cause difference matrix; Various comprehensive negative indices are compared with preset emotional risk thresholds to generate emotional risk assessment results. The emotional risk assessment results include mild fluctuation state, automatically soothing state, high risk escalation state, or cautious handling state.