A system engineering construction method and a computing device
By parsing the code snippets output by the large model and automatically filling them in using project templates, the automatic conversion from code snippets to project templates is achieved, solving the problem of low development efficiency in existing technologies, improving the development efficiency of project templates and ensuring the stability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XFUSION DIGITAL TECH CO LTD
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, converting code snippets generated from large language models into complete, maintainable, and collaborative engineering projects requires a large amount of manual work, which affects the development efficiency of engineering projects.
By parsing the code snippets output by the large model, extracting engineering metadata, and automatically populating the code snippets using engineering project templates, the automatic conversion from code snippets to engineering projects is achieved.
It improves the development efficiency of engineering projects, reduces the possibility of human error in configuration, and ensures the operational stability of the target system.
Smart Images

Figure CN122491234A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computing device technology, and in particular to a system engineering construction method and computing device. Background Technology
[0002] With breakthroughs in code generation using large conversational language models (commonly known as "big models"), developers can quickly obtain code snippets that implement specific functions by inputting natural language requirements into the big models. However, transforming the generated code snippets into a complete, maintainable, and collaborative engineering project (i.e., engineering) still requires a significant amount of configuration, which can impact the development efficiency of the engineering project. Summary of the Invention
[0003] This application provides a method for constructing a system engineering project and a computing device. This method can realize the automated conversion from code snippets output from a large model to an engineering project, thereby improving development efficiency.
[0004] In a first aspect, embodiments of this application provide a method for constructing a system engineering project, comprising: obtaining code snippets output by a large model; the code snippets being used to implement the functions of a target system; parsing the code snippets to obtain engineering metadata of the target system; the engineering metadata being data used to describe the engineering characteristics of the target system; obtaining an engineering project template from a project template library; and filling the engineering project template according to the code snippets and the engineering metadata to generate engineering code for the target system.
[0005] In the system engineering construction method provided in this application embodiment, the computing device acquires and parses code snippets output by a large model to extract engineering metadata describing engineering features from the code snippets used to implement the target system's functions. Further, the computing device acquires an engineering project template and fills the engineering project with code snippets and engineering metadata to obtain the engineering code of the target system. It can be seen that this application embodiment extracts the required engineering metadata for the engineering project by parsing code snippets and automatically fills in code snippets and engineering metadata using an engineering project template, achieving automated conversion from code snippets to engineering projects, thereby improving development efficiency. In addition, by automatically extracting engineering data through the computing device, the possibility of human configuration errors is eliminated, reducing the technical threshold requirements for developers while effectively ensuring the operational stability of the target system.
[0006] In one possible implementation, the engineering metadata should include at least: the technology stack information of the project code; the directory structure information of the project code; the runtime dependency information of the project code; the configuration requirement parameters of the project code; and the file paths of code snippets within the project code. By defining various engineering metadata, the functional integrity of the project can be guaranteed, ensuring the implementation of automated build functionality.
[0007] Another possible implementation involves parsing code snippets to obtain the engineering metadata of the target system. This includes: extracting engineering metadata from the code snippets according to predefined matching rules to obtain a first parsing result; performing semantic parsing on the code snippets to identify the engineering metadata to obtain a second parsing result; and obtaining the engineering metadata of the target system based on the first and second parsing results. By combining rule matching and semantic parsing to extract engineering metadata, the accuracy of extraction across multiple formats is ensured, and the extraction of engineering metadata is compatible with various scenarios.
[0008] In another possible implementation, the engineering metadata of the target system is obtained based on the first and second parsing results. This includes: obtaining the confidence levels corresponding to the first and second parsing results; and fusing the first and second parsing results according to a preset strategy to obtain the engineering metadata of the target system. The preset strategy includes: for conflicting content in the first and second parsing results, determining the parsing result with the higher confidence level as valid. By comparing the extraction results of the two methods and selecting the optimal one, the accuracy of the parsing results is further guaranteed.
[0009] Another possible implementation involves retrieving project templates from a project template library. This includes: performing multi-level searches in the project template library based on technology stack information to obtain multiple candidate templates; determining the matching score of each candidate template with the engineering metadata; and selecting the candidate template with the highest matching score as the project template. By performing multi-level searches in the template library, a sufficient number of candidate templates can be found in different scenarios. Finally, the optimal candidate template is selected based on the matching score, ensuring accuracy and effectiveness.
[0010] In another possible implementation, based on the technology stack information, a multi-level search is performed from the project template library to obtain multiple candidate templates. This includes: searching the project template library using a search strategy based on the technology stack information to obtain at least one search result; if the number of obtained search results does not meet a preset threshold, then employing a next search strategy; wherein the search precision of the next search strategy is lower than that of the current search strategy; and if the number of obtained search results meets the preset threshold, then determining the obtained search results as multiple candidate templates. Through the above steps, a specific implementation scheme for multi-level searching is provided, ensuring the feasibility of this scheme.
[0011] Another possible implementation involves filling a project template with code snippets and project metadata to generate the target system's project code. This includes: generating directory files in the project template based on directory structure information to obtain the target system's file framework; generating configuration files in the file framework based on the project code's configuration requirements; configuring dependency libraries in the file framework based on runtime dependency information; and filling code snippets into the corresponding files in the file framework based on file paths to generate the target system's project code. These steps provide a specific implementation scheme for template filling, ensuring the feasibility of this solution.
[0012] Another possible implementation involves obtaining the code snippet output by the large model, including: acquiring the user-inputted requirement text; performing structured parsing on the requirement text after compliance verification to extract requirement information from different dimensions; filling the prompt word template with the requirement information to obtain standardized prompt words; and inputting the standardized prompt words into the large model to obtain the code snippet. It should be understood that filling the prompt word template with requirement information guides the generation of the large model through standardization, improving the engineering friendliness and parsability of the generated code from the source, and laying the foundation for subsequent automated processing.
[0013] Another possible implementation includes: building a sandbox environment; deploying the target system's project code and running tests within the sandbox environment; packaging and outputting the project code if it runs normally; and recording and outputting error logs if it encounters abnormalities. Simulating the execution of the project code within the sandbox environment ensures the stability of the target system.
[0014] Secondly, embodiments of this application provide a system engineering construction apparatus, which includes one or more functional modules for implementing the system engineering construction method described in the first aspect above.
[0015] Thirdly, embodiments of this application provide a computing device including a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computing device to implement the method described in the first aspect.
[0016] Fourthly, embodiments of this application provide a computer-readable storage medium comprising: computer software instructions; when the computer software instructions are executed in a computing device, they cause the computing device to implement the method described in the first aspect.
[0017] Fifthly, embodiments of this application provide a computer program product that, when run on a computing device, causes the computing device to execute the steps of the method related to the first aspect described above, so as to implement the method of the first aspect described above.
[0018] The beneficial effects of the second to fifth aspects mentioned above can be referred to the corresponding description of the first aspect, and will not be repeated here. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the composition of a computing device provided in an embodiment of this application; Figure 2 A schematic diagram illustrating the composition of a construction platform provided in an embodiment of this application; Figure 3 A flowchart illustrating a system engineering construction method provided in an embodiment of this application; Figure 4 A schematic diagram illustrating the generation process of a standardized format prompt word provided in an embodiment of this application; Figure 5 A flowchart illustrating a process for obtaining an engineering project template, provided as an embodiment of this application; Figure 6 An interaction flowchart of a software module provided in an embodiment of this application; Figure 7 A schematic diagram illustrating a complete process provided for an embodiment of this application; Figure 8 This is a schematic diagram of another complete process provided for an embodiment of this application. Detailed Implementation
[0020] The technical solutions of 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 of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] It should be noted that in the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0022] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.
[0023] The following is a brief explanation of the technical terms used in the embodiments of this application: 1. Engineering: Engineering refers to organizing code snippets that implement a certain function into an engineering project (engineering code) that can be run directly, maintained, and collaborated on, according to industry-standard specifications. This includes not only code snippets, but also the relationships between code snippets, configuration files, and other content.
[0024] 2. Large Language Model (LLM): A type of artificial intelligence model that uses deep learning algorithms to learn language patterns and structures through training on a large amount of text data, thereby enabling it to understand and generate natural language text.
[0025] 3. Prompt: This refers to the input text used to guide or stimulate the large language model to perform a specific task. Its purpose is to help the large language module model understand the type of task the user wants to perform or the required output format.
[0026] This application provides a method for constructing a system engineering project, which can automatically convert code snippets into engineering projects, thereby improving the development efficiency of engineering projects.
[0027] In some implementations, the computing device acquires and parses code snippets output from a large model to extract engineering metadata describing engineering features from the code snippets used to implement the target system's functions. Further, the computing device acquires an engineering project template and populates the engineering project using the code snippets and engineering metadata to obtain the engineering code of the target system. It can be seen that this application embodiment extracts the required engineering metadata for the engineering project by parsing code snippets and automatically populates the code snippets and engineering metadata using an engineering project template, achieving automated conversion from code snippets to engineering projects, thereby improving development efficiency. In addition, by automatically extracting engineering data through the computing device, the possibility of human configuration errors is eliminated, lowering the technical threshold for developers while effectively ensuring the operational stability of the target system.
[0028] In this application embodiment, the target system refers to the software system to be developed, such as a human resources management system, an order management system, or other software systems that implement various business operations. This application embodiment does not limit the specific business scenarios of the target system.
[0029] The embodiments provided in this application will now be described in detail with reference to the accompanying drawings.
[0030] The technical solutions provided in this application can be applied to computing devices. For example, the computing device can be a server or a terminal device. This application does not specifically limit the type of computing device.
[0031] The server can be a single physical or logical server, or it can consist of two or more physical or logical servers that share different responsibilities and work together to achieve the various functions of the server.
[0032] When the computing device is specifically a server, in terms of form, the server can be a blade server, a high-density server, a rack server, or a full-rack server; in terms of function, the server can be a general-purpose server, a graphics processing unit (GPU) server, an artificial intelligence (AI) server, etc.
[0033] When the computing device is specifically a terminal device, the terminal device may include PDAs, ultra-mobile personal computers (UMPCs), tablets, laptops, netbooks, desktop computers, all-in-ones, etc.
[0034] The following section uses a computing device as a server as an example to introduce its system architecture. Figure 1 This is a schematic diagram illustrating the composition of a computing device provided in an embodiment of this application. Figure 1 As shown, the computing device may include a processor 101 and a memory 102; the memory 102 stores instructions executable by the processor 101; when the processor 101 is configured to execute instructions, the computing device executes the system engineering construction method of the embodiments of this application.
[0035] In some embodiments, a build platform (software module) is deployed in the computing device, which can execute the system engineering build method of the embodiments of this application by running the build platform.
[0036] In some implementations, the computing device can communicate with a display device to interact with developers, for example, to display the user interface of the build platform to the user, who can then initiate requests or view build results.
[0037] Figure 2 This is a schematic diagram illustrating the composition of a construction platform provided in an embodiment of this application. Figure 2 The system comprises an application layer (user interface layer), a core service layer (processing engine layer), and a resource and infrastructure layer.
[0038] I. Application Layer The application layer provides an interactive entry point for users, who can initiate requests in three ways: a web-based online platform, command-line tools, and an integrated development environment (IDE) plugin. The application layer then passes the requests to the core service layer for processing.
[0039] II. Core Service Layer The core service layer is the core of the platform's business processing, including a standardized prompt word generator, an intelligent parsing engine, a templated project generator, and output and integration devices.
[0040] The standardized prompt generator is used to obtain user requirements, call the prompt template library in the resource and infrastructure layer, and generate enhanced prompts with engineering constraints. Furthermore, it calls the large model application programming interface (API) provided by the resource and infrastructure layer to obtain code snippets output by the large model; these code snippets are used to implement the functionality of the target system.
[0041] The intelligent parsing engine receives code snippets from the output of large models, calls parsing rules and model knowledge bases in the resource and infrastructure layer, and outputs engineering metadata to the templated project generator through rule and semantic fusion parsing. This engineering metadata is data used to describe the engineering characteristics of the target system.
[0042] The templated project generator calls the project template library, dynamically matches the optimal engineering project template, and fills the engineering project template based on code snippets and engineering metadata to obtain the complete engineering code of the target system, which is then sent to the output and integration device.
[0043] The output and integration device packages the generated project code and outputs it to the application layer for display to users, such as through a web online platform or by integrating it into an IDE plugin.
[0044] III. Resources and Infrastructure Layer The resources and infrastructure layer provides data and capability support for the core service layer, including: Prompt Template Library: Stores standardized prompt templates.
[0045] Large Model API: Connects to external large model services.
[0046] Parsing rules and model knowledge base: stores matching rules, semantic parsers, etc.; Project Template Library: Stores different engineering project templates.
[0047] It should be noted that the system architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0048] Figure 3 This is a flowchart illustrating a system engineering construction method provided in an embodiment of this application. Exemplarily, the system engineering construction method provided in this embodiment can be applied to... Figure 1 In the computing device shown, in other words, it can be used... Figure 1 The computing device executes the method; specifically, the method can be executed by the processor of the computing device.
[0049] like Figure 3 As shown, the system engineering construction method provided in this application embodiment may include the following steps: S301, Code snippet for obtaining the output of the large model.
[0050] The code snippets are used to implement the functions of the target system.
[0051] In the embodiments of this application, the computing device can obtain existing code snippets from a preset location, or the computing device can temporarily construct prompt words to describe the functional requirements of the target system in order to obtain code snippets output by the large model.
[0052] In some implementations, the large template can be deployed locally on the computing device or as an online large model. The computing device can use the online large model by calling its API.
[0053] In one possible implementation, S301 above can be specifically implemented as follows: S3011. Obtain the user's input request text.
[0054] The requirements text describes the functional requirements of the target system in natural language.
[0055] For example, a computing device can display a target interface via a display device. This interface specifies the content the user should input, including the required text and parameters related to engineering metadata, such as the development language, technical framework, and project type (front-end / back-end). Input through the target interface standardizes the user's input, ensuring the accuracy and comprehensiveness of subsequent prompts.
[0056] S3012. If the compliance verification of the requirement text passes, perform structured parsing of the requirement text to extract requirement information from different dimensions.
[0057] S3013. Fill in the prompt word template according to the requirements information to obtain a standardized prompt word.
[0058] The standardized prompts describe different dimensions of requirement information in the form of key-value pairs.
[0059] S3014. Input the standardized prompt words into the large model to obtain the code snippet.
[0060] Figure 4 This is a schematic diagram illustrating the generation process of a standardized format prompt word provided in an embodiment of this application. Combined with... Figure 4 The following explains steps S3011-S3014. First, 1. Obtain the user-inputted requirement text (corresponding to S3011). 2. Perform compliance verification (corresponding to S3012). The compliance verification ensures that the user input is in a valid format, complete in content, and has compliant values, preventing invalid input from entering subsequent parsing stages and ensuring the stability of the entire process.
[0061] Specifically, compliance verification includes: Parameter structure validation: Validates whether the user input conforms to the preset format to avoid incomplete or incorrect input.
[0062] Required field check: Identifies whether any core fields required for the target system (such as requirements text, development language, technical framework, etc.) are missing. If missing, it returns completion suggestions (such as "Please supplement the development language and technical framework information used in the project").
[0063] Enumerated value validation: For fields with a fixed range of values (such as those where the development language only supports Java / Python / JavaScript), validate whether the input value is within the allowed range of values (if the input is for PHP as the development language, the validation will fail).
[0064] 3. After compliance verification is passed, natural language preprocessing is performed.
[0065] Specifically, natural language preprocessing includes: Text cleaning: Remove irrelevant characters from the text to be cleaned, such as special symbols and redundant spaces.
[0066] Word segmentation: The cleaned text is segmented semantically (using existing word segmentation tools) to break down continuous text into meaningful lexical units (e.g., user login interface development is broken down into user, login, interface, and development).
[0067] Stop-word removal: Remove stop words that do not substantially contribute to semantic parsing (such as "的", "了", "请" in Chinese), reduce the interference of redundant information, and focus on describing core requirement words (such as simplifying "请帮我开发一个用户登录的接口" to "开发", "用户", "登录", "接口").
[0068] Stem extraction: Extract the stems of English words (such as unifying "developing" and "developed" to "develop"), and extract the core semantics of Chinese words (such as unifying "开发中" and "开发了" to "开发"), to achieve lexical normalization and ensure the accuracy of subsequent parsing.
[0069] 4. Perform structured parsing (corresponding to S3012 above).
[0070] Among them, the core of structured parsing is to extract engineering-related entities, relationships, and constraints from the preprocessed text, transform natural language requirements into machine-readable structured data, and provide parameter basis for the generation of prompting words. [[ID=I2]]
[0071] [[ID=I3]]Specifically, structured parsing includes:[[ID=I4]] [[ID=I5]]Parameter parsing tree construction: Identify key entities (technology stack, requirement text, function template, configuration requirement parameters, etc.) in the preprocessed text, and construct a hierarchical parameter parsing tree (such as the root node is the project requirement, and the child nodes are the technology stack, function module, and configuration parameters).[[ID=I6]] [[ID=I7]]
[0072] [[ID=I8]]Dependency relationship analysis: Analyze the dependency relationships between entities in the parsing tree, and establish connections between key entities (such as clearly requiring the use of a database to implement the login function in the prompting words).[[ID=I9]] [[ID=I10]]
[0073] [[ID=I11]]Constraint extraction: Extract clear constraint conditions from the text (such as "端口配置为 9090", and the technology stack is compatible with A operating system).[[ID=I12]] [[ID=I13]]
[0074] [[ID=I14]]Through structured parsing, requirement information in different dimensions is obtained. Exemplarily, requirement information in different dimensions is expressed as follows:[[ID=I15]] [[ID=I16]]{python, technology framework 1, user login, port 9090}[[ID=I17]] [[ID=I18]]5. Perform context enhancement.[[ID=I19]] [[ID=I20]]
[0075] [[ID=I21]]On the basis of structured parsing, supplement context information, such as requirements input by the user during the historical conversation process, the user's preference content, etc.[[ID=I22]] [[ID=I23]]
[0076] [[ID=I24]]Specifically, context enhancement includes:[[ID=I25]] [[ID=I26]]Environmental variable injection: Inject data related to environmental variables (such as the current running time, the operating system of the computing device).[[ID=I27]] [[ID=I28]]
[0077] Historical record association: If the user's historical requirements are associated (e.g., if the user's historical development process used Python as the development language), then Python will be used as the current technology stack information.
[0078] User preference matching: Matches the user's preset preference configuration (such as preferred development language, development tools, etc.) and adds it to the prompt words.
[0079] 6. Perform prompt word synthesis and output (corresponding to S3013-S3014 above).
[0080] The computing device integrates the structured parsing results with contextual enhancement information to obtain requirement information from different dimensions. Then, the computing device retrieves prompt word templates from the prompt word template library, fills the prompt word templates with the requirement information from different dimensions, and finally generates prompt words in a standardized format, which are sent to the large model to guide the large model to output code snippets with a structured format that meets engineering requirements.
[0081] As an example, a standardized prompt word can be represented as: { Project requirement: Develop a user login function module. Technology stack: Python + technology framework 1 Functional modules: User login, data query Configuration parameters: Port 9090 } It should be understood that by filling the prompt word template with requirement information, the content of the prompt words is standardized, which improves the engineering friendliness and parsability of the code generated by the large model from the source, laying the foundation for subsequent automated processing.
[0082] S302. Parse the code snippet to obtain the engineering metadata of the target system.
[0083] Among them, engineering metadata is data used to describe the engineering characteristics of the target system.
[0084] In this embodiment of the application, after the computing device obtains the code fragment, it can parse the code fragment to analyze and extract the engineering metadata of the target system from the code fragment. The engineering metadata is a key parameter for realizing the transformation of code into an engineering project.
[0085] In some implementations, engineering metadata includes at least: The technology stack information of the project code; where the technology stack information indicates the development language and technology framework used.
[0086] Directory structure information for the project code; The runtime dependency information of the project code; where runtime dependency information is used to indicate other software code (such as third-party libraries) that the project code depends on for normal operation.
[0087] The configuration requirements parameters of the project code; among them, the configuration requirements parameters are used to indicate the necessary configurations for the target system, such as network configuration (ports used), computing resource configuration (number of processors used), etc.
[0088] The file path of the code snippet in the project code; where the file path is used to indicate the hierarchical relationship between different code snippets (e.g., if code A calls code B, then the file path of code B can be represented as: code A / code B).
[0089] In one possible implementation, S302 above can be specifically implemented as follows: S3021. Based on predefined matching rules, extract engineering metadata from the code snippet to obtain the first parsing result.
[0090] It should be noted that different predefined matching rules are selected for matching different engineering metadata. These predefined matching rules can be keywords, regular expressions, etc., and this application embodiment does not specifically limit them. Keywords can be obtained from a pre-built software development domain dictionary to accurately match engineering metadata.
[0091] For example, for code text, a computing device can use regular expressions to match code text enclosed in characteristic delimiters (triple quotes) in the output of a large model.
[0092] For the technology stack, the technology equipment can be determined based on keyword matching (such as import torch matching the technology framework PyTorch, @RequestMapping matching the technology framework Spring MVC, etc.).
[0093] For runtime dependency information, computing devices can use regular expressions to identify statements such as import / require / from in order to extract third-party library names / module names and obtain runtime dependency information.
[0094] For configuration requirement parameters, computing devices can obtain configuration requirement parameters by matching keywords (such as port, operating system, etc.).
[0095] For file paths, the large model will specify suggested file paths (e.g., src / main) when outputting code snippets. The computing device can then use regular expressions to match content that conforms to the file path format to obtain the file path of the code snippet. Furthermore, based on all file paths, the output target structure information can also be determined.
[0096] S3022. Perform semantic parsing on the code snippet, identify engineering metadata, and obtain the second parsing result.
[0097] Computing devices can also employ natural language processing technology to perform semantic recognition on code fragments through a semantic understander. For example, they can identify the technology stack through the syntax style of the code, and identify file paths through the calling relationship between functions and class names in the code fragment, thereby obtaining a second parsing result.
[0098] In some implementations, the semantic understander can be a pre-trained machine learning model. The training data includes the output text of different large models, standard code libraries of various technology stacks, software engineering directory structure specifications, etc., which can be compatible with the output styles of different large models and process and parse various code snippets. Alternatively, the semantic understander can also be a large model, where the computing device utilizes the powerful data processing capabilities of the large model to perform language parsing of code snippets.
[0099] S3023. Based on the first and second parsing results, obtain the engineering metadata of the target system.
[0100] The computing device obtains the first parsing result from the predefined matching rules and the second parsing result from the semantic parsing. By combining the two parsing results, the engineering metadata of the target system is obtained.
[0101] Specifically, S3023 can be implemented as follows: obtaining the confidence level corresponding to the first parsing result and the confidence level corresponding to the second parsing result; according to a preset strategy, fusing the first parsing result and the second parsing result to obtain the engineering metadata of the target system; wherein, the preset strategy includes: for conflicting content in the first parsing result and the second parsing result, determining that the parsing result with higher confidence is valid.
[0102] Among them, the confidence level can reflect the reliability of the analysis results.
[0103] In other words, when computing devices obtain parsing results using both rule-based and semantic parsing methods, they can simultaneously calculate and obtain the confidence score. The confidence score can serve as the basis for fusing the two parsing results; for example, for conflicting content, the parsing result with the higher confidence score is deemed valid. For instance, for a code block, if the matching rules determine the corresponding technology stack as Python with a confidence score of 50%, and semantic parsing determines the corresponding technology stack as Java with a confidence score of 90%, then the computing device will use the semantic parsing result to determine that the technology stack corresponding to that code block is Java.
[0104] It's important to note that the first confidence level of a matching rule can be determined by the ratio between the number of successful matches (hit rules) and the amount of text in the input code snippet. A higher ratio indicates a greater likelihood that the predefined matching rule will be successful, resulting in a higher first confidence level for the parsing result. For semantic parsing confidence, current machine learning models generally output the confidence level along with the output result.
[0105] In some implementations, to conserve computing resources, the computing device can first extract parsing results from the code snippet using predefined matching rules. For the parts of the code snippet that do not match any rules, or those with a confidence level below a threshold (e.g., less than 40%), semantic parsing is used. Finally, the parsing results from both methods are combined to obtain the engineering metadata. For example, rule matching determines runtime dependencies, semantic parsing determines the technology stack, and the combined results from both methods yield the engineering metadata.
[0106] In some implementations, the computing device can also combine a domain knowledge graph to supplement the fused parsing results, ensuring the integrity of the engineering metadata. The computing device can query the domain knowledge graph based on the technology stack to retrieve other nodes associated with the current technology stack, such as configuration requirement parameters and dependencies, and add them to the engineering metadata obtained in S3023. This ensures that the engineering metadata can also include parameters required by the technology stack but not mentioned in the parsing results, thus guaranteeing parameter integrity and consequently ensuring the accurate construction of subsequent engineering projects.
[0107] S303. Obtain the project template from the project template library.
[0108] Among them, the project templates in the project template library are abstract engineering structure templates used to indicate the basic file framework, general configuration, etc. of an engineering project.
[0109] In this embodiment, the computing device has a pre-installed project template library, which stores various project templates, each corresponding to a different technology stack. Therefore, the computing device can obtain a matching engineering project template from the project template library based on the technology stack information obtained from the aforementioned analysis.
[0110] In one possible implementation, the above S303 can be specifically implemented as follows: S3031. Based on the technology stack information, perform multi-level retrieval from the template library to obtain multiple candidate templates.
[0111] Among them, multi-level retrieval is the core step in matching the optimal template for engineering metadata. Based on the strategy of prioritizing accuracy and matching layer by layer, the template library is searched sequentially to ensure that enough candidate templates can be found in different scenarios.
[0112] Specifically, the multi-level search process is as follows: 1. Based on the technology stack information, a search strategy is used to search the template library to obtain at least one search result.
[0113] 2. If the number of search results obtained does not meet the preset threshold, the next search strategy shall be adopted.
[0114] The next retrieval strategy has lower retrieval accuracy than the current retrieval strategy.
[0115] 3. If the number of search results obtained meets the preset threshold, the search results obtained are identified as multiple candidate templates.
[0116] For example, the computing device can perform precise matching retrieval based on technology stack information to determine at least one matching retrieval result (i.e., candidate template). If the number of retrieval results obtained (i.e., the number of candidate templates) does not meet a preset threshold, fuzzy matching retrieval is used, for example, by determining the vector similarity of technology stack information, and determining candidates with a similarity greater than a certain value. In addition, if the number of retrieval results after the current retrieval has met the preset threshold, the multi-level retrieval process ends, and multiple candidate templates are determined.
[0117] S3032. Determine the matching score between each candidate template and the engineering metadata among multiple candidate templates.
[0118] For each candidate template, the computing device can determine the degree of matching between the candidate template and the engineered metadata, thereby determining the matching score for each candidate template.
[0119] S3033. Select the template with the highest matching score from multiple candidate templates as the project template.
[0120] For example, the matching score can be determined based on factors such as technology stack matching degree, functional coverage, and redundancy. Technology stack matching degree refers to the degree to which the candidate template's technology stack matches the technology stack in the engineering metadata; a higher matching degree results in a higher score. Functional coverage refers to whether the candidate template's functions cover the functional modules in the engineering metadata (e.g., if the engineering metadata contains "user login," does the candidate template contain related code / configuration for login functionality?); a higher coverage degree results in a higher score. Redundancy refers to the number of redundant functions (i.e., functions that are not needed by users) in the candidate template; a higher number results in a lower score. Then, the computing device can determine the scores for different aspects based on preset weight ratios, perform a weighted summation, and obtain the overall matching score for the candidate template. Finally, the computing device selects the candidate template with the highest matching score as the optimal engineering project template.
[0121] In one possible implementation, if a user has previously used a project template, the computing device can quickly determine whether a matching template exists through a three-level cache and a Bloom filter, avoiding duplicate calculations. The three-level cache includes a memory cache (highest priority), a Redis cache (medium priority), and a local disk cache (lowest priority). A Bloom filter is an efficient method for determining whether an element exists in a set. In this embodiment, a Bloom filter is used to check the three-level cache for a matching template in descending order of priority. If a matching template exists, it is read and used directly. If the template does not exist in any of the three levels of cache, step S303 is executed to retrieve it from the project template library.
[0122] Figure 5 This is a schematic diagram illustrating a process for obtaining an engineering project template, provided as an embodiment of this application. (In conjunction with...) Figure 5 Instructions for use: 1. Input the project metadata as the basis for the query.
[0123] 2. Perform a cache check.
[0124] Specifically, in the caching layer, based on a Bloom filter, it first checks the memory cache. If a match is found, the matching template is returned; otherwise, the Redis cache is checked. Further, if a match is found, the matching template is returned; otherwise, the local disk cache is checked. If a match is found, the matching template is returned; otherwise, a multi-level search is performed.
[0125] 3. Perform multi-level searches.
[0126] Specifically, the process begins with exact match retrieval (highest priority). If enough candidate templates are found (e.g., more than 5 candidate templates), the process proceeds to candidate sorting. If there are insufficient candidate templates, the process moves to the next level. Then, semantic vector retrieval (fuzzy matching) is performed. If enough candidate templates are found (e.g., more than 5 candidate templates), the candidate sorting is performed. If there are not enough candidate templates, the process moves to the next level. Secondly, graph pattern matching is performed. The knowledge graph records the relationships between "technology stack - function - template" (e.g., Spring Boot → User Management → corresponding template), which is used to assist in querying templates that are not directly mentioned in the engineering metadata but are logically related. The computing device outputs candidate templates based on the node closest to the input technology stack in the knowledge graph query path. If enough candidate templates are found (e.g., more than 5 candidate templates), the candidate is sorted; if there are not enough candidate templates, the process moves to the next level. Finally, a hybrid enhanced retrieval method is employed. The computing device combines a hybrid strategy of safety net rules, semantic similarity, and graph correlation to perform a global generalized search of the project template library. The safety net rules can be flexible in their matching conditions, such as allowing differences in technology stack versions or partial functional overlap, to ensure that as many potential suitable templates as possible are retrieved.
[0127] 4. Sort the candidates.
[0128] The computing device performs multi-dimensional scoring on each candidate template, and then calculates a comprehensive matching score by weighting and summing the multi-dimensional scores. In addition, to avoid selecting templates with overly singular functions (such as selecting only templates with completely matching technology stacks but redundant functions), the system introduces diversity guarantees, and finally selects the optimal candidate template based on the matching score.
[0129] 5. Update the cache so that you don't have to search the project template library again the next time you use it.
[0130] 6. Output the optimal candidate template.
[0131] S304. Fill the project template with code snippets and engineering metadata to generate the project code for the target system.
[0132] In this embodiment of the application, after obtaining the code snippet and extracting the engineering metadata and the engineering project template, the computing device fills the code snippet and the engineering metadata into the replaceable position of the engineering project template to generate the engineering code of the target system. The engineering code includes code and engineering metadata and is an editable, maintainable and runnable complete engineering project.
[0133] In one possible implementation, S304 above can be specifically implemented as follows: S3041. Based on the directory structure information, generate a directory file in the project template to obtain the file framework of the target system.
[0134] The computing device reads the basic file framework from the project template, adjusts the directory structure of the basic file framework according to the target structure information in the engineering metadata, adds missing directory files, etc., and obtains the file framework of the target system.
[0135] S3042. Generate a configuration file in the file framework based on the configuration requirements parameters of the project code.
[0136] The computing device generates different configuration files, such as network configuration files and database configuration files, based on different configuration requirements parameters, and stores the configuration files in a specified location in the file frame (to store configuration-related information).
[0137] S3043. Configure the dependency libraries in the file framework according to the runtime dependency information.
[0138] The computing device configures the dependency libraries in the file framework based on the runtime dependency information in the engineering metadata, that is, it installs third-party libraries to ensure that there are no dependency issues when the code runs.
[0139] S3044. Based on the file path, fill the code snippets into the corresponding files in the file frame to generate the project code for the target system.
[0140] The computing device inserts the code snippets into the corresponding positions in the file frame according to their file paths to generate the project code for the target system.
[0141] In some implementations, after generating the project code, the computing device can automatically verify that the project code is free of syntax errors. If syntax errors are found, they can be automatically corrected using a large template, or the computing device can notify the developers for assistance in correcting them.
[0142] In some implementations, the computing device can also simulate running the project code in a sandbox environment to ensure the operational stability of the target system. Specifically, the computing device also performs the following: building a sandbox environment; deploying the target system's project code in the sandbox environment and running tests; packaging and outputting the project code if it runs normally; and recording and outputting error logs if it encounters abnormalities.
[0143] The sandbox environment refers to an isolated, independent, and secure simulated operating environment. A sandbox environment allows for comprehensive automated testing of generated project code without affecting the production / local development environment, verifying its normal operation, functionalities, and configuration effectiveness. This application does not limit the specific method of constructing the sandbox environment; for example, containerization technology or virtual machine technology can be used to build it.
[0144] If the project code runs without issues in the sandbox environment, the computing device can package the project code into a compressed file and output it to a specified location (such as the cloud). If there are any runtime errors, the computing device will extract the relevant error logs and provide feedback to the developers for assistance in making modifications.
[0145] Figure 6 This is an interactive flowchart of a software module provided in an embodiment of this application. Figure 6 As shown, the process is as follows: 1. The user interface obtains the user's input requirement text. 2. The requirement text and project parameters are passed to the standardized prompt word generator. 3. The standardized prompt word generator matches and fills the prompt word template to obtain enhanced prompt words (the aforementioned standardized format prompt words). 4. The enhanced prompt words are sent to the large model. 5. The large model returns a code snippet to the standardized prompt word generator. 6. The standardized prompt word generator passes the code snippet to the intelligent parsing engine. 7. The intelligent parsing engine performs rule and semantic parsing to obtain engineering metadata. 8. The engineering metadata is passed to the templated project generator. 9. The templated project generator selects and fills in an engineering project template to obtain engineering code. 10. The engineering code is sent to the output and integration module. 11. The output and integration module returns the engineering code to the user interface. 12. The engineering code is presented to the user through the user interface.
[0146] The following example, using the application of the solution on a web online platform, provides a brief description of the method in this embodiment. Figure 7 As shown, the process begins with: 1. The user logs into the online web platform. 2. The user enters their requirements text or pastes a code snippet. 3. The user manually selects their technology stack / project type, etc. 4. The user chooses whether to use guidance. If yes, 5. The platform generates enhanced prompts and calls the large model. If no, 6. The user directly submits an existing code snippet. 7. The computing device retrieves the code snippet output from the large model. 8. The intelligent parsing engine parses and processes the code. 9. The project is built using a template. 10. The sandbox environment is automatically deployed for verification. 11. Verification is checked. If verification passes, a compressed package is generated and a download link is provided, completing the build. If verification fails, error logs are provided, along with modification suggestions, allowing the user to make modifications based on the suggestions.
[0147] Through the above process, a fully online and automated service is achieved from "user input" to "project delivery." Users do not need to install development environments or tools locally, avoiding problems caused by differences in local environments. In addition, the solution runs in the cloud, which facilitates centralized updates and maintenance of template libraries and matching rules, ensuring that all users obtain the best results.
[0148] The following example demonstrates how to apply this solution to a local IDE. Developers can install an IDE plugin on their local device's IDE, and by running this plugin, the aforementioned system project build method can be implemented. For example... Figure 8 As shown, for user operations: 1. Click the "Generate Project" button; 2. The IDE plugin calls core service behaviors (local or cloud); 3. Execute the build process, collecting relevant information required for the build through the IDE (user inputs requirement text and selects configuration through the interface); 4. Return system code; 5. The IDE plugin receives the system code; 6. Call the IDE interface to initialize the project and display the system code; 7. The user can view or edit the system code in the opened new window.
[0149] Through the above process, the functional flow of the embodiments of this application is embedded into the IDE, realizing seamless integration with the developer's existing workflow. This allows the developer to automatically build the system code using the IDE plugin without leaving the current coding environment, ensuring the user experience of the developer and improving development efficiency.
[0150] In the system engineering construction method provided in this application embodiment, the computing device acquires and parses code snippets output by a large model to extract engineering metadata describing engineering features from the code snippets used to implement the target system's functions. Further, the computing device acquires an engineering project template and fills the engineering project with code snippets and engineering metadata to obtain the engineering code of the target system. It can be seen that this application embodiment extracts the required engineering metadata for the engineering project by parsing code snippets and automatically fills in code snippets and engineering metadata using an engineering project template, achieving automated conversion from code snippets to engineering projects, thereby improving development efficiency. In addition, by automatically extracting engineering data through the computing device, the possibility of human configuration errors is eliminated, reducing the technical threshold requirements for developers while effectively ensuring the operational stability of the target system.
[0151] As can be seen, the above mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the embodiments of this application provide corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0152] In an exemplary embodiment, this application also provides a system engineering construction apparatus. This system engineering construction apparatus may be the aforementioned computing device or a processor within the computing device. The system engineering construction apparatus may include one or more functional modules for implementing the system engineering construction method of the above method embodiments.
[0153] Other optional implementation methods are described in the foregoing method embodiments.
[0154] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware; for example, the related hardware can be a processor of a computing device. The program instructions can be stored in the above-described computer-readable storage medium, and when executed, they can implement the processes of the above method embodiments. The computer-readable storage medium can be memory. The above-described computer-readable storage medium can also be an external storage device, such as a hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Further, the above-described computer-readable storage medium can include both memory and external storage devices. The above-described computer-readable storage medium is used to store the above-described computer program instructions and other programs and data required for the above-described software package translation.
[0155] This application also provides a computer program product comprising a computer program that, when run on a computing device, causes the computing device to execute any of the system engineering construction methods provided in the above embodiments.
[0156] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0157] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
[0158] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for constructing a systems engineering project, characterized in that, The method includes: A code snippet that yields the output of a large model; this code snippet is used to implement the functionality of the target system. The code snippet is parsed to obtain the engineering metadata of the target system; the engineering metadata is data used to describe the engineering characteristics of the target system. Obtain project templates from the project template library; The project template is populated with the code snippet and the engineering metadata to generate the engineering code for the target system.
2. The method according to claim 1, characterized in that, The engineering metadata includes at least: The technology stack information of the project code; The directory structure information of the project code; The runtime dependency information of the project code; The configuration requirements parameters for the project code; The code snippet is located in the file path of the project code.
3. The method according to claim 2, characterized in that, The process of parsing the code snippet to obtain the engineering metadata of the target system includes: Based on predefined matching rules, the engineering metadata is extracted from the code snippet to obtain the first parsing result; The code snippet is semantically parsed to identify the engineering metadata, resulting in a second parsing result; Based on the first and second parsing results, the engineering metadata of the target system is obtained.
4. The method according to claim 3, characterized in that, The step of obtaining the engineering metadata of the target system based on the first parsing result and the second parsing result includes: Obtain the confidence level corresponding to the first parsing result and the confidence level corresponding to the second parsing result; According to a preset strategy, the first parsing result and the second parsing result are fused to obtain the engineering metadata of the target system; The preset strategy includes: For any conflicting content between the first and second parsing results, the parsing result with higher confidence is determined to be valid.
5. The method according to claim 2, characterized in that, The step of obtaining the project template from the project template library includes: Based on the technology stack information, a multi-level search is performed from the project template library to obtain multiple candidate templates; Determine the matching score between each candidate template and the engineered metadata among the plurality of candidate templates; The template with the highest matching score among the multiple candidate templates is selected as the project template.
6. The method according to claim 5, characterized in that, The step involves performing a multi-level search from the project template library based on the technology stack information to obtain multiple candidate templates, including: Based on the technology stack information, a search strategy is used to search the project template library to obtain at least one search result; If the number of search results obtained does not meet the preset threshold, the next search strategy is adopted; wherein the search accuracy of the next search strategy is lower than that of the current search strategy. If the number of retrieved results meets the preset threshold, the retrieved results are determined to be the multiple candidate templates.
7. The method according to any one of claims 2-6, characterized in that, The project template is populated based on the code snippet and the project metadata to generate the project code for the target system, including: Based on the directory structure information, a directory file is generated in the project template to obtain the file framework of the target system; Based on the configuration requirements parameters of the project code, a configuration file is generated in the file framework; Configure the dependency library in the file framework based on the runtime dependency information; Based on the file path, the code snippet is filled into the corresponding file in the file framework to generate the project code of the target system.
8. The method according to claim 7, characterized in that, The code snippet for obtaining the output of the large model includes: Obtain the user's input request text; If the compliance verification of the requirement text passes, the requirement text is structured and parsed to extract requirement information from different dimensions. The prompt word template is filled in according to the required information to obtain a standardized prompt word format; The standardized prompt words are input into the large model to obtain the code snippet.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: Create a sandbox environment; Deploy the project code of the target system in the sandbox environment and run tests; Package and output the project code if it runs normally; In case of operational errors, log the error information and output the error log.
10. A computing device, characterized in that, The computing device includes a processor and a memory; the processor is coupled to the memory. The memory is used to store computer instructions; The computer instructions are loaded and executed by the processor to enable the computing device to implement the system engineering construction method as described in any one of claims 1-9.