Method and device for automatically generating scaffold engineering based on architecture scheme document

By using an automated generation method based on architecture solution documents and employing an artificial intelligence model to parse enterprise architecture design documents, automatically matching CBB component versions and integrating operation and maintenance monitoring, the high adaptation cost and uncontrollable quality issues of existing scaffolding tools in enterprise-level scenarios are resolved, achieving efficient and reliable engineering generation and verification.

CN121918809APending Publication Date: 2026-04-24ASPIRE TECH (SHENZHEN) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ASPIRE TECH (SHENZHEN) LTD
Filing Date
2026-01-05
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing scaffolding tools cannot deeply integrate with the enterprise's internal technology ecosystem, and cannot automatically parse or respond to the enterprise's unique architecture design documents. As a result, the generated projects cannot meet the enterprise's internal requirements for technology stack uniformity, component compatibility, and out-of-the-box business functionality. Furthermore, the lack of a full-chain automated verification mechanism leads to long project initialization times and uncontrollable quality.

Method used

By using an automated generation method based on architecture solution documents, an artificial intelligence model is used to parse the project architecture design documents, extract a three-dimensional constraint list, automatically match the enterprise CBB component version, generate a dependency list, integrate operation and maintenance monitoring configuration, and finally execute automated test closed-loop verification to ensure project quality.

Benefits of technology

It achieves fully automated generation from architecture documents to runnable projects, significantly shortening project initialization time, improving dependency configuration efficiency, ensuring technology stack consistency and engineering quality, and enhancing business development efficiency and monitoring capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121918809A_ABST
    Figure CN121918809A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer software engineering, and discloses a method and a device for automatically generating scaffold engineering based on an architecture scheme document. The method comprises the following steps: inputting a project architecture design document, analyzing and extracting constraints by adopting a fine-tuning artificial intelligence model, generating a three-dimensional constraint list, performing legality verification on the three-dimensional constraint list, matching a component version in a built-in CBB component library according to the list, automatically associating three-party dependencies, executing dependency conflict detection, and generating a final dependency list. And based on the three-dimensional constraint list and the dependency list, generating a basic engineering code through a code generation engine, integrating prefabricated service logic and operation and maintenance monitoring configuration, and executing automatic test closed-loop verification on the generated complete engineering. According to the method, full-process automatic generation from an architecture document to an operable project can be realized, project initialization efficiency is greatly improved, dependency conflicts are reduced, business development efficiency is improved, and controllable and reliable quality of a delivery project is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software engineering technology, and discloses a method and apparatus for automatically generating scaffolding engineering based on architecture scheme documents. Background Technology

[0002] As enterprise software development scales and architectural complexity continues to increase, the scaffolding project construction during the project initialization phase has become a critical link affecting development efficiency and code standardization. Current mainstream Java scaffolding generation technologies are generally based on universal template mechanisms, providing basic directory structures and dependency configurations through pre-defined combinations of open-source technology stacks such as Spring Boot and MyBatis, aiming to lower the barrier to project setup and unify team development styles. These solutions typically support Maven / Gradle build specifications and standardized output for layered architectures such as Controller / Service / Repository, suitable for rapid startup needs in common business scenarios.

[0003] Existing scaffolding tools focus on the integration capabilities of general-purpose technical components, allowing users to select necessary dependencies from a limited pool of options and generate a shell-like project skeleton. However, this approach essentially remains at the level of technical template reuse, lacking deep adaptation capabilities to the enterprise's internal technical ecosystem and business specifications. Specifically, conventional solutions cannot parse or respond to the CBBCommon Building Block component requirements, business scenario constraints such as IAM permission management, web security protection, and basic environment specifications such as JDK version, package path, and private middleware contained in the enterprise's unique architecture design documents. As a result, while the generated project conforms to best practices in the open-source community, it fails to meet the enterprise's core demands for technology stack uniformity, component compatibility, and out-of-the-box business functionality.

[0004] Existing technologies suffer from multiple structural flaws: First, their configuration logic is disconnected from the enterprise CBB (Content Builder) system, supporting only free combination of open-source third-party libraries and failing to automatically match enterprise-verified CBB versions and their bound dependencies, easily leading to version conflicts or compliance risks. Second, the generated content is unrelated to specific business logic, requiring developers to manually write a large amount of basic business logic, making it impossible to directly translate architectural intent into runnable code. Third, non-functional requirements such as operation and maintenance monitoring and deployment modes require manual configuration, making it difficult to achieve automated integration through document-driven processes. Finally, the lack of a closed-loop verification mechanism for the generated results makes it impossible to ensure the availability of the project at the compilation, startup, and basic functional levels. These problems cause traditional scaffolding to face bottlenecks such as high adaptation costs, difficulty in implementing standards, and uncontrollable delivery quality in complex enterprise scenarios, urgently requiring an intelligent scaffolding generation method that can take architecture documents as input, deeply integrate with the enterprise CBB ecosystem, and connect the entire chain of parsing, adaptation, generation, and verification. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and apparatus for automatically generating scaffolding engineering based on architectural scheme documents, which can effectively solve the problems in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: In one aspect, a method for automatically generating scaffolding projects based on architectural scheme documents, the method comprising the following steps: S110, Input the project architecture design document, and use a fine-tuned artificial intelligence model to parse the content of the project architecture design document, identify and extract basic constraints, business scenario constraints and CBB component constraints, and generate a three-dimensional constraint list; S120, perform a validity check on the extracted three-dimensional constraint list. If the check fails, output an adjustment prompt and support document correction and re-entry. If the check passes, proceed to the next step. S130, based on the CBB component constraints in the three-dimensional constraint list, match the corresponding component version in the built-in CBB component library, and automatically associate its bound third-party dependencies; S140 performs dependency conflict detection. When multiple CBB components depend on the same third-party library, it automatically selects the highest compatible version verified by the enterprise and generates the final dependency list. S150, based on the three-dimensional constraint list and dependency list, generate basic engineering code through the code generation engine, and integrate pre-made business logic and operation and maintenance monitoring configuration according to business scenario constraints; S160 automatically generates docker-compose configuration and jar package startup scripts based on architecture type and deployment requirements; S170 performs automated closed-loop testing on the generated complete project. If the verification fails, the project code fine-tuning mechanism is triggered.

