Machine tool after-sales operation and maintenance intelligent question answering method based on intention recognition

By using a dual-model feature extraction and domain knowledge graph alignment method, the problems of insufficient professionalism and non-operational answers in machine tool after-sales maintenance are solved, achieving efficient and accurate intelligent question answering, adapting to new fault scenarios and reducing costs.

CN122019713APending Publication Date: 2026-05-12ANHUI TONGCHI CNC MASCH TOOL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI TONGCHI CNC MASCH TOOL CO LTD
Filing Date
2026-01-22
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies in machine tool after-sales maintenance suffer from slow response speed, high cost, insufficient professionalism, and highly inoperable solutions. In particular, the lack of in-depth professional knowledge in the machine tool field in single general-purpose models leads to biased solutions and difficulty in adapting to new fault scenarios.

Method used

By employing a dual-model feature extraction and domain knowledge graph alignment approach, and training an intent recognition model using an improved LORA algorithm, combined with intent-driven dynamic retrieval enhancement generation technology, a complete closed loop from intent understanding to answer generation is formed, achieving high-precision intent recognition and structured answer generation.

Benefits of technology

It improved the accuracy and efficiency of Q&A in machine tool after-sales maintenance, ensured the operability and adaptability of the answers, reduced continuous maintenance costs, controlled response time within 3 seconds, and significantly improved user satisfaction and repair success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019713A_ABST
    Figure CN122019713A_ABST
Patent Text Reader

Abstract

The invention provides a machine tool after-sales operation and maintenance intelligent question answering method based on intention recognition. The method comprises the steps that firstly, multi-source operation and maintenance data is subjected to standardization processing, and a multi-dimensional intention recognition data set is constructed; then, semantic and intention features are extracted by using a question model, field professional features are extracted by using a DeepSeek model, and a high-precision intention recognition model is trained based on an improved LORA algorithm; then, feature alignment is carried out through the knowledge graph in the machine tool operation and maintenance field, and feature fusion is realized by adopting a double-model collaborative attention mechanism; based on the identified intention, constructing a dynamic retrieval enhancement generation mechanism, and outputting a self-adaptive structured answer; and finally, optimizing the model parameters and the knowledge graph through a feedback iteration mechanism. According to the method, double-model advantage complementation and knowledge-data deep fusion are realized, the question and answer accuracy, the intention recognition precision and the operation and maintenance service efficiency are remarkably improved, more than 98% of machine tool operation and maintenance scenes can be covered, the method is suitable for various after-sales operation and maintenance scenes such as fault consultation and maintenance guidance, and the after-sales cost of enterprises is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of artificial intelligence, natural language processing, and industrial operation and maintenance, and in particular to an intelligent question-and-answer method for machine tool after-sales operation and maintenance based on intent recognition. Background Technology

[0002] With the intelligent upgrading of the manufacturing industry, CNC machine tools, as the core equipment of modern manufacturing, are of paramount importance for stable and efficient operation. The response speed, diagnostic accuracy, and professionalism of after-sales maintenance services directly affect the continuity of the production line and the economic benefits of enterprises.

[0003] However, the machine tool after-sales maintenance field mainly relies on the following models, all of which have significant limitations: Traditional human expert model: It relies heavily on experienced engineers for remote or on-site diagnosis. This model is slow to respond, costly, and has scarce expert resources, making it difficult to cope with massive and concurrent customer consultation needs on a large scale.

[0004] Rule-based or traditional FAQ-based question-and-answer systems can only handle predefined, simple, and fixed questions. They lack flexibility, cannot understand complex and variable fault scenarios described by users in natural language, and cannot generate dynamic solutions.

[0005] Intelligent question answering based on a single general model: Directly applying general language models such as GPT and Wenxin Yiyan. Although such models have strong natural language understanding and generation capabilities, they lack in-depth professional knowledge in the machine tool field, which leads to biases in their understanding of professional terms, fault mechanisms, and maintenance procedures. The generated answers are often "seemingly reasonable" but "inoperable" and may even pose safety hazards.

