Self-adaptive dialogue generation method oriented to operation and maintenance scene and knowledge rearrangement

By constructing the context and professional level tags of operation and maintenance scenario dialogue, and combining the large language generation model to fine-tune the parameters, the problem that traditional dialogue generation methods cannot personalize and real-time coping with complex operation and maintenance scenarios is solved, and the maintenance efficiency and operation of CNC machine tools is improved accuracy.

CN119226471APending Publication Date: 2024-12-31WANK IND TECH (SHANDONG) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411318895.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-21
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The traditional dialogue generation method for CNC machine tool operation and maintenance scenarios cannot be personalized, real-time, and iterative scenario dialogue generation based on different fault types or the professional level of operators, resulting in a decrease in the application value of operation and maintenance knowledge, and the efficiency of maintenance and maintenance is affected. limit.

Method used

By analyzing and identifying the maintenance requirements in the production process, building the context of the operation and maintenance scenario dialogue, combining multiple professional level tags to generate the input sequence to be generated, using the large language generation model and prompt word engineering to form multiple rounds of dialogue sequences, using the forward direction The propagation algorithm and cross-entropy loss function fine-tune the model parameters to ensure the professionalism and consistency of the generated content.

Benefits of technology

It improves the maintenance efficiency and operation accuracy of CNC machine tools, enhances the fine-tuning and knowledge adaptability of fields, and ensures high service reliability and consistent processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226471A_ABST
    Figure CN119226471A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive dialogue generation method oriented to operation and maintenance scenes and knowledge rearrangement, and belongs to the technical field of new-generation information technology and high-end manufacturing equipment. Constructing an operation and maintenance scene dialogue context, combining a professional degree label to form an operation and maintenance scene input sequence of a to-be-generated reply, designing a training input sequence based on a technical document sequence and a real reply statement, performing professional degree labeling improvement by using a large language model, and designing a label classifier to perform supervised learning; further splicing the training input sequence and the corresponding label to form a pre-training dialogue sequence to perform multiple rounds of fine tuning on the large language model, and finally rearranging operation and maintenance knowledge based on the fine-tuning large model to screen and integrate expected generated replies, thereby ensuring context reply adaptive equipment overhaul and maintenance requirements. The method effectively improves the professionality and accuracy of dialogue generation of the operation and maintenance scene, and has a wide application prospect in the field of intelligent manufacturing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an adaptive dialogue generation method oriented to operation and maintenance scenarios and knowledge rearrangement. Background Art

[0002] Failures and maintenance issues of CNC machine tools are important factors that restrict the production efficiency of the system. How to improve the efficiency of obtaining and reusing professional operation and maintenance knowledge, and then ensure the efficiency of inspection and maintenance of CNC machine tools, has become a key issue that needs to be solved in the manufacturing industry. Traditional dialogue generation methods for CNC machine tool operation and maintenance scenarios are often based on fixed knowledge bases or expert systems, lacking professional matching and content adaptation to the actual needs of users, and are unable to generate personalized, real-time, and iterative scene dialogues based on different fault types or the professional characteristics of operators. It is difficult to cope with complex and changing dynamic manufacturing processes, resulting in a significant reduction in the application value of massive professional knowledge and technical documents in existing operation and maintenance scenarios. Summary of the invention

[0003] In order to solve the problem of limited efficiency of inspection, troubleshooting and maintenance operations of CNC machine tools during operation and ensure high service reliability and high consistency processing of CNC machine tools, the present invention proposes an adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement. By analyzing and identifying the inspection and maintenance needs in the production process, summarizing professional operation and maintenance knowledge and dialogue background, combining multiple types of professional degree labels to generate input sequences of responses to be generated, and constructing the operation and maintenance scenario dialogue context, the large language generation model and prompt word engineering are further used to form multi-round dialogue sequences and real response sentences containing professional degree labels. The forward propagation algorithm and cross entropy loss function are used to iteratively update the fine-tuning of large model parameters. Finally, the professional degree label classifier is used to screen candidate outputs consistent with the expected labels to ensure the professionalism and consistency of the generated content. The final response that meets the operation requirements in the operation and maintenance scenario is adaptively output, which improves the fine-tuning and knowledge adaptability of specific fields, thereby ensuring the maintenance efficiency and operation accuracy of CNC machine tools in the production process, and has important engineering value.