[0007] Furthermore, the method also includes: In step S110, the fine-tuned artificial intelligence model adopts a text classification model based on the BERT-base architecture, and the training process includes: Using the enterprise's historical architecture design documents as a sample, the HanLP word segmentation tool was used to segment key chapters and construct semantic associations between constraint items and parameter values; A dedicated labeling system is used for fine-grained annotation. During model training, the learning rate and number of iterations are set, and the cross-entropy loss function is used.

[0008] Furthermore, the method also includes: In step S140, the dependency conflict detection is performed based on a preset compatibility matrix, which records the compatibility status of different CBB component versions with different third-party dependency versions. By querying the compatibility matrix, the highest compatible version supported by all relevant CBB components is selected and locked for third-party dependencies with version differences.

[0009] On the other hand, this invention claims protection for an apparatus for automatically generating scaffolding engineering projects based on architectural scheme documents, used to execute the aforementioned method for automatically generating scaffolding engineering projects based on architectural scheme documents. The apparatus comprises the following components: The architecture document parsing module is used to receive and parse the input architecture design document. It uses a customized artificial intelligence model to identify and extract the basic constraints, business scenario constraints and CBB component constraints contained in the document, forming a structured three-dimensional constraint list. It also performs legality verification and format standardization processing on the extracted constraint information. The CBB component adaptation module is used to maintain a built-in enterprise CBB component library. This library fixes the stable versions of each CBB component and their corresponding third-party dependency mapping relationships. It automatically matches the corresponding CBB component version according to the three-dimensional constraint list, associates and supplements the required third-party dependencies, and performs dependency conflict detection and version compatibility processing. The code and configuration generation module is used to automatically generate engineering code, configuration files and pre-made business scenario logic that conform to the enterprise's technical specifications based on the three-dimensional constraint list and CBB-third-party dependency matching results, through preset code generation logic and template engine. The deployment configuration generation module is used to automatically generate deployment configuration files adapted to different operating environments based on architecture type and operation and maintenance monitoring requirements, including docker-compose orchestration files and jar package startup scripts, and ensure the consistency of configuration parameters; Verification closed-loop module, which is used to automatically create targeted automated test scripts based on the generated engineering code and configuration, and execute the full-link verification process of compilation, startup, and functional testing, and output a verification report.

[0010] Furthermore, the construction process of the customized artificial intelligence model in the architecture document parsing module includes: Adopt a text classification model based on the BERT-base architecture, use the enterprise historical project architecture design document as the training sample, and design a special training process for three types of information: basic constraints, business scenario constraints, and CBB component constraints; The training process includes using the HanLP word segmentation tool to segment the key chapters of the document, and focusing on constructing the semantic association between the constraint item - parameter value; Construct an exclusive label system to perform fine-grained annotation on the training sample, and the annotation format is <base_constraint = constraint item, val = value>, <biz_constraint = type, demand = requirement>, and <cbb_constraint = component name>; Set the learning rate and the number of iterations during model training, and use the cross-entropy loss function to optimize the parameters.

[0011] Furthermore, the logic for the architecture document parsing module to perform constraint extraction is: For the uploaded Word, PDF or Markdown format document, the model automatically locates the chapters of the basic environment configuration, business requirements, and technical component selection; The extraction of basic constraints includes the JDK version, the basic package path, the database type, and the middleware requirements, and the output is structured data of the <base_constraint> type; The extraction of business scenario constraints includes the business type and the operation and maintenance monitoring requirements, and the output is data of the <biz_constraint> type; The CBB component constraint only extracts the component name or ID, without specifying the version, and the output is data of the <cbb_constraint> type.

[0012] Furthermore, the architecture document parsing module also includes a constraint legality pre-checking engine, and the checking logic is: For the extracted basic constraints, judge whether the JDK version and the database type are within the enterprise's preset support list, and output a correction prompt for the unsupported items; For the missing optional constraint items in the document, automatically fill in the enterprise default value and mark them as modifiable items; Perform format standardization processing on the extracted parameter values.