[0006] Therefore, there is a need for an intelligent operation and maintenance question-and-answer technology that can deeply integrate domain knowledge, accurately understand user intent, effectively utilize multi-source data, and continuously evolve, in order to improve the automation and intelligence level of machine tool after-sales service. Summary of the Invention

[0007] To overcome the shortcomings of existing technologies, the present invention aims to provide an intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition. This method aims to improve the quality and efficiency of machine tool after-sales maintenance services by leveraging the complementary advantages of dual models, domain knowledge graph alignment, dynamic feedback mechanisms, multi-dimensional intent recognition systems, improved LORA algorithm training, and intent-driven retrieval enhancement generation.

[0008] The objective of this invention is achieved through the following technical solution: A machine tool after-sales maintenance intelligent question-answering method based on intent recognition includes the following steps: Step S1: Multi-source operation and maintenance data preprocessing: Standardize and structure the multi-source data such as natural language questions, machine tool models / parameters, fault logs, and historical maintenance records in the machine tool after-sales scenario, and simultaneously construct a multi-dimensional intent recognition labeled dataset; Step S2, Dual-model feature extraction: Extract semantic and intent features of natural language questions through the first pre-trained language model, extract professional features of related domain data through the second pre-trained language model, and train an intent recognition model based on the improved LORA algorithm to output intent labels and confidence scores; Step S3, Knowledge Graph Alignment and Attention Fusion: Construct a knowledge graph for machine tool operation and maintenance, semantically align the features extracted in step S2 with the nodes of the knowledge graph, and generate a fused feature vector through a dual-model collaborative attention mechanism; Step S4, Intent-driven dynamic retrieval enhancement generation: Based on the intent tag dynamic retrieval related knowledge output in step S2, combined with the fusion feature vector generated in step S3, construct prompt words and generate a structured operation and maintenance solution; Step S5, Feedback Iteration Optimization: Based on user feedback data on the solution, optimize and update the model parameters in Step S2, the knowledge graph in Step S3, and the generation strategy in Step S4.

[0009] In one optional implementation, the multidimensional intent recognition annotation dataset constructed in step S1 covers five core intents: equipment maintenance, fault diagnosis, parameter debugging, parts consultation and operation guidance.

[0010] In one optional implementation, in step S2, the improved LORA algorithm updates parameters by inserting trainable low-rank matrix pairs into the network layer of the first pre-trained language model encoder, and is trained using a hybrid loss function that combines cross-entropy loss and contrastive learning loss; wherein, the first pre-trained language model is the Tongyi Qianwen model, and the second pre-trained language model is the DeepSeek model.

[0011] In one optional implementation, the dual-model collaborative attention mechanism in step S3 specifically uses the intent features extracted by the first pre-trained language model as the query vector, and the domain features extracted by the second pre-trained language model and the knowledge graph-enhanced features as the key vector and value vector, respectively, and generates the fused feature vector after calculating the attention weights.

[0012] In an optional implementation, the dynamic retrieval in step S4 includes: selecting corresponding index fragments in the vector database for initial screening based on the intent tag, and then using a comprehensive similarity algorithm to perform a secondary sorting of the initial screening results. The comprehensive similarity algorithm is as follows:

[0013] in, For the user's question vector; These are knowledge fragments from a vector database. Balance coefficient; This indicates the calculation of cosine similarity. Intent weighting factor; This is for calculating semantic similarity.

[0014] In one optional implementation, in step S4, the constructed prompt word is a four-in-one template containing task description, constraints, relevant knowledge, and contextual information.

[0015] In one optional implementation, in step S4, when generating the structured operation and maintenance solution, the output strategy is dynamically adjusted based on the confidence level output in step S2: when the confidence level is higher than the high confidence level threshold, a structured maintenance process is output; when the confidence level is between the high confidence level threshold and the medium confidence level threshold, candidate solutions and follow-up questions are output; when the confidence level is lower than the medium confidence level threshold, troubleshooting guidance is output; when the generated solution involves parts replacement, the compatible parts information obtained from the knowledge graph is output in association.

