Planetary gearbox fault diagnosis algorithm automatic generation system and method based on large language model

The automatic generation system for planetary gearbox fault diagnosis algorithms based on large language models solves the problems of reliance on manual model design and insufficient automated optimization. It realizes efficient and automated generation and optimization of fault diagnosis algorithms, improving model performance and the effectiveness of the training process.

CN121233973BActive Publication Date: 2026-03-31SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies for planetary gearbox fault diagnosis rely on manual model design, which is time-consuming, labor-intensive, and suboptimal. Automated optimization methods cannot explore network topology and are difficult to improve the upper limit of model performance.

Method used

An automatic generation system for planetary gearbox fault diagnosis algorithms based on large language models is adopted. It includes an evolutionary control engine, a large language model generation module, a dynamic code execution and verification module, an architecture evaluator module, an intelligent evolutionary strategy module, and a program database module. Through elite selection strategy, intelligent evolution, and hyperparameter optimization, it automatically generates high-performance diagnostic algorithms.

Benefits of technology

The system automates the generation of fault diagnosis algorithms, reducing the workload of manually writing network architectures. Through intelligent evolutionary strategies and hyperparameter optimization, it improves model performance and the effectiveness of the training process, ensuring stable improvement in population performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233973B_ABST
    Figure CN121233973B_ABST
Patent Text Reader

Abstract

The application relates to a planetary gearbox fault diagnosis algorithm automatic generation system and method based on a large language model, which comprises the following modules: a large language model generation module, which is used for receiving prompt words, selecting parent planetary gearbox fault diagnosis algorithm and architecture component knowledge, and combining with the characteristics of the planetary gearbox fault diagnosis task to call the large language model to generate new planetary gearbox fault diagnosis algorithm code; a dynamic code execution and verification module, which is used for code execution and verification; an architecture evaluator module, which is used for training and performance evaluation; an intelligent evolution strategy module, which is used for analyzing the training history and obtaining an analysis result; a program database module, which is used for storing and managing the population of the planetary gearbox fault diagnosis algorithm and constructing prompt words; and an evolution control engine, which is used for coordinating and controlling the work processes of the modules and controlling the number of iterative evolutions to realize evolution circulation. Compared with the prior art, the application has the advantages of automatic generation, iterative evolution and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent industrial technology, and in particular to an automatic generation system and method for planetary gearbox fault diagnosis algorithms based on a large language model. Background Technology

[0002] In the process of industrial intelligence, data-driven planetary gearbox fault diagnosis technology plays a crucial role. Among them, deep learning models, especially convolutional neural networks (CNNs), have become the mainstream technology in this field due to their powerful feature self-learning capabilities.

[0003] However, this current technical approach has significant limitations in the model design stage:

[0004] First, the design of the model architecture is highly dependent on manual labor. The creation of a high-performance diagnostic model, including its network hierarchy, component types, connection methods, and other topological structures, all requires manual construction by experts with deep domain knowledge and practical experience. This process is not only time-consuming and labor-intensive but also highly subjective, often resulting in a suboptimal solution.

[0005] Secondly, automated optimization methods have limitations. To reduce reliance on manual intervention, the industry has attempted to introduce automated algorithms such as Particle Swarm Optimization (PSO). However, the scope of these methods is typically limited to fine-tuning hyperparameters (e.g., adjusting the learning rate, batch size, etc.) on a fixed model architecture, essentially focusing on parameter optimization rather than structural creation. They cannot autonomously explore the possibilities of network topology, thus making it difficult to fundamentally improve the upper limit of model performance.

[0006] Therefore, there is an urgent need in this field for a new paradigm of automated algorithm design that can break free from the constraints of manual design and enable structural innovation. Summary of the Invention

[0007] The purpose of this invention is to provide an automated generation system and method for planetary gearbox fault diagnosis algorithms based on a large language model, enabling full lifecycle generation automation.

[0008] The objective of this invention can be achieved through the following technical solutions:

[0009] An automatic generation system for planetary gearbox fault diagnosis algorithms based on a large language model includes an evolutionary control engine and connected to it a large language model generation module, a dynamic code execution and verification module, an architecture evaluator module, an intelligent evolutionary strategy module, and a program database module. The program database module is also connected to the dynamic code execution and verification module, the architecture evaluator module, and the intelligent evolutionary strategy module, respectively. The large language model generation module is also connected to an algorithm gene library module.

[0010] Large Language Model Generation Module: This module receives prompt words from the program database module, selects parent planetary gearbox fault diagnosis algorithms from the program database module and architectural component knowledge from the algorithm gene library module, and combines these with the characteristics of the planetary gearbox fault diagnosis task to call the large language model to generate new planetary gearbox fault diagnosis algorithms.

[0011] Dynamic code execution and verification module: used to execute and verify the new planetary gearbox fault diagnosis algorithm;

[0012] Architecture evaluator module: used for training and performance evaluation of the new planetary gearbox fault diagnosis algorithm;

[0013] Intelligent Evolutionary Strategy Module: Used to analyze the training history and obtain analysis results;

[0014] Program database module: used to store and manage the population of planetary gearbox fault diagnosis algorithms, and to construct prompt words;

