Software full life cycle intelligent collaborative optimization method and system based on large model

By constructing a large-scale model for intelligent collaborative optimization throughout the software lifecycle, the problem of LLM performance degradation caused by data fragmentation in development, testing, and production environments has been solved. This has resulted in improved fault prediction accuracy and shortened P0-level defect repair cycles, while reducing the time cost and operational errors associated with cross-team collaboration.

CN120929117APending Publication Date: 2025-11-11SHANDONG INSPUR SCI RES INST CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511007520.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing technologies for large language models suffer from performance degradation due to data fragmentation in development, testing, and production environments, as well as issues related to time costs and operational errors in cross-team collaborative work.

Method used

By constructing an intelligent collaborative optimization method for the entire software lifecycle based on a large model, we utilize the gRPC interface to call the large language model to generate code, combine the JUnit framework to generate test cases, integrate the Prometheus monitoring tool for fault detection, build a structured data lake through Elasticsearch and Neo4j, dynamically optimize LoRA fine-tuning, and deploy the Drools rule engine to achieve cross-module collaboration.

Benefits of technology

It effectively solves the performance degradation problem of LLM models, improves the accuracy of fault prediction, shortens the repair cycle of P0 level defects, and reduces the time cost and operational errors of cross-team collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929117A_ABST
    Figure CN120929117A_ABST
Patent Text Reader

Abstract

The invention discloses a software full-life-cycle intelligent collaborative optimization method and system based on a large model, belongs to the technical field of artificial intelligence and DevOps crossing, and aims to solve the technical problem of how to eliminate LLM model performance degradation caused by development, test and production environment data splitting. According to the technical scheme, the method comprises the steps that a large language model is called through a gRPC interface to generate a program code, and a requirement specification with a version mark is obtained; calling a large language model to generate a boundary value test case based on an extension plug-in of a JUnit framework, and obtaining a defect report with a severity label; an anomaly detector integrated with a Prometheus monitoring tool calls a large language model to predict a container fault, and obtains a resource utilization rate time sequence report; and constructing a structured data lake: storing development, test and operation and maintenance data by using Elasticsearch, and establishing space-time association among developers, test cases and container instances through a Neo4j graph database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence and DevOps interdisciplinary technology, specifically to a method and system for intelligent collaborative optimization of the entire software lifecycle based on a large model. Background Technology

[0002] In current software engineering practices, the application of large language models faces two key technical bottlenecks:

[0003] First, there is the problem of model degradation. Due to the discrepancy between the training data and the production environment, actual test data from a securities trading system showed that the accuracy of LLM fault prediction dropped from 82% to 67% within 30 days, with a deviation rate exceeding 37%.

[0004] Second, there's the issue of collaboration efficiency. The average time for a work order to be processed across development, testing, and operations teams is 6.2 hours.

[0005] Therefore, how to eliminate the performance degradation of LLM models caused by the fragmentation of data in development, testing, and production environments, and reduce the time cost and operational errors of cross-team collaboration, is a technical problem that urgently needs to be solved. Summary of the Invention

[0006] The technical objective of this invention is to provide a software lifecycle intelligent collaborative optimization method and system based on a large model to address how to eliminate the performance degradation of the LLM model caused by data fragmentation in development, testing, and production environments, and reduce the time cost and operational errors in cross-team collaboration.

[0007] The technical objective of this invention is achieved as follows: a software lifecycle intelligent collaborative optimization method based on a large model, the specific method of which is as follows:

[0008] Intelligent development: Generate program code by calling the large language model through the gRPC interface and obtain the requirements specification document with version tags;

[0009] Intelligent Testing: An extension plugin based on the JUnit framework calls a large language model to generate boundary value test cases and obtain defect reports with severity labels;

[0010] Intelligent O&M: The anomaly detector integrated with the Prometheus monitoring tool calls a large language model to predict container failures and obtains time-series reports on resource utilization;

[0011] Building a structured data lake: Use Elasticsearch to store development, testing, and operations data, and use Neo4j graph database to establish spatiotemporal relationships between developers, test cases, and container instances, thereby building a structured data lake;

[0012] Dynamic optimization: Based on the Apache Flink stream processing platform, LoRA fine-tuning of the large language model is initiated when the number of code submissions exceeds 500 lines / day or the error rate increases by more than 15%.

[0013] Rule Collaboration: Deploy the Drools rule engine to execute preset priority matrix operations, automatically triggering collaborative actions from development, testing, and operations modules.

[0014] As a preferred option, dynamic optimization is as follows:

[0015] Real-time monitoring data is written to the Kafka message queue;

[0016] When the triggering conditions of code commit volume > 500 lines / day or error rate increase > 15% are met, extract the most recent 24-hour dataset from the structured data lake;

