CN-121996222-A - AI-driven supply chain software automation code generation method
Abstract
The invention provides an AI-driven automatic code generation method for supply chain software, relates to the technical field of supply chain software development, and solves the problems of low development efficiency, high manual adjustment cost and difficult cross-system integration of the current supply chain software. The method comprises the steps of firstly obtaining a component template library which stores a front-end component template and a background interface code template packaged by adopting a fixed structure and configurable parameters, further obtaining a configuration description file, analyzing the configuration parameters, retrieving the component template, injecting the configuration parameters into the configurable parameter positions of the component template, splicing according to engineering catalog specifications to generate a basic code prototype of supply chain software, finally analyzing service context information of the supply chain by utilizing an AI proxy to generate a service logic code, and embedding the service logic code into the basic code prototype to obtain a target code of the supply chain software. The invention can provide full-flow efficient support from the first edition framework to business logic floor for ERP, WMS and MAS related supply chain software.
Inventors
- LIANG LI
- CUI YI
- SHI TING
Assignees
- 宏图智能物流股份有限公司
- 泸州宏图数字科技有限责任公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260407
Claims (10)
- 1. An AI-driven supply chain software automation code generation method, comprising the steps of: S1, acquiring a component template library of supply chain software, wherein a front-end component template and a background interface code template which are packaged by adopting a fixed structure and configurable parameters are stored in the component template library; S2, acquiring a configuration description file of the supply chain software, analyzing configuration parameters in the configuration description file, retrieving corresponding component templates from the component template library according to the configuration parameters, injecting the configuration parameters into the configurable parameter positions of the component templates, and splicing according to engineering catalog specifications to generate a basic code prototype of the supply chain software; S3, based on the basic code prototype, using an AI agent to analyze service context information of a supply chain, generating a service logic code associated with the service context information, embedding the service logic code into the basic code prototype, and obtaining and outputting an object code of supply chain software.
- 2. The method for generating automatic code of supply chain software according to claim 1, wherein in step S1, the front-end component templates include at least one of a list presentation component template, a business form interaction component template, an inventory and production visualization component template, and a cross-system collaboration component template; The background interface code template is packaged by adopting a preset background frame specification and comprises a Controller layer template, a Service layer template, a Mapper layer template and an entity class template, wherein class annotation, a method naming structure, exception handling logic and a hierarchical dependency definition corresponding to the preset background frame specification are preset in each template.
- 3. The method for generating automatic code of supply chain software according to claim 2, wherein the fixed structure encapsulates basic rendering logic, style definition code and industry universal event binding logic of components; the configurable parameters comprise a database table mapping relation, a field display rule, an interface request address, a screening condition field, a permission identifier and a style theme identifier.
- 4. The method for generating automatic code of supply chain software according to claim 1, wherein in step S2, the configuration description file is defined in a JSON format structure to form a plurality of resolvable information modules, including a project basic information module, a data source configuration module, a component combination configuration module, an interface association configuration module and a menu authority configuration module, wherein the project basic information module is configured with a project name and an output path.
- 5. The method for generating automatic code of supply chain software according to claim 4, wherein the data source configuration module is configured with a database table name, a primary key field identification, a field name list, a field data type and field annotation information; the component combination configuration module is configured with a page path, a page title, a selected component template identifier and a personalized parameter set corresponding to the component template according to the page dimension.
- 6. The method for generating automatic code of supply chain software according to claim 5, wherein the interface association configuration module is configured with an interface path, an HTTP request method type, a mapping rule of a request parameter and a database field, and a response data analysis format; The menu authority configuration module is configured with a menu hierarchical structure, a menu name, an associated page path and an authority identifier.
- 7. The supply chain software automation code generation method of claim 1, wherein in step S2, a base code prototype of the supply chain software is generated, comprising the sub-steps of: S21, analyzing the configuration description file, and establishing an association mapping relation among project information, data sources, components and interfaces; S22, retrieving the matched component templates from the component template library according to the association mapping relation and loading the fixed structure codes of the matched component templates; S23, injecting the configuration parameters into the configurable parameter positions of the component templates to complete the instantiation of the components and obtain corresponding component codes; s24, splicing the component codes according to the page structure and a preset engineering catalog specification to generate a complete engineering structure; S25, carrying out grammar verification on the spliced codes, and obtaining a basic code prototype of the supply chain software after verification.
- 8. The method for generating automatic code of supply chain software according to claim 1, wherein in step S3, the business context information comprises at least one business rule data selected from the group consisting of stock warning threshold rules, stock alignment verification rules, purchase order verification rules, stock ledger update trigger conditions, and production task status feedback rules.
- 9. The method of claim 8, wherein the business logic code comprises logic code segments for triggering a procurement replenishment process when inventory is below a pre-warning threshold, temporarily stopping execution of a bill of lading when production material is not aligned, performing business verification when a procurement order is submitted, synchronously updating a ledger record when inventory is changed, and feeding back status to an associated system when a production task is completed.
- 10. The method for generating automatic code of supply chain software according to claim 1, wherein in step S3, said AI agent performs context analysis on the data model, interface call relationship and component event binding logic in said basic code prototype based on a preset supply chain business rule knowledge base, identifies association paths between business rules, and generates said business logic code matching with the existing code structure according to said association paths when generating said business logic code.
Description
AI-driven supply chain software automation code generation method Technical Field The invention relates to the technical field of supply chain software development, in particular to an AI-driven automatic code generation method for supply chain software. Background In the field of supply chain software development, core components such as a resource management module of an enterprise resource planning system ERP, a job processing module of a warehouse management system WMS, a production scheduling module of a manufacturing execution system MAS and the like face double pressures of development efficiency and comprehensive cost for a long time. Functional units with highly similar structures and repeated logic are commonly existing in the service flow of the supply chain, such as input verification of a purchase order, dynamic maintenance of an inventory ledger, dispatch of production tasks, state feedback and the like. Although the service scene is clear, the module needs to strictly follow the data rule and the service constraint specific to the supply chain. Even depending on the mature development framework, developers still need to spend a large amount of time to carry out rule adaptation and basic logic repeated construction, and project period is remarkably prolonged. Meanwhile, the supply chain software highly depends on the cooperation of multiple systems, such as stock data flow between resource planning and warehouse management, material distribution information interaction between warehouse and production execution, and the like. In the process of cross-system integration, problems such as standardization degree of interface definition, accuracy of data model mapping, coordination consistency of authority configuration and the like are easy to cause connection deviation, repeated communication and debugging are needed by multiple parties, and development and maintenance cost is further increased. To improve development efficiency, the industry has attempted to introduce various code generation tools, however, the limitations of the existing schemes in the supply chain scenario are obvious. Part of tools can only output single code components with isolated functions, such as independently generating inventory inquiry interfaces, but cannot associate with purchase verification, production linkage and other upstream and downstream business logic, and end-to-end supply chain business flow construction is difficult to support. The other template-based generation scheme supports parameter configuration, but the configuration flow is complex, the template is weak in coupling with the service rule of the supply chain, the generated code prototype has low conformity with the actual service requirement, and a large amount of manual correction is still needed. In recent years, the artificial intelligence AI technology is gradually applied to code generation, but the existing tools generally lack deep understanding capability of service contexts of a supply chain, and are difficult to accurately capture implicit relations among typical service rules such as purchase replenishment triggered by inventory early warning, work order suspension caused by material shortage and the like. The generated logic fragments have insufficient compatibility with the existing supply chain framework, the multiplexing value is limited, and a developer still needs to invest a great deal of effort to carry out adaptation optimization. In summary, when the current technical means deal with the collaborative integration of the development of the high-repeatability module of the supply chain software and the multisystem, the current technical means cannot effectively integrate business knowledge and project specific context of the industry, so that the degree of automation is insufficient and the manual intervention is frequent. The development process still highly depends on experience accumulation and repeated debugging, and the collaborative improvement of efficiency and quality is difficult to realize. The development field of supply chain software is in need of an intelligent supporting scheme capable of integrating business component resources of industry, simplifying configuration flow remarkably and having context sensing and accurate logic deriving capability, so as to break through the bottleneck of the prior art and promote development mode to evolve in a high-efficiency, accurate and reusable direction. Disclosure of Invention The invention aims to solve the problems of low development efficiency, high manual adjustment cost and difficult cross-system collaborative integration caused by the fact that the conventional supply chain software code generation technology is low in service link fracture, complicated in industry configuration flow and poor in service context awareness capability of a supply chain. The invention provides an AI-driven automatic code generation method for supply chain software, which provides full-f