Software generation method based on multilayer semantic analysis and progressive module extension

Through the software generation method of multi-layer semantic analysis and progressive module expansion, the problem of difficulty in generating code based on personalized semantic requirements in the existing technology is solved, flexible and accurate prototype development and continuous optimization are achieved, and the quality and efficiency of software development are improved.

CN119512508APending Publication Date: 2025-02-25ANHUI GAOSHAN TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411553166.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing software generation method is difficult to flexibly generate code based on personalized semantic needs, and cannot be improved and improved according to actual operational results.

Method used

Using a software generation method based on multi-layer semantic analysis and progressive module expansion, user needs are analyzed through natural language processing and semantic hierarchy, mapped to pre-designed functional modules, and modular design and progressive expansion are carried out, and the code is continuously optimized in combination with the self-iteration optimization mechanism.

Benefits of technology

It realizes flexible code generation based on personalized semantic requirements, improves the accuracy and speed of prototype development, and significantly improves the quality and efficiency of software development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512508A_ABST
    Figure CN119512508A_ABST
Patent Text Reader

Abstract

The invention relates to software development, in particular to a software generation method based on multilayer semantic analysis and progressive module extension, which comprises the following steps: describing related software requirements by a user through a natural language, and acquiring context information according to user description; performing multi-layer semantic analysis on the user description by utilizing natural language processing and semantic layering; mapping the multi-layer semantic analysis result to a pre-designed function module, and carrying out modular design on the function module; generating modular codes according to the modular design, and integrating the modular codes into a complete software system; performance testing and user experience are carried out on the software system, self-iteration optimization is carried out based on the performance testing and the user experience, and progressive expansion is carried out on the function and the performance of the function module according to an optimization target in each optimization process; according to the technical scheme provided by the invention, the defects that codes are difficult to generate flexibly according to personalized semantic requirements and improvement and perfection cannot be carried out according to actual operation effects can be effectively overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to software development, and in particular to a software generation method based on multi-layer semantic analysis and progressive module expansion. Background Art

[0002] Existing software generation methods mainly include templated code generation, low-code / no-code platforms, and AI-driven code generation. These three software generation methods are introduced below.

[0003] 1) Templated code generation

[0004] Use predefined code snippets or templates to replace the parameters entered by the user into the template to generate code for specific functions. For example, the code generator in the front-end framework (such as React, Angular) will generate component code based on the template.

[0005] The above generation method relies on predefined static templates and cannot flexibly generate code according to user needs. It is suitable for generating code snippets with high repetitiveness. Its main disadvantage is that it is less sensitive to demand changes and can usually only handle simple and repetitive code snippets, but it is difficult to cope with complex demand changes.

[0006] 2) Low-code / no-code platforms

[0007] Drag-and-drop generation: Many low-code and no-code platforms provide visual interfaces where users can design applications by dragging components. These platforms automatically generate corresponding codes in the background, such as front-end interface codes, API calls, etc.

[0008] Business process orchestration: Some low-code tools allow users to define business logic in the form of flowcharts and configure workflows through preset modules. The system generates underlying code logic based on these configurations to implement the functions required by users.

[0009] Although the above generation method provides visualization and configuration operations, it lacks deep semantic understanding capabilities. User operations are often limited to the components provided by the platform and cannot handle more detailed semantic requirements and complex logic in specific fields.

[0010] 3) AI-driven code generation

[0011] User needs are associated with code snippets through the knowledge graph, and the knowledge graph is used to retrieve and combine to generate suitable code based on user input.

[0012] In the above generation method, although AI models (such as GPT, Codex, etc.) have certain context understanding capabilities, the generated code usually depends on the initial input and does not have a self-iteration optimization mechanism. The generated code is not highly maintainable and cannot be improved and perfected according to the actual operating results. Summary of the invention

[0013] 1. Technical issues to be resolved

[0014] In view of the above-mentioned shortcomings of the prior art, the present invention provides a software generation method based on multi-layer semantic parsing and progressive module expansion, which can effectively overcome the defects of the prior art that it is difficult to flexibly generate code according to personalized semantic requirements, and cannot be improved and perfected according to actual operating results.