[0017] Initiate the LoRA fine-tuning task for the large language model;

[0018] When the F1 score of the large language model improves by more than 5% after verification and fine-tuning, update the large language model server endpoint in the production environment.

[0019] As a preferred option, the real-time table of the priority matrix includes event type, development response, test response, and operation and maintenance response; the event type includes payment module P0 defect event, CPU continuous >90% event, and database deadlock event;

[0020] Specifically, for the P0 defect event of the payment module, the development S-level work order allocation and patch package generation are triggered, the core path regression test case generation is performed, and the operation and maintenance circuit breaker mechanism is activated and traffic scheduling is implemented.

[0021] In response to events where CPU usage consistently exceeds 90%, the following actions are taken: development thread pool parameter optimization, addition of stress test scenarios, and automatic scaling of Pod instances for operations and maintenance.

[0022] In response to database deadlock events, the system prompts SQL rewriting suggestions for developers, tests concurrent deadlock detection, and implements query rate limiting and master-slave failover for operations and maintenance.

[0023] More specifically, extracting the most recent 24-hour dataset from the structured data lake involves extracting code snippets, test results, and CPU performance metrics from the operations and maintenance database, and only returning records with timestamps greater than the current time within a 24-hour interval. This is used to obtain the code snippets, corresponding test results, and CPU performance metrics data recorded in the past 24 hours.

[0024] More specifically, the LoRA fine-tuning task for a large language model is initiated as follows:

[0025] Import LoRA configuration and PEFT model tools: Import LoraConfig and get_peft_model from the peft library; LoraConfig is used to configure LoRA parameters; get_peft_model is used to adapt LoRA to the base model;

[0026] Define LoRA configuration: Create a LoRA configuration object and specify the parameters for fine-tuning, as follows:

[0027] r = 8: The rank of the LoRA attention matrix controls the compression ratio of trainable parameters; the smaller the compression ratio, the fewer parameters there are.

[0028] lora_alpha = 16: Scaling factor, used to adjust the impact of LoRA weights on the original model (similar to the role of learning rate);

[0029] Adapting LoRA to the base model: Applying the LoRA configuration to the pre-trained large language model llm_model generates a new model model that supports LoRA fine-tuning, as follows:

[0030] llm_model: A pre-trained large model to be fine-tuned (such as LLaMA, GPT-NeoX, etc.);

[0031] Output: Returns a wrapped model with only a small number of LoRA-related parameters trained, instead of all model parameters;

[0032] Training the model: Fine-tune the LoRA-adapted model using the training dataset training_dataset.

[0033] A software lifecycle intelligent collaborative optimization system based on a large model includes a development agent, a testing agent, an operations agent, and an intelligent hub module. The intelligent hub module sends Drools rule execution to the development agent, testing agent, and operations agent, respectively. The development agent feeds back the requirement rule book with version tags to the intelligent hub module. The testing agent feeds back the defect report with severity tags to the intelligent hub module. The operations agent feeds back the resource utilization time series report to the intelligent hub module.

[0034] Among them, the development agent is used to call the large language model LLM through the gRPC interface to generate Python or Java program code and obtain the requirements specification with Git commit ID;

[0035] The test agent is used by an extension plugin based on the JUnit framework to call a large language model to generate boundary value test cases and obtain defect reports containing stack signatures.

[0036] The operations and maintenance intelligence agent is used to integrate the anomaly detector of the Prometheus monitoring tool to monitor Kubernetes containers, and calls the large language model to predict container failures and obtain resource utilization time-series reports.

[0037] As a preferred embodiment, the intelligent central module includes:

[0038] A structured data lake is used to store development, testing, and operations data through Elasticsearch, and to establish spatiotemporal relationships between developers, test cases, and container instances through the Neo4j graph database, and to create code paths in Elasticsearch; where the code path is a spatiotemporal index of line number + timestamp;

[0039] A dynamic optimization engine for initiating LoRA fine-tuning of large language models based on the Apache Flink stream processing platform when the number of code submissions exceeds 500 lines / day or the error rate rises by more than 15%.

[0040] The rule collaboration gateway is used by the Drools rule engine to execute preset priority matrix operations and automatically trigger collaborative actions of development, testing, and operations modules.

[0041] The priority matrix's real-time table includes event types, development responses, test responses, and operation and maintenance responses; event types include payment module P0 defect events, CPU usage consistently >90% events, and database deadlock events.

[0042] Specifically, for the P0 defect event of the payment module, the development S-level work order allocation and patch package generation are triggered, the core path regression test case generation is performed, and the operation and maintenance circuit breaker mechanism is activated and traffic scheduling is implemented.

[0043] In response to events where CPU usage consistently exceeds 90%, the following actions are taken: development thread pool parameter optimization, addition of stress test scenarios, and automatic scaling of Pod instances for operations and maintenance.