[0013] Furthermore, the device also includes: The built-in CBB component library maintained by the CBB component adaptation module is stored in tabular form. Each record contains the CBB component coordinates, name, built-in version, and core third-party dependency version. The component library establishes a version synchronization mechanism, which is updated and iterated regularly with the scaffolding version. When a CBB component is upgraded, the associated third-party dependency mapping relationship is updated synchronously. The dependency conflict handling logic executed by the CBB component adaptation module is as follows: When the 3D constraint list requires the integration of multiple CBB components, and the third-party dependencies mapped by these components have version differences, the highest compatible version supported by all relevant CBB components is automatically selected and locked uniformly based on the preset compatibility matrix. The code and configuration generation module includes a pre-built logic library for business scenarios, which encapsulates core code templates for various enterprise-level business scenarios. When the 3D constraint list contains a specific business scenario, the module automatically matches and integrates the corresponding template.

[0014] Furthermore, the device also includes: The deployment configuration generation module generates differentiated configurations based on the architecture type. For monolithic or cluster architectures, it generates a docker-compose configuration containing a single service node and a jar startup script that sets the JVM parameter to -Xms1024m. For microservice architectures, generate docker-compose configurations that include multiple nodes such as service registry, gateway, and business services, and automatically arrange the startup order. At the same time, generate jar startup scripts with the JVM parameter set to -Xmx512m.

[0015] Furthermore, the automated test scripts generated by the verification closed-loop module cover specific test cases such as permission verification, security interception, indicator reporting, and link tracing. The verification process supports one-click deployment verification based on docker-compose and direct startup verification based on jar packages.

[0016] Compared with the prior art, the present invention has the following beneficial effects: It has achieved fully automated generation of the entire process from architecture documents to runnable projects, reducing the time spent on manual operations in the project initialization phase from several hours to minutes, with an overall efficiency improvement of over 90%. Among these improvements, the time spent on dependency configuration has been reduced from 1 hour to 1 minute, and the time spent on monitoring access has been reduced from 3 hours to 10 minutes.

[0017] By using the enterprise CBB component as the sole technical entry point and automatically matching third-party dependencies, the technology stack is forcibly unified, completely resolving the issues of dependency version chaos and conflict, achieving a 100% dependency adaptation success rate, and reducing the startup failure rate caused by version conflicts from 20% to 0.

[0018] Built-in pre-built business scenario logic and automated operation and maintenance monitoring integration enable the generated project to have out-of-the-box business capabilities and production-ready monitoring capabilities, improving business development efficiency by 60% and ensuring that the monitoring indicator format is completely consistent with the enterprise platform specifications.

[0019] A complete closed loop including parsing, adaptation, generation, and verification has been constructed. Constraint legality is verified during the document parsing stage, and full-link automated testing is performed after the project is generated. This avoids errors such as environment incompatibility and component incompatibility from the source, ensuring the quality of the delivered project is controllable and reliable.

[0020] It supports seamless switching between various architecture modes such as monolithic, cluster, and microservice and different deployment scenarios in development and production. Through parameter linkage mechanism, it ensures the consistency of docker-compose configuration and jar package startup script environment, reducing problems caused by environment inconsistency by 80%. Attached Figure Description

[0021] Figure 1 A flowchart illustrating a method for automatically generating scaffolding engineering based on architectural scheme documents, as claimed in an embodiment of the present invention; Figure 2 The present invention relates to a structural module diagram of a scaffolding engineering device that is automatically generated based on an architecture scheme document, as claimed in an embodiment of the present invention. Detailed Implementation

[0022] In enterprise software development projects, especially when developing new business devices using a microservice architecture, the project initialization phase typically involves a large amount of tedious, repetitive, and error-prone manual configuration work. Development teams need to manually build the project structure, configure the basic environment, introduce technical components, handle dependency conflicts, and integrate operation and maintenance monitoring capabilities based on the architecture design documents output by the architect. This process can take hours or even days and is highly susceptible to human error, leading to inconsistencies in the environment and dependency version conflicts, severely impacting project startup efficiency and subsequent development quality. This embodiment will detail a method and apparatus for automatically generating scaffolding projects based on architecture solution documents, demonstrating how to achieve fully automated generation from architecture documents to a runnable and verifiable project in this scenario.

[0023] According to the first embodiment of the present invention, referring to Figure 1 This invention claims protection for a method for automatically generating scaffolding projects based on architectural scheme documents, the method comprising the following steps: S110, Input the project architecture design document, and use a fine-tuned artificial intelligence model to parse the content of the project architecture design document, identify and extract basic constraints, business scenario constraints and CBB component constraints, and generate a three-dimensional constraint list; S120, perform a validity check on the extracted three-dimensional constraint list. If the check fails, output an adjustment prompt and support document correction and re-entry. If the check passes, proceed to the next step. S130, based on the CBB component constraints in the three-dimensional constraint list, match the corresponding component version in the built-in CBB component library, and automatically associate its bound third-party dependencies; S140 performs dependency conflict detection. When multiple CBB components depend on the same third-party library, it automatically selects the highest compatible version verified by the enterprise and generates the final dependency list. S150, based on the three-dimensional constraint list and dependency list, generate basic engineering code through the code generation engine, and integrate pre-made business logic and operation and maintenance monitoring configuration according to business scenario constraints; S160 automatically generates docker-compose configuration and jar package startup scripts based on architecture type and deployment requirements; S170 performs automated closed-loop testing on the generated complete project. If the verification fails, the project code fine-tuning mechanism is triggered.

