An artificial intelligence driven software system upgrade method, device and medium
Patent Information
- Application Number
- CN202611006245.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]相关的框架版本升级方式主要包括:手动修改项目配置文件(如Maven的pom.xml文件)中的版本号;逐一检查和更新相关依赖库的版本;手动测试升级后的兼容性;提交代码变更并进行人工审核;而在企业级开发环境中,一般存在数十甚至数百个基于同一框架的项目,相关的手动升级方式会存在低效问题
本申请可以通过预定义的升级策略和预编译检查,将升级失败率降低80%以上,提高软件系统升级成功率。
Smart Images

Figure CN122985205A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software development technology, and in particular to a method, apparatus and medium for upgrading software systems based on artificial intelligence. Background Technology
[0002] Currently, with the rapid development of software development, the version update frequency of enterprise-level software frameworks is increasing. In the software development process of large enterprises, multiple application systems are usually built based on a unified technical framework. These frameworks need to be upgraded regularly to obtain new features, performance optimizations and security patches.
[0003] The main methods for upgrading framework versions include: manually modifying the version number in the project configuration file (such as Maven's pom.xml file); checking and updating the versions of related dependency libraries one by one; manually testing the compatibility after the upgrade; submitting code changes and conducting manual review; however, in enterprise-level development environments, there are usually dozens or even hundreds of projects based on the same framework, and the manual upgrade methods may be inefficient. Summary of the Invention
[0004] To overcome the aforementioned technical deficiencies, this application aims to provide a software system upgrade method, apparatus, and medium based on artificial intelligence. The method includes: receiving a user's natural language command; using an encoding assistant to recognize the software system upgrade command based on the user's natural language; acquiring software system information and a set upgrade recipe knowledge base through a framework upgrade tool; performing multi-dimensional analysis of the software system's features; determining a target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system, wherein the target upgrade recipe combination includes at least one of a framework upgrade recipe, a migration recipe, a dependency update recipe, and an optimization recipe; determining the target execution order of the target upgrade recipe combination through a multi-round convergence mechanism; and upgrading the software system according to the target execution order and the target upgrade recipe combination. This application can reduce the upgrade failure rate by more than 80% and improve the software system upgrade success rate through predefined upgrade strategies and pre-compilation checks.
[0005] The specific technical solutions provided in this application are as follows: In a first aspect, this application provides a software system upgrade method based on artificial intelligence, the method comprising: Receive natural language commands from users; The encoding assistant updates the natural language recognition software system according to the user's instructions. The framework upgrade tool obtains software system information and the set upgrade recipe knowledge base; The features of the software system are analyzed from multiple dimensions using a large model. The large model determines the target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system, wherein the target upgrade recipe combination includes at least one of the following: framework upgrade recipe, migration recipe, dependency update recipe, and optimization recipe. The target execution order of the target upgrade formula combination is determined through a multi-round convergence mechanism; The software system is upgraded according to the target execution order and the target upgrade formula combination.
[0006] Secondly, this application also provides a software system upgrade device based on artificial intelligence, the device comprising: The receiving module is used to receive natural language commands from users; The recognition module is used to update the user's natural language recognition software system according to the encoding assistant's instructions. The acquisition module is used to obtain software system information and the set upgrade recipe knowledge base through the framework upgrade tool; The parsing module is used to perform multi-dimensional analysis of the features of the software system using a large model. The determination module is used to determine a target upgrade recipe combination from the upgrade recipe knowledge base based on the feature parsing results of the software system, wherein the target upgrade recipe combination includes at least one of a framework upgrade recipe, a migration recipe, a dependency update recipe, and an optimization recipe; and to determine the target execution order of the target upgrade recipe combination through a multi-round convergence mechanism. The upgrade module is used to upgrade the software system according to the target execution order and the target upgrade formula combination.
[0007] Thirdly, an artificial intelligence-driven software system upgrade device is also provided, including: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the software system upgrade method as described in any of the first aspects.
[0008] Fourthly, this application also provides a computer device, the device comprising: A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the AI-driven software system upgrade method as described in any of the first aspects.
[0009] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the artificial intelligence-driven software system upgrade method described in any of the first aspects.
[0010] Sixthly, this application also provides a computer storage medium, the medium comprising: It stores a computer program that, when executed by a processor, implements the steps of the AI-driven software system upgrade method described in any of the first aspects.
[0011] Compared with existing technologies, the method of the technical solution provided in this application includes: receiving a user's natural language command; recognizing the software system upgrade command based on the user's natural language command through an encoding assistant; obtaining software system information through a framework upgrade tool and setting up an upgrade recipe knowledge base; performing multi-dimensional analysis on the features of the software system; determining a target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system, wherein the target upgrade recipe combination includes at least one of a framework upgrade recipe, a migration recipe, a dependency update recipe, and an optimization recipe; determining the target execution order of the target upgrade recipe combination through a multi-round convergence mechanism; and upgrading the software system according to the target execution order and the target upgrade recipe combination. This application can reduce the upgrade failure rate by more than 80% and improve the success rate of software system upgrades through predefined upgrade strategies and pre-compilation checks.
[0012] The technical solutions provided in this application can simplify the use of OpenRewrite and improve development efficiency; encapsulate complex OpenRewrite commands into simple tool calls through the MCP (Model Context Protocol); intelligently select appropriate upgrade strategies based on the user's natural language intent; and provide a standardized upgrade process. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 An architecture diagram of an AI-driven software system upgrade system provided in Embodiment 1 of this application; Figure 2 A first flowchart of an AI-driven software system upgrade method provided in Embodiment 1 of this application; Figure 3 This is a second flowchart of an AI-driven software system upgrade method provided in Embodiment 2 of this application. Figure 4 This is a schematic diagram of the intelligent selection of the upgraded formula provided in Embodiment 2 of this application; Figure 5 A detailed flowchart of an AI-driven software system upgrade provided in Embodiment 2 of this application; Figure 6 A structural diagram of the AI-driven software system upgrade device provided in Embodiment 3 of this application; Figure 7 This is an exemplary system provided for Embodiment Seven of this application, which can be used to implement the various embodiments described in this application. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] It should be noted that, unless the context explicitly requires it, the words "comprising," "including," and similar terms in the entire specification and claims should be interpreted as encompassing rather than being exclusive or exhaustive; that is, meaning "including but not limited to."
[0017] Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0018] Currently, there are several version management and code refactoring tools available on the market, such as: 1. The Maven Versions Plugin is a version management plugin provided by Apache Maven, and its technical solutions include: The `versions:display-dependency-updates` command displays updatable dependencies; the `versions:use-latest-versions` command automatically updates to the latest version; and it supports batch updating of multiple dependency version numbers.
[0019] 2. Dependabot is an automated dependency update service provided by GitHub. Its working principle is as follows: It regularly scans dependency files in the code repository; detects if new versions are available; automatically creates Pull Requests for version updates; and supports multiple programming languages and package managers.
[0020] 3. OpenRewrite is an open-source, large-scale code refactoring tool that defines specific code transformation logic. Its core technologies include: It parses source code into a lossless semantic tree (LST); it traverses and modifies LST nodes using the visitor pattern; it provides declarative code transformation rule definitions; and it supports batch refactoring operations on a large number of code files.
[0021] Disadvantages of existing technology: The Maven Versions Plugin has the following drawbacks: Lack of intelligent version selection: It can only mechanically update to the latest version and cannot select the appropriate target version based on the project situation; High risk of batch operations: It updates all dependencies indiscriminately, lacks risk assessment, and is prone to introducing destructive changes; Poor interactive experience: It requires familiarity with complex command-line parameters and cannot be interacted with through natural language.
[0022] Dependabot's shortcomings include: a single upgrade strategy (primarily focusing on security vulnerabilities and lacking flexible configuration for functional upgrades); a lack of in-depth code analysis (only able to replace dependency version numbers and unable to handle complex framework upgrade scenarios such as API changes and configuration file adjustments); and weak batch management capabilities (insufficient support for unified upgrade management of multiple enterprise projects).
[0023] The drawbacks of OpenRewrite include: a high learning curve (requiring mastery of LST syntax trees, Visitor mode, and specific Recipe coordinates); a complex command line (with numerous Maven parameters, such as the need to memorize coordinates like org.openrewrite.recipe:rewrite-spring:RELEASE); and a lack of intelligent decision-making (unable to automatically select appropriate Recipe combinations based on natural language).
[0024] Common shortcomings of all three: lack of integration: unable to leverage the understanding and reasoning capabilities of large models to optimize and upgrade processes; poor enterprise-level adaptability: insufficient batch processing and unified management capabilities in large-scale, multi-project scenarios; outdated interaction methods: mainly relying on command lines and lacking natural language interaction interfaces.
[0025] The purpose of this application is to overcome the aforementioned deficiencies of the prior art and provide an intelligent software framework version upgrade system based on a model context protocol and a code refactoring engine. This system has the following characteristics: By analyzing project characteristics through models, suitable upgrade strategies are provided for users to choose from; developers can easily complete complex version upgrade tasks through intuitive natural language commands; and the MCP protocol and OpenRewrite engine are deeply integrated to build an integrated software upgrade solution.
[0026] Example 1 This application provides a software system upgrade method based on artificial intelligence, such as... Figure 1 , Figure 2 As shown, the method includes: Receive natural language commands from users; The encoding assistant updates the natural language recognition software system according to the user's instructions. The framework upgrade tool obtains software system information and the set upgrade recipe knowledge base; The features of the software system are analyzed from multiple dimensions using a large model. The large model determines the target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system, wherein the target upgrade recipe combination includes at least one of the following: framework upgrade recipe, migration recipe, dependency update recipe, and optimization recipe. The target execution order of the target upgrade formula combination is determined through a multi-round convergence mechanism; The software system is upgraded according to the target execution order and the target upgrade formula combination.
[0027] Specifically, the system in this application adopts a layered architecture design, including: User Interaction Layer: Responsible for receiving natural language commands from users; MCP Protocol Adaptation Layer: Implements standardized interfaces for the MCP protocol and provides an OpenRewrite upgrade recipe knowledge base; Intelligent Decision Layer: Responsible for analyzing software system characteristics and intelligently selecting OpenRewrite upgrade recipes; Strategy Management Layer: Manages predefined upgrade strategies and processes; OpenRewrite Execution Layer: Responsible for executing specific code refactoring operations; Verification and Feedback Layer: Responsible for compilation verification and error handling.
[0028] The beneficial effects of the technical solutions provided in this application are: This application can reduce the upgrade failure rate by more than 80% and improve the success rate of software system upgrades through predefined upgrade strategies and pre-compilation checks.
[0029] The technical solutions provided in this application can simplify the use of OpenRewrite and improve development efficiency; encapsulate complex OpenRewrite commands into simple tool calls through the MCP protocol; intelligently select appropriate upgrade strategies based on the user's natural language intent; and provide a standardized upgrade process.
[0030] Example 2 This application provides a software system upgrade method based on artificial intelligence, such as... Figure 3 As shown, the method includes: This application relates to a software framework version upgrade system based on the Model Context Protocol (MCP), which is particularly suitable for framework version management and dependency upgrades in enterprise software development environments.
[0031] Step S01: Receive the user's natural language instructions; The encoding assistant updates the natural language recognition software system according to the user's instructions. Obtain software system information and the knowledge base of upgrade recipes through the upgrade framework tool.
[0032] Specifically, the MCP tool service module is the core component of the system, which implements the framework upgrade function through the upgradeFramework tool.
[0033] The upgradeFramework tool is a parameterless tool interface that, when called by the coding assistant, directly returns the complete upgrade strategy. This tool encapsulates complex framework upgrade operations into a simple call interface. Users only need to express their upgrade intentions in natural language, and the coding assistant can call the tool to obtain detailed operation guidance.
[0034] This tool exposes itself to the coding assistant through a standard interface of the MCP protocol, containing detailed functional descriptions that enable the coding assistant to accurately understand the tool's purpose and when to call it. The tool's design follows the principle of simplification, avoiding complex parameter configurations and lowering the barrier to entry for users.
[0035] The upgrade strategy management module is responsible for defining and managing unified upgrade strategies. This module adopts an intelligent comprehensive strategy design. Comprehensive upgrade strategy: The system provides a comprehensive upgrade strategy that includes a complete process for handling different upgrade scenarios. The strategy covers various situations from minor version patch upgrades to major version jump upgrades. Through intelligent step design, it can automatically adapt to different upgrade requirements.
[0036] Understandably, the system uses the coding assistant's natural language understanding capabilities to translate the user's upgrade intent into an upgradeFramework tool call: When a user enters a natural language command containing keywords such as "upgrade framework", "update framework", or "framework version upgrade", the coding assistant recognizes the user's upgrade intent and automatically calls the upgradeFramework tool to obtain the upgrade strategy.
[0037] This design simplifies the user interaction process. Users do not need to know the specific details of the OpenRewrite recipe; they only need to express their intention to upgrade to receive complete operation guidance.
[0038] Step S02: Verify the software system information; The verification of the software system information includes: Verify the compilation status of the software system information; If the software system is found to be in an uncompileable state, the software system upgrade process will be terminated and an alarm will be issued.
[0039] Specifically, perform a pre-compilation check on the project to verify the current compilation status of the software system; ensure that the project is compileable before the upgrade; if the check fails, terminate the upgrade process and prompt the user to resolve the existing problems.
[0040] Configure the OpenRewrite tool to include detailed information on all available upgrade recipes; record the functional characteristics and applicable scenarios of each upgrade recipe; and create a mapping and dependency graph of relationships between each upgrade recipe.
[0041] Specifically, it maintains detailed information on all available OpenRewrite recipes; records the functional characteristics and applicable scenarios of each upgrade recipe; and establishes a mapping and dependency graph of relationships between upgrade recipes.
[0042] Step S03: Perform multi-dimensional analysis of the features of the software system using a large model.
[0043] Specifically, the intelligent automated refactoring phase enables the intelligent selection and execution of OpenRewrite recipes: in-depth analysis of the project's code structure and technology stack; identification of the framework components and version information used in the project; and assessment of the complexity and upgrade difficulty of the software system.
[0044] Step S031: Obtain the framework type and current version information used by the software system; The large model is used to analyze the code structure and dependencies of the software system based on the framework type and current version information used by the software system. Obtain the framework components and programming paradigms used in the software system; The complexity and upgrade difficulty of the software system are assessed using a large model based on the framework components and programming paradigms used in the software system.
[0045] Specifically, project feature analysis: The system first analyzes the characteristics of the current project, including: the type and current version of the framework used in the project; the code structure and dependencies of the project; the application programming interface patterns (APIs) and programming paradigms used in the project; and the complexity and scale characteristics of the project.
[0046] In other words, the system performs multi-dimensional project analysis: it analyzes project characteristics from multiple dimensions, including: technology stack analysis (identifying the frameworks, libraries, and tools used in the project); code pattern analysis (analyzing the project's programming patterns and architectural style); dependency analysis (organizing the project's internal and external dependencies); and version difference analysis (comparing the differences between the current version and the target version).
[0047] Step S04, as follows Figure 4 As shown, based on the feature analysis results of the software system, a target upgrade recipe combination is determined from the upgrade recipe knowledge base according to the large model. The target upgrade recipe combination includes at least one of the following: framework upgrade recipe, migration recipe, dependency update recipe, and optimization recipe.
[0048] Specifically, the agent makes autonomous decisions by combining the capabilities of the MCP tool: The identification and selection of upgrade recipes are led by the Agent, rather than relying on a fixed rule table. After completing multi-dimensional project feature analysis (framework type and version, module composition, dependency relationships, code API patterns, etc.), the Agent will combine the capabilities of the MCP tools exposed in the current context to independently determine which tools should be called and which OpenRewrite recipes should be combined to complete the upgrade. When information is insufficient, the Agent can ask the user to clarify the upgrade goals.
[0049] The key to this design is that the system does not need to pre-write hard-coded matching rules for each upgrade scenario. Instead, it entrusts the decision of "identifying which recipes are needed" to a large model with semantic understanding and reasoning capabilities, and then uses the MCP protocol to standardize OpenRewrite's recipe capabilities as a tool.
[0050] Intelligent recipe selection: Based on the project feature analysis results, the system intelligently selects the most suitable recipe combination from the OpenRewrite recipe library: automatically identifies the required framework upgrade recipe; selects the appropriate API migration recipe; determines the necessary dependency update recipe; and selects code modernization and optimization recipes.
[0051] Based on the project analysis results, the system intelligently matches the most suitable formula: Functional matching: selects formulas that can solve specific upgrade needs; Compatibility matching: ensures the compatibility of the formula with the project's technology stack; Efficiency matching: selects the formula combination with the highest execution efficiency; Safety matching: prioritizes verified and stable formulas.
[0052] Step S041: Obtain the feature analysis results of the software system; Based on the user's natural language intent and the characteristics of the software system, the gaps that need to be overcome for the software system upgrade are obtained through the large model. The gaps include at least one of the following: the main version of the software system upgrade framework, security module, language version, and namespace migration gap. Obtain the framework upgrade tool; The large model obtains a software system upgrade strategy through the framework upgrade tool and the gaps that the software system upgrade needs to overcome, and determines the target upgrade formula combination based on the software system upgrade strategy.
[0053] Specifically, the process of agent identification and selection will be illustrated with examples throughout: Feature analysis: The agent identified that the software system is currently based on Spring Boot 2.7 and Java 11, and includes Web, Data, and Security modules. The code contains deprecated APIs such as the javax.* namespace and WebSecurityConfigurerAdapter. Target Inference: Combining the user's natural language intent (upgrading to Spring Boot 3.0) with the current state of the software system, the Agent infers the main gaps that need to be overcome for the upgrade: major framework version, security module, Java language version, and namespace migration; Based on the capability description of the MCP tool in the context, the Agent decides to call the upgradeFramework tool to obtain the upgrade strategy, and selects the following recipe combination accordingly: org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0 (Master Recipe for Framework Upgrade); org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_0 (Security Module Migration Recipe); org.openrewrite.java.migrate.UpgradeToJava17 (Java version and language modernization recipe).
[0054] Step S042: In response to the fact that the software system does not include a security module, the software system is not upgraded using a migration recipe; If the software system is already the latest version, then the software system will not be upgraded using the framework upgrade recipe.
[0055] Specifically, the above selection is not a simple keyword hit, but a judgment made by the agent based on which constructs in the project are actually used that will be affected by the upgrade; for example, if the project does not contain a security module, the agent will not select the security 6 migration recipe; if the software system is already Java 17, the Java version upgrade recipe will be skipped.
[0056] Here, the large model is the machine learning model. A machine learning model is a mathematical function that learns patterns from data and makes predictions or decisions on new data. The input of the machine learning model is the features of the software system. The machine learning model performs multi-dimensional analysis on the input features of the software system, analyzing the framework type and current version used by the software system, the code structure and dependencies of the project, the API patterns and programming paradigms used by the software system, and the complexity and scale characteristics of the project. Based on the feature analysis results of the software system, the target upgrade recipe combination is determined from the upgrade recipe knowledge base, the required framework upgrade recipe is automatically identified, the appropriate API migration recipe is selected, the necessary dependency update recipe is determined, the code modernization and optimization recipe is selected, and the machine learning model outputs the target upgrade recipe combination. In addition, machine learning models can also use deep learning or reinforcement learning models to optimize recipe selection.
[0057] Step S05: Determine the target execution order of the target upgrade formula combination through a multi-round convergence mechanism.
[0058] Step S051: Sort the target upgrade formula combination by the atomic granularity and multi-round convergence mechanism of the reconstruction tool; The refactoring tool creates an abstract syntax tree for the target upgrade recipe combination operation; Detect whether the abstract syntax tree has changed; In response to a change in the abstract syntax tree, the target upgrade recipe combination is reordered using the atomic granularity and multi-round convergence mechanism of the reconstruction tool until the abstract syntax tree remains unchanged. The number of sorting rounds corresponding to the unchanged abstract syntax tree is then set as the maximum number of rounds. In response to the maximum number of rounds of repetition of sorting the target upgrade recipe combination through the atomic granularity and multi-round convergence mechanism of the reconstruction tool, the sorting order of the current target upgrade recipe combination is determined as the target execution order of the target upgrade recipe combination.
[0059] Specifically, the vast majority of sorting problems are automatically solved by OpenRewrite's own operating mechanism, and the Agent does not need to manually arrange the order of the recipes; Most recipes are atomic and independent transformations; each recipe typically rewrites only one specific code construct, and they are directed to completely different syntax nodes and do not interfere with each other; therefore, most recipes do not have sequential constraints and can be combined arbitrarily.
[0060] Composite recipes contain pre-defined and ordered sub-recipes; for example, the Spring Boot 3.0 upgrade recipe is itself a composite recipe, which encapsulates a series of sub-recipes. The execution order of these sub-recipes is predefined and maintained by the recipe author, and the caller does not need to worry about it.
[0061] The runtime employs a multi-cycle convergence mechanism. After running all recipes in one cycle, OpenRewrite checks if the Abstract Syntax Tree (AST) has changed. If it has, another cycle is run, and this process is repeated until the AST is stable and no further changes occur (a maximum number of cycles is set by default). Therefore, even if there is an implicit dependency between two recipes that "B can only recognize the target after A is modified," the multi-cycle mechanism can usually converge automatically without requiring manual specification of the order.
[0062] For example, after a namespace migration recipe rewrites javax.persistence.Entity to jakarta.persistence.Entity, a subsequent recipe that depends on jakarta.* to match will naturally be able to identify the target and complete the rewriting in the next cycle. The whole process is driven by a convergence mechanism, and the Agent does not need to be pre-sorted.
[0063] Step S06: Upgrade the software system according to the target execution order and target upgrade formula combination.
[0064] Specifically, automated execution: The system automatically executes the selected OpenRewrite Recipe recipe combination: each recipe is executed in the optimized order; the execution process and results are monitored in real time; and any abnormal situations that may occur during the upgrade execution process are handled.
[0065] Step S061: Set the upgrade execution log of the software system to record the currently running target upgrade recipe combination, scan progress, upgrade convergence rounds, and error information during the upgrade. Upon completion of the software system upgrade, a software system upgrade data table is generated, recording the change information generated during the current software system upgrade execution. The change information includes at least one of the following: modified project files, version change information of upgrade dependent projects, and modified recipe information. The software system upgrade data table includes a source file change table and a dependency change table. The modification information for the current software system upgrade is determined by parsing the software system upgrade data table, and a software system upgrade report is generated based on the parsing results of the software system upgrade data table. If the software system's dependency information fails to download normally, the changes to the successfully upgraded project will be retained. If the selected upgrade recipe coordinates or software system version does not exist in the upgrade recipe knowledge base, the failed upgrade recipe and the reason for the upgrade failure are recorded. If the source code cannot be compiled or parsed before the software system upgrade, or if there are syntax errors before the software system upgrade, the system will return to the compileable state before the upgrade and send the upgrade recipe coordinate error information to the user.
[0066] Specifically, the Agent monitors and tracks the execution status through two channels: During the execution process, the Agent continuously polls the OpenRewrite execution log to monitor the currently running recipe, scan progress, convergence cycle, and any errors. This allows the Agent to determine whether the upgrade execution is progressing normally, has converged, or has encountered an anomaly.
[0067] Change tracking and data table parsing: After OpenRewrite is completed, it generates DataTables, which record all change information generated during this execution in a structured way (such as modified files, changes in dependency versions, which recipes were applied, etc.). The Agent parses the DataTables to accurately track what exactly was changed in this upgrade and generates an upgrade report and subsequent recommendations accordingly.
[0068] DataTables are a set of structured data tables output by OpenRewrite after it finishes running. Each table is for a specific type of information and consists of several rows and columns. They can usually be exported to formats such as CSV for the program to parse. Common types include source file change tables (which record which files were modified by which recipe) and dependency change tables (which record version changes of dependency coordinates).
[0069] For example, after a software system upgrade is completed, the Agent parses the above data table and summarizes it as "a total of 89 source files were modified, 12 dependencies were aligned, and 56 javax → jakarta migrations were hit". Based on this, an upgrade report can be generated for the user without the need for file-by-file diff comparison.
[0070] Although multi-round convergence mechanisms can handle most sequence and dependency issues, the following anomalies may still occur during actual implementation, which the system needs to identify and handle: Incomplete rewriting due to missing type information: OpenRewrite relies on complete type attribution for accurate rewriting, and type attribution depends on the project being able to correctly resolve its dependencies. If project dependencies fail to download / resolve properly (e.g., unreachable private repository, missing classpath), the recipe may only match part of the target, resulting in an incomplete migration that is only half modified.
[0071] Failed to converge within the maximum number of cycles: The interaction between the two recipes creates "oscillations" (a change in A triggers B, and a change in B triggers A), causing the AST to remain unstable within the maximum number of cycles, and the execution is forcibly terminated.
[0072] Recipe coordinates or version not found: The recipe coordinates selected by the Agent do not exist or have been renamed in the current recipe library version, causing loading to fail.
[0073] The source code could not be compiled / parsed before the upgrade: If the project already had syntax errors before the upgrade, OpenRewrite could not build the AST and the recipe could not run. This is why pre-check verification is set up.
[0074] Resource and timeout anomalies in large-scale projects: Large-scale projects may experience excessively long processing times or insufficient memory during parsing or multiple rounds of convergence.
[0075] Residual and compilation errors caused by incomplete recipe coverage: In complex scenarios, existing recipes cannot cover all changed logic (such as custom encapsulation in the project or proprietary APIs of third-party libraries), leaving uncompileable code after execution. These exceptions are handled by the post-processing stage.
[0076] The basic principle for handling the above-mentioned anomalies is to retain successful modifications, record the recipes and reasons for failures, revert to the compileable state before the upgrade if necessary, and provide clear prompts to users to make decisions on problems that cannot be resolved automatically (such as unreachable dependencies or incorrect coordinates), ensuring that the project is always in a safe and recoverable state.
[0077] Step S07: Use the large model to determine whether there are compilation errors in the software system after the target upgrade recipe is executed; If no compilation errors are found in the software system, the software system test is run to verify whether the software system upgrade breaks existing functions. In response to a compilation error in the software system, the compilation error information is obtained, the residual problem that the upgrade recipe failed to cover is located based on the compilation error information, and the software system is repaired based on the residual problem and the ability to understand the software system code; If the upgrade errors that occur during the software system repair phase are not isolated cases, the software system will be upgraded again using the software system-specific upgrade recipe corresponding to this framework type. If a regression occurs in the software system test after executing a software system-specific upgrade recipe, the software system-specific upgrade recipe is deleted, and the software system is upgraded using an equivalent upgrade recipe. If a discrepancy arises between the actual technology stack of the software system and the initial analysis after an upgrade is performed, the target upgrade formula for subsequent software system upgrades will be adjusted.
[0078] Specifically, check for potential compilation errors in the upgraded project; provide error fixing guidance and suggestions; and ensure that the upgraded project can compile and run normally.
[0079] In other words, dynamic optimization and adjustment: the system can dynamically adjust the formula selection based on execution feedback; monitor the execution effect of upgraded formulas in real time; adjust subsequent formula selections based on execution results; and learn project-specific optimization patterns.
[0080] Because OpenRewrite's recipes are based on predefined rules, they cannot fully cover all change logic in complex scenarios (e.g., projects have custom encapsulated the framework, use third-party library APIs not covered by the recipe, or have business code that the recipe cannot automatically rewrite). Therefore, the completion of the recipe execution does not mean the upgrade is over. The system will use prompts to control the Agent to enter a closed loop of "build-test-repair". Build: The Agent triggers project compilation / build and checks whether compilation errors still exist after the recipe is executed; Testing: After the build passes, run the project for testing to verify that the upgrade does not break existing functionality; Remediation: If the build or test fails, the Agent reads the error message, locates the residual issues that the Recipe failed to cover, and performs manual remediation (modifying code, completing migrations) based on its own code understanding capabilities, rather than relying on the recipe again.
[0081] For example, after executing the Spring Boot 3.0 recipe, a custom WebMvcConfigurer implementation in the project failed to be overridden by the recipe due to a signature change, resulting in a compilation error. The Agent captured this error during the build phase, understood its semantics, and directly modified the method signature of the class to adapt to the new version API, making the project compileable again. This is exactly where the Recipe needs the Agent to fill in the gaps.
[0082] In an architecture primarily based on multi-round convergence and Agent-based remediation, the traditional need for "dynamically adding or removing recipes" is significantly reduced. This is because the order and dependency issues are handled by the convergence mechanism, and incomplete coverage is mitigated by the Agent's closed-loop remediation mechanism. However, "adjusting subsequent recipe selections based on execution results" remains valid and meaningful in the following scenarios: The build / test results reveal new, systematic migration needs. If the bugs discovered during the fix phase are not isolated cases, but rather require the migration of an entire library (for example, if the project is found to heavily depend on a third-party framework that also needs to be upgraded), the Agent will determine that "manual fixes are too costly" and instead select and add the corresponding special formula for that framework to re-execute, which is more efficient and consistent than purely manual fixes.
[0083] For example, after the Spring Boot 3.0 upgrade recipe is executed and enters the build phase, the Agent finds that compilation errors are concentrated on the old version of MyBatis integration used by the project. mybatis-spring-boot-starter 2.x is incompatible with Spring Boot 3.0, and the errors are scattered across dozens of Mappers and configuration classes, involving overall changes to package paths and configuration items. The Agent then judges that this is a "systematic migration requirement spanning dozens of files." Manually modifying each part is inefficient and prone to omissions. Therefore, instead of manually fixing it, the Agent dynamically adds the corresponding MyBatis upgrade recipe (such as the org.openrewrite.java.mybatis series) and re-executes it.
[0084] After the recipes have been migrated in batches and in a consistent manner, they are then returned to the build-test closed-loop verification; this reflects the dynamic optimization of adjusting the selection of subsequent recipes based on the results of the previous round of execution.
[0085] If a certain formula introduces regression after execution, a strategy switch is required. If a certain formula (especially a newer beta formula) causes regression in the test after execution, the agent can choose to roll back the changes to the formula and use a more stable equivalent formula, or downgrade to "manual repair by the agent only".
[0086] The biases in the feature analysis are corrected after execution; if it is found after execution that the actual technology stack of the project does not match the initial analysis (such as a certain module being a different framework), the Agent will adjust the formula to be used in the future accordingly.
[0087] Finally, the subsequent adjustment of the formula selection is a "replenishment mechanism triggered on demand": when the agent determines that "solving a batch of problems with a formula is better than manually repairing them one by one", it will add or replace the formula, while most scattered problems will be handled directly by the agent in the repair loop.
[0088] like Figure 5 As shown, the user interaction phase of this application is as follows: Users describe their upgrade needs using natural language in the coding assistant, such as "upgrade the framework to the latest version" or "update the project framework"; Intent recognition phase: The coding assistant understands the user's upgrade intent through natural language processing technology and identifies that the user needs to perform a framework upgrade operation; Tool invocation phase: The coding assistant invokes the upgradeFramework tool to obtain the complete upgrade strategy and operation steps; Intelligent analysis phase: The system's intelligent decision-making module analyzes project characteristics and intelligently selects the most suitable recipe combination from the OpenRewrite recipe library; Strategy execution phase: The coding assistant executes the operation step by step according to the returned upgrade strategy, including pre-compilation checks, intelligent automated refactoring, post-processing verification, and other steps; Result feedback phase: The system collects the execution results, generates an upgrade report, and provides the user with operation suggestions and follow-up guidance.
[0089] The method for upgrading a software system based on artificial intelligence provided in this application can be improved and optimized in several ways without departing from the technical solution of this application. These improvements and optimizations should also be considered within the scope of protection of this application.
[0090] The beneficial effects of the technical solutions provided in this application are: This application significantly simplifies operational complexity: it encapsulates complex OpenRewrite commands into simple natural language interactions, reducing operational complexity by over 90%; improves upgrade success rate: through a standardized three-step process and pre-compilation checks, it reduces upgrade failure rate by over 80%; enhances user experience: the natural language interaction method allows even non-professional developers to easily complete framework upgrade operations; ensures upgrade quality: predefined upgrade strategies ensure that each upgrade follows best practices, reducing human error; improves development efficiency: the automated refactoring process reduces manual upgrade time from hours to minutes; and enhances enterprise-level controllability: through MCP protocol integration, it facilitates enterprise-level permission management and operation auditing.
[0091] Example 3 This application provides a software system upgrade device based on artificial intelligence, such as... Figure 6 As shown, the device includes: a receiving module, an identification module, an acquisition module, a parsing module, a determination module, an upgrade module, and an optimization module.
[0092] In this embodiment, the receiving module is used to receive natural language instructions from the user; The recognition module is used to update the user's natural language recognition software system according to the encoding assistant's instructions. The acquisition module is used to obtain software system information and the set upgrade recipe knowledge base through the framework upgrade tool; The parsing module is used to perform multi-dimensional analysis of the features of the software system using a large model. The determination module is used to determine a target upgrade recipe combination from the upgrade recipe knowledge base based on the feature parsing results of the software system, wherein the target upgrade recipe combination includes at least one of a framework upgrade recipe, a migration recipe, a dependency update recipe, and an optimization recipe; and to determine the target execution order of the target upgrade recipe combination through a multi-round convergence mechanism. The upgrade module is used to upgrade the software system according to the target execution order and the target upgrade formula combination.
[0093] In this embodiment, the parsing module is used to obtain the framework type and current version information used by the software system; The large model is used to analyze the code structure and dependencies of the software system based on the framework type and current version information used by the software system. Obtain the framework components and programming paradigms used in the software system; The complexity and upgrade difficulty of the software system are assessed using a large model based on the framework components and programming paradigms used in the software system.
[0094] In one embodiment, a determining module is used to obtain the feature analysis results of the software system; Based on the user's natural language intent and the characteristics of the software system, the gaps that need to be overcome for the software system upgrade are obtained through the large model. The gaps include at least one of the following: the main version of the software system upgrade framework, security module, language version, and namespace migration gap. Obtain the framework upgrade tool; The large model obtains a software system upgrade strategy through the framework upgrade tool and the gaps that the software system upgrade needs to overcome, and determines the target upgrade formula combination based on the software system upgrade strategy.
[0095] If the software system does not include a security module, the software system will not be upgraded using a migration recipe. If the software system is already the latest version, then the software system will not be upgraded using the framework upgrade recipe.
[0096] The target upgrade formula combination is sorted by the atomic granularity and multi-round convergence mechanism of the reconstruction tool; The refactoring tool creates an abstract syntax tree for the target upgrade recipe combination operation; Detect whether the abstract syntax tree has changed; In response to a change in the abstract syntax tree, the target upgrade recipe combination is reordered using the atomic granularity and multi-round convergence mechanism of the reconstruction tool until the abstract syntax tree remains unchanged. The number of sorting rounds corresponding to the unchanged abstract syntax tree is then set as the maximum number of rounds. In response to the maximum number of rounds of repetition of sorting the target upgrade recipe combination through the atomic granularity and multi-round convergence mechanism of the reconstruction tool, the sorting order of the current target upgrade recipe combination is determined as the target execution order of the target upgrade recipe combination.
[0097] In one embodiment, the upgrade module is used to set the upgrade execution log of the software system, recording the currently running target upgrade recipe combination, scan progress, upgrade convergence rounds, and error information during the upgrade. Upon completion of the software system upgrade, a software system upgrade data table is generated, recording the change information generated during the current software system upgrade execution. The change information includes at least one of the following: modified project files, version change information of upgrade dependent projects, and modified recipe information. The software system upgrade data table includes a source file change table and a dependency change table. The modification information for the current software system upgrade is determined by parsing the software system upgrade data table, and a software system upgrade report is generated based on the parsing results of the software system upgrade data table. If the software system's dependency information fails to download normally, the changes to the successfully upgraded project will be retained. If the selected upgrade recipe coordinates or software system version does not exist in the upgrade recipe knowledge base, the failed upgrade recipe and the reason for the upgrade failure are recorded. If the source code cannot be compiled or parsed before the software system upgrade, or if there are syntax errors before the software system upgrade, the system will return to the compileable state before the upgrade and send the upgrade recipe coordinate error information to the user.
[0098] Understandably, this application uses a user request to upgrade the software framework as an example: 1. User Operation: The user enters "Upgrade project xx framework" in the coding assistant; 2. Intent Recognition: The coding assistant recognizes the user's upgrade intent and determines that a framework upgrade operation needs to be performed; 3. Tool Invocation: The coding assistant invokes the upgradeFramework tool; 4. Intelligent Analysis: The system's intelligent decision-making module analyzes project characteristics. The project is identified as using the Spring Boot 2.7 framework. The analysis project includes modules such as Web, Data, and Security; The target upgrade version is determined to be Spring Boot 3.0; 5. Intelligent Recipe Selection: The system selects recipes from the OpenRewrite recipe library. org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0 main upgrade recipe; The recipe for upgrading the Spring Security 6.0 security module (org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_0). org.openrewrite.java.migrate.JavaVersion11to17 Java version upgrade recipe; 6. Strategy Return and Execution: The system returns an upgrade strategy containing intelligent recipe selection, and the coding assistant executes the upgrade operation according to the strategy.
[0099] The beneficial effects of the technical solutions provided in this application are: This application is based on the following intelligent recipe selection method of OpenRewrite Recipe: It realizes intelligent and automated recipe selection by analyzing project characteristics through technology and automatically selecting the most suitable recipe combination; the tool interface design of MCP protocol encapsulation: It encapsulates the complex recipe selection and execution process into a very simple calling method through the parameterless tool interface of upgradeFramework; the intelligent upgrade process triggered by natural language: It converts the user's natural language intent into a driven intelligent upgrade operation process.
[0100] Example 4 This application also provides a software system upgrade device based on artificial intelligence, comprising: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors perform the following AI-driven software system upgrade method: Receive natural language commands from users; The encoding assistant updates the natural language recognition software system according to the user's instructions. The framework upgrade tool obtains software system information and the set upgrade recipe knowledge base; The features of the software system are analyzed from multiple dimensions using a large model. The large model determines the target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system, wherein the target upgrade recipe combination includes at least one of the following: framework upgrade recipe, migration recipe, dependency update recipe, and optimization recipe. The target execution order of the target upgrade formula combination is determined through a multi-round convergence mechanism; The software system is upgraded according to the target execution order and the target upgrade formula combination.
[0101] Example 5 This application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can perform the following method for upgrading a software system based on artificial intelligence: Receive natural language commands from users; The encoding assistant updates the natural language recognition software system according to the user's instructions. The framework upgrade tool obtains software system information and the set upgrade recipe knowledge base; The features of the software system are analyzed from multiple dimensions using a large model. The large model determines the target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system, wherein the target upgrade recipe combination includes at least one of the following: framework upgrade recipe, migration recipe, dependency update recipe, and optimization recipe. The target execution order of the target upgrade formula combination is determined through a multi-round convergence mechanism; The software system is upgraded according to the target execution order and the target upgrade formula combination.
[0102] The beneficial effects of the technical solutions provided in this application are: This application can reduce the upgrade failure rate by more than 80% and improve the success rate of software system upgrades through predefined upgrade strategies and pre-compilation checks.
[0103] The technical solutions provided in this application can simplify the use of OpenRewrite and improve development efficiency; encapsulate complex OpenRewrite commands into simple tool calls through the MCP protocol; intelligently select appropriate upgrade strategies based on the user's natural language intent; and provide a standardized upgrade process.
[0104] Example 6 This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the following method for upgrading a software system based on artificial intelligence: Receive natural language commands from users; The encoding assistant updates the natural language recognition software system according to the user's instructions. The framework upgrade tool obtains software system information and the set upgrade recipe knowledge base; The features of the software system are analyzed from multiple dimensions using a large model. The large model determines the target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system, wherein the target upgrade recipe combination includes at least one of the following: framework upgrade recipe, migration recipe, dependency update recipe, and optimization recipe. The target execution order of the target upgrade formula combination is determined through a multi-round convergence mechanism; The software system is upgraded according to the target execution order and the target upgrade formula combination.
[0105] The beneficial effects of the technical solutions provided in this application are: This application can reduce the upgrade failure rate by more than 80% and improve the success rate of software system upgrades through predefined upgrade strategies and pre-compilation checks.
[0106] The technical solutions provided in this application can simplify the use of OpenRewrite and improve development efficiency; encapsulate complex OpenRewrite commands into simple tool calls through the MCP protocol; intelligently select appropriate upgrade strategies based on the user's natural language intent; and provide a standardized upgrade process.
[0107] Example 7 This application provides a computer storage medium, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: Receive natural language commands from users; The encoding assistant updates the natural language recognition software system according to the user's instructions. The framework upgrade tool obtains software system information and the set upgrade recipe knowledge base; The features of the software system are analyzed from multiple dimensions using a large model. The large model determines the target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system, wherein the target upgrade recipe combination includes at least one of the following: framework upgrade recipe, migration recipe, dependency update recipe, and optimization recipe. The target execution order of the target upgrade formula combination is determined through a multi-round convergence mechanism; The software system is upgraded according to the target execution order and the target upgrade formula combination.
[0108] In addition to intelligent selection, this application can also use rule engines or expert systems to implement recipe selection; in addition to multi-dimensional analysis, it can also use methods such as static code analysis or dependency graph analysis; in addition to centralized recipe libraries, it can also use distributed recipe registries or plug-in recipe management; in addition to machine learning models, it can also use deep learning or reinforcement learning models to optimize recipe selection.
[0109] This application can reduce the upgrade failure rate by more than 80% and improve the success rate of software system upgrades through predefined upgrade strategies and pre-compilation checks.
[0110] Figure 7 This is an exemplary system provided for Embodiment Seven of this application, which can be used to implement the various embodiments described in this application; like Figure 7 As shown, in some embodiments, the system can serve as any of the aforementioned devices for upgrading an AI-driven software system in each of the various embodiments. In some embodiments, the system may include one or more computer-readable media (e.g., system memory or NVM / storage device) having a result, and one or more processors (e.g., one or more processors) coupled to the one or more computer-readable media and configured to execute the result to implement the module thereby performing the actions described in this application.
[0111] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0112] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0113] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A software system upgrade method based on artificial intelligence, characterized in that, The method includes: Receive natural language commands from users; The encoding assistant updates the natural language recognition software system according to the user's instructions. The framework upgrade tool obtains software system information and the set upgrade recipe knowledge base; The features of the software system are analyzed from multiple dimensions using a large model. The large model determines the target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system, wherein the target upgrade recipe combination includes at least one of the following: framework upgrade recipe, migration recipe, dependency update recipe, and optimization recipe. The target execution order of the target upgrade formula combination is determined through a multi-round convergence mechanism; The software system is upgraded according to the target execution order and the target upgrade formula combination.
2. The software system upgrade method based on artificial intelligence driven according to claim 1, characterized in that, Before performing multi-dimensional analysis of the features of the software system, the following steps are included: The software system information is verified; The verification of the software system information includes: Verify the compilation status of the software system information; If the software system is found to be in an uncompileable state, the software system upgrade process will be terminated and an alarm will be issued. Set up an upgraded formula knowledge base; The setup and upgrade of the recipe knowledge base includes: Configure detailed information on all available upgrade recipes for the refactoring tool; record the functional characteristics and applicable scenarios of each upgrade recipe; create a mapping and dependency graph of relationships between each upgrade recipe.
3. The software system upgrade method based on artificial intelligence driven according to claim 1, characterized in that, The multi-dimensional analysis of the features of the software system includes: Obtain the framework type and current version information used by the software system; The large model is used to analyze the code structure and dependencies of the software system based on the framework type and current version information used by the software system. Obtain the framework components and programming paradigms used in the software system; The complexity and upgrade difficulty of the software system are assessed using a large model based on the framework components and programming paradigms used in the software system.
4. The software system upgrade method based on artificial intelligence driven according to claim 1, characterized in that, The step of determining the target upgrade formula combination from the upgrade formula knowledge base based on the feature analysis results of the software system includes: Obtain the feature analysis results of the software system; Based on the user's natural language intent and the characteristics of the software system, the large model is used to identify the gaps that need to be overcome for the software system upgrade. These gaps include at least one of the following: the main version of the software system upgrade framework, security module, language version, and namespace migration gaps. Obtain the framework upgrade tool; The large model obtains a software system upgrade strategy through the framework upgrade tool and the gaps that the software system upgrade needs to overcome, and determines the target upgrade formula combination based on the software system upgrade strategy.
5. The software system upgrade method based on artificial intelligence driven according to claim 4, characterized in that, The step of determining the target upgrade formula combination from the upgrade formula knowledge base based on the feature analysis results of the software system further includes: If the software system does not include a security module, the software system will not be upgraded using a migration recipe. If the software system is already the latest version, then the software system will not be upgraded using the framework upgrade recipe.
6. The software system upgrade method based on artificial intelligence driven according to claim 1, characterized in that, The process of determining the target execution order of the target upgrade formula combination through a multi-round convergence mechanism includes: The target upgrade formula combination is sorted by the atomic granularity and multi-round convergence mechanism of the reconstruction tool; The refactoring tool creates an abstract syntax tree for the target upgrade recipe combination operation; Detect whether the abstract syntax tree has changed; In response to a change in the abstract syntax tree, the target upgrade recipe combination is reordered using the atomic granularity and multi-round convergence mechanism of the reconstruction tool until the abstract syntax tree remains unchanged. The number of sorting rounds corresponding to the unchanged abstract syntax tree is then set as the maximum number of rounds. In response to the maximum number of rounds of repetition of sorting the target upgrade recipe combination through the atomic granularity and multi-round convergence mechanism of the reconstruction tool, the sorting order of the current target upgrade recipe combination is determined as the target execution order of the target upgrade recipe combination.
7. The software system upgrade method based on artificial intelligence driven according to claim 1, characterized in that, The upgrade of the software system according to the target execution order and the target upgrade formula combination includes: Set up an upgrade execution log for the software system to record the currently running target upgrade recipe combination, scan progress, upgrade convergence rounds, and error messages during the upgrade process; Upon completion of the software system upgrade, a software system upgrade data table is generated, recording the change information generated during the current software system upgrade execution. The change information includes at least one of the following: modified project files, version change information of upgrade dependent projects, and modified recipe information. The software system upgrade data table includes a source file change table and a dependency change table. The modification information for the current software system upgrade is determined by parsing the software system upgrade data table, and a software system upgrade report is generated based on the parsing results of the software system upgrade data table. If the software system's dependency information fails to download normally, the changes to the successfully upgraded project will be retained. If the selected upgrade recipe coordinates or software system version does not exist in the upgrade recipe knowledge base, the failed upgrade recipe and the reason for the upgrade failure are recorded. If the source code cannot be compiled or parsed before the software system upgrade, or if there are syntax errors before the software system upgrade, the system will return to the compileable state before the upgrade and send the upgrade recipe coordinate error information to the user.
8. The software system upgrade method based on artificial intelligence driven according to claim 1, characterized in that, After upgrading the software system according to the target execution order and the target upgrade formula combination, the process includes: The large model is used to determine whether there are compilation errors in the software system after the target upgrade formula is executed; If no compilation errors are found in the software system, the software system test is run to verify whether the software system upgrade breaks existing functions. In response to a compilation error in the software system, the compilation error information is obtained, the residual problem that the upgrade recipe failed to cover is located based on the compilation error information, and the software system is repaired based on the residual problem and the ability to understand the software system code; If the upgrade errors that occur during the repair phase of the software system are not isolated cases, the software system will be upgraded again using the software system-specific upgrade recipe corresponding to this framework type. If a regression occurs in the software system test after executing a software system-specific upgrade recipe, the software system-specific upgrade recipe is deleted, and the software system is upgraded using an equivalent upgrade recipe. If a discrepancy arises between the actual technology stack of the software system and the initial analysis after an upgrade is performed, the target upgrade formula for subsequent software system upgrades will be adjusted.
9. A software system upgrade device based on artificial intelligence, characterized in that, The device includes: The receiving module is used to receive natural language commands from users; The recognition module is used to update the user's natural language recognition software system according to the encoding assistant's instructions. The acquisition module is used to obtain software system information and the set upgrade recipe knowledge base through the framework upgrade tool; The parsing module is used to perform multi-dimensional analysis of the features of the software system using a large model. The determination module is used to determine the target upgrade recipe combination from the upgrade recipe knowledge base based on the feature analysis results of the software system using a large model. The target upgrade recipe combination includes at least one of the following: framework upgrade recipe, migration recipe, dependency update recipe, and optimization recipe. The target execution order of the target upgrade recipe combination is determined through a multi-round convergence mechanism. The upgrade module is used to upgrade the software system according to the target execution order and the target upgrade formula combination.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the artificial intelligence-driven software system upgrade method according to any one of claims 1 to 8.