[0044] In response to database deadlock events, the system prompts SQL rewriting suggestions for developers, tests concurrent deadlock detection, and implements query rate limiting and master-slave failover for operations and maintenance.

[0045] More specifically, the dynamic optimization engine works as follows:

[0046] (1) Real-time monitoring data is written to the Kafka message queue;

[0047] (2) When the triggering conditions of code submission volume > 500 lines / day or error rate increase > 15% are met, the data set of the most recent 24 hours is extracted from the structured data lake. Specifically, code snippets, test results and CPU performance indicators are extracted from the operation and maintenance database. Only records with timestamps greater than the current time prison 24-hour interval are returned, which are used to obtain the code snippets, corresponding test results and CPU performance indicator data recorded in the past 24 hours.

[0048] (3) Initiate the LoRA fine-tuning task for the large language model; details are as follows:

[0049] ① Import LoRA configuration and PEFT model tools: Import LoraConfig and get_peft_model from the peft library; LoraConfig is used to configure LoRA parameters; get_peft_model is used to adapt LoRA to the base model;

[0050] ② Define LoRA configuration: Create a LoRA configuration object to specify the parameters for fine-tuning, as follows:

[0051] r = 8: The rank of the LoRA attention matrix controls the compression ratio of trainable parameters; the smaller the compression ratio, the fewer parameters there are.

[0052] lora_alpha = 16: Scaling factor, used to adjust the impact of LoRA weights on the original model (similar to the role of learning rate);

[0053] ③ Adapt LoRA to the base model: Apply the LoRA configuration to the pre-trained large language model llm_model to generate a new model model that supports LoRA fine-tuning, as follows:

[0054] llm_model: A pre-trained large model to be fine-tuned (such as LLaMA, GPT-NeoX, etc.);

[0055] Output: Returns a wrapped model with only a small number of LoRA-related parameters trained, instead of all model parameters;

[0056] ④ Train the model: Fine-tune the LoRA-adapted model using the training dataset training_dataset;

[0057] (4) When the F1 value of the large language model improves by more than 5% after verification, update the large language model server endpoint in the production environment.

[0058] An electronic device includes: a memory and at least one processor;

[0059] The memory contains computer programs;

[0060] The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the software lifecycle intelligent collaborative optimization method based on the large model as described above.

[0061] A computer-readable storage medium storing a computer program that can be executed by a processor to implement the above-described intelligent collaborative optimization method for the entire software lifecycle based on a large model.

[0062] The intelligent collaborative optimization method and system for the entire software lifecycle based on a large model, as described in this invention, has the following advantages:

[0063] (I) This invention establishes a spatiotemporal knowledge graph of code-test-operation data, triggers incremental training of LLM based on production environment events, and automatically executes cross-module emergency collaboration rules, effectively solving the model degradation problem caused by data fragmentation in LLM in software engineering, improving the fault prediction accuracy by 31.2%, and shortening the P0 level defect repair cycle by 85.4%.

[0064] (ii) This invention eliminates the performance degradation of LLM models caused by the fragmentation of data in development, testing and production environments, and reduces the time cost and operational errors of cross-team manual collaboration.

[0065] (III) Implementation and verification of the present invention in a securities trading system:

[0066] ① The dynamic optimization engine improved the fault prediction accuracy from 67% to 85.3%;

[0067] ② The rule-based collaborative gateway reduces the P0 defect repair time from 6 hours to 52 minutes;

[0068] ③ Achieve precise correlation between development defects and production failures through spatiotemporal indexing;

[0069] (iv) The development agent of this invention realizes LLM-driven code generation and requirement specification output through the gRPC interface; the testing agent generates boundary value test cases based on the JUnit extension framework; the operation and maintenance agent integrates Prometheus to realize container fault prediction; the intelligent central module establishes a spatiotemporal knowledge graph through Elasticsearch+Neo4j, uses Apache Flink to monitor and trigger LoRA fine-tuning in real time (started when the code volume is >500 lines / day or the error rate is ↑>15%), and deploys the Drools rule engine to execute cross-module priority matrix collaboration, realizing the closed-loop flow and intelligent response of development-testing-operation and maintenance data;

[0070] (V) This invention constructs a spatiotemporally correlated data lake architecture, which automatically triggers LLM incremental training through production environment events to solve the model degradation problem; at the same time, it designs a rule collaboration gateway to realize minute-level automatic response to three typical events (payment failure / CPU overload / database deadlock), eliminates the delay of manual approval, and compresses the P0 defect repair cycle from 6 hours to 52 minutes.