[0004] The present invention is implemented through the following technical solutions: first, a scenario definition module, including constructing an operation and maintenance scenario dialogue context for a to-be-generated reply, matching professional level labels, and realizing the definition of an operation and maintenance scenario input sequence for a to-be-generated reply; then a training preparation module, including collecting technical documents to construct an input sequence for training, using a large language model to automatically annotate professional level labels, and splicing the input sequence for training and the professional level labels to form a pre-trained dialogue sequence; then a large language generation base model fine-tuning module, including selecting a large language generation model as a base model, and iteratively updating model parameters using a pre-trained dialogue sequence; and finally a verification module, including generating an operation and maintenance scenario candidate output, screening a candidate output sequence, merging a verification output sequence, and outputting a final operation and maintenance scenario reply.

[0005] The construction of the operation and maintenance scenario dialogue context for the to-be-generated response refers to: for a manufacturing system composed of CNC machine tool equipment, identifying and analyzing the inspection and maintenance needs that may arise in the production process, and constructing the operation and maintenance scenario dialogue context for the to-be-generated response by summarizing operation and maintenance knowledge such as specific fault phenomena, equipment error codes, and maintenance and debugging processes to ensure the accuracy and relevance of the dialogue content.

[0006] The matching professional level labels means: according to the actual application requirements of the operation and maintenance scenario context, the most appropriate one is selected from the six categories of professional level labels of "academic, professional, explanatory, operational, illustrative, and understandable" for matching, and the original input sequence of iterative input is formed by splicing the operation and maintenance scenario dialogue context with the selected professional level labels, which is defined as the operation and maintenance scenario input sequence to be generated for the response.

[0007] The construction of the input sequence for training specifically includes: using historical maintenance records, failure mode records, operation document descriptions, equipment operation manuals, equipment installation instructions and other technical documents to construct a multi-round operation and maintenance scenario context dialogue sequence and real response sentences containing professional level labels, and defining the above dialogue sequence containing real response sentences as a training input sequence for subsequent model training.

[0008] The automatic labeling of professional level labels specifically includes: labeling and improving the professional level labels of the training input sequence through a large language generation model and prompt word engineering; designing a professional level label classifier based on the representation ability of the bidirectional encoder, and implementing supervised classification learning to improve the accuracy of professional level labeling.

[0009] The forming of the pre-trained dialogue sequence specifically includes: concatenating the training input sequence with its corresponding professional level label to form a pre-trained dialogue sequence; at the same time, separately removing the real response sentences of the pre-trained dialogue sequence in the operation and maintenance scenario to form a pre-trained dialogue context for the response to be generated, laying a foundation for the subsequent generation process.

[0010] The large language generation base model fine-tuning module specifically includes: based on the pre-trained dialogue context of the response to be generated, selecting the large language generation model as the base model to enter the fine-tuning stage. The generated response of the pre-trained dialogue context is obtained through the forward propagation algorithm, and the cross entropy loss function between the generated response and the real response sentence is minimized to perform back propagation, thereby realizing the iterative update of the large language generation model parameters.

[0011] The generating of operation and maintenance scenario candidate outputs refers to: splicing the operation and maintenance scenario dialogue context of the to-be-generated response with the professional level label generated by the expected response to form an operation and maintenance scenario input sequence of the to-be-generated response; the input sequence will be copied multiple times and input in parallel to the fine-tuned and updated large language generation model to generate multiple operation and maintenance scenario candidate output sequences.

[0012] The screening of candidate output sequences refers to: inputting multiple operation and maintenance scenario candidate output sequences generated by the fine-tuned and updated large language generation model one by one into the professional level label classifier designed in the fourth step, screening out operation and maintenance scenario candidate output sequences that are consistent with the professional level labels generated by the expected responses, so as to ensure the professionalism and accuracy of the output.

[0013] The merged verification output sequence refers to: combining the screened operation and maintenance scenario candidate output sequence with the professional level label generated by the expected response, and expressing it through the large language generation model. The merged output sequence will be input into the fine-tuned and updated large language generation model again, and compared with the professional level label classifier designed in the fourth step to ensure consistency.

[0014] The output of the final operation and maintenance scenario response means: if the professional level label of the operation and maintenance scenario output sequence in the merged verification output sequence is consistent with the professional level label generated by the expected response, then the sequence output is used as a real response to the operation and maintenance scenario that meets the inspection and maintenance needs of CNC machine tool equipment during the production process; otherwise, the operation and maintenance scenario response is iteratively optimized; the iterative optimization of the operation and maintenance scenario response means that if the professional level label of the operation and maintenance scenario output sequence in the merged verification output sequence is inconsistent with the professional level label generated by the expected response, then the training preparation module is re-run, and the model iteration rounds in the micro-large language generation base model fine-tuning module are increased to further optimize the generation results until the verification module is completed. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It reflects the overall application process of the adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement;