[0015] (II) Technical solution

[0016] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0017] A software generation method based on multi-layer semantic parsing and progressive module expansion comprises the following steps:

[0018] S1. The user describes the relevant software requirements in natural language, and obtains context information based on the user description;

[0019] S2, using natural language processing and semantic stratification to perform multi-layer semantic analysis on user descriptions;

[0020] S3, mapping the multi-layer semantic analysis results to pre-designed functional modules, and performing modular design on the functional modules;

[0021] S4. Generate modular code according to modular design and integrate the modular code into a complete software system;

[0022] S5. Perform performance testing and user experience on the software system, perform self-iterative optimization based on performance testing and user experience, and progressively expand the functions and performance of the functional modules according to the optimization goals during each optimization process;

[0023] S6. Automatically deploy the optimized software system, continuously track the running status of the software system and collect data, and perform subsequent self-iterative optimization based on the collected data.

[0024] Preferably, in S1, the user describes the relevant software requirements in natural language, and the context information is obtained according to the user description, including:

[0025] S11. Users describe relevant software requirements including software functions, interface design and business logic in natural language;

[0026] S12. Obtain context information including known system requirements, user preferences, and domain knowledge based on the user description to prepare for subsequent multi-layer semantic analysis.

[0027] Preferably, S2 uses natural language processing and semantic stratification to perform multi-layer semantic analysis on the user description, including:

[0028] S21. Analyze the user description using natural language processing, including entity recognition, syntax analysis, and intent recognition, and convert the user description into structured intermediate semantic information;

[0029] S22. Perform semantic layering processing on the intermediate semantic information to achieve multi-layer semantic analysis of the user description.

[0030] Preferably, the semantic layering processing of the intermediate semantic information includes:

[0031] Use the function layer, business layer and technical layer to process the intermediate semantic information in a semantic layered manner;

[0032] Functional layer, identifying functional requirements in intermediate semantic information;

[0033] Business layer, which determines the business logic of functional requirements;

[0034] The technical layer analyzes the implementation details based on the business logic.

[0035] Preferably, in S3, the multi-layer semantic analysis results are mapped to pre-designed functional modules, and the functional modules are modularly designed, including:

[0036] S31, mapping the intermediate semantic information to a specific domain knowledge base, and extracting domain models, components, and design patterns corresponding to the intermediate semantic information;

[0037] S32, mapping the multi-layer semantic analysis results to pre-designed functional modules based on the domain knowledge base, each module containing a set of reusable components, interfaces and business logic;

[0038] S33, combining the user's priority requirements and the existing module library, modular design is performed on the mapped functional modules, including determining the module's interface, input and output, internal logic, and interaction mode with other functional modules;

[0039] In the process of modular design, the functional modules are customized according to the specific needs of users.

[0040] Preferably, in S4, modular codes are generated according to the modular design, and the modular codes are integrated into a complete software system, including:

[0041] S41. Dynamically select the appropriate technology stack and best practices based on the modular design, and use predefined code templates, design patterns, and domain-specific code snippets to transform the modular design into modular code;

[0042] S42, automatically generating integrated code including interaction logic, data flow processing and exception processing of the functional modules according to the business logic and modular codes of the functional modules, so as to integrate the modular codes into a complete software system;

[0043] Among them, in the process of converting modular design into modular code, the modular design of core functional modules is converted into modular code first, and then the modular design of auxiliary functional modules and optimization functional modules are gradually converted into modular code.

[0044] Preferably, in S5, the software system is subjected to performance testing and user experience, self-iterative optimization is performed based on the performance testing and user experience, and the functions and performance of the functional modules are progressively expanded according to the optimization target during each optimization process, including:

[0045] S51. After generating the integrated code, perform unit testing and integration testing on the integrated code to verify the accuracy and performance of the code and collect test data;

[0046] S52. After initially using the generated software system, the user provides evaluation feedback through natural language or configuration interface, proposes new software requirements or adjusts existing functions;