[0071] (vi) The version marking mechanism of the development agent gRPC interface, the JUnit boundary value test plugin architecture of the test agent, and the Prometheus integration scheme of the operation and maintenance agent of the present invention; the spatiotemporal knowledge graph construction method (Elasticsearch index + Neo4j association) for special protection of the intelligent hub, the LoRA fine-tuning trigger logic of the dynamic optimization engine (Flink monitoring 500 rows / day or 15% error rate threshold) and the priority matrix design of the rule collaboration gateway (payment P0 defect triggers S-level work order + circuit breaker mechanism, CPU>90% triggers thread pool optimization + Pod expansion, database deadlock triggers SQL rewriting + master-slave switching three-module linkage strategy);

[0072] (vii) This invention is applied to intelligent DevOps platforms. Through dynamic optimization engines, the accuracy of fault prediction is improved by 31.2%, significantly reducing business losses caused by production accidents. The rule-based collaborative gateway improves the efficiency of major defect repair by 85.4%, significantly enhancing system reliability. The spatiotemporal knowledge graph enables precise correlation between development defects and production failures, shortening the root cause location time by more than 75%. Ultimately, it forms a technical barrier, creating annualized tens of millions of yuan in operation and maintenance cost savings in high-availability scenarios such as finance and cloud computing. Attached Figure Description

[0073] The invention will be further described below with reference to the accompanying drawings.

[0074] Appendix Figure 1 This is a schematic diagram of the structure of a software lifecycle intelligent collaborative optimization system based on a large model;

[0075] Appendix Figure 2A data closed-loop flowchart;

[0076] Appendix Figure 3 This is a schematic diagram of the implementation table for the rule-based collaborative gateway. Detailed Implementation

[0077] The following detailed description of the intelligent collaborative optimization method and system for the entire software lifecycle based on a large model, with reference to the accompanying drawings and specific embodiments, is provided in the specification.

[0078] Example 1:

[0079] This embodiment provides a software lifecycle intelligent collaborative optimization method based on a large model, as detailed below:

[0080] S1. Intelligent Development: Generate program code by calling the large language model through the gRPC interface and obtain the requirement specification document with version marking;

[0081] S2, Intelligent Testing: Based on the JUnit framework, an extension plugin calls a large language model to generate boundary value test cases and obtain defect reports with severity labels;

[0082] S3, Intelligent Operation and Maintenance: The anomaly detector integrated with the Prometheus monitoring tool calls a large language model to predict container failures and obtains time-series reports on resource utilization.

[0083] S4. Building a structured data lake: Use Elasticsearch to store development, testing, and operation data, and use Neo4j graph database to establish spatiotemporal relationships between developers, test cases, and container instances, thereby building a structured data lake;

[0084] S5. Dynamic Optimization: Based on the Apache Flink stream processing platform, LoRA fine-tuning of the large language model is initiated when the number of code submissions exceeds 500 lines / day or the error rate increases by more than 15%.

[0085] S6. Rule Collaboration: Deploy the Drools rule engine to execute preset priority matrix operations, automatically triggering collaborative actions of development, testing, and operations modules.

[0086] As attached Figure 2 As shown, the dynamic optimization in step S5 of this embodiment is as follows:

[0087] S501: Real-time monitoring data is written to the Kafka message queue;

[0088] S502. When the triggering conditions of code submission volume > 500 lines / day or error rate increase > 15% are met, extract the dataset of the most recent 24 hours from the structured data lake.

[0089] S503, Initiate the LoRA fine-tuning task for the large language model;

[0090] S504. When the F1 score of the large language model improves by more than 5% after verification and fine-tuning, update the large language model server endpoint in the production environment.

[0091] As attached Figure 3 As shown, the real-time table of the priority matrix in step S6 of this embodiment includes event types, development responses, test responses, and operation and maintenance responses; the event types include payment module P0 defect events, CPU continuous >90% events, and database deadlock events;

[0092] Specifically, for the P0 defect event of the payment module, the development S-level work order allocation and patch package generation are triggered, the core path regression test case generation is performed, and the operation and maintenance circuit breaker mechanism is activated and traffic scheduling is implemented.

[0093] In response to events where CPU usage consistently exceeds 90%, the following actions are taken: development thread pool parameter optimization, addition of stress test scenarios, and automatic scaling of Pod instances for operations and maintenance.

[0094] In response to database deadlock events, the system prompts SQL rewriting suggestions for developers, tests concurrent deadlock detection, and implements query rate limiting and master-slave failover for operations and maintenance.

[0095] In this embodiment, step S502, extracting the most recent 24-hour dataset from the structured data lake, specifically involves: extracting code snippets, test results, and CPU performance metrics from the operations and maintenance database, and returning only records whose timestamps are greater than the current time interval of 24 hours. This data is used to obtain the code snippets, corresponding test results, and CPU performance metrics recorded in the past 24 hours. The key code is as follows:

[0096] In this embodiment, step S503, which involves initiating the LoRA fine-tuning task of the large language model, is as follows:

[0097] S50301, Import LoRA Configuration and PEFT Model Tools: Import LoraConfig and get_peft_model from the peft library; LoraConfig is used to configure LoRA parameters; get_peft_model is used to adapt LoRA to the base model;

[0098] S50302. Define LoRA configuration: Create a LoRA configuration object and specify the parameters for fine-tuning, as follows:

[0099] ①r=8: The rank of the LoRA attention matrix controls the compression ratio of trainable parameters; the smaller the compression ratio, the fewer parameters there are.

[0100] ②lora_alpha=16: Scaling factor, used to adjust the impact of LoRA weights on the original model (similar to the role of learning rate);

[0101] S50303. Adapting LoRA to the base model: Applying the LoRA configuration to the pre-trained large language model llm_model generates a new model model that supports LoRA fine-tuning, as detailed below:

[0102] ①llm_model: A pre-trained large model to be fine-tuned (such as LLaMA, GPT-NeoX, etc.);

[0103] ② Output: Returns a wrapped model, with only a small number of LoRA-related parameters trained, rather than all model parameters;

[0104] S50304. Training the model: Fine-tune the LoRA-adapted model using the training dataset training_dataset.

[0105] The dynamic optimization process in this embodiment is as follows:

[0106] ① The Flink stream processing engine detected that the trigger condition was met.

[0107] ②Execute the data extraction SQL:

[0108] SELECT code_snippet,test_result,cpu_metric

[0109] FROM devops_data_lake

[0110] WHERE timestamp>NOW()-INTERVAL'24hours';

[0111] ③ Initiate the LoRA fine-tuning task:

[0112] from peft import LoraConfig,get_peft_model

[0113] config=LoraConfig(r=8, lora_alpha=16)

[0114] model=get_peft_model(llm_model,config)

[0115] model.train(training_dataset);

[0116] ④ After the F1 value of the validation set is increased from 0.71 to 0.79, update the endpoints of the production environment model.

[0117] In this embodiment, the rule-coordinated end-to-end tracking is specifically as follows:

[0118] A payment interface timeout event (P0 level) occurred in the core financial system:

[0119] ① At 08:00:00, the test module detects defects and marks their severity;

[0120] ②08:00:200 The rule gateway triggers three actions:

[0121] Development: Automatically create S-level work orders, with an optimization scheme for the thread pool generated by LLM;

[0122] Testing: Generate a regression test package for the core payment chain and bind it to a Git commit ID;

[0123] Operations and maintenance: Enforce CPU quota limits for non-paying Pods;

[0124] ③ At 08:30:00, the development team submitted an optimization patch (Commit ID: x7fd);

[0125] ④08:31:00 The gateway automatically associates the patch with the regression test package;

[0126] ⑤09:15:00 Regression test passed, triggering automatic deployment;

[0127] ⑥ At 09:20:00, production monitoring showed a 92% reduction in latency.

[0128] Example 2:

[0129] As attached Figure 1 As shown, this embodiment provides a software lifecycle intelligent collaborative optimization system based on a large model. The system includes a development agent, a testing agent, an operations agent, and an intelligent hub module. The intelligent hub module sends Drools rule execution to the development agent, the testing agent, and the operations agent, respectively. The development agent feeds back the requirement rule book with version tags to the intelligent hub module. The testing agent feeds back the defect report with severity tags to the intelligent hub module. The operations agent feeds back the resource utilization time series report to the intelligent hub module.

[0130] Among them, the development agent is used to call the large language model LLM through the gRPC interface to generate Python or Java program code and obtain the requirements specification with Git commit ID;

[0131] The test agent is used by an extension plugin based on the JUnit framework to call a large language model to generate boundary value test cases and obtain defect reports containing stack signatures.

[0132] The operations and maintenance intelligence agent is used to integrate the anomaly detector of the Prometheus monitoring tool to monitor Kubernetes containers, and calls the large language model to predict container failures and obtain resource utilization time-series reports.

[0133] The intelligent central module in this embodiment includes:

[0134] A structured data lake is used to store development, testing, and operations data through Elasticsearch, and to establish spatiotemporal relationships between developers, test cases, and container instances through the Neo4j graph database, and to create code paths in Elasticsearch; where the code path is a spatiotemporal index of line number + timestamp;

[0135] A dynamic optimization engine for initiating LoRA fine-tuning of large language models based on the Apache Flink stream processing platform when the number of code submissions exceeds 500 lines / day or the error rate rises by more than 15%.

[0136] The rule collaboration gateway is used by the Drools rule engine to execute preset priority matrix operations, automatically triggering collaborative actions of development, testing, and operations modules.