[0016] Figure 2 It reflects the model design structure of the adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement;

[0017] Figure 3 It is the consistency of professional level label prediction in actual operation and maintenance scenarios by adaptive dialogue generation methods for operation and maintenance scenarios and knowledge rearrangement;

[0018] Figure 4 It is the confusion probability matrix of the adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement in actual operation and maintenance scenarios. DETAILED DESCRIPTION

[0019] The following is a detailed description of an embodiment of the present invention: This embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation method and a specific operation process are given, but the protection scope of the present invention is not limited to the following embodiments.

[0020] This embodiment proposes an adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement, which includes the following steps.

[0021] Step 1: Construct the operation and maintenance scenario dialogue context. For the manufacturing system composed of CNC machine tools, identify and analyze the inspection and maintenance needs that may arise in the production process. By summarizing the operation and maintenance knowledge such as specific fault phenomena, equipment error codes, and maintenance and debugging processes, construct the operation and maintenance scenario dialogue context to generate the response. ,in Representative The operation and maintenance scenario word sequence input by the user is used in the round-robin dialogue. The maximum length of the input sequence is no more than , Representative The operation and maintenance scenario word sequence that the model generates in the round-trip dialogue is output. The maximum length of the output sequence is no more than , further defined Represents the first word in the input word sequence of the operation and maintenance scenario The first round of dialogue words, Represents the first word in the output word sequence of the operation and maintenance scenario The first round of dialogue words to ensure the accuracy and completeness of the definition of conversation content in operation and maintenance scenarios.

[0022] Step 2: Match professional level labels. Based on the actual application requirements of the operation and maintenance scenario context, define six types of professional level labels including "academic, professional, explanatory, operational, illustrative, and understandable". , and from Select the most suitable category for the current operation and maintenance scenario input word sequence to match it by Label with the selected degree M q ,q∈[1,6] Splicing to form an iterable input sequence of the original input, defined as the operation and maintenance scenario input sequence to generate the response S T=[T, M q ] , and Reply to the generated operation and maintenance scenario output word sequence in the large language model Professional Chengdu adaptive control and content optimization are carried out as the target output.

[0023] Step 3: Construct training input sequence , using historical maintenance records, failure mode records, operating documentation, equipment operation manuals, equipment installation instructions and other technical documents to split To construct a multi-round operation and maintenance scenario context dialogue sequence with professional level labels And the real reply statement ,in M q h ,q∈[1,6] .

[0024] Step 4: Label the professional level, and use the large language generation model and prompt word engineering to train the input sequence The professional level labels are marked and improved to update the obtained M q h * ,q∈[1,6] Based on the representation ability of the bidirectional encoder, we design a professional level label classifier ,by For classification targets, Implement supervised classification learning to improve the accuracy of labeling the professional level of the conversation context in operation and maintenance scenarios.

[0025] Step 5: Define subvectors of the training input sequence , and The corresponding professional level label after the improvement of the standard Splicing to form a pre-trained dialogue sequence , get the pre-trained conversation context for the response to be generated At the same time, the pre-trained dialogue sequence in the operation and maintenance scenario The real reply statement It is designed as a separate target vector that forms the input for fine-tuning a large language model in the subsequent generation process.

[0026] Step 6: Fine-tune the large language generation model based on the pre-trained conversation context of the response to be generated , select the large language generation model Qwen2-7B as the base model to enter the fine-tuning stage. Obtain the generative response of the pre-trained dialogue context through the forward propagation algorithm , learn professional level tags With pre-trained conversation context The text co-occurrence relationship between ,in M q h * ,q∈[1,6] A subvector reflecting the training input sequence The professionalism label is then back-propagated by minimizing the cross entropy loss function between the generated reply and the true reply statement, that is, minimizing ,in item∈[1,total] , which can represent an instance in all training input sequences, and can be solved by the stochastic gradient descent algorithm to achieve iterative update of the parameters of the large language generation model.

[0027] Step 7: Generate candidate outputs for operation and maintenance scenarios, and generate the operation and maintenance scenario dialogue context for the response to be generated Professionalism labels generated with expected responses Splicing to form the operation and maintenance scenario input sequence to generate the response S T=[T, M q ] . The input sequence will be copied K,K∈[1,2,…] copies, and input them in parallel to the fine-tuned updated large language generation model to generate Candidate output sequence of operation and maintenance scenarios .

