Battery replacement customer service work order automatic dispatching method, device and equipment based on semantic analysis
Patent Information
- Application Number
- CN202611282236.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-09-29
AI Technical Summary
相关技术中,工单派发方法存在以下不足:词语到派发类别的语义映射固定不变,无法根据故障场景动态调整;动态路由缺乏领域知识引导,易被高频类别主导;语义增强仅依赖句法结构,难以建立远程故障术语之间的语义关联;分类模型缺乏类内表征紧致性约束,易混淆类别边界模糊
本发明实施例提供了一种基于语义分析的换电客服工单自动派发方法、装置及设备,通过获取训练样本集合,对每个原始换电工单文本执行数据增强表示构建,得到词级增强表示矩阵、工单故障模式分布向量和全局语义向量,基于词级增强表示矩阵、工单故障模式分布向量和全局语义向量,构建并训练派发分类模型,获取待派发换电工单文本,对待派发换电工单文本执行数据增强表示构建,将得到的待派发词级增强表示矩阵、待派发工单故障模式分布向量和待派发全局语义向量输入至训练完成的派发分类模型,得到待派发类别概率分布,基于待派发类别概率分布输出目标派发类别。该方式中,显著提升了换电工单派发准确率与细粒度分类泛化能力。
Smart Images

Figure CN122840600A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of work order dispatching technology, and in particular to a method, apparatus and equipment for automatically dispatching battery swapping customer service work orders based on semantic analysis. Background Technology
[0002] As battery swapping becomes an important energy replenishment method for new energy vehicles, the accurate dispatch of battery swapping customer service work orders is crucial to ensuring service quality. However, current work order dispatch methods suffer from the following shortcomings: the semantic mapping from words to dispatch categories remains fixed and cannot be dynamically adjusted based on fault scenarios; dynamic routing lacks domain knowledge guidance and is easily dominated by high-frequency categories; semantic enhancement relies solely on syntactic structure, making it difficult to establish semantic connections between remote fault terms; and classification models lack intra-class representation tightness constraints, easily leading to confusion and blurred category boundaries. These issues result in low work order dispatch accuracy and insufficient fine-grained category generalization ability. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method, device and equipment for automatic dispatch of battery swapping customer service work orders based on semantic analysis, which significantly improves the accuracy of battery swapping work order dispatch and the fine-grained classification generalization ability.
[0004] In a first aspect, embodiments of the present invention provide an automatic dispatch method for battery swapping customer service work orders based on semantic analysis. The method includes: acquiring a training sample set; each training sample in the training sample set includes an original battery swapping work order text and a corresponding real dispatch category label; performing data augmentation representation construction on each original battery swapping work order text to obtain a word-level augmented representation matrix, a work order fault mode distribution vector, and a global semantic vector; constructing and training a dispatch classification model based on the word-level augmented representation matrix, the work order fault mode distribution vector, and the global semantic vector; acquiring the battery swapping work order text to be dispatched, performing data augmentation representation construction on the text to be dispatched to obtain a word-level augmented representation matrix to be dispatched, a work order fault mode distribution vector to be dispatched, and a global semantic vector to be dispatched; inputting the word-level augmented representation matrix to be dispatched, the work order fault mode distribution vector to be dispatched, and the global semantic vector to be dispatched into the trained dispatch classification model to obtain a probability distribution of the dispatch category; and outputting the target dispatch category based on the probability distribution of the dispatch category.
[0005] In a preferred embodiment of the present invention, the above-mentioned data augmentation representation construction for each original battery swapping work order text to obtain a word-level augmented representation matrix, a work order fault mode distribution vector, and a global semantic vector includes: performing domain terminology standardization and standardized fault component tuple extraction on the original battery swapping work order text to obtain a standardized fault component tuple set; statistically analyzing the co-occurrence strength between standard terms and fault modes based on the historical battery swapping work order set, and calculating the terminology-pattern association score of standard terms with fault modes in combination with the battery swapping domain knowledge graph; and performing weighted aggregation and normalization processing on all standard terms in the original battery swapping work order text according to the terminology-pattern association score to generate a work order fault mode distribution. The process involves: using each standard term in the original power swapping work order text as a semantic dependency graph node; constructing basic semantic connections based on the dependency syntax tree; constructing prior connections for fault modes based on the work order fault mode distribution vector; superimposing the basic semantic connections and prior connections for fault modes to obtain a semantic dependency enhanced adjacency matrix; applying the semantic dependency enhanced adjacency matrix to the initial term embedding matrix for graph diffusion to obtain a word-level enhanced representation matrix; calculating the fault mode attention weight for each standard term node based on the work order fault mode distribution vector; and weighting and summing the enhanced representation vectors of each standard term node in the word-level enhanced representation matrix according to the fault mode attention weight to obtain a global semantic vector.
[0006] In a preferred embodiment of the present invention, the above-mentioned weighted aggregation and normalization of all standard terms in the original battery swapping work order text based on terminology pattern association scores to generate a work order fault mode distribution vector includes: statistically analyzing the co-occurrence probability of each standard term and each fault mode based on a historical battery swapping work order set, and calculating point mutual information as statistical co-occurrence strength; constructing a knowledge graph in the battery swapping domain, and calculating the knowledge graph association strength and shortest path distance between standard terms and fault modes based on the knowledge graph; fusing the statistical co-occurrence strength and the prior association of the knowledge graph in the battery swapping domain to obtain the terminology pattern association score of each standard term for each fault mode; and averaging and normalizing the terminology pattern association scores of all standard terms in the current original battery swapping work order text according to the fault mode dimension to obtain the work order fault mode distribution vector.
[0007] In a preferred embodiment of the present invention, the above-mentioned superposition of basic semantic connections and fault mode prior connections to obtain a semantic dependency enhanced adjacency matrix, and the application of the semantic dependency enhanced adjacency matrix to the initial term embedding matrix for graph diffusion to obtain a word-level enhanced representation matrix, includes: calculating the shortest path distance of the dependency tree between any two standard term nodes based on the dependency syntax tree; if the shortest path distance of the dependency tree does not exceed a preset dependency distance truncation threshold, then establishing a basic semantic connection, and calculating the basic semantic connection weight based on Gaussian kernel transformation; calculating the fault mode prior connection weight between any two standard term nodes based on the work order fault mode distribution vector and the term mode association score of each standard term for the fault mode; the fault mode prior connection weight is positively correlated with the fault mode probability commonly associated with the two standard terms; adding the basic semantic connection weight and the fault mode prior connection weight, and setting self-loop connections to obtain the semantic dependency enhanced adjacency matrix; calculating the graph degree matrix of the semantic dependency enhanced adjacency matrix, performing row normalization on the semantic dependency enhanced adjacency matrix, and applying the row-normalized adjacency matrix to the initial term embedding matrix to obtain a word-level enhanced representation matrix.
[0008] In a preferred embodiment of the present invention, the above-mentioned construction and training of the dispatch classification model based on the word-level enhanced representation matrix, the work order fault mode distribution vector, and the global semantic vector includes: taking the enhanced representation vector of each standard term node in the word-level enhanced representation matrix as the input of the word semantic capsule, establishing a basic projection matrix and multiple fault mode modulation offset matrices for each dispatch category; dynamically modulating the basic projection matrix according to the work order fault mode distribution vector, mapping the input of the word semantic capsule to the category prediction vector of each dispatch category capsule; aggregating the category prediction vectors through iterative dynamic routing and outputting the output vector of each dispatch category capsule; gating and fusing the output vector of each dispatch category capsule with the global semantic vector to obtain the dispatch category fusion representation vector of each dispatch category; calculating the classification score based on each dispatch category fusion representation vector, and obtaining the dispatch category probability distribution after normalization exponent processing; constructing a joint training loss function, and updating the model parameters end-to-end according to the joint training loss function.
[0009] In a preferred embodiment of the present invention, the iterative dynamic routing includes: establishing a trainable dispatch category fault mode prototype vector for each dispatch category; in each round of routing, for each standard term node, multiplying the inner product of the currently accumulated log prior with the work order fault mode distribution vector and the dispatch category fault mode prototype vector by the fault prior bias strength coefficient, summing the products, and then performing normalized exponential processing to obtain the coupling coefficient of the standard term node assigned to each dispatch category capsule; performing a weighted summation of the category prediction vectors according to the coupling coefficients to obtain the input vector of each dispatch category capsule, and obtaining the output vector of each dispatch category capsule through a compressed activation function; updating the log prior according to the consistency between the category prediction vector and the output vector of the dispatch category capsule, repeating the iteration until a preset number of routing rounds is reached, and using the output vector of the dispatch category capsule in the last round as the final output vector.
[0010] In a preferred embodiment of the present invention, outputting a target distribution category based on the probability distribution of the category to be distributed includes: taking the distribution category corresponding to the highest probability in the probability distribution of the category to be distributed as a candidate target distribution category, and calculating the difference between the highest probability and the second highest probability as the distribution confidence interval; if the highest probability is not less than a preset confidence threshold and the distribution confidence interval is not less than a preset interval threshold, then the candidate target distribution category is output as the target distribution category and automatic distribution is performed; otherwise, a manual review prompt is output, and the top few distribution categories with the highest probability are displayed for manual selection.
[0011] Secondly, embodiments of the present invention also provide an automatic dispatching device for battery swapping customer service work orders based on semantic analysis. The device includes: a training sample set acquisition module, used to acquire a training sample set; each training sample in the training sample set includes an original battery swapping work order text and a corresponding real dispatching category label; a data augmentation representation construction module, used to perform data augmentation representation construction on each original battery swapping work order text to obtain a word-level augmented representation matrix, a work order fault mode distribution vector, and a global semantic vector; and a dispatching classification model construction module, used to construct a dispatching classification model based on the word-level augmented representation matrix, the work order fault mode distribution vector, and the global semantic vector. The system trains a dispatch classification model; a module for acquiring the text of the power exchange work order to be dispatched is used to acquire the text of the power exchange work order to be dispatched, and performs data augmentation representation construction on the text of the power exchange work order to be dispatched to obtain the word-level augmentation representation matrix, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector of the work order to be dispatched; a module for determining the probability distribution of the dispatch category is used to input the word-level augmentation representation matrix, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector of the work order to be dispatched into the trained dispatch classification model to obtain the probability distribution of the dispatch category; and a target dispatch category output module is used to output the target dispatch category based on the probability distribution of the dispatch category.
[0012] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the semantic analysis-based automatic dispatching method for battery swapping customer service work orders described in the first aspect.
[0013] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the semantic analysis-based automatic dispatching method for battery swapping customer service work orders described in the first aspect.
[0014] The embodiments of the present invention bring the following beneficial effects: This invention provides a method, apparatus, and device for automatic dispatching of battery swapping customer service work orders based on semantic analysis. By acquiring a training sample set, data augmentation representation construction is performed on each original battery swapping work order text to obtain a word-level augmented representation matrix, a work order fault mode distribution vector, and a global semantic vector. Based on these, a dispatching classification model is constructed and trained. The text of the battery swapping work order to be dispatched is then acquired, and data augmentation representation construction is performed on it. The obtained word-level augmented representation matrix, work order fault mode distribution vector, and global semantic vector are input into the trained dispatching classification model to obtain the probability distribution of the dispatching category. Based on this probability distribution, the target dispatching category is output. This method significantly improves the accuracy of battery swapping work order dispatching and the fine-grained classification generalization ability.
[0015] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0016] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 A flowchart of an automatic dispatch method for battery swapping customer service work orders based on semantic analysis provided in an embodiment of the present invention; Figure 2 A flowchart for constructing a training sample set is provided in an embodiment of the present invention; Figure 3 A flowchart of battery swapping customer service work order dispatch and closed-loop update provided in this embodiment of the invention; Figure 4 A flowchart of another method for automatically dispatching battery swapping customer service work orders based on semantic analysis provided in an embodiment of the present invention; Figure 5 A flowchart for constructing a standardized set of faulty component tuples is provided in this embodiment of the invention. Figure 6 An example diagram illustrating the construction of a standardized set of faulty component tuples provided in an embodiment of the present invention; Figure 7 A flowchart for work order fault mode distribution analysis provided in an embodiment of the present invention; Figure 8 This invention provides a semantic dependency graph construction relation graph. Figure 9 A flowchart of another method for automatically dispatching battery swapping customer service work orders based on semantic analysis, provided in an embodiment of the present invention; Figure 10 A flowchart illustrating the construction of a joint optimization module is provided in an embodiment of the present invention. Figure 11 A schematic diagram of a semantic analysis-based automatic dispatching device for battery swapping customer service work orders is provided in an embodiment of the present invention. Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] With the rapid development of the new energy vehicle industry, battery swapping is becoming an important method for replenishing energy for electric vehicles due to its advantages such as high energy replenishment efficiency and the separability of battery assets. Battery swapping services involve the collaborative work of multiple technical aspects, including the vehicle, battery pack, swapping station equipment, station control system, and cloud platform communication. An anomaly in any of these aspects can lead to swapping failure or a compromised user experience. When a user or frontline customer service personnel initiates a battery swapping fault report, the customer service system needs to accurately dispatch the work order to the appropriate technical team based on the fault description, such as equipment maintenance, battery software, vehicle control, or station communication specialists.
[0021] Existing technologies have many shortcomings, such as: 1. The semantic projection from words to categories is usually static and fixed. Regardless of the fault type involved in the work order, the prediction weight of the same word for different dispatch categories remains unchanged. It is impossible to dynamically adjust the semantic mapping according to the specific fault background of the current work order, which makes it difficult to eliminate the discrimination ambiguity of the same word in different fault scenarios.
[0022] 2. The dynamic routing process of capsule networks relies solely on the consistency between the class prediction vector and the output vector for iteration, lacking prior guidance from business knowledge. When there are many dispatched classes with similar semantics, the routing convergence speed is slow and easily dominated by high-frequency classes. Low-frequency but correct dispatched classes are difficult to obtain sufficient coupling probability in the routing process.
[0023] 3. The semantic enhancement of work order text is mostly based on dependency syntax trees or general attention mechanisms, which fail to introduce the business association between fault modes and terms in the field of battery swapping. This results in a lack of effective semantic interaction channels between terms that are far apart in the syntactic structure but closely related in the fault link, making it difficult to fully express the semantics of fault combinations across phrases.
[0024] 4. The optimization objective of the dispatch classification model is usually only the cross-entropy classification loss, which lacks the constraint on the compactness of the representation within the category. This leads to the scattered distribution of similar work orders in the representation space, and the blurred boundaries between easily confused fine-grained dispatch categories. It is difficult to widen the gap between categories by relying solely on the classification loss, and the generalization ability of low-frequency categories is insufficient.
[0025] Based on this, the present invention provides a method, apparatus, and device for automatic dispatching of battery swapping customer service work orders based on semantic analysis. This method involves acquiring a training sample set, performing data augmentation representation construction on each original battery swapping work order text to obtain a word-level augmented representation matrix, a work order fault mode distribution vector, and a global semantic vector. Based on these elements, a dispatching classification model is constructed and trained. The method then acquires the battery swapping work order text to be dispatched, performs data augmentation representation construction on this text, and inputs the obtained word-level augmented representation matrix, fault mode distribution vector, and global semantic vector into the trained dispatching classification model to obtain the probability distribution of the dispatching category. Finally, the method outputs the target dispatching category based on this probability distribution. This approach significantly improves the accuracy of battery swapping work order dispatching and the fine-grained classification generalization ability.
[0026] To facilitate understanding of this embodiment, a detailed description of the automatic dispatching method for battery swapping customer service work orders based on semantic analysis disclosed in this embodiment of the invention will be provided first.
[0027] Example 1 This invention provides a method for automatically dispatching battery swapping customer service work orders based on semantic analysis. Figure 1 This is a flowchart illustrating an automatic dispatching method for battery swapping customer service work orders based on semantic analysis, provided as an embodiment of the present invention. Figure 1 As shown, the automatic dispatching method for battery swapping customer service work orders based on semantic analysis may include the following steps: Step S101: Obtain the training sample set.
[0028] Each training sample in the training sample set includes the original power swap work order text and the corresponding real dispatch category label.
[0029] Specifically, by uniformly organizing the battery swapping work order text, structured fields of the battery swapping business, and manual dispatch tags, a training sample set with standard dispatch tags was obtained. For ease of understanding, Figure 2 A flowchart for constructing a training sample set is provided in this embodiment of the invention, specifically: 1) Read the first number from the battery swapping customer service system Original power replacement work order text ,in, This represents the work order index, used to distinguish different work orders, with a value range of 1 to... ; This represents the total number of work orders, and its value is determined by the size of the historical work order database; for example, it can be 500,000. It refers to the first The original text content of the work order, generated by customer service personnel, site personnel, or user feedback, includes at least one type of information from the following categories: fault description, vehicle status, site status, and processing remarks.
[0030] Furthermore, read the data from the vehicle status record related to the first... Original power replacement work order text The corresponding fields include vehicle identification, battery swapping time, site number, fault code, state of charge, battery pack number, and battery swapping result. Specifically, the vehicle identification is used to associate work orders generated by the same vehicle at different times; the battery swapping time is used to determine the time the work order occurred; the site number is used to associate the status of the battery swapping station equipment; the fault code is used to supplement system anomalies not explicitly described in the text; the state of charge is used to assist in identifying battery charging anomalies, state of charge jumps, and battery management system communication anomalies; and the battery pack number is used to track the recurrence of anomalies involving the same battery pack in different vehicles or sites.
[0031] In one embodiment, for example, a certain original power replacement work order text For vehicle owners reporting that their vehicles cannot be driven away and that battery swapping has failed, the corresponding structured fields can be read as follows: Vehicle Identification Number: VIN_20230715_A001 Battery swapping time: 2023-07-15 14:32:10 Site ID: STN_BJ_HD_003 Fault code: E0410 (corresponding to "battery swapping mechanism lock-up abnormality") State of charge: 45% Battery pack part number: BP_CN_LT_0892 Battery swap result: Failed This set of structured fields, together with the work order text, constitutes a complete work order record, providing accurate numerical basis for subsequent semantic understanding and fault location.
[0032] 2) Based on historical manual distribution records, this is the first... Original power replacement work order text Assign real distribution category labels , It refers to the first Original power replacement work order text The corresponding actual distribution category label has a value range of 1 to ; This represents the total number of distribution categories, determined by the battery swapping service distribution system; for example, 12 could be used.
[0033] In one implementation, dispatch categories may include equipment maintenance, battery software, battery maintenance, vehicle control, site communication, platform system, customer service review, and comprehensive troubleshooting. If the same historical work order has multiple dispatch records, the dispatch category that is finally confirmed and closed-loop will be used as the true dispatch category label. If there are obvious misassignments in the transfer records and they are manually reviewed and corrected, the corrected delivery category will be used as the true delivery category label. .
[0034] 3) Perform validity screening on historical work orders, deleting work orders with no faults, duplicate submissions, purely inquiry-based orders, purely marketing-based orders, and work orders with uncertain dispatch results. For example, for multiple duplicate work orders generated around the same vehicle identifier, station number, and battery swapping time, they can be merged based on text similarity, fault code consistency, and manual dispatch category consistency, retaining the original battery swapping work order text with the most complete content. And other duplicate work orders are added as supplementary notes for the same fault event.
[0035] In practical implementation, if two work orders have the same vehicle identifier, a battery swapping interval of less than 30 minutes, the same set of fault codes, and a text similarity greater than 0.9 for the original battery swapping work orders, they can be identified as duplicate work orders. This processing can reduce the impact of duplicate samples on the statistical distribution of dispatch categories and avoid the model from overlearning of duplicate events that occur in a short period of time.
[0036] 4) The processed samples are combined into a training sample set. ,Right now .in, The training sample set refers to a data set consisting of multiple original power swapping work order texts and their actual dispatch category labels. Indicates the first training samples, Indicates the first The original power replacement work order text, Indicates the first The actual dispatch category label corresponding to the original power replacement work order text.
[0037] Step S102: Perform data augmentation representation construction on each original power replacement work order text to obtain a word-level augmentation representation matrix, a work order fault mode distribution vector, and a global semantic vector.
[0038] Among these issues, battery swapping customer service work orders are typically entered by frontline customer service personnel, resulting in problems such as colloquial descriptions of faults, inconsistent component names, and incomplete vehicle status descriptions. For example, similar faults may be described in multiple text formats, such as "battery cannot charge," "battery is not responding," or "energy storage system malfunction." Conventional text preprocessing usually only performs word segmentation, stop word removal, and word frequency statistics, which is insufficient to eliminate differences in synonymous terms and to express the business relationship between fault phenomena, faulty components, and vehicle status. This leads to synonymous faults being fragmented into different text features, affecting the accuracy of subsequent dispatch and classification.
[0039] This application standardizes domain terminology in work order texts, unifying colloquial and non-standard fault descriptions into standardized fault components, fault phenomena, and semantic relation tuples. Based on this, by mining the co-occurrence relationships between standard terms and fault patterns in historical work orders and combining prior associations from a knowledge graph in the battery swapping domain, a work order fault pattern distribution vector is generated for each work order. Finally, a semantic dependency graph is constructed using standard terms as nodes and syntactic relations and fault pattern associations as edges, and graph diffusion is performed to obtain word-level and work order-level enhanced semantic representations that integrate text structure, business knowledge, and fault priors.
[0040] Step S103: Based on the word-level enhanced representation matrix, work order fault mode distribution vector, and global semantic vector, construct and train the dispatch classification model.
[0041] Battery swapping work orders typically exhibit characteristics such as fine-grained categorization, strong similarity, and cross-component coupling. For example, mechanical equipment failures should be assigned to the equipment maintenance category, battery communication failures to the battery software category, and battery charging anomalies to the battery maintenance category. Conventional classification models usually input text vectors directly into linear classifiers, making it difficult to dynamically adjust the mapping between standard terms and assignment categories based on the current work order's failure mode, and also making it difficult to effectively differentiate between easily confused assignment categories.
[0042] This application's embodiments utilize a word-level enhanced representation matrix. Work order fault mode distribution vector and global semantic vector The projection process from standard terms to distribution category capsules is subjected to fault mode modulation, and a prototype vector of distribution category fault modes is introduced into the dynamic routing. Finally, the distribution classification result is optimized by jointly using classification loss and prototype constraint loss.
[0043] Step S104: Obtain the text of the power replacement work order to be dispatched, perform data augmentation representation construction on the text of the power replacement work order to be dispatched, and obtain the word-level augmentation representation matrix to be dispatched, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector to be dispatched.
[0044] Step S105: Input the word-level augmented representation matrix to be dispatched, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector to be dispatched into the trained dispatch classification model to obtain the probability distribution of the dispatch category.
[0045] After model training is complete, the trained dispatch classification model is deployed to the battery swapping customer service work order system. During online operation, the system receives newly generated battery swapping work order texts to be dispatched and outputs the target dispatch category according to the same terminology standardization, fault mode distribution generation, semantic dependency graph enhancement, and dynamic routing classification process as in the training phase. Simultaneously, it generates interpretable dispatch criteria to assist in manual review and business closure. For ease of understanding, [further details are needed]. Figure 3 A flowchart for battery swapping customer service work order dispatch and closed-loop update provided in this embodiment of the invention is as follows: 1) Obtain the text of the power replacement work order to be dispatched. ,in, This indicates the text of the pending power replacement work order that needs to be dispatched and judged. (Pending power replacement work order text) These can come from user repair requests, customer service records, battery swapping station equipment alarms, or vehicle-side fault reports.
[0046] Furthermore, read the text of the power replacement work order to be dispatched. The corresponding vehicle status fields, battery swapping station equipment status fields, and fault code fields are used as auxiliary information in terminology standardization and standardized fault component tuple extraction. This processing can be applied to the text of the battery swapping work order to be dispatched. When the information is too short or incomplete, supplement it with structured business information.
[0047] 2) Treatment of the dispatch of electrical replacement work order text Perform the same work order data augmentation representation construction process as in the training phase to obtain the word-level augmentation representation matrix to be dispatched. Fault mode distribution vector of work orders to be dispatched and global semantic vector to be dispatched .in, This indicates the text of the power replacement work order to be dispatched. The corresponding word-level augmented representation matrix; This indicates the text of the power replacement work order to be dispatched. The corresponding work order fault mode distribution vector; This indicates the text of the power replacement work order to be dispatched. The corresponding global semantic vector.
[0048] It should be noted that the online inference phase must use the synonym mapping table of battery swapping terminology, the knowledge graph of battery swapping, the fault mode set, and normalized statistical parameters saved during the training phase; it must not be based on a single battery swapping work order text. Reconstruct the fault mode set or re-statistically analyze the co-occurrence strength of terms; otherwise, the fault mode distribution space will be altered, affecting the stability of the dispatch results.
[0049] 3) The word-level enhancement representation matrix to be dispatched Fault mode distribution vector of work orders to be dispatched and global semantic vector to be dispatched The trained dispatch classification model (i.e., the fault mode modulation dynamic routing capsule network and prototype-enhanced dispatch classification model) is input and sequentially processed through fault mode modulation word semantic capsule projection, fault prior bias iterative dynamic routing, global and local semantic fusion, and dispatch classification to obtain the probability distribution of the dispatch category. .
[0050] Step S106: Output the target distribution category based on the probability distribution of the category to be distributed.
[0051] Specifically, outputting the target distribution category based on the probability distribution of the categories to be distributed can include: taking the distribution category corresponding to the highest probability in the probability distribution of the categories to be distributed as the candidate target distribution category, and calculating the difference between the highest probability and the second highest probability as the distribution confidence interval; if the highest probability is not less than a preset confidence threshold and the distribution confidence interval is not less than a preset interval threshold, then the candidate target distribution category is output as the target distribution category and automatic distribution is performed; otherwise, a manual review prompt is output, and the top few distribution categories with the highest probability are displayed for manual selection.
[0052] Among them, the probability distribution of the categories to be distributed The distribution category with the highest probability is selected as the candidate target distribution category, and the difference between the highest probability and the second highest probability is calculated as the distribution confidence interval. The larger the distribution confidence interval, the more clearly the model distinguishes the candidate target distribution category; the smaller the distribution confidence interval, the more likely the work order is on the boundary of easily confused distribution categories, requiring manual review.
[0053] Output the target distribution category based on the confidence threshold and the distribution confidence interval. ,in, This represents the minimum class probability required to accept the automatically assigned result, and can be between 0.6 and 0.8, for example, 0.7. The assignment interval threshold is denoted as... ,in, This represents the minimum probability difference that needs to be satisfied between the candidate target distribution category and the second highest probability distribution category. It can be between 0.1 and 0.2, for example, 0.15.
[0054] In practical implementation, if the probability distribution of the category to be distributed is... The maximum probability in is not less than the confidence threshold. And the distribution confidence interval is not less than the distribution interval threshold. If the probability is less than the confidence threshold, then the candidate target distribution category is output as the target distribution category, and automatic distribution is performed; if the maximum probability is less than the confidence threshold, then the target distribution category is output as the candidate target distribution category. Or the distribution confidence interval is less than the distribution interval threshold. If the condition is met, a prompt for manual review will be output, and the top 2 or 3 distribution categories with the highest probability will be displayed for customer service supervisors or dispatchers to select.
[0055] In one embodiment, for example, if the probability distribution of the category to be distributed is as follows: Confidence threshold Distribution interval threshold The maximum probability is And with the second highest probability The distribution confidence interval between them is If the automatic dispatch condition is met, output the third dispatch category as the target dispatch category. If the probability distribution of the categories to be dispatched is... The maximum probability is Less than the confidence threshold Output a prompt for manual review.
[0056] An interpretable dispatching basis is generated based on failure mode attention weights, semantic dependency enhancement edge weights, and dynamic routing coupling coefficients. Specifically, failure mode attention weights are first selected. The highest-ranking standard terms are selected as key fault terms; then, the standard terms with the highest coupling coefficient with the target dispatch category capsule are selected as category support terms; finally, the standardized fault component tuple set is combined to output the explanatory information of "standard fault component terms, standard fault phenomenon terms, semantic relationship type, and support dispatch category".
[0057] In practical implementation, if the text of the power replacement work order to be dispatched is... For the scenario of "the lock jams during battery swapping, preventing the vehicle owner from leaving," the system can output key fault terms such as "locking mechanism," "jammed," and "vehicle unable to leave," along with standardized fault component tuples like "locking mechanism, jammed, occurred" and "vehicle, unable to leave, accompanying," and explain that the target dispatch category is primarily supported by "locking mechanism jammed" and "vehicle unable to leave." This explanatory information helps manual reviewers quickly confirm the dispatch basis and facilitates subsequent business closed-loop analysis.
[0058] Text of the electrician replacement work order to be dispatched The target dispatch category, the probability distribution of the category to be dispatched, the standardized set of faulty component tuples, and the interpretable dispatch basis are written into the dispatch record. If the subsequent manual processing result is inconsistent with the target dispatch category, the manual correction category and the reason for the correction are recorded, and closed-loop work orders are periodically added to the training sample set. It is used to update the synonym mapping table of terminology in the field of battery swapping, the knowledge graph of the field of battery swapping, and the parameters of the distribution classification model.
[0059] It should be noted that online updates do not directly use incomplete work orders to modify the dispatch classification model parameters. Only work orders that have been manually confirmed or have entered the business loop are included in the subsequent training sample set. This avoids erroneous dispatch results being repeatedly learned by the model, ensuring the long-term stability of the dispatch classification model.
[0060] Based on this, output the text of the power replacement work order to be dispatched. The system includes the target assignment category, the probability distribution of the pending assignment category, and the explainable assignment basis. The target assignment category is used to automatically assign work orders or assist in manual review; the probability distribution of the pending assignment category is used to show the confidence level of the candidate assignment category; and the explainable assignment basis is used to support the review of assignment results, fault tracking, and optimization of assignment rules.
[0061] The automatic dispatching method for battery swapping customer service work orders based on semantic analysis provided in this invention can obtain a training sample set, perform data augmentation representation construction on each original battery swapping work order text to obtain a word-level augmented representation matrix, a work order fault mode distribution vector, and a global semantic vector. Based on the word-level augmented representation matrix, work order fault mode distribution vector, and global semantic vector, a dispatching classification model is constructed and trained. The method then obtains the battery swapping work order text to be dispatched, performs data augmentation representation construction on the text, and inputs the obtained word-level augmented representation matrix, work order fault mode distribution vector, and global semantic vector to the trained dispatching classification model to obtain the probability distribution of the dispatching category. Based on this probability distribution, the target dispatching category is output. This method significantly improves the accuracy of battery swapping work order dispatching and the fine-grained classification generalization ability.
[0062] Example 2 This invention also provides another method for automatically dispatching battery swapping customer service work orders based on semantic analysis. This method is implemented on the basis of the method in the above embodiments. This method focuses on describing the specific implementation of performing data enhancement representation construction on each original battery swapping work order text to obtain a word-level enhanced representation matrix, a work order fault mode distribution vector, and a global semantic vector.
[0063] Figure 4 A flowchart of another method for automatically dispatching battery swapping customer service work orders based on semantic analysis provided in this embodiment of the invention is shown below. Figure 4 As shown, the process of constructing a data augmentation representation for each original battery swapping work order text to obtain a word-level augmented representation matrix, a work order fault mode distribution vector, and a global semantic vector can include the following steps: Step S201: Standardize the original power replacement work order text for domain terminology and extract standardized fault component tuples to obtain a set of standardized fault component tuples.
[0064] To address the issues of inconsistent terminology and incomplete semantic relationships in original battery swapping work order texts, this application first performs text cleaning, Chinese word segmentation, and domain phrase recognition on the original battery swapping work order text. Then, it utilizes a battery swapping domain terminology synonym mapping table to standardize colloquial fault descriptions, non-standard component names, and vehicle status phrases into standard terms. Next, combining dependency parsing and battery swapping domain rules, it extracts standard fault component terms, standard fault phenomenon terms, and semantic relationship types to form standardized fault component tuples. For ease of understanding... Figure 5 A flowchart for constructing a standardized fault component tuple set is provided for an embodiment of the present invention. The specific steps are as follows: 1) Regarding the first Original power replacement work order text The process involves cleaning up invalid symbols, standardizing full-width and half-width formats, removing duplicate spaces, and retaining key numerical status terms and business symbols. Key numerical status terms include battery percentage, fault codes, site numbers, vehicle status numbers, battery swapping bay numbers, and battery pack numbers. Retaining these key numerical status terms helps prevent the loss of fault diagnosis information during the cleaning phase.
[0065] In one embodiment, as an example, during the cleaning process, the original text "Vehicle SOC is 30%, E0410 error occurred, battery swapping failed at bay 3 of STN_BJ_HD_003 station" is processed and retained as "Vehicle SOC is 30%, E0410 error occurred, battery swapping failed at bay 3 of STN_BJ_HD_003 station". The numbers or codes such as 30%, E0410, STN_BJ_HD_003, and 3 are considered critical business information and are not deleted, ensuring that the quantitative basis required for fault analysis is not lost.
[0066] Furthermore, the original power replacement work order text after cleaning was examined. Chinese word segmentation and domain phrase recognition are performed to retain continuous word fragments with complete business meanings, such as "battery swapping failure", "communication anomaly", "locking mechanism", "charge state jump", "unable to drive away", "battery pack unlocking failure", and "station controller no response", as candidate terms. This avoids simple word segmentation from breaking down business phrases into ordinary words that cannot express the complete fault meaning.
[0067] In one implementation, the original power replacement work order text after cleaning is... Chinese word segmentation and domain phrase recognition are performed. First, a pre-built domain phrase dictionary for battery swapping is loaded, which contains complete business phrases such as "battery swapping failure," "state of charge transition," "locking mechanism," and "battery pack unlocking failure." Then, a combination of a dictionary-based maximum matching word segmentation algorithm and a general Chinese word segmentation tool is used. Continuous character segments in the text that match the domain dictionary are prioritized as indivisible domain phrases. For parts not covered by the dictionary, the general word segmentation tool is then used for processing. This strategy ensures that compound terms like "state of charge transition" are not incorrectly segmented into "charge / state / transition," thus losing their complete semantics.
[0068] 2) Establish a terminology synonym mapping table for the battery swapping field. This table is used to store the mapping relationship between non-standard terms and standard terms. The terminology synonym mapping table for the battery swapping field is jointly constructed from high-frequency words in historical work orders, manual maintenance dictionaries, battery swapping equipment component lists, fault code description documents, and dispatch rule documents, and is stored in the form of "non-standard terms, standard terms, term type, applicable scenarios, and priority".
[0069] In one implementation, "battery," "battery pack," and "energy storage system" are uniformly mapped to "power battery"; "latch," "buckle," and "latch tongue" are uniformly mapped to "locking mechanism"; "cannot charge," "cannot replenish energy," and "replenishment failed" are uniformly mapped to "charging failed"; "no response," "no response," and "not responding" are uniformly mapped to "no response"; and "cannot swap batteries," "battery swap interrupted," and "battery swap not completed" are uniformly mapped to "battery swap failed." This process eliminates discrepancies in the descriptions of the same business object and the same fault phenomenon across different customer service representatives, improving the consistency of subsequent fault mode statistics and dispatch classification.
[0070] In practical implementation, if a non-standard term may map to multiple standard terms, the final standard term is determined based on the component type, fault code, and adjacent verbs in the context. For example, "cannot lock" is mapped to "locking mechanism failed" when "battery pack," "slot," or "lock tongue" appears; and to "vehicle door" or "user side door" when "door" or "user side door" appears. By introducing contextual conditions, errors caused by homonymous phrases can be reduced in standardization.
[0071] 3) The original power swapping work order text after standardization of terminology. Dependency parsing is performed to identify core predicates, subjects, objects, attributive-head relationships, adverbial-head relationships, coordinate relationships, and supplementary explanatory relationships in sentences. Dependency parsing is used to determine whether there is a direct business relationship between standard fault component terms and standard fault phenomenon terms, avoiding the grouping of irrelevant terms solely based on textual distance.
[0072] In practical implementation, if there is a subject-predicate relationship, verb-object relationship, modifier relationship, or adjacent fault phrase relationship between standard fault component terms and standard fault phenomenon terms, then the two are considered as candidate fault component combinations; if the standard fault phenomenon term describes the abnormal state of the standard fault component term, then the semantic relationship type is set to "occurrence"; if one standard fault phenomenon term triggers another standard fault phenomenon term, such as "communication abnormality leads to battery swapping failure", then the semantic relationship type between the two is set to "cause"; if multiple standard fault phenomenon terms appear in parallel in the same work order, such as "locking mechanism jammed and vehicle unable to leave", then the corresponding semantic relationship type is set to "accompanying".
[0073] Furthermore, if the original power replacement work order text If a fault code is included but a specific component is missing, standard fault component terms should be added based on the fault code description document. For example, if the fault code corresponds to "Battery Management System Communication Timeout," but the text only states "System Error Unable to Swap Battery," then the standard fault component term "Battery Management System" and the standard fault symptom term "Communication Anomaly" should be added. This supplementary processing improves the semantic completeness of faults in both short text and abbreviated work orders.
[0074] 4) Combine standard fault component terms, standard fault phenomenon terms, and semantic relation types with business meaning into standardized fault component tuples, and obtain a set of standardized fault component tuples, i.e. .in, Indicates the first Original power replacement work order text A standardized set of faulty component tuples used to store data from the original power replacement work order text. The core business semantic information extracted from it is used as the structured input for subsequent fault mode mining; Represents a tuple index, used to distinguish the tuple. Original power replacement work order text Different standardized fault component tuples in; Indicates the first Original power replacement work order text The total number of standardized fault component tuples, used to characterize the number of valid fault semantics contained in the work order, with values ranging from 1 to 5; Indicates the first Original power replacement work order text The Middle A standard term for faulty components, used to characterize the business object where the fault occurs; Indicates the first Original power replacement work order text The Middle A standard fault phenomenon terminology used to characterize abnormal behavior perceived by users, vehicles, or battery swapping equipment; Indicates the first Original power replacement work order text The Middle There are several semantic relationship types used to characterize the business relationship between standard fault component terms and standard fault phenomenon terms. Examples of values include "occurs", "causes", "accompanied by", and "triggers".
[0075] For ease of understanding, Figure 6 An example diagram illustrating the construction of a standardized fault component tuple set provided by an embodiment of the present invention. In one embodiment, as an example, the original power replacement work order text... The message "The owner reported that the battery was unresponsive, the latch got stuck during battery swapping, and the system displayed a communication error" can be categorized into "Power battery unresponsive," "Lock mechanism stuck," and "Battery management system communication error" after terminology standardization. Further dependency parsing and battery swapping domain rule processing yield three standardized fault component tuples: "Power battery, unresponsive, occurred," "Lock mechanism, stuck, occurred," and "Battery management system, communication error, occurred." This process transforms colloquial text into structured fault semantics.
[0076] It should be noted that the standard fault component terminology, standard fault phenomenon terminology, and semantic relationship types are all maintained using a unified terminology system in the field of battery swapping; terms with the same meaning use only the same standard term throughout the text to avoid synonym dispersion and feature conflicts in subsequent calculations.
[0077] Step S202: Based on the historical battery swapping work order set, statistically analyze the co-occurrence strength between standard terms and fault modes, and combine the knowledge graph in the battery swapping field to calculate the term pattern association score of standard terms to fault modes.
[0078] To address the issues of limited samples of low-frequency fault modes, scattered statistical analysis of synonyms, and the difficulty of representing business priors using simple word frequency, this invention statistically analyzes the co-occurrence strength between standard terms and fault modes based on historical battery swapping work order sets. It also incorporates prior associations between components, fault phenomena, and dispatch categories in a knowledge graph within the battery swapping field to calculate the indicative strength of standard terms for different fault modes. Furthermore, it performs weighted aggregation and normalization on the standard terms in the current work order to generate a work order fault mode distribution vector. For ease of understanding, [further details are needed]. Figure 7 A flowchart for work order fault mode distribution analysis provided in this embodiment of the invention includes the following specific steps: 1) Establish a fault mode set based on the historical set of power replacement work orders. The fault mode set is denoted as... ,in, This represents a set consisting of multiple battery swapping failure modes; Indicates the first One failure mode; This represents the fault mode index, with a value range of 1 to... ; This represents the total number of fault modes, determined jointly by historical work order clustering results, manual review labels, and battery swapping expert knowledge. An example value is 32. Fault modes are used to carry prior categories of faults with consistent business meaning, such as "equipment lock-up fault mode", "power battery communication fault mode", "battery charging anomaly fault mode", "vehicle unable to leave fault mode", and "station network fault mode".
[0079] In the specific implementation, step S201 is first executed on the historical power replacement work order set to obtain the standard terminology sequence and standardized fault component tuple set for each historical work order; then, the historical work orders are clustered according to the dispatch category label, fault code, manual review conclusion, and standard terminology combination; finally, the clustering results are merged, split, and named to obtain the fault mode set. This process ensures that fault modes are derived from real work order data and are constrained by knowledge of battery swapping services, thus avoiding categories without business meaning generated by purely unsupervised clustering.
[0080] In practice, the algorithm first performs initial clustering, and then the clustering results are jointly reviewed by battery swapping business experts and data analysts. For multiple clusters that are semantically similar but were incorrectly split by the algorithm, such as the "charging gun mechanical failure" cluster and the "charging connector jamming" cluster, if their business meanings are determined to be consistent, they are merged into one cluster. For clusters with large differences in internal samples and containing multiple fault phenomena, such as a mixed cluster containing both "network interruption" and "locking mechanism abnormal noise", they are split into two independent clusters based on the terminology distribution of their internal samples. Finally, each processed cluster is named according to its core combination of <standard fault component, standard fault phenomenon>, such as the merged cluster being named "charging connector mechanical failure mode".
[0081] In one embodiment, as an example, the initial clustering yielded cluster A (keywords: latch, jamming), cluster B (keywords: bolt, unable to open), and cluster C (keywords: communication, interruption, platform). Clusters A and B both describe mechanical faults in the locking mechanism, so they are merged and named "Equipment Locking Fault Mode." Cluster C, being more independent, is directly named "Station Network Fault Mode."
[0082] 2) Define the first Original power replacement work order text The corresponding standard terminology sequence is ,in, It refers to the first Original power replacement work order text The standard terminology sequence obtained after terminology standardization; Indicates the first Original power replacement work order text The first in A standard term; This represents a standard term index, with values ranging from 1 to... ; Indicates the first Original power replacement work order text The number of standard terms in the text, with examples ranging from 5 to 40.
[0083] Furthermore, based on the historical power swapping work order set, the co-occurrence of each standard term and each fault mode is statistically analyzed to obtain the statistical correlation strength between the standard terms and fault modes. In one implementation, point mutual information can be used to calculate the co-occurrence strength between the standard terms and fault modes, expressed as: ; in, Standard terminology With the One fault mode The mutual information between points is used to mine statistical co-occurrence patterns from the historical set of power swap work orders; Standard terminology With the One fault mode The joint probability of occurrence in the historical set of electrical swapping work orders; Standard terminology Probability of occurrence in the historical set of electrical swap work orders; Indicates the first One fault mode Probability of occurrence in the historical set of electrical swap work orders; This represents a logarithmic function; in machine learning, the base is assumed to be the natural constant. If a certain probability is... Laplace smoothing can be used to ensure that low-frequency standard terms can still participate in the calculation of statistical association strength.
[0084] 3) Construct a knowledge graph for the battery swapping domain. This knowledge graph includes entity components, fault phenomenon entities, fault mode entities, and dispatch category entities. Relationships between entities include "belongs to component system," "cause," "characterizes," "belongs to fault mode," and "suggests dispatch to." Then, standard terminology is calculated based on the battery swapping domain knowledge graph. Failure Mode The strength of the knowledge graph association and the shortest path distance between the knowledge graphs.
[0085] In practical implementation, if standard terminology Corresponding entities and failure modes If there is a direct "cause", "representation", or "dependent failure mode" relationship between corresponding entities, then the knowledge graph association strength is... Pick If no direct relationship exists, then the knowledge graph's association strength... Pick Shortest path distance in a knowledge graph Standard terminology Corresponding entities and failure modes The indirect association span between corresponding entities; if two entities are unreachable in the knowledge graph of the battery swapping domain, then the shortest path distance in the knowledge graph is used. Set to the preset maximum distance, for example, take .
[0086] One implementation employs a combination of top-down and bottom-up approaches to construct a knowledge graph for the battery swapping field. First, experts in the battery swapping field define the schema layer of the knowledge graph, defining concept types such as "component entities," "fault phenomenon entities," "fault mode entities," and "dispatch category entities," along with their possible relationship types (e.g., "causing" and "dependent fault modes"). Then, instance data is extracted from structured fault code documentation, equipment maintenance manuals, and parts lists to populate the bottom-level data layer. Simultaneously, relationship extraction algorithms are used to mine relationships between entities from unstructured historical work order texts as a supplement. All knowledge is stored in triples (head entity, relationship, tail entity).
[0087] In one embodiment, for example, the graph contains the following triples: (Locking mechanism, part of the component system, battery swapping actuator) (The locking mechanism is stuck, preventing the vehicle from leaving.) (Locking mechanism stuck, slave fault mode, equipment locking fault mode) (Equipment lockout fault mode, it is recommended to dispatch to the equipment maintenance category) In another embodiment, by way of example, using standard terminology Corresponding entity "state of charge transition", fault mode For example, the corresponding entity "Battery charging abnormal fault mode": Knowledge Graph Association Strength In the spectrum, if a triplet exists (state-of-charge transition, characterization, abnormal battery charging fault mode), this belongs to a direct "characterization" relationship, then... If the standard term is "site number" and has no direct business relationship with "battery charging anomaly failure mode", then the knowledge graph association strength is 0.
[0088] Shortest path distance in knowledge graph Again, taking the two entities mentioned above as an example, there is a direct relationship between them, and the path length is 1. Therefore... For the "Site Communication Interruption" entity and the "Battery Recharge Abnormal Failure Mode" entity, the path might be "Site Communication Interruption" -) (leading to) -) "Battery Swapping Failure" -) (characterized by) -) "Battery Recharge Abnormal Failure Mode", with a path length of 2. If two entities have no reachable path in the knowledge graph, then Set it to the preset maximum distance, for example, 6.
[0089] 4) By fusing statistical co-occurrence strength and prior associations from the knowledge graph, standard terminology is obtained. For the One fault mode The terminology pattern association score is represented as: ; in, Indicates the first Original power replacement work order text The Middle Standard terminology For the One fault mode The terminology pattern association score is used to measure the indicativeness of the standard term for the failure mode; This represents the prior knowledge balance coefficient, used to adjust the contribution of prior associations in the term pattern association score. It can be taken from 0.5 to 1.2, for example, 0.8. This represents the knowledge path decay coefficient, used to control the rate at which indirect knowledge associations decay as the path distance increases. It can be set from 0.3 to 0.8, for example, 0.5. This represents a linear rectified function used to truncate negative correlation scores. This ensures that the indication strength of the standard terminology for the failure mode is non-negative.
[0090] Through the above processing, standard terms that frequently co-occur in historical data can obtain higher statistical correlation scores, and standard terms with clear business correlations in the knowledge graph of the battery swapping field can also obtain supplementary weighting, thereby improving the problem that long-tail fault patterns are difficult to identify when there are few historical samples.
[0091] Step S203: Based on the terminology pattern association score, perform weighted aggregation and normalization on all standard terms in the original power swapping work order text to generate a work order fault mode distribution vector.
[0092] Specifically, based on the terminology pattern association score, all standard terms in the original battery swapping work order text are weighted, aggregated, and normalized to generate a work order fault mode distribution vector. This process may include: calculating the co-occurrence probability of each standard term with each fault mode based on historical battery swapping work order sets, and calculating point mutual information as the statistical co-occurrence strength; constructing a knowledge graph in the battery swapping domain, and calculating the knowledge graph association strength and shortest path distance between standard terms and fault modes based on the knowledge graph; fusing the statistical co-occurrence strength and the prior association of the knowledge graph in the battery swapping domain to obtain the terminology pattern association score of each standard term for each fault mode; and averaging and normalizing the terminology pattern association scores of all standard terms in the current original battery swapping work order text according to the fault mode dimension to obtain the work order fault mode distribution vector.
[0093] For the Original power replacement work order text All standard terms in the dataset are weighted and aggregated, and normalization exponents are applied to all failure modes to obtain the first... Original power replacement work order text Work order failure mode distribution vector , is represented as: ; in, It refers to the first Original power replacement work order text The work order failure mode distribution vector is used to characterize the prior distribution of the work order in the failure mode space. Indicates the first Original power replacement work order text Belongs to the One fault mode The probability distribution of the fault mode ranges from 0 to 1, and the sum of the probability distributions of all fault modes is 1. This represents the normalized fault mode index, used to traverse all fault modes in the denominator. Indicates the first Original power replacement work order text The Middle The first standard term for the first One fault mode Terminology pattern association score; This represents the natural exponential function, used to amplify the differences between scores for different failure modes. This is achieved by adjusting the number of standard terms. Taking the average can reduce the problem of long-term work orders having a high overall score due to the large number of technical terms.
[0094] In one embodiment, as an example, the current original power replacement work order text It includes standard terms such as "battery swapping failure," "locking mechanism," and "state of charge transition." If these standard terms frequently co-occur with "equipment lockout failure mode" in the historical battery swapping work order set, and there is a direct subordinate relationship between "locking mechanism" and "equipment lockout failure mode" in the battery swapping knowledge graph, then the probability distribution corresponding to "equipment lockout failure mode" is... The increase in the number of dispatch categories makes subsequent models pay more attention to equipment operation and maintenance related categories.
[0095] It should be noted that the work order failure mode distribution vector It is not the final dispatch category, but the prior distribution of the current work order in the fault mode space, which is used to guide subsequent semantic dependency graph enhancement and dynamic routing dispatch classification.
[0096] Step S204: Using each standard term in the original power swap work order text as a semantic dependency graph node, construct basic semantic connections based on the dependency syntax tree, and construct prior connections for fault modes based on the work order fault mode distribution vector.
[0097] To address the challenge of simultaneously expressing syntactic distance, fault mode association, and contextual semantics among standard terms, this invention uses the first... Original power replacement work order text The standard terminology in the code is graph nodes. Basic semantic connections are constructed based on dependency parsing trees, and based on the work order fault mode distribution vector. To enhance the information transmission strength between fault-related nodes, a word-level enhanced representation matrix is obtained through normalized graph diffusion with self-loops. For ease of understanding, Figure 8 The specific steps for constructing a semantic dependency graph according to an embodiment of the present invention are as follows: 1) Using standard terminology sequence Each standard term in the graph is used as a node in a semantic dependency graph to establish the first... Original power replacement work order text The corresponding semantic dependency graph, each node of which retains the standard terminology text, standard terminology type, standardized fault component tuple attribution information, and the original power replacement work order text. The position index in the middle.
[0098] In one embodiment, for example, the standard terminology sequence for the text "The locking mechanism is stuck, preventing the vehicle from leaving, and the system reports battery swapping failure" is as follows: Locking mechanism jammed, vehicle unable to move, system battery swap failed. The established semantic dependency graph contains 6 nodes. For example, the "locking mechanism" node retains attributes such as its term type as "component", its associated tuple "(locking mechanism, jam, occurred)", and its position index as 1.
[0099] Furthermore, each standard term is input into a pre-trained language model or a word vector table for the battery swapping domain to obtain an initial term vector. If the dimension of the initial term vector is inconsistent with the dimension of the subsequent graph diffusion, a trainable linear mapping layer is used to map the initial term vector to a unified dimension to obtain an initial term embedding matrix. .in, Indicates the first Original power replacement work order text The initial term embedding matrix, with dimension . ; This indicates the dimension of the word-level augmented representation, used to limit the number of columns in the word-level augmented representation matrix. An example value is 256.
[0100] In practical implementation, the pre-trained language model can be a text encoding model pre-trained on a general Chinese corpus and further trained using historical battery swapping work orders (e.g., a BERT-base-chinese model pre-trained on a general Chinese corpus). The domain-specific word vector table for battery swapping can be obtained through training on historical work orders, fault code documentation, and equipment maintenance records. By continuing training within the domain or using the domain-specific word vector table, battery swapping-specific terms such as "locking mechanism," "state of charge transition," and "battery pack unlocking failure" can obtain vector expressions that more closely reflect their business meaning.
[0101] In practical implementation, during the training of the vector table, historical work order texts, fault code documentation, and equipment maintenance records are used as a corpus, and the Word2Vec Skip-gram or CBOW algorithm is used for training. After training, a vector table is obtained, which is a key-value pair in the form of "standard term: vector". For example, "locking mechanism: [0.123,-0.456,0.789,...]", "state of charge transition: [-0.234,0.567,-0.890,...]". This vector table is directly loaded during model inference and is used to map standard terms to their corresponding dense vector representations without requiring retraining.
[0102] Step S205: The basic semantic connection and the fault mode prior connection are superimposed to obtain the semantic dependency enhanced adjacency matrix. The semantic dependency enhanced adjacency matrix is applied to the initial term embedding matrix to perform graph diffusion, resulting in the word-level enhanced representation matrix.
[0103] Specifically, the semantic dependency enhanced adjacency matrix is obtained by superimposing the basic semantic connections and the fault mode prior connections. The semantic dependency enhanced adjacency matrix is then applied to the initial term embedding matrix for graph diffusion to obtain the word-level enhanced representation matrix. This process may include: calculating the shortest path distance between any two standard term nodes based on the dependency syntax tree; if the shortest path distance does not exceed a preset dependency distance truncation threshold, a basic semantic connection is established, and the basic semantic connection weights are calculated based on Gaussian kernel transformation; calculating the fault mode prior connection weights between any two standard term nodes based on the work order fault mode distribution vector and the term mode association score of each standard term for the fault mode; the fault mode prior connection weights are positively correlated with the fault mode probabilities commonly associated with the two standard terms; adding the basic semantic connection weights and the fault mode prior connection weights, and setting self-loop connections to obtain the semantic dependency enhanced adjacency matrix; calculating the graph degree matrix of the semantic dependency enhanced adjacency matrix, performing row normalization on the semantic dependency enhanced adjacency matrix, and applying the row-normalized adjacency matrix to the initial term embedding matrix to obtain the word-level enhanced representation matrix.
[0104] Calculate the shortest path distance between any two standard term nodes using the dependency syntax tree. ,in, This represents the node index of the standard terminology, with a value range of 1 to... ; It refers to the first The first standard terminology node and the first The shortest path length of each standard term node in the dependency syntax tree is used to characterize the degree of syntactic proximity between them. If two standard term nodes are close in syntactic structure, they usually have a more direct semantic modification or fault description relationship, so a basic semantic connection is established between them; if the shortest path distance in the dependency tree exceeds a preset dependency distance truncation threshold, no basic semantic connection is established.
[0105] In one implementation, the basic semantic connection weights are calculated based on the shortest path distance in the dependency tree using a Gaussian kernel transform, and are expressed as: ; in, Indicates the first Original power replacement work order text The Middle The first standard terminology node and the first The basic semantic connection weights between standard terminology nodes; This indicates an indicator function that takes the value when the condition within the parentheses is true. Otherwise take ; This represents the dependency distance truncation threshold, used to filter node pairs that are too far apart syntactically and have weak semantic association. It can be 2 to 4, for example, 3. This represents the dependency distance bandwidth coefficient, which controls the degree of penalty imposed by syntactic distance on the weights of the underlying semantic connections. It can be set to 1.0 to 2.0, for example, 1.5.
[0106] 3) Based on the work order fault mode distribution vector Associated score with terminology pattern To add fault mode prior connections to standard terminology nodes that are commonly related to the high-probability fault modes of the current work order, fault mode prior connections are used to solve the problem that some fault terms are far apart in syntactic structure but belong to the same fault link in business.
[0107] In the specific implementation, firstly... Original power replacement work order text The term pattern association score of each standard term is normalized to obtain the normalized term pattern association score. ,in, Indicates the first Original power replacement work order text The Middle The first standard term for the first One fault mode The normalized indicator strength ranges from 0 to 1; normalization can be achieved using minimum-maximum normalization or proportional normalization based on the fault mode dimension. Then, the common correlation between two standard term nodes under the current work order fault mode distribution is calculated to obtain the prior connection weight of the fault mode, expressed as: ; in, Indicates the first Original power replacement work order text The Middle The first standard terminology node and the first Fault mode prior connection weights between standard terminology nodes; This represents the failure mode enhancement coefficient, used to balance the contributions of syntactic dependency connections and failure mode prior connections. It can be 0.3 to 0.9, for example, 0.6.
[0108] This process allows for the acquisition of additional information transmission channels if two standard terms are strongly correlated with the high-probability fault modes of the current work order, even if the two standard terms are syntactically far apart, thereby strengthening the task-related semantics. For example, "state of charge jump" and "battery swapping failure" may not be in the same syntactic phrase, but both are related to "abnormal battery charging fault mode," so semantic enhancement can be achieved through fault mode prior connections.
[0109] 4) Add the basic semantic connection weights and the fault mode prior connection weights to obtain the semantic dependency enhancement adjacency matrix. , It refers to the first Original power replacement work order text The semantic dependency enhancement adjacency matrix has a dimension of This is used to describe the strength of information transmission between standard terminology nodes; where, Represents a semantic dependency-enhanced adjacency matrix The Middle Line 1 The elements of the column are used to represent the first... The first standard terminology node and the first The semantic dependency enhancement edge weights between standard term nodes can make .
[0110] Specifically, for the same standard term node itself, the diagonal position is set to This forms a self-loop connection, preventing the semantics of the original node from being completely covered by neighboring nodes during graph diffusion.
[0111] Furthermore, the graph degree matrix is calculated. , It refers to the first Original power replacement work order text The graph degree matrix is used to enhance the semantic dependency adjacency matrix. Perform row normalization; The dimension is ; The diagonal elements Enhancing the adjacency matrix for semantic dependencies No. The sum of the weights of all semantic dependency-enhanced edges. Since each standard term node has a self-loop connection, the graph degree matrix... Each diagonal element is greater than .
[0112] It should be noted that the graph degree matrix It is a diagonal matrix, and all elements except those on the main diagonal are 0.
[0113] 5) Apply the row-normalized semantic dependency-enhanced adjacency matrix to the initial term embedding matrix. The word-level augmented representation matrix is obtained. , is represented as: ; in, It refers to the first Original power replacement work order text The word-level augmented representation matrix, with dimension . , used to store standard terminology representations enhanced by semantic dependency graph diffusion; Representation layer normalization function, used to stabilize word-level augmented representation matrix The numerical distribution; This represents the restart retention coefficient, which controls the proportion of original node representations retained in the graph diffusion. It can be between 0.1 and 0.4, for example, 0.2. The dimension is An identity matrix is used to preserve the semantic information of each standard term node.
[0114] In one embodiment, for example, "locking mechanism" and "jamming" are usually syntactically close and can convey semantic information through basic semantic connections; "state of charge transition" and "battery swapping failure" may be syntactically far apart, but both are related to "battery swapping anomaly fault mode," so semantic enhancement can be achieved through fault mode prior connections. Through the combined effect of syntactic connections and fault mode prior connections, the word-level enhanced representation matrix... It can simultaneously express textual structural relationships and battery swapping service fault relationships.
[0115] It should be noted that semantic dependency-enhanced adjacency matrix The edge weights in the model are continuous values, not just binary labels indicating whether they are connected; the larger the edge weight, the stronger the information transmission between the two standard term nodes. This design enables the model to assign higher propagation weights to nodes with strong business relevance, thereby improving the ability to express fine-grained fault semantics in work orders.
[0116] Step S206: Calculate the fault mode attention weight of each standard term node based on the work order fault mode distribution vector, and perform a weighted summation of the enhanced representation vectors of each standard term node in the word-level enhanced representation matrix according to the fault mode attention weight to obtain the global semantic vector. To obtain a global representation that can summarize the semantics of the entire work order fault, this invention is based on the work order fault mode distribution vector. Fault mode attention weights are assigned to nodes of different standard terms, and the word-level augmented representation matrix is applied. The weighted aggregation is performed to obtain the global semantic vector. The specific steps are as follows: 1) From word-level augmented representation matrix Get the first place Row as a standard term node augmentation representation vector ,in, Indicates the first Original power replacement work order text The Middle The enhanced representation vector of each standard term node, with dimension [missing information]. , is used to characterize the contextual semantics of the standard term after the semantic dependency graph has diffused.
[0117] 2) Based on the work order fault mode distribution vector Correlation score with normalized terminology pattern Calculate the first The matching score between a standard term node and the main failure mode of the current work order. If a standard term has a high indicative strength for the high-probability failure mode of the current work order, then the standard term node receives a higher attention weight; if a standard term is mainly a background description or a normal state description, then the standard term node receives a lower attention weight.
[0118] In one implementation, first adopt The calculation method calculates the failure mode attention score, whereby... It refers to the first Original power replacement work order text The Middle The fault mode attention score of each standard terminology node is used to measure the degree of matching between that standard terminology node and the fault mode distribution of the current work order. Then, a normalized exponential processing is performed on the fault mode attention scores of all standard terminology nodes to obtain the fault mode attention weights. ,Right now ;in, Indicates the first Original power replacement work order text The Middle The fault mode attention weights of each standard term node range from 0 to 1, and the sum of the fault mode attention weights of all standard term nodes is 1. Represents the normalized standard term node index, used for traversing the first... Original power replacement work order text All standard terminology nodes in the document.
[0119] 3) The enhanced representation vectors of all standard term nodes are weighted and summed according to the fault mode attention weights to obtain the global semantic vector. ,Right now .in, It refers to the first Original power replacement work order text The global semantic vector, with dimension . It is used to summarize the fault semantic information of the entire work order and serves as the global input for subsequent dispatch classification.
[0120] Based on this, we obtain the first... Original power replacement work order text Word-level augmented representation matrix Work order fault mode distribution vector and global semantic vector Among them, the word-level enhancement representation matrix Provides standard terminology-level fault semantics and work order fault mode distribution vectors. Provides prior distribution of failure modes and global semantic vectors. Provides comprehensive fault semantics for the entire work order.
[0121] Example 3 This invention also provides another method for automatic dispatching of battery swapping customer service work orders based on semantic analysis. This method is implemented based on the method in the above embodiments. The method focuses on describing the specific implementation of constructing and training a dispatching classification model based on word-level enhanced representation matrix, work order fault mode distribution vector and global semantic vector.
[0122] Figure 9 A flowchart of another method for automatically dispatching battery swapping customer service work orders based on semantic analysis provided in this embodiment of the invention is shown below. Figure 9 As shown, the dispatch classification model, which is constructed and trained based on word-level enhanced representation matrix, work order fault mode distribution vector, and global semantic vector, may include the following steps: Step S301: Take the enhanced representation vector of each standard term node in the word-level enhanced representation matrix as the input of the word semantic capsule, and establish a basic projection matrix and multiple fault mode modulation offset matrices for each dispatch category.
[0123] To address the issue that the same standard term may refer to different dispatch categories under different failure mode contexts, this invention inputs the enhanced representation vector of the standard term node into the dispatch category capsule projection layer, and utilizes the work order failure mode distribution vector. The basic projection matrix is dynamically modulated so that the same standard term generates different category prediction vectors under different fault mode backgrounds. For ease of understanding... Figure 10 A flowchart for constructing a joint optimization module is provided in this embodiment of the invention, and the specific steps are as follows: 1) Enhance the word-level representation matrix Enhanced representation vector for each standard term node in As a semantic capsule input, the semantic capsule input is used to represent the word semantic capsule input. Original power replacement work order text The Middle The contextual semantics of each standard term node are obtained through terminology standardization, failure mode prior enhancement, and semantic dependency graph diffusion.
[0124] It should be noted that semantic capsule input refers to inputting an enhanced standard term vector. This can be viewed as an independent neuronal capsule containing rich semantic information. For example, the word "lock" in the text "lock jammed during battery swapping" is standardized to "locking mechanism" using standard terminology, and after graph diffusion enhances the modifying semantics of "jammed," it forms a high-dimensional vector. This vector contains not only the information of the "locking mechanism" component itself, but also the semantics of its contextual fault state "stuck". This whole is called a semantic capsule, which serves as the smallest input unit for subsequent dynamic routing.
[0125] 2) Establish a basic projection matrix and a fault mode modulation offset matrix for each dispatch category. Wherein, the... The basic projection matrix corresponding to each distribution category is denoted as . , dimension These are trainable parameters used to learn a general semantic mapping for this dispatch category; This represents the distribution category index, with values ranging from 1 to... ; This represents the dimension of the category capsule vector, used to limit the expressive capacity of dispatching category capsules. An example value is 64.
[0126] Furthermore, for the first The distribution category and the first Establish a modulation offset matrix for each fault mode. , It refers to the first The failure mode is related to the first The modulation offset matrix of semantic mapping for each distribution category, with dimension [missing information]. These are trainable parameters used to learn the first... The failure mode for the first The direction of correction for the semantic mapping of each dispatch category. When the work order fault mode distribution vector... When the probability of a certain fault mode is high, the modulation offset matrix corresponding to that fault mode will receive a higher participation weight in the current work order.
[0127] Step S302: Dynamically modulate the basic projection matrix according to the work order fault mode distribution vector, and map the word semantic capsule input to the category prediction vector of each dispatch category capsule.
[0128] Specifically, based on the work order failure mode distribution vector The basic projection matrix is dynamically modulated to obtain the dynamic projection matrix corresponding to the current work order and the current dispatch category, and the standard terminology node is enhanced with a representation vector. The mapping to a class prediction vector is represented as follows: ; in, Indicates the first Original power replacement work order text The Middle The first standard term node for the first The prediction vector for each distribution category capsule, with dimension [dimensionality]. This is used to characterize the degree of semantic support that the standard term node provides for the dispatch category; Indicates the first Original power replacement work order text Belongs to the One fault mode The probability distribution of is used to control the distribution of the th . Each fault mode modulation offset matrix The intensity of participation.
[0129] In practical implementation, the basic projection matrix Learn the general discriminative semantics of distribution categories, and modulate the offset matrix. The study learns the direction of correction for the semantic mapping of dispatch categories based on fault modes. When a work order is closer to the "equipment lock-up fault mode", the modulation offset matrix related to the equipment maintenance category receives higher weight, thereby improving the support of standard term nodes such as "lock-up mechanism", "stuck", and "unlock failure" for the equipment maintenance category dispatch category.
[0130] In one embodiment, as a distance, the standard term "communication anomaly" is more likely to support the battery software dispatch category under the "power battery communication failure mode" and more likely to support the site communication dispatch category under the "site network failure mode". Through fault mode modulation projection, the same standard term can generate different category prediction vectors according to the fault mode background of the current work order, thereby reducing the impact of semantic ambiguity on dispatch classification.
[0131] Step S303: Aggregate the category prediction vectors through iterative dynamic routing and output the output vector for each dispatch category capsule.
[0132] The iterative dynamic routing can include: establishing a trainable fault mode prototype vector for each dispatch category; in each round of routing, for each standard term node, multiplying the inner product of the currently accumulated log prior with the work order fault mode distribution vector and the dispatch category fault mode prototype vector by the fault prior bias strength coefficient, summing them, and then performing normalized exponential processing to obtain the coupling coefficient of the standard term node assigned to each dispatch category capsule; performing a weighted summation of the category prediction vectors based on the coupling coefficients to obtain the input vector of each dispatch category capsule, and obtaining the output vector of each dispatch category capsule through a compressed activation function; updating the log prior based on the consistency between the category prediction vector and the output vector of the dispatch category capsule, repeating the iteration until the preset number of routing rounds is reached, and using the output vector of the dispatch category capsule in the last round as the final output vector.
[0133] To enable standard terminology nodes to be adaptively assigned to different dispatch category capsules, this invention updates the coupling coefficient based on the consistency between the category prediction vector and the dispatch category capsule output vector, and utilizes the work order fault mode distribution vector. The degree of matching between the dispatch category and the fault mode prototype vector forms a routing prior bias, enabling the dispatch category that better matches the current fault mode to obtain a higher coupling probability at the beginning of the routing phase. Specific steps include: 1) Build a fault mode prototype vector for each dispatch category. , It refers to the first Each dispatch category has a fault mode prototype vector, with dimension [missing information]. , which are trainable parameters used to characterize the . Typical distribution of dispatch categories in the fault mode space. For example, the fault mode prototype vector of the dispatch category corresponding to the equipment operation and maintenance category has high values in dimensions such as "equipment lock-up fault mode" and "battery swapping mechanism abnormal fault mode"; the fault mode prototype vector of the dispatch category corresponding to the battery software category has high values in dimensions such as "power battery communication fault mode" and "battery management system abnormal fault mode".
[0134] Further, calculate the first Original power replacement work order text With the The prior matching score of each dispatch category in the failure mode space is denoted as: ,in, This refers to the fault mode prototype vector of the dispatch category. With work order failure mode distribution vector The inner product between them is used to measure the degree of prior matching between the current work order fault composition and the dispatch category; This represents the prior bias strength coefficient for faults, used to control the fault mode distribution vector of work orders. The degree of impact on dynamic routing can be taken from 0.2 to 0.8, for example, 0.5.
[0135] In one embodiment, as an example, suppose the fault mode distribution vector of the current work order is... The probability of displaying "Device Lockdown Fault Mode" is 0.7, and the probability of displaying "Battery Recharge Anomaly Fault Mode" is 0.1. The prototype vector of the existing equipment maintenance class... The value for the "Device Lockdown Fault Mode" dimension is 0.9, while the prototype vector for battery maintenance is... The value on this dimension is 0.05. Therefore, the inner product of the equipment maintenance class... It will be much larger than battery maintenance, thus multiplying by the prior bias strength coefficient. Subsequently, a logarithmic prior bias is provided for device maintenance capsules during initial routing.
[0136] 2) The first Original power replacement work order text The Middle The first standard term node to the first The logarithmic prior of each distribution category of capsules is initialized as follows: , recorded as .in, Indicates the first Original power replacement work order text The Middle The first standard term node to the first The first distribution category of capsules in the The log-prior in round-robin routing is used to accumulate consistency between the class prediction vector and the dispatched class capsule output vector; This represents the route iteration round index, with a value ranging from 0 to... ; This represents the total number of routing iterations and is used to control the number of times dynamic routes are updated. It can be 2 to 4, for example, 3.
[0137] 3) in the In round-robin routing, for each standard term node, the coupling coefficient assigned to each dispatch category capsule is calculated by combining the logarithmic prior and the fault prior bias, and is expressed as: ; in, Indicates the first Original power replacement work order text The Middle The standard terminology node in the first Assigned to the first round route The coupling coefficient of each distribution category capsule is used to characterize the proportion of information contribution of the standard term node to the distribution category capsule; This represents the normalized dispatch category index, used to traverse all candidate dispatch categories; Indicates the first Each dispatch category has a fault mode prototype vector.
[0138] Through the above processing, the work order fault mode distribution vector is obtained. With dispatch category failure mode prototype vector The higher the matching degree, the better. The larger the initial bias obtained by each dispatch category in the coupling coefficient calculation, the faster the routing process can focus on the dispatch category that matches the current work order failure mode.
[0139] 4) The category prediction vectors are weighted and summed according to the coupling coefficient to obtain the first... The first distribution category of capsules in the The input vector in the round-robin routing is then processed by a compression activation function to obtain the first... The first distribution category of capsules in the Output vector in round-robin routing .
[0140] In one implementation, first adopt Calculate the distribution category capsule input vector in this way Then, a compressed activation function is used to obtain the distribution category capsule output vector. , is represented as: ; in, Indicates the first Original power replacement work order text The Middle The first distribution category of capsules in the Input vector in round-robin routing; Indicates the first Original power replacement work order text The Middle The first distribution category of capsules in the The output vector in round-robin routing has a dimension of This is used to characterize the semantic information of the work orders aggregated in the current iteration phase for this dispatch category; This represents the Euclidean norm (L2 norm), used to measure vector length. If... If it is a zero vector, then... Set it to the zero vector.
[0141] It should be noted that the compression activation function can preserve the vector direction as the semantic direction and compress the vector length to a stable range, so that the vector length can be used as an indirect representation of the probability of the dispatched class.
[0142] 5) Update the log-prior based on the consistency between the category prediction vector and the output vector of the dispatched category capsule.
[0143] Specifically, if the category prediction vector of a standard term node is in the same direction as the output vector of a distribution category capsule, the dot product of the two is larger, and the probability of the standard term node being assigned to the distribution category capsule in the next round of routing increases; if the directions are not in the same direction, the corresponding coupling coefficient decreases.
[0144] In one implementation, the following is adopted: Logarithmic prior updates are performed in this manner. Represents the category prediction vector Transpose of; This represents the dot product consistency score between the category prediction vector and the output vector of the dispatched category capsule. Further, complete... After rounds of iteration, the output vector of the category capsule distributed in the last round is denoted as... , It refers to the first Original power replacement work order text The Middle The final output vector of each distribution category capsule.
[0145] In one embodiment, as an example, when the work order failure mode distribution vector When the probability of displaying "equipment lockout fault mode" is high, the prototype vector of the dispatch category fault mode and the distribution vector of the work order fault mode corresponding to the equipment operation and maintenance category will be displayed. The larger inner product between them increases the coupling coefficient between standard term nodes such as "locking mechanism", "stuck", and "unlock failure" pointing to the device maintenance capsule during the routing process, thereby shortening the routing convergence process and reducing confusion with the battery maintenance dispatch category.
[0146] It should be noted that the fault prior bias does not directly determine the final assignment category, but rather participates in the coupling coefficient calculation as an initial tendency of dynamic routing. The final assignment category is still jointly determined by the category prediction vector, routing consistency, and global semantic fusion. While utilizing the prior of the battery swapping fault mode, it avoids forced misassignment caused by a single prior rule.
[0147] Step S304: Gated fusion of the output vector of each distribution category capsule with the global semantic vector to obtain the distribution category fusion representation vector of each distribution category.
[0148] To ensure that each dispatch category representation simultaneously includes both local standard terminology semantics and the semantics of the entire work order, this invention encapsulates the dispatch category output vector. With global semantic vector Gated fusion is performed to obtain the distribution category fusion representation vector. The specific steps are as follows: 1) Through the global semantic mapping matrix global semantic vector Mapping to the category capsule space yields the mapped global semantic vector. ,Right now .in, Represents the global semantic mapping matrix, with dimension . These are trainable parameters used to train the global semantic vector. Mapped to category capsule space; Indicates the first Original power replacement work order text The mapped global semantic vector has a dimension of Used to output vectors of distribution category capsules Perform same-dimensional fusion.
[0149] 2) Output vector of the distribution category capsule Mapped global semantic vector The concatenation is used as the input for the gating calculation, and the gating vector is obtained through a logistic activation function, as follows: ; in, Indicates the first Original power replacement work order text Corresponding to the The gating vectors for each distribution category have dimensions of [missing information]. This is used to control the fusion ratio between local category capsule semantics and global work order semantics; This represents the logical activation function (i.e., the Sigmoid activation function), used to map the gating calculation result to the interval between 0 and 1; This represents the gate weight matrix, with dimension 1. These are trainable parameters used to learn the fusion relationship between local category capsule semantics and global work order semantics; Represents the gated bias vector, with dimension . , which are trainable parameters used to adjust the basic values of the gating vector; This represents the vector concatenation operator, used to join two vectors into a gated input.
[0150] 3) Distribute category capsule output vectors by fusing them dimension by dimension according to the gating vector. and the mapped global semantic vector The distribution category fusion representation vector is obtained. , is represented as: ; in, It refers to the first Original power replacement work order text Corresponding to the The distribution category fusion representation vector of each distribution category has a dimension of . Used to perform the final distribution category determination; This represents the element-wise multiplication operator, used to fuse two types of semantic information dimension by dimension according to the gated vector.
[0151] In practical implementation, if a work order contains multiple explicit local fault phrases, the dispatch category capsule output vector is used. Used to highlight local semantics directly related to a certain dispatch category; if a work order text is short or a local fault phrase is incomplete, the mapped global semantic vector... Used to supplement the fault mode distribution and overall business context of the entire work order. Gating vector Adaptively controlling the fusion ratio based on the consistency between the two types of semantics can improve the stability of dispatching and classifying work orders for short texts and multi-fault phrases.
[0152] In one embodiment, as an example, for a short work order that only contains "battery swap failure", the global semantic vector It can provide fault mode distribution and overall semantic supplementation; for work orders containing multiple explicit fault phrases such as "locking mechanism stuck, battery swapping failed, vehicle unable to leave", it dispatches category capsule output vectors. It can provide stronger local discriminative information. Through gating fusion, the model can automatically adjust the ratio of global and local semantics based on the completeness of the work order text.
[0153] Step S305: Calculate the classification score based on the fused representation vector of each distribution category, and obtain the distribution category probability distribution after normalization index processing.
[0154] To improve the accuracy of distribution classification and enhance the separability between easily confused distribution categories, this invention calculates the distribution category probability based on the fusion representation vector of each distribution category, and jointly optimizes the cross-entropy classification loss and the prototype constraint loss to make the fusion representation vector of the distribution category corresponding to the true distribution category closer to the semantic prototype vector of the corresponding distribution category. The specific steps are as follows: 1) Fuse a representation vector for each distribution category. Calculate classification score ,Right now .in, It refers to the first Original power replacement work order text Corresponding to the Category scores for each distribution category; Indicates the first The classification weight vector for each distribution category has dimensions of . These are trainable parameters used to fuse the distribution category representation vector. Mapped to category scores; Indicates the first The classification bias scalar for each distribution category is a trainable parameter used to adjust the baseline level of the classification score for that distribution category. Represents the classification weight vector The transpose of .
[0155] 2) Perform normalization index processing on the classification scores of all distribution categories to obtain the distribution category probability distribution. Specifically, the... Original power replacement work order text Predicted as the first The probability of each distribution category is denoted as: The calculation method is expressed as follows: ; in, Indicates the first Original power replacement work order text Corresponding to the The classification score of each dispatch category is used. The dispatch category with the highest probability is selected as the target dispatch category for automatic work order dispatch or to assist manual review.
[0156] Step S306: Construct a joint training loss function and update the model parameters end-to-end based on the joint training loss function.
[0157] Specifically, during the model training phase, historical manual distribution records or review tags are used as supervision signals to construct the cross-entropy classification loss. In the actual implementation, the following is defined: Indicates the first Original power replacement work order text The true distribution category label is used to supervise the model in learning the correct distribution direction; Indicates the first Original power replacement work order text The probability of being predicted as the true distribution category. Cross-entropy classification loss is used to directly improve the accuracy of distribution label prediction.
[0158] Specifically, a semantic prototype vector for each distribution category is established. ,in, Indicates the first There are semantic prototype vectors for each distribution category, with dimensions of [missing information]. , which are trainable parameters used to characterize the . The central semantics of each distribution category in the prototype space; This represents the prototype space dimension, used to limit the expressive capacity of the distribution category semantic prototype vector; an example value is 64. It should be noted that the distribution category semantic prototype vector... Used to constrain the intra-class compactness of the dispatch class fusion representation vector, and the dispatch class failure mode prototype vector. The fault-mode prior bias used in dynamic routing has different meanings and functions.
[0159] Furthermore, through the prototype space projection matrix The distribution category representation vector corresponding to the actual distribution category is fused. Map to the prototype space and compute the semantic prototype vector of the distribution category corresponding to the actual distribution category. The distance between them. Represents the prototype space projection matrix, with dimension . These are trainable parameters; Indicates the first Original power replacement work order text Distribution category fusion representation vector corresponding to the actual distribution category; This represents the semantic prototype vector of the dispatch category corresponding to the actual dispatch category. The prototype constraint loss is used to compress the representation distance within the same dispatch category, making similar work orders more compact in the prototype space.
[0160] Specifically, the cross-entropy classification loss and the prototype constraint loss are weighted and summed to obtain the joint training loss function, which is expressed as: ; in, This represents the joint training loss function, used to simultaneously optimize the assignment classification accuracy and the compactness of the class representation; This indicates the number of batch training work orders, used to limit the number of work orders participating in the calculation for each parameter update. An example value is 64. This represents the prototype constraint loss weight, used to balance the contributions of classification loss and prototype constraint loss. It can be taken from 0.05 to 0.2, for example, 0.1. The square of the Euclidean norm between the projected true distribution category fusion representation vector and the distribution category semantic prototype vector indicates that the smaller the value, the more compact the intra-class representation.
[0161] In practice, classification loss is responsible for directly improving the accuracy of dispatch category prediction, while prototype constraint loss is responsible for making the work order representation of the same dispatch category close to the semantic prototype vector of the corresponding dispatch category in the prototype space. Joint training of the two can enhance the separability between easily confused dispatch categories, while avoiding training instability caused by complex marginal losses.
[0162] In one embodiment, for example, both "short battery life" and "battery cannot be charged" belong to battery-related work orders, but "short battery life" is closer to the battery performance degradation dispatch category, while "battery cannot be charged" is closer to the battery charging anomaly dispatch category. By using prototype constraint loss, the dispatch category fusion representation vectors of the two types of work orders are respectively close to the semantic prototype vectors of their respective dispatch categories, thereby improving the accuracy of fine-grained dispatch.
[0163] This step uses the training sample set. The dispatch classification model is trained end-to-end. Each training sample first goes through step S2 to obtain the word-level augmented representation matrix, work order fault mode distribution vector, and global semantic vector. Then, it goes through steps S301 to S304 to obtain the dispatch category probability distribution. Finally, the model parameters are updated using the joint training loss function. The specific steps are as follows: 1) Set up the training samples The model is divided into training, validation, and test sets. The training set is used to update model parameters, the validation set is used to select model hyperparameters and save the optimal model, and the test set is used to evaluate the final classification performance. In one implementation, it can be divided into... The training set, validation set, and test set should be divided proportionally. If there are multiple related work orders for the same vehicle identifier or the same battery pack number, the related work orders should be divided into the same data subset to avoid the same fault event appearing in both the training set and the test set, which would lead to an overestimation of the evaluation results.
[0164] 2) Extract the original power swapping work order text from the training set. By sequentially inputting steps S201 to S204, the word-level enhanced representation matrix is obtained. Work order fault mode distribution vector and global semantic vector Then , and Input steps S301 to S304 to obtain the distribution category probability distribution. and joint training loss function .
[0165] In one implementation, the Adam optimizer or AdamW optimizer is used to update the trainable parameters in the dispatch classification model. In another implementation, the initial learning rate can be 0.001, and the number of batch training orders... A value of 64 can be used, and the number of training epochs can be 50 to 100. If the validation set loss does not decrease for 5 consecutive training epochs, the learning rate is multiplied by 0.5 to improve the convergence stability in the later stages of training.
[0166] 3) After each training cycle, evaluate the distribution classification model using the validation set. Specifically, calculate the precision, recall, and F1 score for each distribution category, and take the arithmetic mean of the F1 scores for all distribution categories to obtain the macro-average F1 score. Save the model parameters corresponding to the highest macro-average F1 score as the final distribution classification model parameters.
[0167] It should be noted that the macro-average F1 score can prevent the model from performing well only in high-frequency distribution categories while ignoring low-frequency distribution categories; the prototype constraint loss can enhance the intra-class compactness of low-frequency distribution categories, which matches the evaluation objective of the macro-average F1 score.
[0168] The above steps ultimately output the trained dispatch classification model, the dispatch category fault mode prototype vector, the dispatch category semantic prototype vector, and normalized statistical parameters. The trained dispatch classification model is used for subsequent online work order dispatch; the dispatch category fault mode prototype vector is used for dynamic routing prior bias; the dispatch category semantic prototype vector is used to maintain the stability of the dispatch category representation; and the normalized statistical parameters are used to ensure consistency in numerical processing between the online inference stage and the training stage.
[0169] It should also be noted that the hierarchical structure of the fault mode modulation dynamic routing capsule network and the prototype enhanced dispatch classification model is shown in Table 1 below.
[0170] Table 1:
[0171] Example 4 Corresponding to the above method embodiments, this invention provides an automatic dispatching device for battery swapping customer service work orders based on semantic analysis. Figure 11 This is a schematic diagram of a semantic analysis-based automatic dispatching device for battery swapping customer service work orders provided in an embodiment of the present invention. Figure 11 As shown, the semantic analysis-based automatic dispatching device for battery swapping customer service work orders may include: The training sample set acquisition module 401 is used to acquire the training sample set; each training sample in the training sample set includes the original power exchange work order text and the corresponding real dispatch category label.
[0172] The data augmentation representation construction module 402 is used to perform data augmentation representation construction on each original power swapping work order text to obtain a word-level augmentation representation matrix, a work order fault mode distribution vector, and a global semantic vector.
[0173] The dispatch classification model building module 403 is used to build and train the dispatch classification model based on the word-level enhanced representation matrix, the work order fault mode distribution vector, and the global semantic vector.
[0174] The module 404 for obtaining the text of the power replacement work order to be dispatched is used to obtain the text of the power replacement work order to be dispatched, perform data augmentation representation construction on the text of the power replacement work order to be dispatched, and obtain the word-level augmentation representation matrix to be dispatched, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector to be dispatched.
[0175] The module 405 for determining the probability distribution of the category to be dispatched is used to input the word-level enhanced representation matrix to be dispatched, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector to be dispatched into the trained dispatch classification model to obtain the probability distribution of the category to be dispatched.
[0176] The target distribution category output module 406 is used to output the target distribution category based on the probability distribution of the category to be distributed.
[0177] The automatic dispatching device for battery swapping customer service orders based on semantic analysis provided in this invention can acquire a training sample set, perform data augmentation representation construction on each original battery swapping order text to obtain a word-level augmented representation matrix, an order fault mode distribution vector, and a global semantic vector. Based on the word-level augmented representation matrix, the order fault mode distribution vector, and the global semantic vector, a dispatching classification model is constructed and trained. The device then acquires the battery swapping order text to be dispatched, performs data augmentation representation construction on the text, and inputs the obtained word-level augmented representation matrix, the order fault mode distribution vector, and the global semantic vector into the trained dispatching classification model to obtain the probability distribution of the dispatching category. Based on this probability distribution, the target dispatching category is output. This method significantly improves the accuracy of battery swapping order dispatching and the fine-grained classification generalization ability.
[0178] In some embodiments, the data augmentation representation construction module is further configured to perform domain terminology standardization and standardized fault component tuple extraction on the original battery swapping work order text to obtain a standardized fault component tuple set; statistically analyze the co-occurrence strength between standard terms and fault modes based on the historical battery swapping work order set, and calculate the terminology pattern association score of standard terms to fault modes in combination with the battery swapping domain knowledge graph; perform weighted aggregation and normalization processing on all standard terms in the original battery swapping work order text according to the terminology pattern association score to generate a work order fault mode distribution vector; and use each standard term in the original battery swapping work order text as a lexical term. For each node in the semantic dependency graph, basic semantic connections are constructed based on the dependency syntax tree, and prior connections for fault modes are constructed based on the work order fault mode distribution vector. The basic semantic connections and prior connections for fault modes are superimposed to obtain a semantic dependency enhanced adjacency matrix. The semantic dependency enhanced adjacency matrix is applied to the initial term embedding matrix to perform graph diffusion, resulting in a word-level enhanced representation matrix. The fault mode attention weight of each standard term node is calculated based on the work order fault mode distribution vector. The enhanced representation vectors of each standard term node in the word-level enhanced representation matrix are weighted and summed according to the fault mode attention weight to obtain the global semantic vector.
[0179] In some embodiments, the data augmentation representation construction module is further configured to: statistically analyze the co-occurrence probability of each standard term and each fault mode based on a historical set of battery swapping work orders; calculate point mutual information as statistical co-occurrence strength; construct a knowledge graph in the battery swapping domain; calculate the knowledge graph association strength and shortest path distance between standard terms and fault modes based on the knowledge graph; fuse the statistical co-occurrence strength and the prior association of the knowledge graph in the battery swapping domain to obtain the term pattern association score of each standard term for each fault mode; and average and normalize the term pattern association scores of all standard terms in the current original battery swapping work order text according to the fault mode dimension to obtain the work order fault mode distribution vector.
[0180] In some embodiments, the data augmentation representation construction module is further configured to calculate the shortest path distance of the dependency tree between any two standard term nodes based on the dependency syntax tree; if the shortest path distance of the dependency tree does not exceed a preset dependency distance truncation threshold, a basic semantic connection is established, and the basic semantic connection weight is calculated based on the Gaussian kernel transform; the prior connection weight of the fault mode between any two standard term nodes is calculated based on the work order fault mode distribution vector and the term mode association score of each standard term for the fault mode; the prior connection weight of the fault mode is positively correlated with the probability of the fault mode commonly associated with the two standard terms; the basic semantic connection weight and the prior connection weight of the fault mode are added together, and self-loop connections are set to obtain the semantic dependency augmentation adjacency matrix; the graph degree matrix of the semantic dependency augmentation adjacency matrix is calculated, the semantic dependency augmentation adjacency matrix is row-normalized, and the row-normalized adjacency matrix is applied to the initial term embedding matrix to obtain the word-level augmented representation matrix.
[0181] In some embodiments, the dispatch classification model construction module is further configured to: use the enhanced representation vector of each standard term node in the word-level enhanced representation matrix as input to the word semantic capsule; establish a basic projection matrix and multiple fault mode modulation offset matrices for each dispatch category; dynamically modulate the basic projection matrix according to the work order fault mode distribution vector; map the word semantic capsule input to the category prediction vector of each dispatch category capsule; aggregate the category prediction vectors through iterative dynamic routing and output the output vector of each dispatch category capsule; perform gated fusion of the output vector of each dispatch category capsule with the global semantic vector to obtain the dispatch category fusion representation vector of each dispatch category; calculate the classification score based on the fusion representation vector of each dispatch category, and obtain the dispatch category probability distribution after normalization exponent processing; construct a joint training loss function, and update the model parameters end-to-end according to the joint training loss function.
[0182] In some embodiments, the dispatch classification model construction module is further configured to establish a trainable dispatch category fault mode prototype vector for each dispatch category; in each round of routing, for each standard term node, the inner product of the currently accumulated log prior and the work order fault mode distribution vector and the dispatch category fault mode prototype vector is multiplied by the fault prior bias strength coefficient and then summed, and then normalized exponential processing is performed to obtain the coupling coefficient of the standard term node assigned to each dispatch category capsule; the category prediction vector is weighted and summed according to the coupling coefficient to obtain the input vector of each dispatch category capsule, and the output vector of each dispatch category capsule is obtained through a compressed activation function; the log prior is updated according to the consistency between the category prediction vector and the output vector of the dispatch category capsule, and the iteration is repeated until the preset number of routing rounds is reached, and the output vector of the dispatch category capsule in the last round is used as the final output vector.
[0183] In some embodiments, the target distribution category output module is further configured to take the distribution category corresponding to the highest probability in the probability distribution of the category to be distributed as the candidate target distribution category, calculate the difference between the highest probability and the second highest probability as the distribution confidence interval; if the highest probability is not less than a preset confidence threshold and the distribution confidence interval is not less than a preset interval threshold, then the candidate target distribution category is output as the target distribution category and automatic distribution is performed; otherwise, a manual review prompt is output, and the top few distribution categories with the highest probability are displayed for manual selection.
[0184] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.
[0185] Example 5 This invention also provides an electronic device for running the above-described semantic analysis-based automatic dispatching method for battery swapping customer service work orders; see also Figure 12 The diagram shows the structure of an electronic device, which includes a memory 500 and a processor 501. The memory 500 stores one or more computer instructions, which are executed by the processor 501 to implement the above-mentioned automatic dispatching method for battery swapping customer service work orders based on semantic analysis.
[0186] Furthermore, Figure 12 The electronic device shown also includes a bus 502 and a communication interface 503. The processor 501, the communication interface 503 and the memory 500 are connected via the bus 502.
[0187] The memory 500 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 503 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 502 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 12 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0188] Processor 501 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 501 or by instructions in software form. Processor 501 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 500, and processor 501 reads information from memory 500 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0189] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the above-described method for automatically dispatching battery swapping customer service work orders based on semantic analysis. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0190] The computer program product for the automatic dispatching method of battery swapping customer service work orders based on semantic analysis provided in this embodiment of the invention includes a computer-readable storage medium storing non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0191] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0192] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interface; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0193] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0194] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0195] If the functionality is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0196] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for automatically dispatching battery swapping customer service work orders based on semantic analysis, characterized in that, The method includes: Obtain a training sample set; each training sample in the training sample set includes the original power replacement work order text and the corresponding real dispatch category label; For each of the original battery swapping work orders, data augmentation representation construction is performed to obtain a word-level augmented representation matrix, a work order fault mode distribution vector, and a global semantic vector; Based on the word-level enhanced representation matrix, the work order fault mode distribution vector, and the global semantic vector, a dispatch classification model is constructed and trained. Obtain the text of the power replacement work order to be dispatched, and perform data augmentation representation construction on the text of the power replacement work order to be dispatched to obtain the word-level augmentation representation matrix to be dispatched, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector to be dispatched. The word-level augmented representation matrix to be dispatched, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector to be dispatched are input into the trained dispatch classification model to obtain the probability distribution of the dispatch category. The target distribution category is output based on the probability distribution of the category to be distributed.
2. The method according to claim 1, characterized in that, The process of performing data augmentation representation construction on each of the original battery swapping work order texts yields a word-level augmented representation matrix, a work order fault mode distribution vector, and a global semantic vector, including: The original power swap work order text is standardized with domain terminology and standardized fault component tuples are extracted to obtain a set of standardized fault component tuples. The co-occurrence strength between standard terms and fault modes is statistically analyzed based on a set of historical battery swapping work orders, and the term pattern association score of standard terms to fault modes is calculated by combining the knowledge graph in the battery swapping field. Based on the terminology pattern association score, all standard terms in the original power swapping work order text are weighted, aggregated, and normalized to generate the work order fault pattern distribution vector. Using each standard term in the original battery swapping work order text as a semantic dependency graph node, basic semantic connections are constructed based on the dependency syntax tree, and prior connections of fault modes are constructed based on the work order fault mode distribution vector. The basic semantic connection and the fault mode prior connection are superimposed to obtain the semantic dependency enhanced adjacency matrix. The semantic dependency enhanced adjacency matrix is then applied to the initial term embedding matrix to perform graph diffusion, resulting in the word-level enhanced representation matrix. The fault mode attention weight of each standard term node is calculated based on the fault mode distribution vector of the work order. The enhanced representation vectors of each standard term node in the word-level enhanced representation matrix are then weighted and summed according to the fault mode attention weights to obtain the global semantic vector.
3. The method according to claim 2, characterized in that, The step of weighting, aggregating, and normalizing all standard terms in the original power replacement work order text based on the terminology pattern association score to generate the work order fault mode distribution vector includes: Based on the historical set of power swapping work orders, the co-occurrence probability of each standard term and each fault mode is statistically analyzed, and the point mutual information is calculated as the statistical co-occurrence intensity. Construct a knowledge graph for the battery swapping field, and calculate the knowledge graph association strength and the shortest path distance between standard terms and fault modes based on the knowledge graph. By fusing the statistical co-occurrence intensity with the prior association of the knowledge graph in the battery swapping field, a term pattern association score for each standard term on each fault mode is obtained. The term pattern association scores of all standard terms in the current original power swapping work order text are averaged and normalized according to the fault mode dimension to obtain the fault mode distribution vector of the work order.
4. The method according to claim 2, characterized in that, The semantic dependency-enhanced adjacency matrix is obtained by superimposing the basic semantic connection and the failure mode prior connection. This semantic dependency-enhanced adjacency matrix is then applied to the initial term embedding matrix for graph diffusion to obtain the word-level enhanced representation matrix, including: The shortest path distance between any two standard term nodes is calculated based on the dependency syntax tree. If the shortest path distance does not exceed a preset dependency distance truncation threshold, a basic semantic connection is established, and the weight of the basic semantic connection is calculated based on the Gaussian kernel transform. Based on the work order fault mode distribution vector and the term mode association score of each standard term for the fault mode, calculate the fault mode prior connection weight between any two standard term nodes; the fault mode prior connection weight is positively correlated with the fault mode probability that the two standard terms are jointly associated. The basic semantic connection weights and the fault mode prior connection weights are added together, and self-loop connections are set to obtain the semantic dependency enhancement adjacency matrix. Calculate the graph degree matrix of the semantic dependency enhanced adjacency matrix, perform row normalization on the semantic dependency enhanced adjacency matrix, and apply the row normalized adjacency matrix to the initial term embedding matrix to obtain the word-level enhanced representation matrix.
5. The method according to claim 1, characterized in that, Based on the word-level enhanced representation matrix, the work order fault mode distribution vector, and the global semantic vector, a dispatch classification model is constructed and trained, including: Each standard term node augmented representation vector in the word-level augmented representation matrix is used as the input of a word semantic capsule to establish a basic projection matrix and multiple fault mode modulation offset matrices for each dispatch category. The basic projection matrix is dynamically modulated based on the work order fault mode distribution vector, and the word semantic capsule input is mapped to the category prediction vector of each dispatch category capsule; The category prediction vectors are aggregated through iterative dynamic routing, and the output vector for each distribution category capsule is output. The output vector of each distribution category capsule is gated and fused with the global semantic vector to obtain the distribution category fusion representation vector of each distribution category; The classification score is calculated based on the fused representation vector of each distribution category, and the distribution category probability distribution is obtained after normalization index processing. Construct a joint training loss function, and update the model parameters end-to-end based on the joint training loss function.
6. The method according to claim 5, characterized in that, The iterative dynamic routing includes: For each distribution category, a trainable distribution category failure mode prototype vector is created. In each round of routing, for each standard term node, the inner product between the currently accumulated log prior and the work order failure mode distribution vector and the dispatch category failure mode prototype vector is multiplied by the failure prior bias strength coefficient and then added, and then normalized exponential processing is performed to obtain the coupling coefficient of the standard term node assigned to each dispatch category capsule. The category prediction vectors are weighted and summed according to the coupling coefficient to obtain the input vector of each distribution category capsule, and the output vector of each distribution category capsule is obtained by a compressed activation function. The logarithmic prior is updated based on the consistency between the category prediction vector and the output vector of the distribution category capsule. This process is repeated iteratively until a preset number of routing rounds is reached, and the output vector of the distribution category capsule in the last round is taken as the final output vector.
7. The method according to claim 1, characterized in that, The step of outputting the target distribution category based on the probability distribution of the category to be distributed includes: The distribution category corresponding to the highest probability in the probability distribution of the category to be distributed is taken as the candidate target distribution category, and the difference between the highest probability and the second highest probability is calculated as the distribution confidence interval. If the maximum probability is not less than a preset confidence threshold and the distribution confidence interval is not less than a preset interval threshold, then the candidate target distribution category is output as the target distribution category and automatic distribution is performed. Otherwise, output a prompt for manual review and display the top few distribution categories with the highest probability for manual selection.
8. A semantic analysis-based automatic dispatching device for battery swapping customer service work orders, characterized in that, The device includes: The training sample set acquisition module is used to acquire the training sample set; each training sample in the training sample set includes the original power replacement work order text and the corresponding real dispatch category label; The data augmentation representation construction module is used to perform data augmentation representation construction on each of the original power swapping work order texts to obtain a word-level augmentation representation matrix, a work order fault mode distribution vector, and a global semantic vector. The dispatch classification model construction module is used to construct and train the dispatch classification model based on the word-level enhanced representation matrix, the work order fault mode distribution vector, and the global semantic vector. The module for obtaining the text of the power replacement work order to be dispatched is used to obtain the text of the power replacement work order to be dispatched, perform data augmentation representation construction on the text of the power replacement work order to be dispatched, and obtain the word-level augmentation representation matrix to be dispatched, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector to be dispatched. The module for determining the probability distribution of the category to be dispatched is used to input the word-level enhanced representation matrix to be dispatched, the fault mode distribution vector of the work order to be dispatched, and the global semantic vector to be dispatched into the trained dispatch classification model to obtain the probability distribution of the category to be dispatched. The target distribution category output module is used to output the target distribution category based on the probability distribution of the category to be distributed.
9. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the automatic dispatching method for battery swapping customer service work orders based on semantic analysis as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the automatic dispatching method for battery swapping customer service work orders based on semantic analysis as described in any one of claims 1 to 7.