[0137] As attached Figure 3 As shown, the real-time table of the priority matrix in this embodiment includes event types, development responses, test responses, and operation and maintenance responses; the event types include payment module P0 defect events, CPU continuous >90% events, and database deadlock events;

[0138] Specifically, for the P0 defect event of the payment module, the development S-level work order allocation and patch package generation are triggered, the core path regression test case generation is performed, and the operation and maintenance circuit breaker mechanism is activated and traffic scheduling is implemented.

[0139] In response to events where CPU usage consistently exceeds 90%, the following actions are taken: development thread pool parameter optimization, addition of stress test scenarios, and automatic scaling of Pod instances for operations and maintenance.

[0140] In response to database deadlock events, the system prompts SQL rewriting suggestions for developers, tests concurrent deadlock detection, and implements query rate limiting and master-slave failover for operations and maintenance.

[0141] As attached Figure 2 As shown, the working process of the dynamic optimization engine in this embodiment is as follows:

[0142] (1) Real-time monitoring data is written to the Kafka message queue;

[0143] (2) When the triggering conditions of code commit volume > 500 lines / day or error rate increase > 15% are met, the data set of the most recent 24 hours is extracted from the structured data lake. Specifically, code snippets, test results, and CPU performance metrics are extracted from the operations and maintenance database, and only records with timestamps greater than the current time interval of 24 hours are returned. These records are used to obtain code snippets, corresponding test results, and CPU performance metrics data recorded in the past 24 hours. The key code is as follows:

[0144] Execute the data extraction SQL:

[0145] SELECT code_snippet,test_result,cpu_metric

[0146] FROM devops_data_lake

[0147] WHERE timestamp>NOW()-INTERVAL'24hours';

[0148] (3) Initiate the LoRA fine-tuning task for the large language model; details are as follows:

[0149] ① Import LoRA configuration and PEFT model tools: Import LoraConfig and get_peft_model from the peft library; LoraConfig is used to configure LoRA parameters; get_peft_model is used to adapt LoRA to the base model;

[0150] ② Define LoRA configuration: Create a LoRA configuration object to specify the parameters for fine-tuning, as follows:

[0151] r = 8: The rank of the LoRA attention matrix controls the compression ratio of trainable parameters; the smaller the compression ratio, the fewer parameters there are.

[0152] lora_alpha = 16: Scaling factor, used to adjust the impact of LoRA weights on the original model (similar to the role of learning rate);

[0153] ③ Adapt LoRA to the base model: Apply the LoRA configuration to the pre-trained large language model llm_model to generate a new model model that supports LoRA fine-tuning, as follows:

[0154] llm_model: A pre-trained large model to be fine-tuned (such as LLaMA, GPT-NeoX, etc.);

[0155] Output: Returns a wrapped model with only a small number of LoRA-related parameters trained, instead of all model parameters;

[0156] ④ Train the model: Fine-tune the LoRA-adapted model using the training dataset training_dataset;

[0157] (4) When the F1 value of the large language model improves by more than 5% after verification, update the large language model server endpoint in the production environment.

[0158] The specific working process of the dynamic optimization engine in this embodiment is as follows:

[0159] ① The Flink stream processing engine detected that the trigger condition was met.

[0160] ②Execute the data extraction SQL:

[0161] SELECT code_snippet,test_result,cpu_metric

[0162] FROM devops_data_lake

[0163] WHERE timestamp>NOW()-INTERVAL'24hours';

[0164] ③ Initiate the LoRA fine-tuning task:

[0165] from peft import LoraConfig,get_peft_model

[0166] config=LoraConfig(r=8, lora_alpha=16)

[0167] model=get_peft_model(llm_model,config)

[0168] model.train(training_dataset);

[0169] ④ After the F1 value of the validation set is increased from 0.71 to 0.79, update the endpoints of the production environment model.

[0170] In this embodiment, the rule-coordinated end-to-end tracking is specifically as follows:

[0171] A payment interface timeout event (P0 level) occurred in the core financial system:

[0172] ① At 08:00:00, the test module detects defects and marks their severity;

[0173] ②08:00:200 The rule gateway triggers three actions:

[0174] Development: Automatically create S-level work orders, with an optimization scheme for the thread pool generated by LLM;

[0175] Testing: Generate a regression test package for the core payment chain and bind it to a Git commit ID;

[0176] Operations and maintenance: Enforce CPU quota limits for non-paying Pods;

[0177] ③ At 08:30:00, the development team submitted an optimization patch (Commit ID: x7fd);

[0178] ④08:31:00 The gateway automatically associates the patch with the regression test package;

[0179] ⑤09:15:00 Regression test passed, triggering automatic deployment;

[0180] ⑥ At 09:20:00, production monitoring showed a 92% reduction in latency.

