Software System Requirement Creation and Management Method for Multi-Agent Large Model Driven by Requirement Model
Through the multi-agent large model driven by demand model, automated creation and management of software system requirements, the problem of lack of automation in demand creation and management in the existing technology is solved, efficient requirement specifications and change impact analysis is achieved, and the traceability of the system is improved.
Patent Information
- Application Number
- CN202411775628.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2044-12-05
AI Technical Summary
The lack of automation of demand creation and management in existing software systems leads to low demand quality, time-consuming and error-prone analysis of changes, and low integration of large models in model-driven engineering, making it impossible to fully utilize its natural language processing and reasoning capabilities.
Using the software system requirements creation and management method of multi-agent large models driven by demand models, we create demand models through the Eclipse modeling framework, and use the multi-agent large models to automatically generate domain-specific languages, system models and behavior models to realize the automated creation and management of demand models.
It realizes the automated creation and management of software system requirements, improves the degree of requirements specification and automation, reduces manual maintenance costs, enhances the traceability of requirements to systems, and solves the time-consuming and error-prone problems of change impact analysis.
Smart Images

Figure CN119806497B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software requirement creation, and particularly relates to a method for creating and managing software system requirements of a multi-agent large model driven by a requirement model. Background Art
[0002] Creating reasonable and effective software requirements in a software system is a key activity. However, most requirements in current software systems rely on natural language documents and spreadsheets, which require a large amount of manpower to generate and maintain. The specification, analysis, and verification of requirements lack the support of automated tools, and the quality of requirements may potentially be damaged due to possible human errors.
[0003] The development and maintenance of complex software systems are highly 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 software engineering efficiency and consistency. As MDE is gradually adopted by various industries, various tools supporting MDE have been developed successively. These tools can help system engineers develop models at different stages of the software life cycle (such as requirement models, architecture models), support different abstraction levels (such as system behavior models at the functional layer), and build models from different perspectives (such as security and supportability). However, the models developed throughout the system engineering process often use different tools and thus have heterogeneity. This heterogeneity brings difficulties in integration and interaction. Especially when system requirements change, manually performing change impact analysis is a time-consuming and error-prone process. Existing model-driven development lacks an automated traceability mechanism and cannot meet the requirements of model version management, change tracking, and historical backtracking in complex systems.
[0004] Large models can generate natural language outputs that conform to the context according to prompts. However, the current integration of large models in the field of model-driven engineering is relatively low, and their natural language processing and reasoning capabilities are not fully utilized.
[0005] Users usually need to refine software requirements, use formal methods to establish a behavior model of the software to prove the security of system components that perform key functions. However, currently, formalizing software requirements usually requires a large amount of manual operation, establishing a software behavior model requires a lot of professional knowledge, it takes a long time to establish a complex behavior model, and it is difficult to establish traceability from requirements to behavior models. Summary of the Invention
[0006] The object of the present invention is to provide a method for creating and managing software system requirements of a multi-agent large model driven by a requirements model, combining model-driven engineering and multi-agent large models to achieve the automatic creation of software system requirements models, automatic model management, and automatic traceability from software requirements to the system.
[0007] The present invention provides a method for creating and managing software system requirements of a multi-agent large model driven by a requirements model, including the following steps:
[0008] Step 1, use the Eclipse Modeling Framework to create a requirements model, and convert the requirements model into a JSON document through code for model-to-text transformation;
[0009] Step 2, utilize the first large model multi-agent, take the requirements model JSON document in Step 1 as input, formulate specific prompt words, and extract concepts and instances from the requirements JSON document;
[0010] Step 3, utilize the second multi-agent large model, take the software requirements JSON document as input through specific prompt words, and automatically generate a domain-specific language for software system requirements;
[0011] Step 4, utilize the third multi-agent large model, take the requirements model JSON document as input, generate code for generating a model, and use it to automatically create a system model that conforms to the domain-specific language of the software system requirements generated in Step 3;
[0012] Step 5, utilize the fourth multi-agent large model to automatically generate a behavior model of the software system;
[0013] Step 6, perform model management operations on the requirements model created in Step 2 and the domain-specific language of the software system requirements generated in Step 3 for system development.
[0014] Further, the requirements model in Step 1 includes requirements terms, categories in a specific domain, and different types of requirements, including user requirements, functional requirements, or non-functional requirements.
[0015] Further, Step 2 further includes:
[0016] Through code for model-to-model transformation, convert the JSON document output by the large model, and automatically generate a conceptual model of the requirements and a traceability model from requirements to requirements concepts through the first large model multi-agent.
[0017] Further, Step 3 further includes:
[0018] Generate a traceable JSON document through the second multi-agent large model for automatically tracing software system requirements to the domain-specific language of software system requirements.
[0019] Further, step 4 further includes:
[0020] Generate a requirements model to system model traceable JSON through the third multi-agent large model.
[0021] Further, step 5 further includes:
[0022] Generate a traceable JSON document from the requirements model to the system behavior model through the fourth multi-agent large model.
[0023] Further, the behavior model in step 5 includes a safety analysis model, a system software behavior model, and a system assurance case model. The safety analysis model includes a failure mode and effects analysis model; the system software behavior model includes a state machine model; the model management operations in step 6 include model verification, model-to-text transformation, and model-to-model transformation.
[0024] The present invention also provides a software system requirements creation and management system based on a requirements model-driven multi-agent large model, including a requirements creation and management module, and the requirements creation and management module executes the software system requirements creation and management method based on the requirements model-driven multi-agent large model.
[0025] The present invention also provides a non-transitory computer-readable storage medium storing computer instructions, and when the computer instructions are executed by a processor, the software system requirements creation and management method based on the requirements model-driven multi-agent large model is implemented.
[0026] The present invention also provides an electronic device, including:
[0027] A memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the software system requirements creation and management method based on the requirements model-driven multi-agent large model by executing the computer instructions.
[0028] By means of the above solution, the software system requirements creation and management method based on the requirements model-driven multi-agent large model has the following technical effects:
[0029] (1) The present invention creates a domain-specific language (DSL) for software system requirements using the Eclipse Modelling Framework (EMF), facilitating users to automatically create requirement models using the DSL. It solves the problems of low automation and low standardization in software system requirement creation.
[0030] (2) The present invention uses Eclipse Sirius to create a graphical modelling workbench and defines a graphical interface for software system requirements, enabling users to create and manage software system requirements with complex functions. It solves the problems of difficult software system requirement management and high manual maintenance costs.
[0031] (3) The present invention formulates exclusive prompts for the design of multi-agent large models, and uses the few-shot prompting and chain-of-thought methods to help the large model generate the artifacts required in model-driven engineering. It solves the problems of low integration of large models and the inability of large models to well generate the required artifacts in model-driven engineering.
[0032] (4) The present invention creates a domain-specific language (DSL) for software system requirement tracing, facilitating users to perform automatic software requirement tracing and change impact analysis. It solves the problems of time-consuming and error-prone software change impact analysis and weak software requirement traceability in current software maintenance activities.
[0033] The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and implement it according to the content of the specification, the following provides a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. Description of the Drawings
[0034] Figure 1 It is a flowchart of the software system requirement creation and management method of the multi-agent large model driven by the requirement model of the present invention;
[0035] Figure 2 It is an application embodiment of the present invention;
[0036] Figure 3 It is a schematic structural diagram of an electronic device of the present invention. Detailed Embodiments
[0037] The following further describes in detail the specific embodiments of the present invention in conjunction with the drawings and embodiments. The following embodiments are used to illustrate the present invention but are not used to limit the scope of the present invention.
[0038] Term Explanation:
[0039] Model-Driven Engineering: Model-Driven Engineering (MDE) is a modern software engineering paradigm in which models are considered the primary artefacts. 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 parts of the system) in an automated manner. MDE includes two important concepts: Domain-Specific Modelling (DSM) and Model Management.
[0040] Domain-Specific Language: A computer language designed for a specific application domain. Different from general-purpose programming languages (such as C, Java, etc.), DSLs are customized to solve problems in specific domains and usually offer higher expressiveness and development efficiency. DSLs can be in the form of programming languages, modelling languages, or configuration languages, etc., aiming to simplify the work of developers and enable them to focus more on domain-specific problems.
[0041] Domain-Specific Modelling (DSM): Domain-Specific Modelling enables modelling experts to focus on creating Domain-Specific Languages (DSLs). These DSLs are used to generate domain-specific models that conform to the DSL specifications 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 domain-specific models, 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 transformation between different models; Model-to-Text Transformation: Generating software artefacts such as source code and documentation.
[0043] Large Language Models (LLMs) are an important advancement in the field of artificial intelligence. These models are trained on large-scale text datasets with the aim of understanding and generating natural language. LLMs utilize deep learning techniques, particularly the Transformer architecture, to capture complex patterns and semantic relationships in natural language. Large models possess excellent few-shot learning capabilities, and LLMs such as Instruct GPT and GPT-4 excel in few-shot learning and generating coherent and contextually relevant responses. Given a prompt, these models can generate natural language outputs that fit the context.
[0044] Prompt Engineering: Instead of large-scale retraining of the model, by designing prompts to clearly communicate the task and the expected output to LLMs, the existing knowledge of the model can be utilized to complete the task. Prompt engineering encompasses various strategies, and the following are common methods: Zero-Shot Prompting The model generates results solely based on 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 prompting usually includes the context of the task and the expected output. Its main advantage is that it significantly reduces the need for task-specific data. However, for complex tasks involving multiple steps, few-shot prompting may be insufficient. Chain-of-Thought (CoT) To address the multi-step reasoning problem in complex tasks, Chain-of-Thought (CoT) prompting is proposed. This technique guides LLMs by providing a series of reasoning steps, breaking down complex problems into intermediate steps, and significantly enhancing the model's ability in complex reasoning tasks.
[0045] Large Model Multi-Agents: As large language models (LLMs) demonstrate near-human cognitive abilities in planning and reasoning, researchers are turning their attention to the development of LLM-based agents to understand and generate human-like instructions, thereby facilitating complex interactions and decision-making. However, the application of a single LLM-based agent is often limited because real-world problems typically 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 conversation records, effectively simulating complex real-world scenarios and ultimately jointly completing one or more tasks.
[0046] Eclipse Modeling Framework (EMF): EMF is a widely used modeling framework in MDE. EMF provides a modeling language called Ecore, which allows for the rapid development of domain-specific languages (DSLs).
[0047] Requirements Engineering: It is a key activity in software development that focuses on the real-world goals, functions, and constraints of software systems. The RE process aims to lay a solid foundation for system development. This process strives to minimize errors, enhance stakeholder communication, and increase the chances of developing a successful system. Requirements engineering includes requirements elicitation, analysis and specification, validation, and management. Automated requirements engineering refers to the use of software tools and techniques to support and automate the elicitation, analysis, specification, validation, and management of software requirements.
[0048] As shown Figure 1 in the following, this embodiment provides a method for creating and managing software system requirements of a multi-agent large model driven by a requirements model, including the following steps:
[0049] Step S1, create a requirements model using the Eclipse Modeling Framework and convert the requirements model into a JSON document through code for model-to-text transformation;
[0050] Step S2, utilize the first multi-agent large model, take the requirements model JSON document in Step S1 as input, formulate specific prompt words, and extract concepts and instances from the requirements JSON document. Through code for model-to-model transformation, transform the JSON document output by the large model to automatically generate a conceptual model of the requirements and a traceability model from requirements to requirement concepts.
[0051] Step S3, utilize the second multi-agent large model, take the software requirements JSON document as input through specific prompt words, and automatically generate a domain-specific language for software system requirements. Generate a traceable JSON document through the second multi-agent large model for automatically tracing software system requirements to the domain-specific language of software system requirements.
[0052] Step S4, utilize the third multi-agent large model, take the requirements model JSON document as input, generate code for generating a model, and use it to automatically create a system model that conforms to the domain-specific language of software system requirements generated in Step S3. Generate a traceability JSON from the requirements model to the system model.
[0053] Step S5, utilize the fourth multi-agent large model to automatically generate a behavior model of the software system. Generate a JSON document for traceability.
[0054] Step S6: Perform model management operations on the requirements model created in Step S2 and the domain-specific language of the software system requirements generated in Step S3 for system development.
[0055] Through this software system requirements creation and management method, the problems of low automation degree in software system requirements creation, low requirement specification degree, and the need for a large amount of manpower for maintenance are solved; in current software maintenance activities, the problems of time-consuming and error-prone software change impact analysis, frequent software requirement changes, and weak traceability from requirements to system artifacts are solved; in model-driven engineering, the problems of low integration degree of large models and the inability of large models to generate the required artifacts in model-driven engineering well are solved; the problems of difficulty in users generating complex software behavior models, high learning costs, and weak traceability from software requirements to software behavior models are solved.
[0056] The present invention will be further described in detail below.
[0057] See Figure 2 The multi-agent large model system engineering driven by the requirements model shown. This engineering method combines model-driven engineering and multi-agent large models, realizing the automatic creation of system requirements 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, create a DSL (Domain-Specific Language) for lightweight requirements models. The characteristics of the requirements model DSL are that it establishes a modular requirements model package, containing domain-specific requirement terms, categories, and different types of requirements, such as user requirements, functional requirements, or non-functional requirements. After generating the requirements model, develop code for model-to-text conversion to convert the model into a JSON format document that is more understandable for large models.
[0059] 2. Extract concepts and their instances from the requirements, which helps to more accurately extract the DSL of the system model in subsequent steps. In this step, apply multi-agent large models, use the JSON document of the requirements model generated in the previous step as input, formulate specific prompt words, and extract concepts and instances from the JSON document of the requirements. In Step 2, develop code for model-to-model conversion to convert the JSON document output by the large model, and automatically generate the conceptual model of the requirements and the traceability model from requirements to requirement concepts.
[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 specific prompt words are formulated for it. Taking the software requirements JSON document as input, it automatically generates 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, facilitating the automatic traceability of software system requirements to the DSL (Domain-Specific Language) of software system requirements.
[0061] 4. Automatically create a system model that conforms to the DSL (Domain-Specific Language) requirements generated in step 3. Another multi-agent is applied. In this step, the requirements model JSON document is used as input to generate code that can be used to generate the model. At the same time, a 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 Effects Analysis), system software behavior models (such as state machines), and system assurance case models. In this step, a multi-agent is applied to generate the software behavior model. At the same time, a JSON document for traceability is generated.
[0063] 6. Apply the model management of MDE to perform model management operations (such as model validation, model-to-text transformation, model-to-model transformation) on the models such as the requirements model and the DSL (Domain-Specific Language) of software system requirements generated in the previous steps 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 Modelling Framework (EMF) to create a domain-specific language (DSL) for software system requirements, which facilitates users to automatically create requirements models using the DSL. It solves the problems of low automation and low specification degree in the creation of software system requirements.
[0066] (2) The present invention uses Eclipse Sirius to create a graphical modelling workbench and defines a graphical interface for software system requirements, enabling users to create and manage software system requirements with complex functions. It solves the problems of difficult software system requirements management and high manual maintenance costs.
[0067] (3) The present invention formulates exclusive prompts for the design of multi-agent large models, and utilizes the few-shot prompting and chain of thought methods to help the large model generate the artifacts required in model-driven engineering, solving the problems of low integration of large models and the inability of large models to well generate the required artifacts in model-driven engineering.
[0068] (4) The present invention creates a domain-specific language (DSL) for software system requirement tracing, facilitating users to perform automated software requirement tracing and change impact analysis, solving the problems of time-consuming and error-prone software change impact analysis and weak software requirement traceability in current software maintenance activities.
[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, and the requirement creation and management module executes the software system requirement creation and management method based on the multi-agent large model driven by the requirement model.
[0070] This embodiment also provides a non-transitory computer-readable storage medium, and the non-transitory computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the software system requirement creation and management method based on the multi-agent large model driven by the requirement model is implemented.
[0071] See Figure 3 As shown, this embodiment also provides an electronic device, including:
[0072] A memory 201 and a processor 202, which are communicatively connected to each other, the memory 201 stores computer instructions, and the processor 202 executes the software system requirement creation and management method based on the multi-agent large model driven by the requirement model by executing the computer instructions.
[0073] The above is only a preferred embodiment of the present invention and is not used to limit the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope 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 first large model multi-agent, taking the requirement model JSON document in step 1 as input, formulating unique prompt words, and extracting concepts and instances from the requirement JSON document; the unique prompt words are formulated using few-sample prompts and chained reasoning prompts, the few-sample prompts contain the context of the task and the expected output, and the chained reasoning prompts provide a series of reasoning steps to guide the large language model, decomposing complex problems into intermediate steps; Step 3: Using the second largest model multi-agent, with unique prompt words, the software requirement JSON document is used as input to automatically generate the domain-specific language of the software system requirements; Step 4, using the third model multi-agent, 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 model multi-agent to automatically generate the 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: Through the model-to-model conversion code, the JSON document output by the large model is converted to automatically generate the conceptual model of the requirements and the traceability model from requirement to requirement concept.
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 second large model multi-agent generates a traceability JSON document, which is used to automatically trace the software system requirements back to the specific domain 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: Generate requirement model to system model traceability JSON.
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: Generates a JSON document for traceability.
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