[0015] Evolutionary control engine: Used to coordinate and control the workflow of each module, and control the number of iterations, to realize the evolutionary loop of the planetary gearbox fault diagnosis algorithm, and finally obtain the optimal planetary gearbox fault diagnosis algorithm.

[0016] Furthermore, the evolutionary control engine employs an elite selection strategy to merge all new offspring planetary gearbox fault diagnosis algorithms with the previous generation of parent planetary gearbox fault diagnosis algorithm populations to form a temporary candidate population as a candidate pool. Based on the performance indicators of each algorithm individual in the candidate pool, a unified ranking is performed, and only the top-ranked algorithm individuals are retained as elite algorithms for use in the next iteration of evolution.

[0017] Furthermore, the dynamic code execution and verification module includes an execution and verification unit, an error handling unit, and an intelligent repair unit.

[0018] Execution and Verification Unit: Used to execute and verify the new planetary gearbox fault diagnosis algorithm;

[0019] Error handling unit: Used to automatically capture errors during execution and verification by utilizing error handling mechanisms, including syntax errors, runtime errors, and dimension mismatches;

[0020] Intelligent Repair Unit: Used to automatically correct captured errors by invoking intelligent repair strategies.

[0021] Furthermore, the evaluation metric used in the training and performance evaluation process of the architecture evaluator module is accuracy.

[0022] Furthermore, the intelligent evolution strategy module includes an analysis unit, a calculation and recognition unit, and an evolution strategy generation unit.

[0023] Analysis unit: Used to analyze the dynamic trends of various evaluation indicators in the training history;

[0024] Calculation and identification unit: used to calculate relationship indicators including overfitting degree, convergence speed, and validation stability based on the dynamic change trend, and to identify existing training problems;

[0025] Evolutionary policy generation unit: Used to generate matching evolutionary policies and priorities for each type of training problem.

[0026] Furthermore, the program database module includes a storage unit and a prompt word generation unit.

[0027] Storage unit: Used to store the population of planetary gearbox fault diagnosis algorithms, including the generated planetary gearbox fault diagnosis algorithms, training history, and performance metrics;

[0028] Prompt word generation unit: Used to connect with the algorithm gene library module and the intelligent evolution strategy module, and to dynamically generate comprehensive prompt words based on the parent program prompt words, the architectural component knowledge in the algorithm gene library module and the analysis results obtained by the intelligent evolution strategy module.

[0029] Furthermore, the algorithm gene library module serves as an architecture component library for storing and managing various planetary gearbox fault diagnosis algorithms, including a convolution component sub-library, an attention mechanism sub-library, a recurrent component sub-library, a pooling component sub-library, a residual component sub-library, a regularization component sub-library, a fusion strategy sub-library, and an activation function sub-library. The algorithm gene library module supports random architecture generation, component sampling, and architecture configuration verification. The convolution component sub-library includes 1D convolution components, depthwise separable convolution components, and dilated convolution components. The attention mechanism sub-library includes SE-Block components, CBAM components, and ECA components. The recurrent component sub-library includes LSTM components, GRU components, and bidirectional RNN components.

[0030] Furthermore, it also includes a hyperparameter optimization module, comprising a hyperparameter configuration management unit, a hyperparameter analyzer, and a hyperparameter optimizer.

[0031] Hyperparameter configuration management unit: used to configure various hyperparameters and various hyperparameter optimizers for planetary gearbox fault diagnosis algorithms;

[0032] Hyperparameter analyzer: used to analyze the training performance of the optimal planetary gearbox fault diagnosis algorithm, detect problems with hyperparameters, and further generate structured prompts including the problems with hyperparameters, the performance indicators of the optimal planetary gearbox fault diagnosis algorithm, and hyperparameter configuration. The structured prompts are then submitted to the large language model, which generates a targeted optimization scheme based on the characteristics of the planetary gearbox fault diagnosis task.

[0033] Hyperparameter optimizer: Used to optimize the generated optimization scheme using a hyperparameter optimizer.

[0034] Furthermore, the training history includes the training accuracy, validation accuracy, training loss, validation loss, and overall performance score obtained after training for each epoch.

[0035] This invention also provides an automatic generation method for an automatic generation system based on the planetary gearbox fault diagnosis algorithm based on a large language model, comprising the following steps:

[0036] a. Initialization and seed model construction:

[0037] A seed model is created using a basic neural network architecture as the starting point for evolution. The architecture evaluator module is used for training and performance evaluation to obtain performance evaluation metrics.

[0038] b. Program database module initialization and population construction:

[0039] Initialize the program database module, clear the existing program code in it, create an empty population, and register the seed model into it as the initial program;

[0040] c. Population initialization and variant generation:

[0041] Based on the seed model and algorithm gene library module, a specified number of initial population individuals are generated using a large language model. During the generation process, the large language model generates different algorithm variants based on architectural component knowledge and the characteristics of planetary gearbox fault diagnosis tasks, which serve as the initial population individuals.

[0042] d. Parent selection and program database module sampling:

[0043] The program database module will select all parent programs in the population and extract their complete training history.

[0044] The program database module generates prompts containing multiple parent programs;

[0045] e. Intelligent Evolutionary Strategy Module Analysis and Decision-Making:

[0046] The intelligent evolution strategy module performs in-depth analysis of the training history of the parent program to obtain the dynamic trends of various evaluation indicators. It further calculates the relationship indicators, including overfitting, convergence speed, and validation stability, and identifies existing training problems. It generates corresponding evolution strategies and priorities for each type of training problem, including overfitting, underfitting, gradient vanishing, learning plateau, validation set divergence, learning failure, and training instability.

[0047] f. Dynamic prompt word generation and large language model invocation:

[0048] The integrated program database module provides prompt words, analysis results from the intelligent evolution strategy module, and architectural component knowledge from the algorithm gene library module, dynamically generating comprehensive prompt words;

[0049] Based on the prompt words, a new planetary gearbox fault diagnosis algorithm code is generated by calling a large language model;

[0050] g. Code verification and intelligent repair:

[0051] The new planetary gearbox fault diagnosis algorithm code is subjected to a syntax check. If the syntax check fails, the process returns to step f to regenerate the new planetary gearbox fault diagnosis algorithm code. If the syntax check passes, the code is dynamically executed and verified using the dynamic code execution and verification module. At the same time, the error handling mechanism is used to automatically capture existing errors and call the intelligent repair strategy for automatic correction. If the verification passes, step h is executed. If the verification fails, the process returns to step f to regenerate the new planetary gearbox fault diagnosis algorithm code.

[0052] h. Training and Performance Evaluation:

[0053] The validated new planetary gearbox fault diagnosis algorithm code was instantiated, trained and its performance evaluated on the planetary gearbox dataset, and the training process was recorded for analysis by the intelligent evolutionary strategy module.

[0054] i. Program storage and population update:

[0055] The evaluated program is stored in the program database module, and the population is updated using an elite selection mechanism to form a new population.

[0056] j. Evolutionary Iteration and Termination Control:

[0057] Determine whether the termination condition has been met. If yes, the iterative evolution terminates, and the optimal planetary gearbox fault diagnosis algorithm is finally obtained. If not, return to step d and perform an iterative evolution loop until the termination condition is met.

[0058] k. Intelligent hyperparameter optimization driven by large language models:

[0059] For the optimal planetary gearbox fault diagnosis algorithm, a hyperparameter optimization module is used to analyze its training performance, detect problems with the hyperparameters, and further generate structured prompts including the problems with the hyperparameters, the performance indicators of the optimal planetary gearbox fault diagnosis algorithm, and the hyperparameter configuration. The structured prompts are then submitted to the large language model. The large language model generates a targeted optimization scheme based on the characteristics of the planetary gearbox fault diagnosis task, thus completing the hyperparameter optimization process.

[0060] Final output:

[0061] Output the optimal planetary gearbox fault diagnosis algorithm after hyperparameter optimization.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] (1) The present invention can automatically generate fault diagnosis algorithms through large language models, reducing the workload of manually writing network architecture and realizing the automation of algorithm generation.

[0064] (2) The intelligent evolution strategy module of this invention can analyze the dynamic changes during the model training process. The system does not rely on a single final performance index, but analyzes multiple key indicators throughout the entire training history, calculates the slope of each indicator, identifies rising, falling, or stable trends, and calculates relational indicators such as overfitting degree (difference between training and validation accuracy), convergence speed (rate of change in accuracy), and validation stability (degree of fluctuation in validation indicators). In terms of trend analysis, it can identify specific training problems: overfitting, underfitting, gradient vanishing, validation set divergence, learning failure, training instability, etc. Each type of problem has clear judgment conditions and corresponding improvement strategies, realizing dynamic analysis of the training process. It can automatically provide directional guidance for each iteration, reduce the work of manually analyzing training curves, and improve the effectiveness of each iteration's evolution.

[0065] (3) This invention employs an elite selection mechanism in the program database module. This mechanism first merges all new offspring algorithms with the previous generation of parent algorithms to form a temporary candidate population. The system then ranks all individuals in this candidate pool based on their algorithm performance scores. Only the top-ranked algorithms are retained to form the new generation of parent algorithms, while the bottom-ranked algorithms are eliminated. This survival-of-the-fittest competitive mechanism ensures the stable improvement of the overall performance of the population while also ensuring the retention of excellent algorithms from the previous generation, thus achieving continuous optimization of algorithm performance.

[0066] (4) The algorithm gene library module of this invention stores multiple architecture components, supports random architecture generation based on the component library, and can generate networks of different complexities, providing a variety of technical solutions for fault diagnosis tasks.

[0067] (5) Compared with traditional random mutation, the present invention generates targeted improvement strategies based on training process analysis, which makes the evolution process have a certain directionality, reduces blind search, and provides data support for subsequent evolutionary decisions by saving and utilizing complete training history information, thus realizing intelligent evolution based on historical experience.

[0068] (6) The present invention adopts a modular design, with clear responsibilities for each module, which facilitates maintenance and expansion. Each module can be developed and tested independently. Attached Figure Description

[0069] Figure 1 This is a schematic diagram of the system structure of the present invention;

[0070] Figure 2 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0071] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0072] This embodiment provides an automatic generation system for planetary gearbox fault diagnosis algorithms based on a large language model, such as... Figure 1 As shown, the system features a modular design, comprising eight core modules that work collaboratively to achieve the automatic evolution of the planetary gearbox fault diagnosis algorithm. Details are as follows:

[0073] Evolutionary Control Engine 1: As the core scheduling unit of the system, it is responsible for driving the entire evolutionary cycle. This engine implements the elite selection strategy and manages the generation, evaluation, and updating of the population.

[0074] The system employs a fixed evolutionary strategy: an elite selection strategy merges all new offspring planetary gearbox fault diagnosis algorithms with the previous generation of parent planetary gearbox fault diagnosis algorithms to form a temporary candidate population, serving as a candidate pool. The system ranks all algorithms in this pool based on their performance scores, retaining only the top-ranked algorithms to form the next generation of parent algorithms for use in the next iteration, while the lower-ranked algorithms are eliminated. This survival-of-the-fittest competitive mechanism ensures the overall performance of the population steadily improves while also preserving the best algorithms from the previous generation, achieving continuous optimization of algorithm performance.

[0075] Evolutionary control engine 1 coordinates the workflow of each module, controls the evolutionary generation and termination conditions, and realizes the evolutionary loop of the planetary gearbox fault diagnosis algorithm, ultimately obtaining the optimal planetary gearbox fault diagnosis algorithm.

[0076] Large Language Model Generation Module 2: Responsible for generating new fault diagnosis algorithm code. This module receives structured prompts containing parent code, intelligent analysis results, improvement suggestions, and other information, and calls the large language model to generate new model code. The module incorporates professional knowledge for planetary gearbox fault diagnosis tasks, including one-dimensional convolution processing of time-series signals, multi-scale feature extraction, and fault mode recognition.

[0077] Dynamic Code Execution and Verification Module 3: Executes and verifies code generated by the large language model in a secure environment. This module implements dynamic code compilation, model instantiation, syntax checking, and execution verification functions, mainly including the following:

[0078] Execution and Verification Unit: Used for executing and verifying the new planetary gearbox fault diagnosis algorithm;

[0079] Error handling unit: Used to automatically capture syntax errors, runtime errors, dimension mismatches and other problems during execution and verification by using error handling mechanisms;

[0080] Intelligent Repair Unit: Used to automatically correct captured errors by invoking intelligent repair strategies.

[0081] Architecture evaluator module 4: Responsible for training and performance evaluation of the generated fault diagnosis algorithm. The evaluation process includes model training, performance calculation, and training history.

[0082] Intelligent Evolutionary Strategy Module 5: This module primarily guides evolution based on the architecture analyzed during the training process. It mainly includes the following:

[0083] Analysis Unit: Used to analyze the dynamic trends of four key metrics throughout the training history;

[0084] Calculation and identification unit: used to calculate the relationship indicators such as overfitting degree, convergence speed, and validation stability based on dynamic change trends, and to identify training problems;

[0085] Evolutionary strategy generation unit: used to match the corresponding evolutionary strategy, specific improvement suggestions and priorities for each type of problem.

[0086] Program Database Module 6: This module serves as the core storage and management module for the evolutionary algorithm. It manages the population using the elite selection strategy of the evolutionary control engine 1. This module mainly includes:

[0087] Storage unit: Used to store the population of planetary gearbox fault diagnosis algorithms;

[0088] Prompt word generation unit: Used to dynamically generate comprehensive prompt words based on the prompt words of the parent program, the architectural component knowledge in the algorithm gene library module 7, and the analysis results obtained from the intelligent evolution strategy module 5.

[0089] Algorithm Gene Library Module 7: An architecture component library for storing and managing various algorithm architecture components. This module includes eight component sub-libraries: Convolution component sub-library (1D convolution, depthwise separable convolution, dilated convolution, etc.), Attention mechanism sub-library (SE-Block, CBAM, ECA, etc.), Recurrent component sub-library (LSTM, GRU, bidirectional RNN, etc.), Pooling component sub-library, Residual component sub-library, Regularization component sub-library, Fusion strategy sub-library, and Activation function sub-library. It supports functions such as random architecture generation, component sampling, and architecture configuration verification, providing rich architectural design references for large language models.

[0090] Hyperparameter Optimization Module 8: Primarily based on a large language model, this module enables intelligent hyperparameter tuning, specifically optimized for the evolved best planetary gearbox fault diagnosis algorithm. This module comprises three core parts:

[0091] Hyperparameter configuration management unit: used to configure various hyperparameters and various hyperparameter optimizers for planetary gearbox fault diagnosis algorithms;

[0092] Hyperparameter analyzer: used to analyze the training performance of the best planetary gearbox fault diagnosis algorithm, detect problems with hyperparameters, and further generate structured prompts including hyperparameter problems, performance indicators of the best planetary gearbox fault diagnosis algorithm, and hyperparameter configuration. The structured prompts are then submitted to the large language model, which generates targeted optimization schemes based on the characteristics of the planetary gearbox fault diagnosis task.

[0093] Hyperparameter optimizer: Used to optimize the generated optimization scheme using different hyperparameter optimizers.

[0094] This system has the following functions:

[0095] Intelligent analysis function: The system can automatically analyze the training metrics of the current model and detect various hyperparameter problems, such as excessively high / low learning rate, inappropriate batch size, insufficient / excessive regularization, slow convergence, and unstable training. Based on metrics such as training accuracy, validation accuracy, loss value, and training time, the system generates a detailed performance analysis report.

[0096] LLM-driven optimization: The system constructs structured optimization prompts, including information such as current performance metrics, hyperparameter configurations, and detected problems, and submits them to the large language model. Based on the characteristics of the planetary gearbox fault diagnosis task, LLM generates targeted optimization solutions, which include complete hyperparameter settings (learning rate, batch size, optimizer type, scheduler type, weight decay, Dropout rate, etc.) and optimization rationale.

[0097] Inter-module collaboration relationships:

[0098] Each core module works collaboratively according to a clearly defined data flow and control flow.

[0099] Evolutionary Control Engine 1 acts as the central scheduler, managing the entire evolutionary cycle:

[0100] First, a seed model is created and evaluated. Then, in each generation, a parent individual is selected from the program database module 6, the intelligent evolution strategy module 5 is called to analyze the analysis results of the parent, and the large language model generation module 2 is called to generate new algorithm code based on the analysis results.

[0101] The program database module 6 manages the population using the elite selection strategy of the evolutionary control engine 1. When a new program needs to be generated, the program database module 6 constructs prompt words based on existing programs and provides them to the large language model.

[0102] The Algorithm Gene Library Module 7 provides a wealth of architectural component knowledge for large language models, including design patterns for various components such as convolution, attention, and loops. Large language models can refer to these component libraries when generating new architectures, ensuring that the generated architectures are both reasonable and diverse.

[0103] The generated code undergoes security checks and intelligent repairs by the dynamic code execution and verification module 3 to ensure its correctness. Then, the architecture evaluator module 4 performs training and performance evaluation. The evaluation results are registered in the program database module 6, and a complete training history is saved for analysis by the intelligent evolutionary strategy module 5.

[0104] The entire system manages the population through an elite selection strategy, implements directional evolutionary search through the intelligent evolution strategy module 5, and provides architectural design knowledge support through the algorithm gene library module 7. After the architectural evolution is complete, the hyperparameter optimization module 8 takes over the optimal model, achieving automation from architectural design to hyperparameter tuning through LLM-driven intelligent analysis and optimization.

[0105] Based on the above system structure, such as Figure 2 As shown, the workflow for iterative evolution of this system includes:

[0106] 1) Initialization and Seed Model Construction Phase

[0107] Upon system startup, a basic CNN seed model is first created as the starting point for evolution. The seed model employs a simple one-dimensional convolutional neural network architecture, including convolutional layers, pooling layers, and fully connected layers. The system trains and evaluates the seed model to obtain basic performance metrics that serve as a benchmark for subsequent evolution.

[0108] 2) Program database module initialization and population building phase

[0109] The system initializes the database module 6, clears existing program code in the module, and creates an empty population. The seed model is stored in the population as the initial program.

[0110] 3) Population initialization and variant generation phase

[0111] Based on the seed model and algorithm gene library module 7, the system generates a specified number of initial population individuals through a large language model. Algorithm gene library module 7 provides a rich reference for architectural components, including eight major categories of component libraries such as convolutional components (1D convolution, dilated convolution, etc.), attention mechanisms (SE-Block, CBAM, etc.), and recurrent components (LSTM, GRU, etc.). The large language model generates different network architecture variants based on these component libraries and the characteristics of the planetary gearbox fault diagnosis task, ensuring good diversity in the initial population.

[0112] 4) Parent selection and program database module sampling stage

[0113] An elite selection strategy is employed to manage parent programs. The system first selects all parent programs that have passed the elite selection strategy. Program database module 6 generates structured cue words containing all parent programs for the large language model. The system extracts complete training history data for each parent program, including four key metrics for each epoch: training accuracy, validation accuracy, training loss, and validation loss.

[0114] 5) Intelligent Evolutionary Strategy Module Analysis and Decision-Making Stage

[0115] The intelligent evolution strategy module 5 performs in-depth analysis of the training process of the parent program, calculating the trends of various evaluation metrics, overfitting, convergence speed, validation stability, and other related indicators. Based on these analysis results, the system can identify specific problems: overfitting, underfitting, gradient vanishing, learning plateau, learning failure, and training instability, and match corresponding evolution strategies and priorities for each type of problem.

[0116] 6) Dynamic prompt generation and LLM invocation stage

[0117] The system integrates parent program prompts provided by the program database module 6, analysis results from the intelligent evolution strategy module 5, and component knowledge from the algorithm gene library module 7 to dynamically generate comprehensive prompts. These prompts contain rich information, including parent program code, detected specific problems, suggested improvement strategies, available architectural components, and quantified parameter adjustment suggestions. For example, when a vanishing gradient problem is detected, the prompts, combined with residual component knowledge from the gene library, suggest "adding residual connections to improve gradient flow"; when overfitting is detected, the system references the regularization component library and suggests "adding a Dropout layer with dropout_rate=0.42". The system submits these structured prompts to the large language model to generate improved planetary gearbox fault diagnosis algorithm code.

[0118] 7) Code verification and intelligent repair phase