[0181] Example 3:

[0182] This embodiment also provides an electronic device, including: a memory and a processor;

[0183] The memory stores the instructions executed by the computer.

[0184] The processor executes computer execution instructions stored in the memory, causing the processor to execute the intelligent collaborative optimization method for the entire software lifecycle based on a large model, as described in any embodiment of the present invention.

[0185] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.

[0186] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory devices, or other volatile solid-state storage devices.

[0187] Example 4:

[0188] This embodiment also provides a computer-readable storage medium storing multiple instructions, which are loaded by a processor to cause the processor to execute the intelligent collaborative optimization method for the entire software lifecycle based on a large model according to any embodiment of the present invention. Specifically, a system or device equipped with a storage medium may be provided, on which software program code implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device may read and execute the program code stored in the storage medium.

[0189] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.

[0190] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.

[0191] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.

[0192] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.

[0193] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A software lifecycle intelligent collaborative optimization method based on a large model, characterized in that, The method is as follows: Intelligent development: Generate program code by calling the large language model through the gRPC interface and obtain the requirements specification document with version tags; Intelligent Testing: An extension plugin based on the JUnit framework calls a large language model to generate boundary value test cases and obtain defect reports with severity labels; Intelligent O&M: The anomaly detector integrated with the Prometheus monitoring tool calls a large language model to predict container failures and obtains time-series reports on resource utilization; Building a structured data lake: Use Elasticsearch to store development, testing, and operations data, and use Neo4j graph database to establish spatiotemporal relationships between developers, test cases, and container instances, thereby building a structured data lake; Dynamic optimization: Based on the Apache Flink stream processing platform, LoRA fine-tuning of the large language model is initiated when the number of code submissions exceeds 500 lines / day or the error rate increases by more than 15%. Rule Collaboration: Deploy the Drools rule engine to execute preset priority matrix operations, automatically triggering collaborative actions from development, testing, and operations modules.

2. The intelligent collaborative optimization method for the entire software lifecycle based on a large model as described in claim 1, characterized in that, The dynamic optimization is as follows: Real-time monitoring data is written to the Kafka message queue; When the triggering conditions of code commit volume > 500 lines / day or error rate increase > 15% are met, extract the most recent 24-hour dataset from the structured data lake; Initiate the LoRA fine-tuning task for the large language model; When the F1 score of the large language model improves by more than 5% after verification and fine-tuning, update the large language model server endpoint in the production environment.

3. The intelligent collaborative optimization method for the entire software lifecycle based on a large model as described in claim 1, characterized in that, The real-time table of the priority matrix includes event type, development response, test response, and operation and maintenance response; event type includes payment module P0 defect event, CPU continuous >90% event, and database deadlock event; Specifically, for the P0 defect event of the payment module, the development S-level work order allocation and patch package generation are triggered, the core path regression test case generation is performed, and the operation and maintenance circuit breaker mechanism is activated and traffic scheduling is implemented. In response to events where CPU usage consistently exceeds 90%, the following actions are taken: development thread pool parameter optimization, addition of stress test scenarios, and automatic scaling of Pod instances for operations and maintenance. In response to database deadlock events, the system prompts SQL rewriting suggestions for developers, tests concurrent deadlock detection, and implements query rate limiting and master-slave failover for operations and maintenance.

4. The intelligent collaborative optimization method for the entire software lifecycle based on a large model as described in claim 2, characterized in that, Extracting the most recent 24-hour dataset from the structured data lake specifically involves extracting code snippets, test results, and CPU performance metrics from the operations and maintenance database, returning only records with timestamps greater than the current time and a 24-hour interval, which are used to obtain code snippets, corresponding test results, and CPU performance metrics data recorded in the past 24 hours.

5. The intelligent collaborative optimization method for the entire software lifecycle based on a large model as described in claim 2, characterized in that, The LoRA fine-tuning task for launching a large language model is as follows: Import LoRA configuration and PEFT model tools: Import LoraConfig and get_peft_model from the peft library; LoraConfig is used to configure LoRA parameters; get_peft_model is used to adapt LoRA to the base model; Define LoRA configuration: Create a LoRA configuration object and specify the parameters for fine-tuning, as follows: r = 8: The rank of the LoRA attention matrix, which controls the compression ratio of trainable parameters; where, the smaller the compression ratio, the fewer the number of parameters; lora_alpha = 16: Scaling factor, used to adjust the impact of LoRA weights on the original model; Adapting LoRA to the base model: Applying the LoRA configuration to the pre-trained large language model llm_model generates a new model model that supports LoRA fine-tuning, as follows: llm_model: The pre-trained large model to be fine-tuned; Output: Returns a wrapped model with only a small number of LoRA-related parameters trained, instead of all model parameters; Training the model: Fine-tune the LoRA-adapted model using the training dataset training_dataset.