[0024] Furthermore, the method also includes: In step S110, the fine-tuned artificial intelligence model adopts a text classification model based on the BERT-base architecture, and the training process includes: Using the enterprise's historical architecture design documents as a sample, the HanLP word segmentation tool was used to segment key chapters and construct semantic associations between constraint items and parameter values; A dedicated labeling system is used for fine-grained annotation. During model training, the learning rate and number of iterations are set, and the cross-entropy loss function is used.

[0025] Furthermore, the method also includes: In step S140, the dependency conflict detection is performed based on a preset compatibility matrix, which records the compatibility status of different CBB component versions with different third-party dependency versions. By querying the compatibility matrix, the highest compatible version supported by all relevant CBB components is selected and locked for third-party dependencies with version differences.

[0026] On the other hand, refer to Figure 2, the present invention claims protection for a scaffolding project generation device based on an architecture solution document, which is used to execute the method for automatically generating a scaffolding project based on an architecture solution document. This device includes the following components: An architecture document parsing module, which is used to receive and parse the input architecture design document, identify and extract the basic constraints, business scenario constraints, and CBB component constraints contained in the document through a customized artificial intelligence model, form a structured three-dimensional constraint list, and perform legal validation and format standardization processing on the extracted constraint information; A CBB component adaptation module, which is used to maintain a built-in enterprise CBB component library. This library solidifies the stable versions of each CBB component and their corresponding third-party dependency mapping relationships, automatically matches the corresponding CBB component versions according to the three-dimensional constraint list, associates and supplements the required third-party dependencies, and performs dependency conflict detection and version compatibility processing; A code and configuration generation module, which is used to automatically generate engineering codes, configuration files, and business scenario prefabricated logics that conform to enterprise technical specifications based on the three-dimensional constraint list and the CBB-third-party dependency matching results through a preset code generation logic and template engine; A deployment configuration generation module, which is used to automatically generate deployment configuration files suitable for different operating environments according to the architecture type and operation and maintenance monitoring requirements, including docker-compose orchestration files and jar package startup scripts, and ensure the consistency of configuration parameters; A verification closed-loop module, which is used to automatically create targeted automated test scripts based on the generated engineering codes and configurations, and execute the full-link verification process of compilation, startup, and functional testing, and output a verification report.

[0027] Furthermore, the construction process of the customized artificial intelligence model in the architecture document parsing module includes: Adopting a text classification model based on the BERT-base architecture, using the enterprise historical project architecture design documents as training samples, and designing a special training process for the three types of information: basic constraints, business scenario constraints, and CBB component constraints; The training process includes using the HanLP word segmentation tool to segment the key chapters of the document, and focusing on constructing the semantic association between constraint items and parameter values; Constructing an exclusive label system to finely label the training samples, and the labeling format is <base_constraint = constraint item, val = value>, <biz_constraint = type, demand = requirement>, and <cbb_constraint = component name>; When training the model, set the learning rate and the number of iterations, and use the cross-entropy loss function to optimize the parameters.

[0028] Furthermore, the logic for constraint extraction performed by the architecture document parsing module is as follows: For uploaded Word, PDF, or Markdown documents, the model automatically locates the sections on basic environment configuration, business requirements, and technical component selection. Basic constraint extraction includes JDK version, base package path, database type, and middleware requirements. The output is...<base_constraint> Types of structured data; Business scenario constraint extraction includes business type and operation and maintenance monitoring requirements, and the output is:<biz_constraint> Type data; CBB component constraints extract only the component name or ID, without specifying the version, and the output is...<cbb_constraint> Type data.

[0029] Furthermore, the architecture document parsing module also includes a constraint validity pre-validation engine, the validation logic of which is as follows: For the extracted basic constraints, determine whether the JDK version and database type are in the enterprise's preset support list, and output correction prompts for unsupported items; For missing optional constraints in the document, automatically fill in the enterprise default values ​​and mark them as modifiable; Perform format standardization processing on the extracted parameter values.

[0030] Furthermore, the device also includes: The built-in CBB component library maintained by the CBB component adaptation module is stored in tabular form. Each record contains the CBB component coordinates, name, built-in version, and core third-party dependency version. The component library establishes a version synchronization mechanism, which is updated and iterated regularly with the scaffolding version. When a CBB component is upgraded, the associated third-party dependency mapping relationship is updated synchronously. The dependency conflict handling logic executed by the CBB component adaptation module is as follows: When the 3D constraint list requires the integration of multiple CBB components, and the third-party dependencies mapped by these components have version differences, the highest compatible version supported by all relevant CBB components is automatically selected and locked uniformly based on the preset compatibility matrix. The code and configuration generation module includes a pre-built logic library for business scenarios, which encapsulates core code templates for various enterprise-level business scenarios. When the 3D constraint list contains a specific business scenario, the module automatically matches and integrates the corresponding template.