[0119] The planetary gearbox fault diagnosis algorithm code generated by the large language model first undergoes a syntax check. If it fails the syntax check, the process returns to step 6) to regenerate a new planetary gearbox fault diagnosis algorithm code to ensure the Python code syntax is correct. Then, dynamic execution verification is performed using the dynamic code execution and verification module 3. The code is executed and the model is instantiated in a secure sandbox environment. Errors are automatically captured using an error handling mechanism, and intelligent repair strategies are invoked for automatic correction. If verification passes, the process proceeds to the next step; otherwise, the process returns to step 6) to regenerate a new planetary gearbox fault diagnosis algorithm code.

[0120] 8) Model training and performance evaluation phase

[0121] The validated planetary gearbox fault diagnosis algorithm code was instantiated as a model and trained and evaluated on the planetary gearbox dataset. During training, metrics such as training accuracy, validation accuracy, training loss, and validation loss were recorded for each epoch. After training, the system calculated a comprehensive score and saved the complete training history to the global training results storage for analysis by the intelligent evolutionary strategy module 5.

[0122] 9) Program registration and population renewal phase

[0123] The evaluated program is stored in program database module 6. Evolutionary control engine 1 uses an elite selection strategy to update the population, achieving a steady improvement in the performance of the population algorithm.

[0124] 10) Evolutionary Iteration and Termination Control Phase

[0125] The system repeats a cyclical process of sampling, intelligent analysis, code generation, evaluation, and registration within the database module 6. The system continues to evolve until it reaches the preset maximum number of generations.

[0126] 11) LLM-driven intelligent hyperparameter optimization stage

[0127] After the architecture evolution is complete, the system initiates the hyperparameter optimization module 8 to fine-tune the optimal planetary gearbox fault diagnosis algorithm. The hyperparameter analyzer first analyzes the training performance of the optimal planetary gearbox fault diagnosis algorithm, detecting issues related to learning rate, batch size, and regularization. The system generates structured prompts containing current performance metrics, hyperparameter configurations, and detection questions, and submits them to the large language model.

[0128] LLM generates targeted optimization schemes based on the characteristics of planetary gearbox fault diagnosis tasks (time-series signal classification, dataset characteristics, etc.). Each scheme includes complete hyperparameter settings and detailed optimization rationale.

[0129] The system automatically evaluates the actual performance of the optimized configuration and selects the configuration with the highest accuracy as the final hyperparameter. The optimization process maintains historical records, tracks the best-performing configuration, and supports multiple rounds of iterative optimization.

[0130] 12) Final Result Output Stage

[0131] After the evolution and optimization process is complete, the system outputs the best fault diagnosis algorithm after architectural evolution and hyperparameter optimization. It also generates a detailed evolution result report and a best algorithm performance evaluation report. The final algorithm can effectively handle fault diagnosis tasks on the dataset.

[0132] The application and breakthroughs of the large language model generation module 2 in planetary gearbox fault diagnosis in this system are as follows:

[0133] ① Innovative models generated by algorithms

[0134] The Large Language Model Generation Module 2 adopts an innovative algorithm-based generation model, directly generating complete program code instead of the traditional configuration dictionary. The system uses the Alibaba Cloud DashScope API interface, guiding the Large Language Model to generate executable nn.Module class definitions through structured prompts. These definitions include complete network layer definitions, forward propagation functions, parameter initialization, and other core components.

[0135] ②Architecture Analysis and Intelligent Generation

[0136] The system possesses intelligent architecture analysis capabilities, enabling it to analyze key features of the parent architecture: network type, backbone network structure, layer count, channel number variations, identification of special components (attention mechanisms, Transformer, LSTM, etc.), activation function type, classifier depth, etc. Based on these analysis results, the large language model can understand the architecture's design patterns and generate new architecture code with targeted improvements.

[0137] ③ Planetary gearbox fault diagnosis task adaptation

[0138] The large language model is specifically optimized for the characteristics of planetary gearbox fault diagnosis datasets, generating a network architecture suitable for time-series signal processing. The system understands the task characteristics such as input signal length, classification output requirements, and time-series feature extraction needs, generating specialized code that includes adaptive components such as one-dimensional convolution, temporal pooling, and multi-scale feature extraction.

[0139] ④ Code generation quality assurance

[0140] Syntax validation: The system performs Python syntax checks on the generated code to ensure that the code structure is correct.

[0141] Execution verification: The generated code is dynamically executed in a secure sandbox environment to verify that the model class can be correctly instantiated.

[0142] Dimension compatibility check: Verify that the generated model can handle the specified input dimensions.

[0143] Output dimension validation: Ensure that the model output dimension matches the requirements of the classification task.

[0144] The actual functions and innovations of the architecture evaluator module 4 in this system:

[0145] ① Model instance evaluation mechanism

[0146] The architecture evaluator module 4 uses direct model instance evaluation, receiving pre-built model instances for training and testing. The system automatically detects available devices (CUDA / CPU), moves the model to the appropriate device, and counts the number of model parameters (total parameters and trainable parameters), providing basic information for performance analysis.

[0147] ② Global training result storage system