[0028] Step 8: Screen candidate output sequences for multiple operation and maintenance scenario candidate output sequences generated by the fine-tuned and updated large language generation model , one by one, is input into the professional level label classifier designed in the fourth step , filter out the candidate output sequences of operation and maintenance scenarios that are consistent with the professional level labels generated by the expected responses ,in To ensure the professionalism and accuracy of the output, Figure 2 The model design structure details of the adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement are provided.

[0029] Step 9: Merge the verification output sequence and output the selected operation and maintenance scenario candidate output sequence , combined with the professionalism label generated by the expected response , and then combined and expressed through the large language generation model. The combined output sequence will be input into the fine-tuned and updated large language generation model again, and compared with the professional level label classifier designed in the fourth step. to ensure consistency.

[0030] Step 10: Output the final operation and maintenance scenario response. If the professional level label of the operation and maintenance scenario output sequence in step 9 is consistent with the professional level label generated by the expected response, then the sequence output is used as the real operation and maintenance scenario response that meets the inspection and maintenance needs of CNC machine tools during the production process. The real operation and maintenance scenario response contains a series of operation steps and suggestions to meet the inspection and maintenance needs of CNC machine tools. Otherwise, proceed to step 11.

[0031] Step 11: Iterative optimization of operation and maintenance scenario responses. If the professional level labels of the operation and maintenance scenario output sequence in step 9 are inconsistent with the professional level labels generated by the expected responses, return to step 4 and increase the number of iterations of the large language generation model in the fine-tuning phase. If necessary, a large language generation model with a larger number of parameters can be reselected as the base model to ensure that the generated content meets the user's professional requirements. Re-execute steps 6 to 10 to further optimize the generation results.

[0032] In the first to eleventh steps, the information processing software used for the operations such as input splicing, model fine-tuning and knowledge rearrangement optimization adopted by the adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement is PYTHON.

[0033] Figure 3 The adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement is provided. In the actual operation and maintenance scenario of the workshop of the manufacturing system, the number of candidates for the candidate output sequence of different operation and maintenance scenarios is calculated. , the impact on the consistency level of generated content in meeting users' professionalism label requirements.

[0034] Figure 4 An adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement is provided. In an actual manufacturing system workshop operation and maintenance scenario, the six categories of professional level labels of the operation and maintenance scenario output sequence and the six categories of professional level labels generated by the expected responses are used to obtain confusion probability values ​​that are consistent with the classification probabilities.

[0035] The above-mentioned specific implementation can be partially adjusted in different ways by those skilled in the art without departing from the principle and purpose of the present invention. The protection scope of the present invention shall be based on the claims and shall not be limited by the above-mentioned specific implementation. Each implementation scheme within its scope shall be subject to the constraints of the present invention.

Claims

1. An adaptive dialogue generation method for operation and maintenance scenarios and knowledge rearrangement, characterized in that: The first is the scenario definition module, which includes building the operation and maintenance scenario dialogue context for the response to be generated, matching the professional level label, and defining the input sequence of the operation and maintenance scenario for the response to be generated; Then comes the training preparation module, which includes collecting technical documents to construct input sequences for training, using a large language model to automatically annotate professional level labels, and concatenating the input sequences for training and professional level labels to form a pre-trained dialogue sequence; next comes the large language generation base model fine-tuning module, which includes selecting a large language generation model as the base model and iteratively updating model parameters using pre-trained dialogue sequences; and finally, the verification module, which includes generating candidate outputs for operation and maintenance scenarios, screening candidate output sequences, merging and verifying output sequences, and outputting final operation and maintenance scenario responses.

2. According to claim 1, the method for generating adaptive dialogues for operation and maintenance scenarios and knowledge rearrangement is characterized in that: The construction of the operation and maintenance scenario dialogue context for the to-be-generated response refers to: for a manufacturing system composed of CNC machine tool equipment, identifying and analyzing the inspection and maintenance needs that may arise in the production process, and constructing the operation and maintenance scenario dialogue context for the to-be-generated response by summarizing operation and maintenance knowledge such as specific fault phenomena, equipment error codes, and maintenance and debugging processes to ensure the accuracy and relevance of the dialogue content.

3. The method for generating an adaptive dialogue for operation and maintenance scenarios and knowledge rearrangement according to claim 1, characterized in that: The matching professional level labels refer to: according to the actual application requirements of the operation and maintenance scenario context, the most appropriate one is selected from the six professional level labels of "academic, professional, explanatory, operational, illustrative, and understandable" for matching, and the original input sequence of iterative input is formed by splicing the operation and maintenance scenario dialogue context with the selected professional level labels, which is defined as the operation and maintenance scenario input sequence to be generated for the response.