[0031] Furthermore, the device also includes: The deployment configuration generation module generates differentiated configurations according to the architecture type. For a monolithic or cluster architecture, it generates a docker-compose configuration containing a single service node and a jar startup script with the JVM parameter set to -Xms1024m; For a microservices architecture, it generates a docker-compose configuration containing multiple nodes such as a service registry, a gateway, and business services, automatically orchestrates the startup order, and simultaneously generates a jar startup script with the JVM parameter set to -Xmx512m.

[0032] Furthermore, the automated test scripts generated by the verification closed-loop module cover special test cases such as permission verification, security interception, metric reporting, and link tracing; The verification process supports one-click deployment verification based on docker-compose and direct startup verification based on jar packages.

[0033] Among them, in this embodiment, the device includes an architecture document parsing module, a CBB component adaptation module, a code and configuration generation module, a deployment configuration generation module, and a verification closed-loop module. These modules work together to form a complete automated pipeline from document input to engineering verification.

[0034] The architecture document parsing module is responsible for receiving and parsing the input architecture design document. The core of this module is an artificially intelligent model that has been specifically fine-tuned. Its construction process is as follows: A text classification model based on the BERT-base architecture is used as the basis, and thousands of high-quality architecture design documents accumulated by the enterprise are used as training samples. A special training process is designed for the core goal of this invention - extracting three types of information: basic constraint, business scenario constraint, and CBB component constraint.

[0035] First, the HanLP word segmentation tool is used to accurately segment the key sections in the document, such as basic environment configuration, business requirements, and technical component selection, with a focus on constructing the semantic association between constraint items and parameter values. Secondly, a dedicated label system is constructed to finely label the training samples. The labeling format includes <base_constraint = constraint item, val = value>, <biz_constraint = type, demand = requirement>, and <cbb_constraint = component name>. During model training, the learning rate is set to 0.001, and it is iterated 50 times. The cross-entropy loss function is used to optimize the parameters.

[0036] After training, the model achieved an overall recognition accuracy of 99.5% for 3D constraint information, with an extraction error rate of less than 0.5% for basic constraint parameter values. In actual operation, when a user uploads an architecture design document in Word, PDF, or Markdown format, the model automatically locates the aforementioned key sections. For basic constraints, the model extracts the JDK version, base package path, database type, and middleware requirements, such as identifying JDK 17, com.example.project, MySQL 8.0, and Nacos 2.2.3, and outputs the information in a structured format.<base_constraint> Type data.

[0037] Given business scenario constraints, the model extracts business types and operational monitoring requirements, such as identifying IAM access control and the need to integrate tracing and metric monitoring, and outputs the following:<biz_constraint> Typed data. For CBB component constraints, the model only extracts the component name or ID, without specifying the specific version. For example, if it identifies the user center component or the payment gateway component, the output will be...<cbb_constraint> Type data. Once extracted, the constraint validity pre-validation engine immediately starts. This engine first determines whether the extracted basic constraints are within the enterprise's preset support list, for example, checking if the JDK version is jdk8 or jdk17. For unsupported items, the engine immediately outputs a clear correction prompt. Secondly, for optional constraint items missing from the documentation, such as those without a specified log level, the engine automatically fills in the enterprise default value INFO and marks them as modifiable.

[0038] Finally, the engine performs format standardization processing, uniformly correcting user-inputted JDK 17 to jdk17 and mysql8.0 to MySQL8.0, ensuring consistency in subsequent processing. After all validations pass, a standardized three-dimensional constraint list is generated, serving as the sole input basis for all subsequent module processing.

[0039] The core of the CBB component adaptation module is maintaining a built-in enterprise CBB component library. This library is stored in a table format, with each record precisely containing the coordinates, name, currently recommended stable version for the enterprise, and the core third-party libraries that this version depends on, along with their version mappings. For example, a record might be: Component coordinates com.enterprise.cbb:user-center, Name: User Center Component, Built-in version 2.1.0, Core third-party dependencies: spring-boot-starter-web:2.7.18, mysql-connector-java:8.0.33. This component library has a strict version synchronization mechanism, iterating regularly along with the enterprise scaffolding's main version. When a CBB component is upgraded, its associated third-party dependency mappings are updated synchronously, ensuring mapping accuracy.

[0040] After receiving the 3D constraint list from the architecture document parsing module, this module first precisely matches the corresponding components and their built-in stable versions in the component library based on the CBB component constraints in the list. The matching process is based on precise queries using component coordinates or names. Upon successful matching, the module automatically associates all third-party dependencies bound to that component version, forming a preliminary dependency set. Subsequently, the device performs dependency conflict detection. When the 3D constraint list requires the integration of multiple CBB components, and the third-party dependencies mapped to these components have version differences—for example, the user center component depends on spring-boot-starter-web:2.7.18, while the payment gateway component depends on spring-boot-starter-web:3.0.0—the device will automatically select and lock the highest compatible version supported by all relevant CBB components based on a preset compatibility matrix that has been fully manually verified.