[0148] The system establishes a global training result storage mechanism to provide data support for the intelligent evolution strategy module 5. The complete training history of each model (including training accuracy, validation accuracy, training loss, and validation loss for each epoch) is saved to support subsequent trend analysis and problem diagnosis.

[0149] ③Integrated hyperparameter optimization function

[0150] The architecture evaluator module 4 integrates a global hyperparameter optimizer, which can track and update the best model information. When a better-performing model is found, the system automatically updates the best model record, providing basic data for subsequent hyperparameter optimization stages.

[0151] ④ Exception handling and error recovery

[0152] The system implements a robust exception handling mechanism. When errors occur during model training or evaluation, it returns a default low-performance result (accuracy 0.0, training time 3600 seconds) to ensure the continuity of the evolutionary process. Detailed error information is also recorded to facilitate problem diagnosis and system improvement.

[0153] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0154] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A large language model-based planetary gearbox fault diagnosis algorithm automatic generation system, characterized in that, The system comprises an evolution control engine (1), a large language model generation module (2) connected with the evolution control engine (1), a dynamic code execution and verification module (3), an architecture evaluator module (4), an intelligent evolution strategy module (5), and a program database module (6). The program database module (6) is also connected with the dynamic code execution and verification module (3), the architecture evaluator module (4), and the intelligent evolution strategy module (5), respectively. The large language model generation module (2) is also connected with an algorithm gene library module (7), The large language model generation module (2) is used to receive prompt words constructed by the program database module (6), select a parent planetary gearbox fault diagnosis algorithm in the program database module (6) and architecture component knowledge in the algorithm gene library module (7), and combine the characteristics of the planetary gearbox fault diagnosis task to call the large language model to generate a new planetary gearbox fault diagnosis algorithm. The dynamic code execution and verification module (3) is used to execute and verify the new planetary gearbox fault diagnosis algorithm. The architecture evaluator module (4) is used to train and evaluate the performance of the new planetary gearbox fault diagnosis algorithm. The intelligent evolution strategy module (5) is used to analyze the training history and obtain an analysis result. The intelligent evolution strategy module (5) comprises an analysis unit, a calculation and identification unit, and an evolution strategy generation unit. The analysis unit is used to analyze the dynamic change trend of each evaluation index in the training history. The calculation and identification unit is used to calculate relationship indexes including overfitting degree, convergence speed, and verification stability according to the dynamic change trend, and identify existing training problems. The evolution strategy generation unit is used to generate a matching evolution strategy and priority for each type of training problem. The program database module (6) is used to store and manage the population of planetary gearbox fault diagnosis algorithms and construct prompt words. The evolution control engine (1) is used to coordinate and control the workflow of each module, control the number of iterations, realize the evolution cycle of the planetary gearbox fault diagnosis algorithm, and finally obtain the best planetary gearbox fault diagnosis algorithm.

2. The large language model-based planetary gearbox fault diagnosis algorithm automatic generation system according to claim 1, characterized in that, The evolution control engine (1) adopts an elite selection strategy to combine all new child planetary gearbox fault diagnosis algorithms with the parent planetary gearbox fault diagnosis algorithm population of the previous generation, form a temporary selection population, use the temporary selection population as a candidate pool, uniformly rank each algorithm individual in the candidate pool according to the performance index, and only keep the algorithm individuals with high rankings as elite algorithms for use in the next iteration.

3. The large language model-based planetary gearbox fault diagnosis algorithm automatic generation system according to claim 1, characterized in that, The dynamic code execution and verification module (3) comprises an execution and verification unit, an error handling unit, and an intelligent repair unit. The execution and verification unit is used to execute and verify the new planetary gearbox fault diagnosis algorithm. The error handling unit is used to automatically capture existing errors, including syntax errors, runtime errors, and dimension mismatches, by using an error handling mechanism during the execution and verification process. The intelligent repair unit is used to automatically correct the captured errors by calling an intelligent repair strategy.

4. The large language model-based planetary gearbox fault diagnosis algorithm automatic generation system according to claim 1, characterized in that, The architecture evaluator module (4) uses accuracy as an evaluation index during the training and performance evaluation process.

5. The large language model-based planetary gearbox fault diagnosis algorithm automatic generation system according to claim 1, characterized in that, The program database module (6) comprises a storage unit, a prompt word generation unit, The storage unit is used for storing the population of the planetary gearbox fault diagnosis algorithm, including the generated planetary gearbox fault diagnosis algorithm, the training history and the performance index; The prompt word generation unit is connected with the algorithm gene library module (7) and the intelligent evolution strategy module (5), and is used for dynamically generating a comprehensive prompt word according to the parent program prompt word, the architecture component knowledge in the algorithm gene library module (7) and the analysis result obtained by the intelligent evolution strategy module (5).

6. The large language model-based planetary gearbox fault diagnosis algorithm automatic generation system according to claim 1, characterized in that, The algorithm gene library module (7) is used for storing and managing various architecture components of the planetary gearbox fault diagnosis algorithm, and comprises a convolution component sub-library, an attention mechanism sub-library, a cycle component sub-library, a pooling component sub-library, a residual component sub-library, a regularization component sub-library, a fusion strategy sub-library and an activation function sub-library. The algorithm gene library module (7) supports random architecture generation, component sampling and architecture configuration verification. The convolution component sub-library comprises a 1D convolution component, a deep separable convolution component and a hollow convolution component. The attention mechanism sub-library comprises an SE-Block component, a CBAM component and an ECA component. The cycle component sub-library comprises an LSTM component, a GRU component and a bidirectional RNN component.