[0047] S53. Initiate a self-iterative optimization mechanism based on test data and evaluation feedback, and dynamically adjust the configuration and interaction mode of the functional modules using reinforcement learning or adaptive algorithms to optimize the modular design and integrated code implementation of the functional modules;

[0048] In each optimization process, the functions and performance of the functional modules are progressively expanded according to the optimization goals, and a comprehensive and performance-optimized software system is obtained through continuous iteration and improvement of integration.

[0049] Preferably, in S6, the optimized software system is automatically deployed, the running status of the software system is continuously tracked and data is collected, and subsequent self-iterative optimization is performed according to the collected data, including:

[0050] S61, automatically deploying the optimized software system by generating a deployment script and configuring environment variables, and publishing the software system to the target environment;

[0051] S62. Continuously track the operating status of the software system and collect user behavior data and system performance data, and perform subsequent self-iterative optimization based on the collected data to ensure that the software system continues to improve and meet user needs.

[0052] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the software generation method based on multi-layer semantic parsing and progressive module expansion is implemented.

[0053] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the various steps of the software generation method based on multi-layer semantic parsing and progressive module expansion.

[0054] (III) Beneficial effects

[0055] Compared with the prior art, the software generation method based on multi-layer semantic parsing and progressive module expansion provided by the present invention gradually converts user needs into executable codes through natural language processing, domain semantic analysis and program semantic parsing. Through modular design and progressive expansion, functional modules can be gradually added and improved as needed, and the modular design and integrated code implementation of the functional modules can be continuously optimized by using a self-iterative optimization mechanism. The present invention can not only flexibly generate codes according to personalized semantic requirements, but also realize accurate and rapid prototype development and continuous optimization, significantly improving the quality and efficiency of software development. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] A software generation method based on multi-layer semantic parsing and progressive module expansion, such as Figure 1 As shown, S1, the user describes the relevant software requirements in natural language, and the context information is obtained according to the user description, including:

[0060] S11. The user describes the relevant software requirements including software functions, interface design and business logic in natural language (for example, user description: I need an online mall with user login, product browsing and shopping cart functions);

[0061] S12. Obtain context information including known system requirements, user preferences, and domain knowledge based on the user description to prepare for subsequent multi-layer semantic analysis.

[0062] S2. Use natural language processing and semantic stratification to perform multi-layer semantic analysis on user descriptions, including:

[0063] S21. Analyze the user description using natural language processing, including entity recognition, syntax analysis, and intent recognition, and convert the user description into structured intermediate semantic information (for example, identifying that "online mall" is a business scenario, and "user login", "product browsing", and "shopping cart" are functional requirements);

[0064] S22. Perform semantic layering processing on the intermediate semantic information to achieve multi-layer semantic analysis of the user description.

[0065] Specifically, the intermediate semantic information is processed in a semantic layered manner, including:

[0066] Use the function layer, business layer and technical layer to process the intermediate semantic information in a semantic layered manner;

[0067] Functional layer, identifying functional requirements in intermediate semantic information (e.g., “user login”, “product browsing”, and “shopping cart”);

[0068] Business layer, which determines the business logic of functional requirements (for example, "user login" needs to include authentication, data storage, etc.);

[0069] The technical layer resolves implementation details based on business logic (e.g., "authentication" requires calling a database, setting up a session, etc.).

[0070] S3. Map the multi-layer semantic analysis results to pre-designed functional modules and perform modular design on the functional modules, including:

[0071] S31, mapping the intermediate semantic information to a specific domain knowledge base, extracting domain models, components, and design patterns corresponding to the intermediate semantic information (for example, identifying that "shopping cart" is a standard module in the "online mall" system, and mapping it to a predefined shopping cart module design pattern);

[0072] S32, mapping the multi-layer semantic analysis results to pre-designed functional modules based on the domain knowledge base (for example, mapping "user login" to the user authentication module, mapping "product browsing" to the product display module), each module contains a set of reusable components, interfaces and business logic;

[0073] S33, combining the user's priority requirements and the existing module library, modular design is performed on the mapped functional modules, including determining the module's interface, input and output, internal logic, and interaction mode with other functional modules;