[0041] The compatibility matrix is ​​an authoritative mapping table maintained by the Enterprise Architecture Committee, recording the compatibility status of different CBB component versions with different third-party dependency versions. The device queries this matrix to determine that `spring-boot-starter-web:2.7.18` is the highest version compatible with both components, thus locking it as the final dependency. After dependency conflicts are resolved, a conflict-free, version-locked final dependency list is generated.

[0042] The code and configuration generation module, based on a three-dimensional constraint list and a final dependency list, drives the code generation engine and template engine to automatically generate an engineering skeleton that conforms to the enterprise's technical specifications.

[0043] This module first generates a standard multi-level Maven or Gradle project directory structure, parent POM file, and submodule POM files based on the project package path, JDK version, and other constraints in the basic constraints. The POM files automatically populate the coordinates and locked versions of all third-party dependencies extracted from the final dependency manifest. Secondly, the module includes a pre-built logic library for various business scenarios, which encapsulates core code templates for multiple enterprise-level business scenarios. When a specific business scenario is included in the three-dimensional constraint manifest, the module automatically matches and integrates the corresponding template.

[0044] For example, for IAM permission management scenarios, the module automatically generates integrated JWT or SESSION authentication mechanisms, RBAC permission models, user-role-permission association data table structures, and corresponding controller, service layer, and data access layer code skeletons. For web security protection scenarios, it generates gateway filter code and configurations integrating XSS filtering, CSRF token verification, and request replay attack protection. Furthermore, this module is responsible for the automated integration of operation and maintenance monitoring capabilities. When the three-dimensional constraint list includes operation and maintenance monitoring requirements, the module automatically imports the enterprise's unified metric monitoring CBB component into the project dependencies and adds parameters such as endpoint addresses, application identifiers, and sampling rates required for connecting to the enterprise's unified monitoring platform to the generated application.yml or bootstrap.properties configuration files. Simultaneously, at the code level, it automatically injects necessary monitoring component beans into the entry class or configuration class and pre-defines some core business metric tracking code examples.

[0045] The deployment configuration generation module generates deployment configuration files adapted to different operating environments based on the architecture type and specific deployment and maintenance requirements.

[0046] This module first identifies the architecture type description in the 3D constraint manifest, such as monolithic architecture or microservice cluster. For monolithic architecture, the module generates a simple `docker-compose.yml` file, defining a service node, building the image based on the JDK version extracted from the basic constraints, and mounting the necessary configuration file volumes. It also generates a corresponding `startup.sh` script, setting the initial JVM heap memory size to 1024MB. For microservice architecture, the module generates a more complex `docker-compose.yml` file, automatically orchestrating the service registry, configuration center, API gateway, and multiple business service nodes, and explicitly defining the network and dependency startup order between containers. The corresponding startup script sets the maximum JVM heap memory for each business service to 512MB. If monitoring requirements are specified in the manifest, the module automatically adds a SkyWalking OAP and UI service container to the `docker-compose.yml` configuration and appends the `-javaagent` parameter to the business service configuration to integrate the tracing agent; alternatively, it directly appends the corresponding agent path and parameters to the generated JAR package startup script. This module ensures that all configuration parameters, such as database connection strings and registry addresses, remain strictly consistent between the docker-compose configuration and the jar package startup script, and is managed uniformly through environment variables or configuration files, completely eliminating environment inconsistency issues.

[0047] The verification closed-loop module starts after all project code and configuration are generated, building the last line of defense for quality assurance. This module first automatically creates a set of targeted automated test scripts based on the characteristics of the generated project and the integrated business scenario. These scripts not only include basic unit tests such as service layer interface tests, but also cover specialized integration test cases such as permission verification, security interception, metric reporting, and tracing. The verification process supports two modes: one is one-click deployment verification based on docker-compose, where the module automatically executes the `docker-compose up` command to start the entire service stack, and then executes the test scripts sequentially to verify the service's collaborative working capabilities in a containerized environment; the other is direct startup verification based on JAR packages, suitable for rapid local checks. The verification process is end-to-end: first, `mvn clean compile` is executed to compile and check for syntax errors and missing dependencies; after successful compilation, the application service is started; after successful service startup, functional test cases are executed sequentially, calling the generated API interfaces to verify whether the business logic and monitoring points are working correctly. Throughout the verification process, the device collects logs and test results in real time. After verification, the module generates a visual verification report, clearly listing key information such as compilation status, service startup status, execution results and pass rates of core functional test cases, and whether monitoring data reporting was successful. If any step of the verification fails, such as compilation failure or an API test case error, the device will not simply exit with an error message, but will trigger an engineering code fine-tuning mechanism. This mechanism will attempt some preset automatic repairs based on error logs, such as adjusting dependency versions and correcting configuration item formats. If automatic repair fails, it will clearly provide feedback to the user on the error point, possible causes, and correction suggestions, guiding the user to revise the architecture design document or adjust constraint parameters.

[0048] In specific embodiments, when large enterprises are upgrading their technology stacks or promoting new scaffolding versions, it is often necessary to migrate project initialization methods from the old architecture specifications to the new standard in batches. Traditional methods require manual adjustments by each team, which is time-consuming, labor-intensive, and difficult to guarantee consistency. This embodiment demonstrates the application of the above-described device and method in a batch, standardized migration scenario.