4. The method for generating an adaptive dialogue for operation and maintenance scenarios and knowledge rearrangement according to claim 1, characterized in that: The construction of the input sequence for training specifically includes: using historical maintenance records, failure mode records, operation document descriptions, equipment operation manuals, equipment installation instructions and other technical documents to construct a multi-round operation and maintenance scenario context dialogue sequence and real response sentences containing professional level labels, and defining the above dialogue sequence containing real response sentences as a training input sequence for subsequent model training.

5. The method for generating adaptive dialogues for operation and maintenance scenarios and knowledge rearrangement according to claim 1 is characterized in that: The automatic labeling of professional level labels specifically includes: labeling and improving the professional level labels of the training input sequence through a large language generation model and prompt word engineering; designing a professional level label classifier based on the representation ability of the bidirectional encoder, and implementing supervised classification learning to improve the accuracy of professional level labeling.

6. The method for generating an adaptive dialogue for operation and maintenance scenarios and knowledge rearrangement according to claim 1, characterized in that: The forming of the pre-trained dialogue sequence specifically includes: concatenating the training input sequence with its corresponding professional level label to form a pre-trained dialogue sequence; at the same time, separately removing the real response sentences of the pre-trained dialogue sequence in the operation and maintenance scenario to form a pre-trained dialogue context for the response to be generated, laying a foundation for the subsequent generation process.

7. The method for generating adaptive dialogues for operation and maintenance scenarios and knowledge rearrangement according to claim 1 is characterized in that: The large language generation base model fine-tuning module specifically includes: based on the pre-trained dialogue context of the response to be generated, selecting the large language generation model as the base model to enter the fine-tuning stage. The generated response of the pre-trained dialogue context is obtained through the forward propagation algorithm, and the cross entropy loss function between the generated response and the real response sentence is minimized to perform back propagation, thereby realizing the iterative update of the large language generation model parameters.

8. The method for generating adaptive dialogues for operation and maintenance scenarios and knowledge rearrangement according to claim 1 is characterized in that: The generating of operation and maintenance scenario candidate outputs refers to: splicing the operation and maintenance scenario dialogue context of the to-be-generated response with the professional level label generated by the expected response to form an operation and maintenance scenario input sequence of the to-be-generated response; the input sequence will be copied multiple times and input in parallel to the fine-tuned and updated large language generation model to generate multiple operation and maintenance scenario candidate output sequences.

9. The method for generating an adaptive dialogue for operation and maintenance scenarios and knowledge rearrangement according to claim 1, characterized in that: The screening of candidate output sequences refers to: inputting multiple operation and maintenance scenario candidate output sequences generated by the fine-tuned and updated large language generation model one by one into the professional level label classifier designed in the fourth step, screening out operation and maintenance scenario candidate output sequences that are consistent with the professional level labels generated by the expected responses, so as to ensure the professionalism and accuracy of the output.

10. The method for generating adaptive dialogues for operation and maintenance scenarios and knowledge rearrangement according to claim 1, characterized in that: The merged verification output sequence refers to: combining the screened operation and maintenance scenario candidate output sequence with the professional level label generated by the expected response, and expressing it through the large language generation model. The merged output sequence will be input into the fine-tuned and updated large language generation model again, and compared with the professional level label classifier designed in the fourth step to ensure consistency.

11. The method for generating adaptive dialogues for operation and maintenance scenarios and knowledge rearrangement according to claim 1, characterized in that: Outputting the final operation and maintenance scenario response means: if the professional level label of the operation and maintenance scenario output sequence in the combined verification output sequence is consistent with the professional level label generated by the expected response, then outputting the sequence as a true operation and maintenance scenario response that meets the inspection and maintenance needs of the CNC machine tool equipment during the production process; Otherwise, perform iterative optimization of operation and maintenance scenario responses; the iterative optimization of operation and maintenance scenario responses refers to re-running the training preparation module if the professionalism label of the operation and maintenance scenario output sequence in the merged verification output sequence is inconsistent with the professionalism label generated by the expected response, and increasing the model iteration rounds in the micro-large language generation base model fine-tuning module to further optimize the generation results until the verification module is completed.

Citation Information

Cited By

  • LLM large model-based operation and maintenance knowledge intelligent question and answer interaction method, apparatus and device

    CN120632017A

  • An operation and maintenance knowledge intelligent question and answer interaction method, device and equipment based on an LLM large model

    CN120632017B