6. A software lifecycle intelligent collaborative optimization system based on a large model, characterized in that, The system includes a development agent, a testing agent, an operations agent, and an intelligent hub module. The intelligent hub module sends Drools rule execution to the development agent, testing agent, and operations agent, respectively. The development agent feeds back the requirement rule book with version tag to the intelligent hub module. The testing agent feeds back the defect report with severity tag to the intelligent hub module. The operations agent feeds back the resource utilization time series report to the intelligent hub module. Among them, the development agent is used to call the large language model LLM through the gRPC interface to generate Python or Java program code and obtain the requirements specification with Git commit ID; The test agent is used by an extension plugin based on the JUnit framework to call a large language model to generate boundary value test cases and obtain defect reports containing stack signatures. The operations and maintenance intelligence agent is used to integrate the anomaly detector of the Prometheus monitoring tool to monitor Kubernetes containers, and calls the large language model to predict container failures and obtain time-series reports on resource utilization.

7. The intelligent collaborative optimization system for the entire software lifecycle based on a large model as described in claim 6, characterized in that, The intelligent central module includes: A structured data lake is used to store development, testing, and operations data through Elasticsearch, and to establish spatiotemporal relationships between developers, test cases, and container instances through the Neo4j graph database, and to create code paths in Elasticsearch; where the code path is a spatiotemporal index of line number + timestamp; A dynamic optimization engine for initiating LoRA fine-tuning of large language models based on the Apache Flink stream processing platform when the number of code submissions exceeds 500 lines / day or the error rate rises by more than 15%. The rule collaboration gateway is used by the Drools rule engine to execute preset priority matrix operations and automatically trigger collaborative actions of development, testing, and operations modules. The priority matrix's real-time table includes event types, development responses, test responses, and operation and maintenance responses; event types include payment module P0 defect events, CPU usage consistently >90% events, and database deadlock events. Specifically, for the P0 defect event of the payment module, the development S-level work order allocation and patch package generation are triggered, the core path regression test case generation is performed, and the operation and maintenance circuit breaker mechanism is activated and traffic scheduling is implemented. In response to events where CPU usage consistently exceeds 90%, the following actions are taken: development thread pool parameter optimization, addition of stress test scenarios, and automatic scaling of Pod instances for operations and maintenance. In response to database deadlock events, the system prompts SQL rewriting suggestions for developers, tests concurrent deadlock detection, and implements query rate limiting and master-slave failover for operations and maintenance.

8. The intelligent collaborative optimization system for the entire software lifecycle based on a large model as described in claim 6 or 7, characterized in that, The dynamic optimization engine works as follows: (1) Real-time monitoring data is written to the Kafka message queue; (2) When the triggering conditions of code submission volume > 500 lines / day or error rate increase > 15% are met, the data set of the most recent 24 hours is extracted from the structured data lake. Specifically, code snippets, test results and CPU performance indicators are extracted from the operation and maintenance database. Only records with timestamps greater than the current time prison 24-hour interval are returned, which are used to obtain the code snippets, corresponding test results and CPU performance indicator data recorded in the past 24 hours. (3) Initiate the LoRA fine-tuning task for the large language model; details are as follows: ① Import LoRA configuration and PEFT model tools: Import LoraConfig and get_peft_model from the peft library; LoraConfig is used to configure LoRA parameters; get_peft_model is used to adapt LoRA to the base model; ② Define LoRA configuration: Create a LoRA configuration object to specify the parameters for fine-tuning, as follows: r = 8: The rank of the LoRA attention matrix, which controls the compression ratio of trainable parameters; where, the smaller the compression ratio, the fewer the number of parameters; lora_alpha = 16: Scaling factor, used to adjust the impact of LoRA weights on the original model; ③ Adapt LoRA to the base model: Apply the LoRA configuration to the pre-trained large language model llm_model to generate a new model model that supports LoRA fine-tuning, as follows: llm_model: The pre-trained large model to be fine-tuned; Output: Returns a wrapped model with only a small number of LoRA-related parameters trained, instead of all model parameters; ④ Train the model: Fine-tune the LoRA-adapted model using the training dataset training_dataset; (4) When the F1 value of the large language model improves by more than 5% after verification, update the large language model server endpoint in the production environment.

9. An electronic device, characterized in that, include: Memory and at least one processor; The memory contains computer programs; The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the software lifecycle intelligent collaborative optimization method based on a large model as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by a processor to implement the intelligent collaborative optimization method for the entire software lifecycle based on a large model, as described in any one of claims 1 to 5.

Citation Information

Cited By

  • System for prison condition analysis and summary by using large model and application method thereof

    CN121687019A