[0049] Built-in CBB component library: Contains commonly used CBB components and stable versions for enterprises, as shown in Table 1. Table 1 CBB Components and Stable Versions

[0050] Version synchronization mechanism: Regularly release new versions of the scaffolding, update the CBB dependency library, and synchronously update the mapping of related third-party dependencies. For example, when aspire-cbb-auth is upgraded to 3.6.2.0, the third-party dependency spring-security is synchronized to 5.8.1.

[0051] Conflict handling: When multiple CBB components depend on the same third-party component, the highest compatible version verified by the enterprise is automatically selected, such as uniformly locking Spring Security to version 5.8.1. Before releasing a new version of the scaffolding, complete manual verification of component compatibility is performed.

[0052] The three-party dependency requires zero configuration and is automatically matched by the scaffolding according to the CBB version, with a 100% success rate in adaptation, solving the compatibility problem of manual version selection.

[0053] Perfectly compatible with enterprise technology stack specifications.

[0054] Business and Operations Scenario-Based Code Generation Module Pre-built business scenarios: It includes multiple business scenario case encapsulations, and forms an initialization project based on the document business type and CBB primary key.

[0055] IAM scenario: Generate authentication service that supports JWT or SESSION authentication, integrate RBAC permission processing core code, and generate relevant data table structures.

[0056] Web Security Protection: Generate GATEWAY gateway services that support various types of security protection functions such as XSS, CSRF, and replay attack protection.

[0057] Uploading attachments scenario: The service automatically integrates the CBB component for uploading attachments, generating relevant configuration scripts and database scripts.

[0058] Automated integration of operation and maintenance monitoring: After configuring the selected monitoring scenario, the aspire-cbb-metric related services are automatically introduced.

[0059] Supports rapid integration with a unified operations and maintenance platform. Supports configuring Docker Compose integration for the tracing agent or automatically adding startup parameters for the JAR package.

[0060] The traditional monitoring integration process, which takes 3 hours, has been simplified to a single step of document selection, taking only 10 minutes.

[0061] Differentiated advantages: Business code is ready to use out of the box, enterprise internal CBB components are plug-and-play, operation and maintenance monitoring access efficiency is improved by 90%, and the indicator format is unified and conforms to the enterprise monitoring platform specifications.

[0062] The workflow of the code and configuration generation module and the deployment configuration generation module is similar to that of Example 1, but it will enable the batch rendering engine of the template to generate the project code and deployment configuration for all projects in parallel. The verification closed-loop module may adopt a sampling verification strategy, that is, for the generated batch projects, a portion is extracted according to certain rules for full-link verification, while the remaining projects perform core compilation and basic startup verification, so as to improve the efficiency of batch processing while ensuring quality. Finally, the device outputs a migration package containing the index of all generated projects, their respective verification reports, and a global dependency analysis report, which greatly improves the efficiency and standardization of unified technology stack upgrades.

[0063] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for automatically generating scaffolding engineering based on architectural scheme documents, characterized in that, The method includes the following steps: S110, Input the project architecture design document, and use a fine-tuned artificial intelligence model to parse the content of the project architecture design document, identify and extract basic constraints, business scenario constraints and CBB component constraints, and generate a three-dimensional constraint list; S120, perform a validity check on the extracted three-dimensional constraint list. If the check fails, output an adjustment prompt and support document correction and re-entry. If the check passes, proceed to the next step. S130, based on the CBB component constraints in the three-dimensional constraint list, match the corresponding component version in the built-in CBB component library, and automatically associate its bound third-party dependencies; S140 performs dependency conflict detection. When multiple CBB components depend on the same third-party library, it automatically selects the highest compatible version verified by the enterprise and generates the final dependency list. S150, based on the three-dimensional constraint list and dependency list, generate basic engineering code through the code generation engine, and integrate pre-made business logic and operation and maintenance monitoring configuration according to business scenario constraints; S160 automatically generates docker-compose configuration and jar package startup scripts based on architecture type and deployment requirements; S170 performs automated closed-loop testing on the generated complete project. If the verification fails, the project code fine-tuning mechanism is triggered.

2. The method for automatically generating scaffolding engineering based on architecture scheme documents according to claim 1, characterized in that, Also includes: In step S110, the fine-tuned artificial intelligence model adopts a text classification model based on the BERT-base architecture, and the training process includes: Using the enterprise's historical architecture design documents as a sample, the HanLP word segmentation tool was used to segment key chapters and construct semantic associations between constraint items and parameter values; A dedicated labeling system is used for fine-grained annotation. During model training, the learning rate and number of iterations are set, and the cross-entropy loss function is used.

3. The method for automatically generating scaffolding engineering based on architecture scheme documents according to claim 1, characterized in that, Also includes: In step S140, the dependency conflict detection is performed based on a preset compatibility matrix, which records the compatibility status of different CBB component versions with different third-party dependency versions. By querying the compatibility matrix, the highest compatible version supported by all relevant CBB components is selected and locked for third-party dependencies with version differences.