7. The large language model-based planetary gearbox fault diagnosis algorithm automatic generation system according to claim 1, characterized in that, The super parameter optimization module (8) further comprises a super parameter configuration management unit, a super parameter analyzer and a super parameter optimizer, The super parameter configuration management unit is used for configuring various super parameters and various super parameter optimizers for the planetary gearbox fault diagnosis algorithm; The super parameter analyzer is used for analyzing the training performance of the best planetary gearbox fault diagnosis algorithm, detecting problems existing in the super parameters, further generating a structured prompt word comprising the problems existing in the super parameters, the performance index of the best planetary gearbox fault diagnosis algorithm and the super parameter configuration, and submitting the structured prompt word to a large language model. The large language model generates a targeted optimization scheme according to the characteristics of the planetary gearbox fault diagnosis task; The super parameter optimizer is used for optimizing the generated optimization scheme by using the super parameter optimizer.

8. The large language model-based planetary gearbox fault diagnosis algorithm automatic generation system according to claim 1, characterized in that, The training history comprises the training accuracy, the verification accuracy, the training loss, the verification loss and the comprehensive performance score obtained after the training is completed.

9. The automatic generation method of the large language model-based planetary gearbox fault diagnosis algorithm automatic generation system according to any one of claims 1-8, characterized in that, The method comprises the following steps: a. Initialization and seed model construction: A seed model is created by using a basic neural network architecture as an evolution starting point. The architecture evaluator module (4) is used for training and performance evaluation to obtain a performance evaluation index; b. Initialization of the program database module (6) and population construction: The program database module (6) is initialized, the existing program codes in the program database module (6) are emptied, an empty population is created, and the seed model is registered in the program database module (6) as an initial program; c. Population initialization and variant generation: Based on the seed model and the algorithm gene library module (7), a large language model is used to generate a specified number of initial population individuals. In the generation process, the large language model generates different algorithm variants as the initial population individuals according to the architecture component knowledge and the characteristics of the planetary gearbox fault diagnosis task. d. Parent selection and program database module (6) sampling: The program database module (6) selects all parent programs in the selection population and extracts the complete training history of the parent programs; The program database module (6) generates a prompt word containing multiple parent programs; e. Intelligent evolution strategy module (5) analysis and decision: The intelligent evolution strategy module (5) deeply analyzes the training history of the parent programs, obtains the dynamic trend of each evaluation index, further calculates the relationship index including overfitting degree, convergence speed, validation stability, and identifies the existing training problems, generates the corresponding evolution strategy and priority for each type of training problem, including overfitting, underfitting, gradient disappearance, learning platform period, validation set divergence, learning failure, and training instability; f. Dynamic prompt word generation and large language model calling: Integrate the prompt word provided by the program database module (6), the analysis results of the intelligent evolution strategy module (5), and the architecture component knowledge in the algorithm gene library module (7) to dynamically generate a comprehensive prompt word; Based on the prompt word, call the large language model to generate a new planetary gearbox fault diagnosis algorithm code; g. Code verification and intelligent repair: Perform syntax checking on the new planetary gearbox fault diagnosis algorithm code. If the syntax checking fails, return to step f to generate a new planetary gearbox fault diagnosis algorithm code. If the syntax checking passes, perform dynamic execution and verification of the code using the dynamic code execution and verification module (3), automatically capture existing errors using the error handling mechanism, and call the intelligent repair strategy for automatic correction. If the verification passes, execute step h. If the verification fails, return to step f to generate a new planetary gearbox fault diagnosis algorithm code; h. Training and performance evaluation: Instance the new planetary gearbox fault diagnosis algorithm code that passes the verification, train and evaluate the performance on the planetary gearbox dataset, and record the training process for analysis by the intelligent evolution strategy module (5); i. Program storage and population update: Store the performance evaluated program in the program database module (6) and update the population using the elite selection mechanism to form a new population; j. Evolution iteration and termination control: Determine whether the termination condition is reached. If yes, the iteration evolution terminates and the best planetary gearbox fault diagnosis algorithm is obtained. If no, return to step d for evolution iteration loop until the termination condition is reached; k. Large language model driven super parameter intelligent optimization: For the best planetary gearbox fault diagnosis algorithm, use the super parameter optimization module (8) to analyze its training performance, detect problems with the super parameters, further generate a structured prompt word including the problems with the super parameters, the performance indicators of the best planetary gearbox fault diagnosis algorithm, and the super parameter configuration, and submit the structured prompt word to the large language model. The large language model generates a targeted optimization scheme based on the characteristics of the planetary gearbox fault diagnosis task to complete the optimization process of the super parameters; Final result output: Output the best planetary gearbox fault diagnosis algorithm after super parameter optimization.

Citation Information

Patent Citations

  • Path planning heuristic function generation platform and method based on large language model and evolutionary computation collaborative optimization

    CN120335780A

  • Methods and systems for the automated generation of neural network architectures

    WO2025166046A1