[0074] In the process of modular design, the functional modules are customized according to the specific needs of users (for example, the user authentication module can choose to use different authentication methods such as OAuth, JWT, etc., and the shopping cart module can be configured with different pricing and discount rules).

[0075] S4. Generate modular code based on modular design and integrate the modular code into a complete software system, including:

[0076] S41. Dynamically select the appropriate technology stack and best practices based on the modular design, and use predefined code templates, design patterns, and domain-specific code snippets to transform the modular design into modular code;

[0077] S42, automatically generating integrated code including interaction logic, data flow processing and exception processing of the functional modules according to the business logic and modular codes of the functional modules, so as to integrate the modular codes into a complete software system;

[0078] Among them, in the process of converting modular design into modular code, the modular design of the core functional modules is converted into modular code first, and then the modular design of the auxiliary functional modules and the optimization functional modules are gradually converted into modular code (for example, the modular design of the user authentication module and the product display module is first converted into modular code, and then the modular design of the shopping cart module and the payment module is converted into modular code).

[0079] S5. Perform performance testing and user experience on the software system, perform self-iterative optimization based on performance testing and user experience, and progressively expand the functions and performance of the functional modules according to the optimization goals during each optimization process, including:

[0080] S51. After generating the integrated code, perform unit testing and integration testing on the integrated code to verify the accuracy and performance of the code and collect test data;

[0081] S52. After initially using the generated software system, the user provides evaluation feedback through natural language or configuration interface, proposes new software requirements or adjusts existing functions;

[0082] S53. Initiate a self-iterative optimization mechanism based on test data and evaluation feedback, and use reinforcement learning or adaptive algorithms to dynamically adjust the configuration and interaction mode of functional modules to optimize the modular design and integrated code implementation of functional modules (for example, if the test finds that the identity authentication speed of the user authentication module does not meet the standard, the implementation method will be adjusted to optimize the code performance);

[0083] In each optimization process, the functions and performance of the functional modules are progressively expanded according to the optimization goals, and a comprehensive and performance-optimized software system is obtained through continuous iteration and improvement of integration.

[0084] S6. Automatically deploy the optimized software system, continuously track the running status of the software system and collect data, and perform subsequent self-iterative optimization based on the collected data, including:

[0085] S61, automatically deploying the optimized software system by generating a deployment script and configuring environment variables, and publishing the software system to a target environment (such as a cloud server, client, etc.);

[0086] S62. Continuously track the operating status of the software system and collect user behavior data and system performance data, and perform subsequent self-iterative optimization based on the collected data to ensure that the software system continues to improve and meet user needs.

[0087] The technical solution of the present application also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the software generation method based on multi-layer semantic parsing and progressive module expansion is implemented.

[0088] The technical solution of the present application also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step of the software generation method based on multi-layer semantic analysis and progressive module expansion is implemented.

[0089] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A software generation method based on multi-layer semantic analysis and progressive module expansion, characterized in that: The following steps are involved: S1. The user describes the relevant software requirements in natural language, and obtains context information based on the user description; S2, using natural language processing and semantic stratification to perform multi-layer semantic analysis on user descriptions; S3, mapping the multi-layer semantic analysis results to pre-designed functional modules, and performing modular design on the functional modules; S4. Generate modular code according to modular design and integrate the modular code into a complete software system; S5. Perform performance testing and user experience on the software system, perform self-iterative optimization based on performance testing and user experience, and progressively expand the functions and performance of the functional modules according to the optimization goals during each optimization process; S6. Automatically deploy the optimized software system, continuously track the running status of the software system and collect data, and perform subsequent self-iterative optimization based on the collected data.

2. The software generation method based on multi-layer semantic analysis and progressive module expansion according to claim 1, characterized in that: In S1, users describe relevant software requirements in natural language, and context information is obtained based on the user description, including: S11. Users describe relevant software requirements including software functions, interface design and business logic in natural language; S12. Obtain context information including known system requirements, user preferences, and domain knowledge based on the user description to prepare for subsequent multi-layer semantic analysis.