[0016] In one optional implementation, the optimization update in step S5 includes: using user satisfaction, repair success rate, and intent recognition accuracy as reward signals, and performing reinforcement learning optimization on the generation strategy in step S4 through the PPO algorithm.

[0017] In one alternative embodiment, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the method as described in any one of claims 1 to 8.

[0018] In one alternative embodiment, a computer-readable storage medium stores a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 8.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. By combining dual-path feature extraction of the Qianwen model and the DeepSeek model with improved LORA intent recognition, high-precision parallel parsing and accurate intent recognition of user question semantics and domain professional features are achieved. This alleviates the problems of bias in understanding professional domain terms, single intent recognition dimension and low accuracy of a single general model, thus improving the intent recognition accuracy in machine tool operation and maintenance scenarios and laying a solid foundation for subsequent accurate services.

[0020] 2. By aligning with domain knowledge graphs and fusing attention between two models, deep semantic association and complementary enhancement of multi-source heterogeneous features and structured domain knowledge are achieved. This alleviates the problem of traditional question answering models having single feature dimensions and lack of logical association, resulting in poor operability of answers. The generated feature vectors combine user intent, question context and maintenance expertise, improving the domain relevance and logic of subsequent answer generation.

[0021] 3. Through intent-driven dynamic retrieval enhancement generation (dynamic index sharding selection + secondary sorting + four-in-one template), a precise, controllable, and adaptive generation chain from "intent" to "knowledge" to "structured answer" is realized. This alleviates the problems of disconnect between retrieval and intent, insufficient relevance of recall information, and unstable answer quality caused by the lack of structured design of prompt words in traditional retrieval enhancement generation technology. It improves the matching degree between recall data and user questions and greatly enhances the direct executability of answers.

[0022] 4. Through a closed-loop feedback iterative optimization mechanism that includes incremental training, knowledge graph updates, and reinforcement learning optimization, the model and knowledge base have achieved continuous self-evolution capabilities. This alleviates the problem that static models are difficult to adapt to new models and new fault scenarios, and their performance degrades over long-term use. It ensures the accuracy, timeliness, and adaptability of the system during long-term operation and maintenance, and reduces continuous maintenance costs.

[0023] 5. Through the above methods, this invention forms a complete technical closed loop from accurate understanding, knowledge integration, intelligent generation to continuous optimization, and ultimately achieves a significant comprehensive improvement in question-and-answer accuracy, user satisfaction and repair success rate in complex machine tool after-sales maintenance scenarios, while controlling the average response time to within 3 seconds, providing enterprises with an efficient, accurate and low-cost intelligent after-sales maintenance solution. Attached Figure Description

[0024] Figure 1 A flowchart of an intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition; Figure 2 This is an overall framework diagram of an intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition. Detailed Implementation

[0025] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0026] Please refer to Figure 1-2A machine tool after-sales maintenance intelligent question-answering method based on intent recognition includes the following steps: Step S1: Multi-source maintenance data preprocessing: Standardize and structure the multi-source data in the machine tool after-sales scenario, including natural language processing, machine tool models / parameters, fault logs, and historical maintenance records. Simultaneously, construct a multi-dimensional intent recognition labeled dataset, specifically including: Natural Language Processing (NLP) Preprocessing: The user-input fault description and inquiry are segmented, stop words are removed, and part-of-speech tagging is performed. An intent classification algorithm (such as TextCNN) is used to preliminarily determine the question type (troubleshooting, parameter tuning, parts inquiry, etc.), and standardized text is output. ; Machine tool parameter data encoding: Structured parameters such as machine tool model, running time, spindle speed, and load rate are converted into parameter feature vectors using one-hot encoding and normalization. ; Fault Log and Maintenance Record Processing: Entity recognition (extracting faulty components, fault phenomena, etc.) is performed on unstructured fault logs (such as equipment alarm information and maintenance work orders). Temporal feature extraction is performed on historical maintenance records, outputting a fault temporal feature vector. ;

