Software system demand creation and management method of multi-agent large model based on demand model driving
Through the multi-agent large-model method driven by the demand model, the software system requirements are automatically created and managed, and the problem of low degree of demand creation and management automation in the existing technology is solved, and efficient requirement specifications and change impact analysis is achieved.
Patent Information
- Application Number
- CN202411775628.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-05
AI Technical Summary
The lack of automation in demand creation and management in existing software systems, resulting in low demand quality, time-consuming analysis of changes and error-prone, and low integration of large models in model-driven projects, making it impossible to effectively generate the required artifacts.
Using the multi-agent large-model method driven by demand models, we create demand models through the Eclipse modeling framework, and use the multi-agent large-model to automatically generate domain-specific languages, system models and behavior models to realize the automated creation and management of software system requirements.
It realizes the automated creation and management of software system requirements, improves the degree of requirement specification and automation, reduces manual maintenance costs, and enhances the traceability of demand-system and the accuracy of change impact analysis.
Smart Images

Figure CN119806497A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software requirement creation, and in particular, relates to a method for creating and managing software system requirements based on a multi-agent large model driven by a requirement model. Background Art
[0002] Creating reasonable and effective software requirements in software systems is a key activity. However, most of the requirements in software systems currently rely on natural language documents and spreadsheets, which require a lot of manpower to generate and maintain. The specification, analysis, and verification of requirements lack the support of automated tools, and the quality of requirements is potentially compromised due to possible human errors.
[0003] The development and maintenance of complex software systems are very difficult, and software complexity has been established as one of the main challenges in the field of software engineering. To cope with software complexity, model-driven engineering (MDE) is considered to have good prospects in improving the efficiency and consistency of software engineering. As MDE is gradually adopted by various industries, various tools supporting MDE have been developed one after another. These tools can help system engineers develop models at different stages of the software life cycle (such as requirement models and architecture models), support different levels of abstraction (such as system behavior models at the functional level), and build models from different perspectives (such as security and assurance). However, the models developed throughout the system engineering process often use different tools and are therefore heterogeneous. This heterogeneity brings difficulties in integration and interaction, especially when system requirements change, manual change impact analysis is a time-consuming and error-prone process. Existing model-driven development lacks an automated traceability mechanism and cannot meet the needs of model version management, change tracking, and historical backtracking in complex systems.
[0004] Large models can generate natural language output that fits the context based on prompt words, but the current model-driven engineering field has a low level of integration of large models and fails to fully utilize their natural language processing and reasoning capabilities.
[0005] Users usually need to refine software requirements and use formal methods to establish software behavior models to prove the safety of system components that perform key functions. However, currently, formalizing software requirements usually requires a lot of manual work, establishing software behavior models requires a lot of professional knowledge, establishing complex behavior models is time-consuming, and traceability from requirements to behavior models is difficult to establish. Summary of the invention
[0006] The purpose of the present invention is to provide a method for creating and managing software system requirements based on a multi-agent big model driven by a requirements model, combining model-driven engineering and the multi-agent big model to achieve automated creation of software system requirements models, automated model management, and automated tracing of software requirements to the system.
[0007] The present invention provides a method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model, comprising the following steps:
[0008] Step 1: Use the Eclipse modeling framework to create a requirement model and convert the requirement model into a JSON document using the model-to-text conversion code.
[0009] Step 2: Using the multi-agent of the first model, taking the JSON document of the demand model in step 1 as input, formulating unique prompt words, and extracting concepts and instances from the JSON document of the demand;
[0010] Step 3: Using the second multi-agent large model, using the unique prompt words, taking the software requirement JSON document as input, automatically generates the domain-specific language of the software system requirements;
[0011] Step 4, using the third multi-agent large model, taking the requirement model JSON document as input, generating code for generating the model, so as to automatically create a system model in a domain-specific language that meets the software system requirements generated in step 3;
[0012] Step 5, using the fourth multi-agent macro model to automatically generate a behavior model of the software system;
[0013] Step 6, perform model management operations on the requirement model created in step 2 and the domain specific language of the software system requirement generated in step 3 for developing the system.
[0014] Furthermore, the requirement model in step 1 includes domain-specific requirement terms, categories, and different types of requirements, including user requirements, functional requirements, or non-functional requirements.
[0015] Furthermore, the step 2 also includes:
[0016] The JSON document output by the large model is converted through the model-to-model conversion code, and the conceptual model of the requirements and the traceability model from requirements to requirements concepts are automatically generated through the first large model multi-agent.
[0017] Furthermore, the step 3 also includes:
[0018] The traceability JSON document is generated through the second multi-agent macro model, which is used to automatically trace the software system requirements to the domain specific language of the software system requirements.
[0019] Furthermore, the step 4 also includes:
[0020] The third model multi-agent generates the traceability JSON from the requirement model to the system model.
[0021] Furthermore, the step 5 also includes:
[0022] The fourth model multi-agent generates a JSON document traceable from the requirement model to the system behavior model.
[0023] Furthermore, the behavior model described in step 5 includes a safety analysis model, a system software behavior model, and a system assurance case model, and the safety analysis model includes a failure mode and impact analysis model; the system software behavior model includes a state machine model; and the model management operation described in step 6 includes model verification, model-to-text conversion, and model-to-model conversion.
[0024] The present invention also provides a software system requirement creation and management system based on a multi-agent large model driven by a requirement model, including a requirement creation and management module, which executes the software system requirement creation and management method based on a multi-agent large model driven by a requirement model.
[0025] The present invention also provides a non-transitory computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the method for creating and managing software system requirements for a multi-agent large model driven by a requirements model is implemented.
[0026] The present invention also provides an electronic device, comprising:
[0027] A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model by executing the computer instructions.
[0028] Through the above scheme, the software system requirement creation and management method based on the multi-agent large model driven by the requirement model has the following technical effects:
[0029] (1) The present invention uses the Eclipse Modeling Framework (EMF) to create a domain-specific language (DSL) for software system requirements, which facilitates users to use DSL to automatically create requirement models. This solves the problem of low automation and low requirement specification in software system requirement creation.
[0030] (2) The present invention uses Eclipse Sirius to create a graphical modeling workbench and defines a graphical interface for software system requirements, enabling users to create and manage software system requirements with complex functions. This solves the problem of difficult software system requirements management and high manual maintenance costs.
[0031] (3) The present invention has developed a dedicated prompt for the design of a multi-agent large model, using a small number of prompts and thought chain methods to help the large model generate the required artifacts in the model-driven engineering. This solves the problem that the large model in the model-driven engineering has a low integration degree and the large model cannot generate the required artifacts well.
[0032] (4) The present invention creates a domain-specific language (DSL) for software system requirement tracing, which facilitates users to automatically trace software requirements and perform change impact analysis. This solves the problem that software change impact analysis in current software maintenance activities is time-consuming and error-prone, and software requirement traceability is weak.
[0033] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A flowchart of a method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model according to the present invention;
[0035] Figure 2 This is an application embodiment of the present invention;
[0036] Figure 3 It is a schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION
[0037] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0038] Terminology explanation:
[0039] Model Driven Engineering: Model Driven Engineering (MDE) is a modern software engineering paradigm in which models are considered as the primary artifacts. These models are used to analyze, simulate, and reason about the properties of the system under development, and ultimately generate the implementation of the system (or part of the system) in an automated manner. MDE includes two important concepts: Domain Specific Modeling (DSM) and Model Management.
[0040] Domain Specific Language: A computer language designed for a specific application domain. Unlike general-purpose programming languages (such as C, Java, etc.), DSL is tailored to solve problems in a specific domain and usually provides higher expressiveness and development efficiency. DSL can be in the form of programming languages, modeling languages, or configuration languages, designed to simplify the work of developers and enable them to focus more on domain-specific problems.
[0041] Domain Specific Modeling (DSM): Domain-specific modeling enables modeling experts to focus on creating Domain Specific Languages (DSLs). These DSLs are used to generate domain specific models that conform to the DSL specification and are used to capture the key information of the system in a way that is suitable for its specific domain and technology.
[0042] Model Management: Based on the domain-specific model, a series of automated model management operations can be performed, including but not limited to: Model Validation: ensuring the correctness and consistency of the model; Model-to-Model Transformation: performing semantic mapping or conversion between different models; Model-to-Text Transformation: generating software artifacts such as source code and documentation.
[0043] Large Language Models (LLMs) are an important development in the field of artificial intelligence. These models are designed to understand and generate natural language by training on large-scale text datasets. LLMs use deep learning techniques, especially the Transformer architecture, to capture complex patterns and semantic relationships in natural language. Large models have excellent contextual learning capabilities, and LLMs (such as Instruct GPT and GPT-4) excel in contextual learning and generating coherent and contextually relevant responses. Given a prompt, these models are able to generate natural language output that fits the context.
[0044] Prompt Engineering: Instead of retraining the model on a large scale, prompts are designed to clearly explain the task and expected output to LLMs, thereby leveraging the model's existing knowledge to complete the task. Prompt Engineering includes a variety of strategies, and the following are common methods: Zero-Shot Prompting The model generates results only through the task description without providing any specific examples. Few-Shot Prompting In addition to the task description, a set of examples containing inputs and outputs are provided to help LLMs better understand the task. Few-Shot Prompts usually contain the context of the task as well as the expected output. Its main advantage is that it significantly reduces the need for task-specific data. However, for complex tasks with multiple steps, few-shot prompts may not perform well. Chain-of-Thought Prompts (CoT) Chain-of-Thought Prompts (CoT) are proposed to solve the problem of multi-step reasoning in complex tasks. This technology guides LLMs by providing a series of reasoning steps, decomposing complex problems into intermediate steps, and significantly improving the model's ability in complex reasoning tasks.
[0045] Large Model Multi-Agent: As large language models (LLMs) demonstrate near-human cognitive capabilities in planning and reasoning, researchers are turning their attention to the development of LLM-based agents to understand and generate human-like instructions to facilitate complex interactions and decision-making. However, the application of single LLM-based agents is often limited because real-world problems often span multiple domains and require expertise from different fields. To address this challenge, a multi-agent LLM framework is proposed. It contains multiple domain-specific agents, each with unique skills and responsibilities. These agents can interact in a specific order and share dialogue records to effectively simulate complex real-world scenarios and ultimately complete one or more tasks together.
[0046] Eclipse Modeling Framework (EMF): EMF is a widely used modeling framework in MDE. EMF provides a modeling language called Ecore, which allows rapid development of domain specific languages (DSL).
[0047] Requirements Engineering: It is a key activity in software development. It focuses on the real-world goals, functions, and constraints of the software system. The RE process is designed to lay a solid foundation for system development. The process strives to minimize errors, enhance communication with stakeholders, and increase the chances of developing a successful system. Requirements engineering includes requirements acquisition, analysis and specification, verification, and management. Automated requirements engineering refers to the use of software tools and technologies to support and automate the elicitation, analysis, specification, verification, and management of software requirements.
[0048] Ginseng Figure 1 As shown, this embodiment provides a method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model, comprising the following steps:
[0049] Step S1, using the Eclipse modeling framework to create a demand model, and converting the demand model into a JSON document through the model-to-text conversion code;
[0050] Step S2, using the first large model multi-agent, taking the requirement model JSON document in step S1 as input, formulating unique prompt words, and extracting concepts and instances from the requirement JSON document. Through the model-to-model conversion code, the JSON document output by the large model is converted to automatically generate the requirement concept model and the requirement-to-requirement concept traceability model.
[0051] Step S3, using the second multi-agent macro model, using the unique prompt words, taking the software requirement JSON document as input, and automatically generating the domain specific language of the software system requirements. The second multi-agent macro model generates a traceable JSON document, which is used to automatically trace the software system requirements to the domain specific language of the software system requirements.
[0052] Step S4: Using the third multi-agent macro model, taking the requirement model JSON document as input, generating code for generating the model, so as to automatically create a system model in a domain-specific language that meets the software system requirements generated in step S3. Generate a requirement model to system model traceability JSON.
[0053] Step S5, using the fourth multi-agent macro model to automatically generate a behavior model of the software system and generate a JSON document for traceability.
[0054] Step S6, performing model management operations on the demand model created in step S2 and the domain specific language of the software system demand generated in step S3 for developing the system.
[0055] Through the software system requirement creation and management method, the problems of low automation level in software system requirement creation, low requirement standardization level, and large amount of manpower maintenance are solved; the problems of time-consuming and error-prone software change impact analysis, frequent software requirement changes, and weak traceability from requirements to system artifacts in current software maintenance activities are solved; the problem of low integration of large models in model-driven engineering and the inability of large models to generate artifacts required in model-driven engineering well is solved; the problem of difficulty in users generating complex software behavior models, high learning cost, and weak traceability from software requirements to software behavior models is solved.
[0056] The present invention is described in further detail below.
[0057] Ginseng Figure 2 The multi-agent large model system engineering driven by the requirement model shown in the figure combines model-driven engineering and multi-agent large models to achieve the automatic creation of system requirement models and the automatic generation of traceability links from requirements to system models. The specific process is as follows:
[0058] 1. Creation of the requirements model. Using the Eclipse modeling framework, a DSL (domain-specific language) for lightweight requirements models is created. The characteristics of the requirements model DSL are the establishment of modular requirements model packages, which contain domain-specific requirements terms, categories, and different types of requirements, such as user requirements, functional requirements, or non-functional requirements. After generating the requirements model, the model-to-text conversion code is developed to convert the model into a JSON format document that is easier to understand for large models.
[0059] 2. Extracting concepts and their instances from requirements helps to more accurately extract the DSL of the system model in the subsequent steps. In this step, the large model multi-agent is applied, the JSON document of the requirement model generated in the previous step is used as input, and unique prompt words are formulated to extract concepts and instances from the JSON document of the requirement. In step 2, the model-to-model conversion code is developed, which can convert the JSON document output by the large model and automatically generate the conceptual model of the requirements and the traceability model from the requirements to the requirements concept.
[0060] 3. Automatically create a DSL (domain-specific language) for software system requirements from the requirements model JSON. In this step, another multi-agent large model is applied, and a unique prompt word is formulated for it. The software requirements JSON document is used as input to automatically generate a DSL (domain-specific language) for software system requirements. At the same time, the multi-agent large model also generates a JSON document for traceability, which facilitates the automatic tracing of software system requirements to the DSL (domain-specific language) for software system requirements.
[0061] 4. Automatically create a system model in DSL (domain specific language) that meets the requirements generated in step 3. Another multi-agent is applied. In this step, the requirements model JSON document is used as input and the code that can be used to generate the model is generated. At the same time, the requirements model to system model traceability JSON is generated.
[0062] 5. Automatically generate the behavior model of the software system. The models that can be generated in this step include but are not limited to safety analysis models (such as failure mode and impact analysis), system software behavior models (such as state machines), and system assurance case models. In this step, multi-agents are used to generate software behavior models. At the same time, JSON documents for traceability are generated.
[0063] 6. Apply MDE’s model management to perform model management operations (e.g., model validation, model-to-text conversion, model-to-model conversion) on the requirement models generated in the previous steps, the DSL (domain-specific language) of the software system requirements, and other models to develop the system until the final system product is developed.
[0064] The present invention has the following technical effects:
[0065] (1) The present invention uses the Eclipse Modeling Framework (EMF) to create a domain-specific language (DSL) for software system requirements, which facilitates users to use DSL to automatically create requirement models. This solves the problem of low automation and low requirement specification in software system requirement creation.
[0066] (2) The present invention uses Eclipse Sirius to create a graphical modeling workbench and defines a graphical interface for software system requirements, enabling users to create and manage software system requirements with complex functions. This solves the problem of difficult software system requirements management and high manual maintenance costs.
[0067] (3) The present invention has developed a dedicated prompt for the design of a multi-agent large model, using a small number of prompts and thought chain methods to help the large model generate the required artifacts in the model-driven engineering. This solves the problem that the large model in the model-driven engineering has a low integration degree and the large model cannot generate the required artifacts well.
[0068] (4) The present invention creates a domain-specific language (DSL) for software system requirement tracing, which facilitates users to automatically trace software requirements and perform change impact analysis. This solves the problem that software change impact analysis in current software maintenance activities is time-consuming and error-prone, and software requirement traceability is weak.
[0069] This embodiment also provides a software system requirement creation and management system based on a multi-agent large model driven by a requirement model, including a requirement creation and management module, which executes the software system requirement creation and management method based on a multi-agent large model driven by a requirement model.
[0070] This embodiment also provides a non-transitory computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, they implement the method for creating and managing software system requirements for a multi-agent large model driven by a requirements model.
[0071] Ginseng Figure 3 As shown, this embodiment also provides an electronic device, including:
[0072] A memory 201 and a processor 202, wherein the memory 201 and the processor 202 are communicatively connected to each other, the memory 201 stores computer instructions, and the processor 202 executes the computer instructions to execute the method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model.
[0073] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the technical principles of the present invention, and these improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model, characterized in that: The steps include: Step 1: Use the Eclipse modeling framework to create a requirement model and convert the requirement model into a JSON document using the model-to-text conversion code. Step 2: Using the multi-agent of the first model, taking the JSON document of the demand model in step 1 as input, formulating unique prompt words, and extracting concepts and instances from the JSON document of the demand; Step 3: Using the second multi-agent large model, using the unique prompt words, taking the software requirement JSON document as input, automatically generates the domain-specific language of the software system requirements; Step 4, using the third multi-agent large model, taking the requirement model JSON document as input, generating code for generating the model, so as to automatically create a system model in a domain-specific language that meets the software system requirements generated in step 3; Step 5, using the fourth multi-agent macro model to automatically generate a behavior model of the software system; Step 6, perform model management operations on the requirement model created in step 2 and the domain specific language of the software system requirement generated in step 3 for developing the system.
2. The method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model according to claim 1, characterized in that: The requirement model described in step 1 includes domain-specific requirement terms, categories, and different types of requirements, including user requirements, functional requirements, or non-functional requirements.
3. The method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model according to claim 2, characterized in that: The step 2 also includes: The JSON document output by the large model is converted through the model-to-model conversion code, and the conceptual model of the requirements and the traceability model from requirements to requirements concepts are automatically generated through the first large model multi-agent.
4. The method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model according to claim 3, characterized in that: The step 3 also includes: The traceability JSON document is generated through the second multi-agent macro model, which is used to automatically trace the software system requirements to the domain specific language of the software system requirements.
5. The method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model according to claim 4, characterized in that: The step 4 also includes: The third model multi-agent generates the traceability JSON from the requirement model to the system model.
6. The method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model according to claim 5, characterized in that: The step 5 also includes: The fourth model multi-agent generates a JSON document traceable from the requirement model to the system behavior model.
7. The method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model according to claim 6, characterized in that: The behavior model described in step 5 includes a safety analysis model, a system software behavior model, and a system assurance case model, wherein the safety analysis model includes a failure mode and impact analysis model; the system software behavior model includes a state machine model; the model management operation described in step 6 includes model verification, model-to-text conversion, and model-to-model conversion.
8. A software system requirement creation and management system based on a multi-agent large model driven by a requirement model, characterized in that: It includes a demand creation and management module, which executes the software system demand creation and management method based on a demand model-driven multi-agent large model as described in any one of claims 1-7.
9. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which, when executed by a processor, implement a method for creating and managing software system requirements based on a requirements model-driven multi-agent large model as described in any one of claims 1-7.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for creating and managing software system requirements based on a multi-agent large model driven by a requirements model as described in any one of claims 1 to 7 by executing the computer instructions.
Citation Information
Patent Citations
Software modeling method based on artificial intelligence, computer equipment and storage medium
CN116466917A
Automated and adaptive model-driven security system and method for operating the same
US20150269383A1
Cited By
Code generation method based on graph alignment coding large model and multi-agent collaboration
CN120508285A