3. The software generation method based on multi-layer semantic analysis and progressive module expansion according to claim 2 is characterized in that: S2 uses natural language processing and semantic stratification to perform multi-layer semantic analysis on user descriptions, including: S21. Analyze the user description using natural language processing, including entity recognition, syntax analysis, and intent recognition, and convert the user description into structured intermediate semantic information; S22. Perform semantic layering processing on the intermediate semantic information to achieve multi-layer semantic analysis of the user description.

4. The software generation method based on multi-layer semantic analysis and progressive module expansion according to claim 3 is characterized in that: The performing semantic layering processing on the intermediate semantic information includes: Use the function layer, business layer and technical layer to process the intermediate semantic information in a semantic layered manner; Functional layer, identifying functional requirements in intermediate semantic information; Business layer, which determines the business logic of functional requirements; The technical layer analyzes the implementation details based on the business logic.

5. The software generation method based on multi-layer semantic analysis and progressive module expansion according to claim 3 is characterized in that: In S3, the multi-layer semantic analysis results are mapped to pre-designed functional modules, and the functional modules are modularly designed, including: S31, mapping the intermediate semantic information to a specific domain knowledge base, and extracting domain models, components, and design patterns corresponding to the intermediate semantic information; S32, mapping the multi-layer semantic analysis results to pre-designed functional modules based on the domain knowledge base, each module containing a set of reusable components, interfaces and business logic; S33, combining the user's priority requirements and the existing module library, modular design is performed on the mapped functional modules, including determining the module's interface, input and output, internal logic, and interaction mode with other functional modules; In the process of modular design, the functional modules are customized according to the specific needs of users.

6. The software generation method based on multi-layer semantic analysis and progressive module expansion according to claim 5 is characterized in that: S4 generates modular code based on modular design and integrates the modular code into a complete software system, including: S41. Dynamically select the appropriate technology stack and best practices based on the modular design, and use predefined code templates, design patterns, and domain-specific code snippets to transform the modular design into modular code; S42, automatically generating integrated code including interaction logic, data flow processing and exception processing of the functional modules according to the business logic and modular codes of the functional modules, so as to integrate the modular codes into a complete software system; Among them, in the process of converting modular design into modular code, the modular design of core functional modules is converted into modular code first, and then the modular design of auxiliary functional modules and optimization functional modules are gradually converted into modular code.

7. The software generation method based on multi-layer semantic analysis and progressive module expansion according to claim 6 is characterized in that: In S5, the software system is tested for performance and user experience, and self-iterative optimization is performed based on performance testing and user experience. In each optimization process, the functions and performance of the functional modules are progressively expanded according to the optimization goals, including: S51. After generating the integrated code, perform unit testing and integration testing on the integrated code to verify the accuracy and performance of the code and collect test data; S52. After initially using the generated software system, the user provides evaluation feedback through natural language or configuration interface, proposes new software requirements or adjusts existing functions; S53. Initiate a self-iterative optimization mechanism based on test data and evaluation feedback, and dynamically adjust the configuration and interaction mode of the functional modules using reinforcement learning or adaptive algorithms to optimize the modular design and integrated code implementation of the functional modules; In each optimization process, the functions and performance of the functional modules are progressively expanded according to the optimization goals, and a comprehensive and performance-optimized software system is obtained through continuous iteration and improvement of integration.

8. The software generation method based on multi-layer semantic analysis and progressive module expansion according to claim 7 is characterized in that: S6 automatically deploys the optimized software system, continuously tracks the running status of the software system and collects data, and performs subsequent self-iterative optimization based on the collected data, including: S61, automatically deploying the optimized software system by generating a deployment script and configuring environment variables, and publishing the software system to the target environment; S62. Continuously track the operating status of the software system and collect user behavior data and system performance data, and perform subsequent self-iterative optimization based on the collected data to ensure that the software system continues to improve and meet user needs.

9. A computer device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the software generation method based on multi-layer semantic parsing and progressive module expansion as claimed in claim 1.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the various steps of the software generation method based on multi-layer semantic parsing and progressive module expansion as claimed in claim 1 are implemented.

Citation Information

Cited By

  • Method and device for controlling vehicle functions, vehicle and storage medium

    CN121224600A