4. A device for automatically generating scaffolding engineering projects based on architectural scheme documents, used to execute the method for automatically generating scaffolding engineering projects based on architectural scheme documents as described in any one of claims 1-3, characterized in that, The device comprises the following components: The architecture document parsing module is used to receive and parse the input architecture design document. It uses a customized artificial intelligence model to identify and extract the basic constraints, business scenario constraints and CBB component constraints contained in the document, forming a structured three-dimensional constraint list. It also performs legality verification and format standardization processing on the extracted constraint information. The CBB component adaptation module is used to maintain a built-in enterprise CBB component library. This library fixes the stable versions of each CBB component and their corresponding third-party dependency mapping relationships. It automatically matches the corresponding CBB component version according to the three-dimensional constraint list, associates and supplements the required third-party dependencies, and performs dependency conflict detection and version compatibility processing. A code and configuration generation module, which is used to automatically generate engineering code, configuration files, and prefabricated business scenario logics that comply with enterprise technical specifications based on the three-dimensional constraint list and the CBB-third-party dependency matching results through a preset code generation logic and template engine; A deployment configuration generation module, which is used to automatically generate deployment configuration files adapted to different operating environments according to the architecture type and operation and maintenance monitoring requirements, including docker-compose orchestration files and jar package startup scripts, and ensure the consistency of configuration parameters; A verification closed-loop module, which is used to automatically create targeted automated test scripts based on the generated engineering code and configuration, and execute the full-link verification process of compilation, startup, and functional testing, and output a verification report.

5. The scaffolding engineering device for automatically generating architecture scheme documents according to claim 4, characterized in that, The construction process of the customized artificial intelligence model in the architecture document parsing module includes: Adopting a text classification model based on the BERT-base architecture, using the enterprise historical project architecture design documents as training samples, and designing special training processes for three types of information: basic constraints, business scenario constraints, and CBB component constraints; The training process includes using the HanLP word segmentation tool to segment the key chapters of the document, and focusing on constructing the semantic association between constraint items and parameter values; Constructing an exclusive label system to perform refined annotation on the training samples, and the annotation format is <base_constraint = constraint item, val = value>, <biz_constraint = type, demand = requirement>, and <cbb_constraint = component name>; When training the model, set the learning rate and the number of iterations, and use the cross-entropy loss function to optimize the parameters.

6. The scaffolding engineering device for automatically generating architecture scheme documents according to claim 4, characterized in that, The logic for the architecture document parsing module to perform constraint extraction is: For the uploaded Word, PDF, or Markdown format documents, the model automatically locates the chapters of the basic environment configuration, business requirements, and technical component selection; The extraction of basic constraints includes the JDK version, basic package path, database type, and middleware requirements, and the output is structured data of the <base_constraint> type; The extraction of business scenario constraints includes business types and operation and maintenance monitoring requirements, and the output is data of the <biz_constraint> type; The CBB component constraint only extracts the component name or ID, without specifying the version, and the output is data of the <cbb_constraint> type.

7. The scaffolding engineering device for automatically generating architecture scheme documents according to claim 4, characterized in that, The architecture document parsing module also includes a constraint legality pre-checking engine, and the checking logic is: For the extracted basic constraints, judge whether the JDK version and database type are within the enterprise's preset support list, and output a correction prompt for the unsupported items; For the missing optional constraint items in the document, automatically fill in the enterprise default values and mark them as modifiable items; Perform format standardization processing on the extracted parameter values.

8. The scaffolding engineering device for automatically generating architecture scheme documents according to claim 4, characterized in that, It also includes: The built-in CBB component library maintained by the CBB component adaptation module is stored in a table form, and each record contains the CBB component coordinates, name, built-in version, and core third-party dependency version; The component library establishes a version synchronization mechanism, which is updated and iterated regularly with the scaffolding version. When a CBB component is upgraded, the associated third-party dependency mapping relationship is updated synchronously. The dependency conflict handling logic executed by the CBB component adaptation module is as follows: When the 3D constraint list requires the integration of multiple CBB components, and the third-party dependencies mapped by these components have version differences, the highest compatible version supported by all relevant CBB components is automatically selected and locked uniformly based on the preset compatibility matrix. The code and configuration generation module includes a pre-built logic library for business scenarios, which encapsulates core code templates for various enterprise-level business scenarios. When the 3D constraint list contains a specific business scenario, the module automatically matches and integrates the corresponding template.

9. The scaffolding engineering device for automatically generating architecture scheme documents according to claim 4, characterized in that, Also includes: The deployment configuration generation module generates differentiated configurations based on the architecture type. For monolithic or cluster architectures, it generates a docker-compose configuration containing a single service node and a jar startup script that sets the JVM parameter to -Xms1024m. For microservice architectures, generate docker-compose configurations that include multiple nodes such as service registry, gateway, and business services, and automatically arrange the startup order. At the same time, generate jar startup scripts with the JVM parameter set to -Xmx512m.

10. The scaffolding engineering device for automatically generating architecture scheme documents according to claim 4, characterized in that, The automated test scripts generated by the verification closed-loop module cover specialized test cases such as permission verification, security interception, indicator reporting, and link tracing. The verification process supports one-click deployment verification based on docker-compose and direct startup verification based on JAR packages.