[0027] Multidimensional intent recognition data construction: Collect a large number of user questions in machine tool after-sales scenarios, and build a labeled dataset covering multiple core intents. Each data entry includes the user's original question, standardized question, intent label, and corresponding question library association information. Step S2, Dual-Model Feature Extraction: Semantic and intent features of the natural language question are extracted using a first pre-trained language model, while professional features of the relevant domain data are extracted using a second pre-trained language model. An intent recognition model is then trained based on an improved LORA algorithm, outputting intent labels and confidence scores. DeepSeek and the Qianwen model are used to focus on different feature dimensions, and a new training step for the intent recognition model based on the improved LORA algorithm is added, achieving a triple empowerment of semantic understanding, domain knowledge, and intent recognition. Feature extraction from the Thousand Questions model: standardizing text Input a 1000 Questions model finely tuned for Chinese semantic understanding, output a user intent feature vector. With text semantic vectors The intent feature vector focuses on the user's core needs (such as "troubleshooting spindle noise"), while the text semantic vector captures the contextual relationships of natural language. DeepSeek model feature extraction: extracting feature vectors from fault logs The DeepSeek model, finely tuned by the domain, takes machine tool maintenance technical documents (such as maintenance manuals and fault case libraries) as input and outputs fault-specific feature vectors. With maintenance knowledge vector The fault feature vector contains core information such as fault type and related components, while the maintenance knowledge vector covers standard maintenance procedures and experience-based solutions. Training of an intent recognition model based on an improved LORA algorithm: Model architecture: The basic encoder of the Qianwen model is used as the backbone network, and a LORA (Low-Rank Adaptation) adapter is introduced. Low-rank matrix pairs are inserted into the Transformer layer of the model. , ),in For the hidden layer dimension of the model, For low-rank dimensions ( Only train the LORA adapter parameters and classification head parameters, and freeze the backbone network parameters to reduce training costs; Hybrid Loss Function Design: A hybrid loss function is designed to address the characteristics of intent recognition in machine tool maintenance. , Fusion cross-entropy loss ( ) and contrastive learning loss The formula is as follows:

[0028] in This is the weighting coefficient (0.7, verified by experiments), used to balance the contributions of the two types of losses; Cross-entropy loss ( The formula for optimizing hard label matching accuracy in intent classification is:

[0029] in For the sample size, For the number of intent categories, For the first The true labels of each sample (one-hot encoding) For the model to predict the first Each sample belongs to category The probability of; Comparative learning loss ( ): This is used to enhance the feature clustering of samples with the same intent and the feature distinguishability of samples with different intents. The formula is:

[0030] in For the first The feature vector of each sample For the first The feature vector of positive samples (agreement map sample). Indicates the first The feature vector of each sample, The cosine similarity function is used. The temperature coefficient is taken as 0.07. Training process: Supervised training is performed using the multidimensional intent recognition dataset constructed in step S1, with the AdamW optimizer, a learning rate of 2e-5, 3 training epochs, and a batch size of 32. Finally, a high-precision intent recognition model is obtained, which can output the intent label and confidence score of the user's question. Step S3, Knowledge Graph Alignment and Attention Fusion: Construct a knowledge graph for machine tool operation and maintenance, semantically align the features extracted in step S2 with the nodes of the knowledge graph, and generate a fused feature vector through a dual-model collaborative attention mechanism; Machine tool operation and maintenance knowledge graph construction: Construct an entity relationship graph with machine tool components (spindle, guide rail, control system, etc.), fault types (mechanical wear, short circuit, program error, etc.), maintenance methods (disassembly and replacement, parameter calibration, program debugging, etc.) as core entities. ,in For a collection of entities, For a set of relationships (such as the relationship weight between "spindle" and "abnormal noise failure"); Feature-Knowledge Graph Alignment: Aligning the semantic vectors of the Thousand Questions model Domain feature vectors of the DeepSeek model and the intent feature vector output by the intent recognition model By mapping entity linking algorithms to knowledge graph nodes, calculating the semantic similarity between features and nodes, and generating aligned knowledge-enhanced features. ; Dual-model collaborative attention fusion: integrating the intent features of the 1000 Questions model As the query vector (Q), the maintenance knowledge vector of the DeepSeek model With knowledge enhancement features As key vectors (Key, K) and value vectors (Value, V), these are input to the multi-head attention module to calculate the association weights across model features, as shown in the following formula:

[0031]

[0032] in To focus on the number of heads, The output weight matrix is ​​then processed through residual connections and layer normalization to finally generate the fused feature vector. :

[0033] Step S4, Intent-Driven Dynamic Retrieval Enhancement Generation: Based on the intent tag dynamic retrieval-related knowledge output in Step S2, and combined with the fusion feature vector generated in Step S3, prompt words are constructed and a structured operation and maintenance solution is generated, specifically including: Dynamic index shard selection: Based on the intent tags output by the intent recognition model (such as equipment maintenance, fault diagnosis, etc.), the system dynamically selects the corresponding index shards in the vector database. The vector database is divided into dedicated shards according to intent categories. Each shard stores vector representations of data such as machine tool parameters, maintenance cases, and technical documents related to the corresponding intent, enabling precise location of the search scope. Secondary sorting and filtering: First, the top-N (N=20, experimentally verified as optimal) data blocks are initially screened from the selected index fragments using vector similarity matching. Then, an intent weight factor is introduced. Then, a second round of ranking is performed using the similarity operator. The similarity calculation formula is as follows:

[0034] in For the user question vector, To retrieve the data block vector, For vector cosine similarity, For semantic similarity, This is the balance coefficient (taken as 0.6). Intent weights (preset based on the importance of intent categories, such as fault diagnosis). Operation guide ); Construction of a four-in-one prompt word template: Based on the TOP-K (K=5) highly relevant data blocks after secondary sorting, a four-in-one prompt word template of "task-constraint-knowledge-context" is constructed, with the following template structure: Task Description: Clearly define the core user needs and generate a task based on intent tags, such as: "The user needs to resolve the fault diagnosis task of the overload alarm of spindle No. 201 on Kt350 machine tool". Constraints: Review key constraints such as machine tool model and operating status, for example: "Constraints: Machine tool model is Kt350, cumulative running time is 3000 hours, alarm occurs during cutting process"; Knowledge Support: Extract highly relevant knowledge from the retrieval, for example: "Relevant knowledge: Alarm No. 201 corresponds to the overload protection trigger of the spindle drive unit. Possible causes include excessive load, poor heat dissipation, and abnormal drive parameters." Contextual association: Associate with the user's historical interaction information (if any), for example: "Context: The user has not previously inquired about spindle-related issues for this model of machine tool"; Adaptive answer generation: Input the constructed prompt words into the fused large model, and combine it with the fused feature vector from step S3. By associating information with the knowledge graph, the output strategy is dynamically adjusted. Fault confidence calculation: Calculate the confidence of the fault type using a fully connected layer and a sigmoid function. The formula is ,in This is the weight matrix. For bias terms; Structured answer generation: when (At high confidence) output a structured flow of "fault cause - repair steps - precautions"; when At (medium confidence) level, output candidate failure solutions and guided confirmation questions; when (At low confidence) generate troubleshooting guidance scripts based on knowledge graphs; Parts-related output: When the fault type involves parts replacement, the appropriate parts model, inventory status and procurement channel are queried through the knowledge graph and added to the answer; Response Verification: Verify the compliance and accuracy of the generated answer, check for errors and compliance with machine tool operation and maintenance safety regulations, and output the result to the user after successful verification; Step S5, Feedback Iterative Optimization: Based on user feedback data on the solution, optimize and update the model parameters in Step S2, the knowledge graph in Step S3, and the generation strategy in Step S4; User Feedback Collection: Design a feedback entry point to collect user satisfaction ratings (1-5 points), correction suggestions, and repair effect data, and label samples as "effective answers," "invalid answers," and "answers that need optimization." At the same time, collect feedback on the accuracy of intent recognition (such as "intent recognition error" and "intent recognition accurate"). Model parameter fine-tuning: Add "valid answer" samples and samples with correct intent recognition to the training set, and use an incremental training strategy to fine-tune the attention weights, LORA adapter parameters, and feature extraction module parameters of the dual models; Knowledge graph and vector database updates: The questions and correct solutions corresponding to "invalid answers" are added to the knowledge graph as new entities and relations. At the same time, the index shard data of the vector database is updated and the data vector representation is optimized. Reinforcement learning optimization: Using user satisfaction, repair success rate, and intent recognition accuracy as reward signals, the proximal policy optimization (PPO) algorithm is used to optimize the adaptive answer generation strategy and retrieval ranking weights to improve question answering performance in complex scenarios.

[0035] In a preferred embodiment of the present invention, a multi-source operation and maintenance data preprocessing example is as follows: Data source: The dataset used is the after-sales maintenance dataset of a machine tool manufacturer, which contains 500,000 user consultation records, 30,000 fault logs, 10,000 technical manuals and 20,000 historical maintenance records, covering 20 mainstream machine tool models such as CNC lathes, machining centers and milling machines; Natural language preprocessing: Jieba word segmentation tool was used for word segmentation, Harbin Institute of Technology stop word list was used to remove meaningless words, and TextCNN model was used for intent classification, with a classification accuracy of 94.3%; Parameter encoding: Continuous parameters such as machine tool runtime and spindle speed are normalized using min-max normalization, while discrete parameters such as machine tool model and fault type are encoded using one-hot encoding, ultimately generating a parameter feature vector with dimension 256. ; Fault log processing: The BERT-CRF model is used to extract entities (such as "spindle", "abnormal noise", "overheating") from the fault log, and the LSTM model is used to extract time-series features, generating a fault time-series feature vector with a dimension of 512. ; Multidimensional Intent Recognition Data Construction: 100,000 high-quality user questions were selected and manually labeled according to 5 core intent categories to construct a labeled dataset. This dataset consists of 80,000 training questions, 10,000 validation questions, and 10,000 test questions. The dataset includes four fields: original user question, standardized question, intent label, and question library association information. A data example is shown in the table below. ; In a preferred embodiment of the present invention, a dual-model feature extraction example is as follows: The Qwen model configuration uses the Qwen3-7B model, fine-tuned based on the Chinese operation and maintenance corpus (learning rate 2e-5, 3 training epochs), and outputs an intent feature vector with a dimension of 768. With text semantic vectors ; DeepSeek model configuration: The DeepSeek-6.7B model is used, and domain-specific fine-tuning is performed using machine tool operation and maintenance technical documents (PDF format converted to text), outputting fault feature vectors with a dimension of 768. With maintenance knowledge vector ; Feature Validation: Validated using the t-SNE visualization tool, the features extracted by the dual models can effectively distinguish different fault types in the semantic space, with a feature clustering purity of 92.1%. Example of training an intent recognition model based on the improved LORA algorithm: Model configuration: The backbone network uses the Qwen3-7B Transformer encoder with low-rank LORA dimensions. The adapter is inserted between the attention layer and the feedforward network layer of the Transformer layer, and the classification head is a 2-layer fully connected network (512 hidden layers). Training parameters: Optimizer is AdamW, weight decay coefficient is 0.01, learning rate is 2e-5, batch size is 32, training epochs are 3, and the weight loss function is a mixture loss function. Comparative learning temperature coefficient ; Model performance: The intent recognition accuracy reached 95.3%, recall 94.8%, and F1 score 95.0% on the test set. The training efficiency was improved by 40% and the parameter size was reduced by 80% compared with the model without LORA.

[0036] In a preferred embodiment of the present invention, an example of knowledge graph alignment and attention fusion is as follows: Knowledge graph construction: The knowledge graph is constructed using the Neo4j graph database, containing 872 core entities and 1246 relationships. The entities cover machine tool parts (321), fault types (189), maintenance methods (213), and part models (149). Entity linking algorithm: A semantic similarity-based entity linking method is adopted, which calculates the cosine similarity between feature vectors and knowledge graph node vectors, achieving a linking accuracy of 90.5%. Attention mechanism parameters: Number of attention heads fusion feature vector dimensions Layer normalization parameters The residual connections use a dropout rate of 0.3 to prevent overfitting.

[0037] In a preferred embodiment of the present invention, an example of an intent-driven dynamic retrieval enhancement generation mechanism is as follows: Vector database configuration: Milvus vector database is used, which is divided into 5 dedicated index shards according to 5 types of intents. Each shard stores the relevant data vectors (768 dimensions) of the corresponding intent, and the index type is IVF_FLAT; Search parameters: Initial screening TOP-N=20, fine-tuning TOP-K=5, vector similarity threshold 0.6, intent weight. Equipment maintenance 0.8, fault diagnosis 0.9, parameter adjustment 0.85, parts consultation 0.75, operation instructions 0.7; Example of a four-in-one prompt template: Task Description: The user needs to resolve the fault diagnosis task of the overload alarm of spindle No. 201 on Kt350 machine tool; Constraints: Machine tool model is Kt350, cumulative running time is 3000 hours, alarm occurs during cutting process, spindle load rate is displayed as 95%; Related knowledge: Alarm No. 201 corresponds to the overload protection trigger of the spindle drive unit. Possible causes include excessive load (unreasonable cutting parameters), poor heat dissipation (cooling fan failure), and abnormal drive parameters (overload protection threshold set too low). Related repair case: A similar alarm on a Kt350 machine tool of a certain company was restored to normal after adjusting the cutting speed to 800rpm. Context: The user had not previously inquired about spindle-related issues for this model of machine tool; Fault confidence threshold: Set a high confidence threshold Medium confidence threshold The optimal threshold is determined through cross-validation; Structured Output Template: Design a standardized output template, for example: "

Cause of Fault

Repair Steps

Precautions

Compatible Parts

[0038] In a preferred embodiment of the present invention, a feedback iterative optimization example is used: Feedback collection mechanism: User feedback is automatically collected through the after-sales system interface, with approximately 10,000 new feedback samples added each month, including satisfaction ratings, feedback on the accuracy of intent recognition, and repair effectiveness data; Incremental training: Incremental training is performed using mini-batch gradient descent (batch size=32), and the model parameters are updated quarterly, with a focus on updating the LORA adapter and attention weights; Knowledge graph and vector database updates: Entities and relationships are added to the knowledge graph every quarter, and the vector database index shard data is updated every two months; Reinforcement Learning Configuration: Discount Factor for the PPO Algorithm Learning rate The reward function is set as "satisfaction score × 0.4 + repair success rate × 0.3 + intent recognition accuracy × 0.3".

[0039] In a preferred embodiment of the present invention, the model hyperparameters are set as shown in the table below: ; In a preferred embodiment of this invention, to verify the effectiveness of the model, a comparative experiment was conducted using the aforementioned machine tool after-sales maintenance dataset. The training, validation, and test sets were divided in an 8:1:1 ratio. The comparative models included: Qwen-7B, DeepSeek-6.7B, a traditional FAQ question-answering system, a BERT-based domain question-answering model, and a fusion model (baseline) without improved LoRa and intent-driven retrieval. Experimental metrics included question-answering accuracy, intent recognition accuracy, response time, user satisfaction, and repair success rate. The comparative experimental results are shown in the table below. ; Experimental results show that: The question-answering accuracy of the model in this invention reaches 94.7%, which is 12.3 percentage points higher than the single model and 8.2 percentage points higher than the baseline, proving that the intent recognition model trained by the improved LORA algorithm and the intent-driven retrieval enhancement generation mechanism can effectively improve the model performance. The intent recognition accuracy reached 95.3%, a significant improvement over the comparison model, ensuring the relevance of subsequent retrieval and generation; Although the response time is slightly longer than that of the traditional FAQ system, it is still kept within 3 seconds, meeting the real-time requirements of after-sales maintenance. User satisfaction and repair success rate reached 4.9 points and 93.2% respectively, which is a significant improvement over existing technologies, verifying the practicality, matching degree and operability of the answer.

[0040] In a preferred embodiment of the present invention, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the machine tool after-sales maintenance intelligent question-and-answer method based on intent recognition as described above. The electronic device may be a server, an industrial computer, or an embedded device.

[0041] In a preferred embodiment of the present invention, the present invention also provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, it implements the steps of the machine tool after-sales maintenance intelligent question-and-answer method based on intent recognition as described above. The medium may include various media capable of storing program code, such as USB flash drive, mobile hard drive, ROM, RAM, magnetic disk, or optical disk.

[0042] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.

Claims

1. A machine tool after-sales maintenance intelligent question-answering method based on intent recognition, characterized in that: Includes the following steps: Step S1: Multi-source operation and maintenance data preprocessing: Standardize and structure the multi-source data such as natural language questions, machine tool models / parameters, fault logs, and historical maintenance records in the machine tool after-sales scenario, and simultaneously construct a multi-dimensional intent recognition labeled dataset; Step S2, Dual-model feature extraction: Extract semantic and intent features of natural language questions through the first pre-trained language model, extract professional features of related domain data through the second pre-trained language model, and train an intent recognition model based on the improved LORA algorithm to output intent labels and confidence scores; Step S3, Knowledge Graph Alignment and Attention Fusion: Construct a knowledge graph for machine tool operation and maintenance, semantically align the features extracted in step S2 with the nodes of the knowledge graph, and generate a fused feature vector through a dual-model collaborative attention mechanism; Step S4, Intent-driven dynamic retrieval enhancement generation: Based on the intent tag dynamic retrieval related knowledge output in step S2, combined with the fusion feature vector generated in step S3, construct prompt words and generate a structured operation and maintenance solution; Step S5, Feedback Iteration Optimization: Based on user feedback data on the solution, optimize and update the model parameters in Step S2, the knowledge graph in Step S3, and the generation strategy in Step S4.

2. The intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition as described in claim 1, characterized in that: In step S1, the constructed multidimensional intent recognition annotation dataset covers five core intents: equipment maintenance, fault diagnosis, parameter debugging, parts consultation and operation guidance.

3. The intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition as described in claim 1, characterized in that: In step S2, the improved LORA algorithm updates parameters by inserting trainable low-rank matrix pairs into the network layer of the first pre-trained language model encoder, and trains using a hybrid loss function that combines cross-entropy loss and contrastive learning loss; wherein, the first pre-trained language model is the Tongyi Qianwen model, and the second pre-trained language model is the DeepSeek model.

4. The intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition as described in claim 1, characterized in that: The dual-model collaborative attention mechanism in step S3 specifically uses the intent features extracted by the first pre-trained language model as the query vector, and the domain features extracted by the second pre-trained language model and the knowledge graph-enhanced features as the key vector and value vector, respectively. After calculating the attention weights, the fused feature vector is generated.

5. The intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition as described in claim 1, characterized in that: The dynamic retrieval in step S4 includes: selecting corresponding index fragments in the vector database for initial screening based on the intent tags, and then using a comprehensive similarity algorithm to perform a secondary sorting of the initial screening results. The comprehensive similarity algorithm is as follows: ,in, For the user's question vector; These are knowledge fragments from a vector database. Balance coefficient; This indicates the calculation of cosine similarity. Intent weighting factor; This is for calculating semantic similarity.

6. The intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition as described in claim 1, characterized in that: In step S4, the constructed prompt is a four-in-one template that includes task description, constraints, relevant knowledge, and contextual information.

7. The intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition according to claim 1, characterized in that: In step S4, when generating the structured operation and maintenance solution, the output strategy is dynamically adjusted based on the confidence level output in step S2: when the confidence level is higher than the high confidence level threshold, a structured maintenance process is output; when the confidence level is between the high confidence level threshold and the medium confidence level threshold, candidate solutions and follow-up questions are output; when the confidence level is lower than the medium confidence level threshold, troubleshooting guidance is output; when the generated solution involves parts replacement, the compatible parts information obtained from the knowledge graph is output in association.

8. The intelligent question-and-answer method for machine tool after-sales maintenance based on intent recognition according to claim 1, characterized in that: The optimization update in step S5 includes: using user satisfaction, repair success rate and intent recognition accuracy as reward signals, and performing reinforcement learning optimization on the generation strategy in step S4 through the PPO algorithm.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.