A software architecture design method, device, storage medium and program product
By parsing requirement documents and generating architecture topology diagrams using a large language model, the problem of the disconnect between requirements and architecture in software architecture design is solved, enabling efficient tracing and verification, and improving the maintainability and iteration efficiency of the software architecture.
Patent Information
- Application Number
- CN202611199941.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-11-24
AI Technical Summary
In existing technologies, software architecture design relies on human experience, which leads to a disconnect between requirements and architecture, making it difficult to trace the source and affecting the maintainability and iteration efficiency of the software architecture.
The requirements specification document is parsed using a large language model to extract business entities and attribute data, generate architecture nodes and establish mapping relationships, construct a software architecture ontology topology diagram, and simulate and verify it in an isolated sandbox.
It achieves a clear and traceable architectural topology design, reduces the cost of requirement iteration and defect investigation, and improves the maintainability and iteration efficiency of the software architecture.
Smart Images

Figure CN123157170A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software development technology, specifically to a software architecture design method, device, storage medium, and program product. Background Technology
[0002] As software systems gradually evolve towards microservices and distributed architectures, and the complexity of business scenarios continues to increase, transforming natural language requirements documents into standardized and precise software architecture designs has become a core part of the software development process. Its design efficiency and accuracy directly affect the development cycle and operational quality of the software system.
[0003] In related technologies, software architecture design typically relies on the experience of professional architects. Specifically, architects need to divide the requirements document into corresponding architecture nodes based on their experience, clarify the relationships between the nodes, and manually complete the drawing of the architecture topology diagram.
[0004] However, when architecture is designed manually, the design process relies on the architect's personal experience and subjective judgment, making it difficult to establish a clear relationship between requirements and architecture (such as nodes in an architecture topology diagram). This results in a lack of traceability between requirements and architecture. When requirements change or architectural design flaws need to be investigated, developers cannot quickly locate the corresponding requirements, which restricts the maintainability and iteration efficiency of the software architecture.
[0005] It should be noted that the information disclosed in the background section of this application is intended only to enhance the understanding of the general background of this application, and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0006] This application provides a software architecture design method, device, storage medium, and program product to help solve the problem of the disconnect between requirements and architecture in the software architecture design process in related technologies.
[0007] In a first aspect, embodiments of this application provide a software architecture design method, including: The requirements specification document is parsed using a large language model to extract target business entities and business attribute data; Based on the target business entity, generate target architecture nodes and establish data flow dependencies between the target architecture nodes; Construct a mapping relationship between the target architecture node and the business attribute data; Based on the mapping relationship, field binding and constraint writing operations are performed on the target architecture node according to the business attribute data to generate a software architecture ontology topology diagram.
[0008] In this embodiment of the application, a large language model is used to perform in-depth analysis of the requirements specification document. Based on the semantic understanding capability of the large language model, business entities and business attributes are accurately extracted, and an architecture topology is generated based on this. This achieves a clear and traceable architecture topology design process and ensures the accuracy of the transformation from requirements to architecture.
[0009] More importantly, by establishing a mapping relationship between target architecture nodes and the aforementioned business attribute data, a traceable relationship between requirements and architecture is formed. Specifically, when business requirements change, the affected target architecture nodes can be located through the mapping relationship; and when there are defects in the architecture design, the corresponding requirements (business attribute data) can be traced back through the mapping relationship. This reduces the time cost of requirement iteration and defect investigation costs, and improves the maintainability and iteration efficiency of the software architecture.
[0010] In one possible implementation, the requirements specification document includes a historical interface definition document and a target requirements specification document, and the business attribute data includes historical interface attribute data and target business attribute data.
[0011] In this embodiment, by combining the two types of documents mentioned above to jointly extract business entities, it is possible to fully cover historically implemented business objects and incrementally planned business objects, thereby obtaining comprehensive target business entities. This avoids the omission of business entities caused by a single document source and improves the adaptability and feasibility of the architecture design in system iteration and evolution scenarios.
[0012] In one possible implementation, after generating the software architecture ontology topology diagram, the following is also included: Based on the software architecture ontology topology diagram, generate a virtual topology instance; In a pre-defined isolation sandbox, the virtual topology instance is verified using simulated requests, and a verification report is generated.
[0013] In this embodiment, by using the aforementioned isolated sandbox simulation verification method, the software architecture design system can complete architecture verification during the architecture design phase without waiting for code development to be completed. This effectively alleviates the problem of strong lag in traditional static verification methods and improves the early detection capability and reliability of architecture design. Furthermore, since this verification process is directly based on the design logic, there is no black-box conversion process from design logic to verification logic, which improves the interpretability of the verification.
[0014] In one possible implementation, the verification report includes an interface consistency verification report, a load verification report, and an authentication link integrity verification report. The virtual topology instance is verified, and a verification report is generated, including: Based on the comparison results between the fields bound to the topology nodes in the virtual topology instance and the fields of the corresponding historical interfaces, an interface consistency verification report is generated. A load verification report is generated based on the fan-in and fan-out ratios of the topology nodes in the virtual topology instance. Based on the calling relationships between topology nodes in the virtual topology instance, an authentication link integrity verification report is generated.
[0015] In this embodiment, multi-dimensional verification is performed on interface consistency, node load characteristics, and authentication link integrity, enabling a comprehensive evaluation of the software architecture in terms of compatibility, performance, and security. It can identify differences in field definitions, performance bottlenecks, and logical deficiencies in security links during the integration of new and old systems at the architecture design stage, thereby ensuring the robustness and feasibility of the software architecture design.
[0016] In one possible implementation, after generating the verification report, the following is also included: Based on the anomaly type in the verification report, a search is performed in the self-healing strategy library to generate a self-healing strategy corresponding to the anomaly type. The self-healing strategy is an optimization suggestion for the software architecture ontology topology diagram.
[0017] In this embodiment of the application, by searching the self-healing strategy library according to the anomaly type in the verification report, a self-healing strategy for the software architecture ontology topology diagram is generated. This can realize the diagnosis and repair suggestions for architectural design defects, which can effectively improve the efficiency and accuracy of software architecture optimization.
[0018] In one possible implementation, the step of parsing the requirements specification document using a large language model to extract target business entity and business attribute data includes: Using a large language model constrained by a pre-defined rule base, semantic understanding and reasoning analysis are performed on the requirements specification document to extract target business entities and business attribute data.
[0019] In this embodiment of the application, by using a large language model constrained by a preset rule base, constraints can be provided for the reasoning process of the large language model, thereby effectively suppressing the illusion phenomenon, ensuring the accuracy and compliance of the extracted content, and extracting data that conforms to semantic description and satisfies business logic.
[0020] In one possible implementation, before retrieving the self-healing strategy from the self-healing strategy library based on the anomaly type in the verification report and generating the self-healing strategy corresponding to the anomaly type, the method further includes: By analyzing historical verification reports and expert repair strategies using a fault analysis model, a self-healing strategy library is generated.
[0021] In this embodiment, the fault analysis model can gradually learn the business characteristics and architectural habits of a specific enterprise, thereby making the generated self-healing strategies increasingly accurate and better suited to the enterprise's actual business needs and scenarios. Furthermore, as the number of self-healing strategies in the self-healing strategy library increases, manual maintenance costs can be continuously reduced.
[0022] Secondly, embodiments of this application provide an electronic device, including: processor; Memory; And a computer program, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, causes the electronic device to perform the method described in any one of the first aspects.
[0023] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of the first aspects.
[0024] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the first aspects. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 A schematic diagram of a software architecture design method provided in this application embodiment; Figure 2 This application provides a schematic diagram of a software architecture verification process. Figure 3 This is a schematic flowchart of a verification report generation method provided in an embodiment of this application; Figure 4 A schematic diagram of a verification process provided in an embodiment of this application; Figure 5 A schematic diagram of a software architecture design process provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0028] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0029] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0030] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0031] As software systems gradually evolve towards microservices and distributed architectures, and the complexity of business scenarios continues to increase, transforming natural language requirements documents into standardized and precise software architecture designs has become a core part of the software development process. Its design efficiency and accuracy directly affect the development cycle and operational quality of the software system.
[0032] In related technologies, software architecture design typically relies on the experience of professional architects. Specifically, architects need to divide the requirements document into corresponding architecture nodes based on their experience, clarify the relationships between the nodes, and manually complete the drawing of the architecture topology diagram.
[0033] However, when architecture is designed manually, the design process relies on the architect's personal experience and subjective judgment, making it difficult to establish a clear relationship between requirements and architecture (such as nodes in an architecture topology diagram). This results in a lack of traceability between requirements and architecture. When requirements change or architectural design flaws need to be investigated, developers cannot quickly locate the corresponding requirements, which restricts the maintainability and iteration efficiency of the software architecture.
[0034] To address the aforementioned issues, this application provides a software architecture design method. By employing a large language model to deeply analyze the requirements specification document, and leveraging the semantic understanding capabilities of the large language model to accurately extract business entities and attributes, an architecture topology is generated based on this. This achieves a clear and traceable architecture topology design process, ensuring the accuracy of the requirements-to-architecture transformation.
[0035] More importantly, by establishing a mapping relationship between target architecture nodes and the aforementioned business attribute data, a traceable relationship between requirements and architecture is formed. Specifically, when business requirements change, the affected target architecture nodes can be located through the mapping relationship; and when there are defects in the architecture design, the corresponding requirements (business attribute data) can be traced back through the mapping relationship. This reduces the time cost of requirement iteration and defect investigation costs, and improves the maintainability and iteration efficiency of the software architecture.
[0036] Specifically, the following detailed description is provided in conjunction with the accompanying drawings and specific embodiments.
[0037] See Figure 1 This is a schematic diagram of a software architecture design method provided in an embodiment of this application. Figure 1 As shown, the method specifically includes the following steps.
[0038] Step S101: Parse the requirements specification document using a large language model to extract target business entity and business attribute data.
[0039] In this step, the software architecture design system (or its control module) acquires the requirements specification document to be processed. The requirements specification document typically includes unstructured or semi-structured requirements data, such as a description of the business background, a list of functional requirements, a description of user interaction processes, and non-functional performance indicators.
[0040] In order to transform these complex texts into structured data that computers can understand, in this embodiment of the application, a large language model can be used to parse the requirements specification document.
[0041] Specifically, the software architecture design system can use the requirements specification document as input to the large language model, guiding it to perform feature extraction tasks through preset prompts. The large language model, leveraging its powerful natural language processing capabilities, can then identify business entities and business attribute data within the requirements specification document.
[0042] The target business entity can refer to an object that plays an independent functional or data-carrying role in the business logic, such as a "user account," "product order," or "payment gateway." It can also be an Integrated Circuit Card Identification Number (ICCID), a Vehicle Identification Number (VIN), or a tariff plan.
[0043] In one possible implementation, the large language model parses the requirements specification document atomically. That is, business entities have atomic characteristics and can be used to represent the smallest business objects extracted from the requirements text that have independent and complete business meaning.
[0044] Business attribute data refers to data used to describe the characteristics or operational logic of an entity. Business attribute data can refer to data describing the characteristics, parameters, or constraints of a target business entity, such as the entity's field names, data types, length limits, value ranges, and business rule constraints.
[0045] Understandably, business attribute data can be attributes directly corresponding to business entities, such as "SIM card status," which directly describes the characteristics of a single entity. It can also be attributes corresponding to combinations or splits of business entities (if a business entity is atomic, it cannot be split). For example, in a specific business rule, business attribute data can be reflected as the combined logic of multiple business entities (such as the joint verification rule for "input parameter vehicle identification code and integrated circuit card identification code"), or it can be reflected as sub-attributes obtained after splitting complex business entities.
[0046] By extracting these target business entities and business attribute data, unstructured requirements documents can be transformed into clearly structured target business entities and business attribute data, laying the foundation for the generation of subsequent architecture design.
[0047] In practical applications, to ensure the accuracy and standardization of the extracted results, the software architecture design system can also predefine a structured output pattern (such as JSON format), requiring the large language model to strictly follow this output pattern to return the parsing results, thereby facilitating direct calling and processing in subsequent steps.
[0048] To improve the reliability of the output content of the large language model, one possible implementation involves using the large language model with a pre-defined rule base as a constraint to perform semantic understanding and reasoning analysis on the requirements specification document, and extract target business entity and business attribute data.
[0049] In practical applications, if large language models are used directly for architecture information extraction or review, the lack of strict topological logic constraints can easily lead to illusion problems such as "fake API calls" or "ignoring circular dependencies," resulting in extraction results that fail to meet engineering-level verification standards.
[0050] In this embodiment, a preset rule base is introduced as a constraint condition.
[0051] Understandably, the large language model is a neural network architecture used for semantic understanding and logical reasoning of requirements documentation. The pre-defined rule base, representing symbolic knowledge, provides logical reasoning constraints and business rule constraints for the output of the large language model.
[0052] In this embodiment of the application, by using a large language model constrained by a preset rule base, constraints can be provided for the reasoning process of the large language model, thereby effectively suppressing the illusion phenomenon, ensuring the accuracy and compliance of the extracted content, and extracting data that conforms to semantic description and satisfies business logic.
[0053] It is understandable that the pre-defined rule base of the large language model can be used not only to parse the requirements specification document, but also for some or all of the steps in the subsequent method implementation.
[0054] To improve the scenario adaptability of software architecture design, in one possible implementation, the requirements specification document includes historical interface definition documents and target requirements specification documents, and the business attribute data includes historical interface attribute data and target business attribute data.
[0055] Among them, the historical interface definition document refers to the document used for defining interfaces in the historical system, reflecting the asset status of the historical system. The target requirements specification document refers to the document used to record the planning of new business functions, reflecting the direction of system evolution.
[0056] In practical applications, historical interface definition documents may include interface definitions based on Simple Object Access Protocol (SOAP) or Representational State Transfer (REST) protocols, such as message definitions in Extensible Markup Language (XML) or JavaScript Object Representation (JSON) formats.
[0057] The software architecture design system parses historical interface definition documents to extract historical interface attribute data. This historical interface attribute data can include details such as legacy components from previous platforms and application interface fields.
[0058] Similarly, the software architecture design system can parse the target requirements specification document (such as the requirements specification document) to extract the target business attribute data in order to obtain the fields and business rules required for the new business.
[0059] In this embodiment, by combining the two types of documents mentioned above to jointly extract business entities, it is possible to fully cover historically implemented business objects and incrementally planned business objects, thereby obtaining comprehensive target business entities. This avoids the omission of business entities caused by a single document source and improves the adaptability and feasibility of the architecture design in system iterative evolution (reconstruction) scenarios.
[0060] Step S102: Based on the target business entity, generate target architecture nodes and establish data flow dependencies between target architecture nodes.
[0061] Understandably, after the target business entity is extracted in the above steps, since the target business entity is an object at the business semantic level, it cannot be directly used for structured architecture topology construction. Therefore, it is necessary to transform the business domain elements into standard building blocks of the architecture domain and clarify the data flow logic between the blocks to provide basic support for subsequent architecture mapping and topology generation.
[0062] In this embodiment, the target business entity can be mapped to a specific target architecture node. The target architecture node can be a microservice component, functional module, data processing unit, or other logical unit with independent functions in a software system.
[0063] In practical applications, the instantiation of target business entities into target architecture nodes can be completed based on a pre-defined architecture ontology model. Specifically, the architecture ontology model can predefine standard architecture node types and basic attribute rules corresponding to different types of business entities. By matching and mapping each target business entity according to the specifications of the architecture ontology model, the corresponding target architecture node can be generated.
[0064] In practical applications, the architecture ontology model can be stored in the aforementioned preset rule base, or it can be stored and deployed separately as an independent model component. This application embodiment does not impose absolute restrictions on this.
[0065] In one possible implementation, the corresponding target architecture nodes can be generated by reasoning based on the semantic information of the target business entities using a large language model. Specifically, all target business entities can be input into the large language model, which then combines general architecture design specifications with business scenario characteristics to reason out the architecture node type and node partitioning granularity corresponding to the target business entities, thus completing the conversion from business entities to architecture nodes.
[0066] Furthermore, after generating all target architecture nodes, data flow dependencies between the target architecture nodes can be established based on the business relationship logic and data interaction requirements between each target business entity. These data flow dependencies can represent the direction of data transmission and the order of interaction between target architecture nodes, and can carry the logical flow rules of the architecture topology in a directed association form.
[0067] For example, in the above embodiments, the target business entities such as vehicle identification number, IoT card identifier, and tariff plan extracted from the requirements specification document can be mapped to generate target architecture nodes such as vehicle information management node, IoT card management node, and tariff calculation node through the architecture ontology model. At the same time, according to the business flow logic, data flow dependencies such as the associated data flow from IoT card management node to vehicle information management node and the billing data flow from tariff calculation node to IoT card management node are established.
[0068] In practical applications, auxiliary target architecture nodes such as gateway authentication nodes, message queue nodes, and business data storage nodes can also be generated according to actual architecture design requirements, and corresponding data flow dependencies can be established. This application embodiment does not impose specific restrictions on this.
[0069] It is understood that the mapping relationship between the target business entity and the target architecture node can be one-to-one, one-to-many, or many-to-one. Regarding the specific mapping granularity, those skilled in the art can flexibly adjust it according to the complexity of the business scenario in the actual application, the layering requirements of the architecture design, etc., and the embodiments of this application do not impose specific limitations in this regard.
[0070] Step S103: Construct the mapping relationship between the target architecture nodes and business attribute data.
[0071] In this embodiment of the application, by constructing a mapping relationship, the software architecture design system can attach abstract business attribute data to specific target architecture nodes, so that the nodes have clear business semantics and data constraints.
[0072] In practical applications, similar to the generation method of the target architecture nodes mentioned above, the mapping relationship can be automatically constructed based on the attribute attribution rules in the preset architecture ontology model. Specifically, the architecture ontology model can predefine the attribute categories and attribution determination rules corresponding to different types of architecture nodes. By matching the extracted business attribute data with the target architecture nodes according to their categories, the corresponding mapping relationship between nodes and attributes can be generated. The mapping relationship can be represented in the form of a dynamic mapping matrix or key-value pairs.
[0073] In another possible implementation, the mapping relationship can be constructed through semantic similarity matching. Specifically, the semantic relevance between each business attribute data and each target architecture node can be calculated, and the business attribute data can be matched to the target architecture node with the highest relevance, thus completing the automatic construction of the mapping relationship.
[0074] In practical applications, manual adjustment and correction of the mapping results can also be supported to adapt to special architecture design requirements.
[0075] It is understandable that the above mapping relationship can be updated synchronously with the architecture design process. When new requirements or business attribute data are added during the requirement analysis process, the mapping relationship can be automatically updated synchronously.
[0076] In practical applications, a mapping relationship can be pre-established between each requirement item in the requirements document and business attribute data or target architecture nodes. This provides a more intuitive reflection of the mapping relationship between requirements and architecture.
[0077] Specifically, each requirement item can correspond to one or more business attribute data, and each requirement item can also correspond to one or more target architecture nodes; correspondingly, a single target architecture node can also carry business attribute data from multiple requirement items.
[0078] Of course, those skilled in the art can adjust the construction method of the mapping relationship according to actual needs, and the embodiments of this application do not impose specific limitations on this.
[0079] Step S104: Based on the mapping relationship, perform field binding and constraint writing operations on the target architecture nodes according to the business attribute data to generate the software architecture ontology topology diagram.
[0080] As mentioned above, the mapping relationship defines the correspondence between business attribute data and target architecture nodes. The generation and connection of target architecture nodes have already been completed in the above steps (step S102).
[0081] In this embodiment, based on the established mapping relationship, it is necessary to complete the field configuration and constraint writing of the target architecture node. Specifically, the field binding operation is used to materialize business data into the architecture node, and the constraint writing operation is used to inject business logic into the architecture node. By completing the field binding and constraint writing operations of the target architecture node, a software architecture ontology topology diagram with complete semantics can be generated.
[0082] Among them, the software architecture ontology topology diagram refers to the topological structure model built based on ontology, that is, to standardize the components, interfaces, data flows and their constraint rules in the system architecture in a machine-readable way.
[0083] Specifically, the field binding operation can be based on the mapping relationship, performing field matching at the cross-mapping position between business attribute data and target architecture nodes, and transforming each business attribute data into a standardized field of the corresponding target architecture node.
[0084] Furthermore, the constraint write operation can transform business rules into constraints and write them into the meta-attributes of the corresponding target architecture node. The types of constraints can include parameter validation rules, data value ranges, field dependencies, data flow triggering conditions, etc.
[0085] For example, for IoT SIM card management nodes, the SIM card status attributes described in text form in the historical platform can be bound to the atomic state machine fields of the target node based on the mapping relationship, and corresponding state enumeration values such as 0-testable, 1-activatable, 2-activated can be set.
[0086] Simultaneously, the business rule that "at least one of the input parameters, vehicle identification code and IoT card identifier, must be filled in" can be written as a parameter validation constraint into the meta-attributes of the IoT card management node. Combined with the data flow dependencies between the target architecture nodes, a software architecture ontology topology diagram is ultimately generated.
[0087] In practical applications, the software architecture ontology topology diagram can be stored in a structured manner using JSON format. JSON-formatted topology data can completely record the field configurations, constraint rules, data flow dependencies between nodes, and requirement mapping traceability information for all target architecture nodes.
[0088] Furthermore, topology data based on JSON format can be visualized by integrating with an automated layout engine. One possible implementation involves calling an underlying graphics rendering script, such as integrating the python-pptx drawing library, to automatically map the nodes, flow directions, and field information in the JSON data to shape elements and connecting lines in the presentation document, thus completing the automatic layout and drawing of the architectural topology.
[0089] During the rendering process, preset visual configuration rules can be automatically applied. For example, a contrasting color scheme of tech blue and Morandi colors can be used to distinguish different types of architecture nodes, paired with a dark matrix layout to organize the node arrangement, improving the hierarchical clarity and visual professionalism of the topology diagram. Finally, a presentation document that meets business technology visual standards can be automatically generated, which can be directly applied to business scenarios such as project bidding and technical reviews.
[0090] Of course, those skilled in the art can adjust the presentation of the software architecture ontology topology diagram according to actual needs, and the embodiments of this application do not impose specific limitations on this.
[0091] In this embodiment of the application, a large language model is used to perform in-depth analysis of the requirements specification document. Based on the semantic understanding capability of the large language model, business entities and business attributes are accurately extracted, and an architecture topology is generated based on this. This achieves a clear and traceable architecture topology design process and ensures the accuracy of the transformation from requirements to architecture.
[0092] More importantly, by establishing a mapping relationship between target architecture nodes and the aforementioned business attribute data, a traceable relationship between requirements and architecture is formed. Specifically, when business requirements change, the affected target architecture nodes can be located through the mapping relationship; and when there are defects in the architecture design, the corresponding requirements (business attribute data) can be traced back through the mapping relationship. This reduces the time cost of requirement iteration and defect investigation costs, and improves the maintainability and iteration efficiency of the software architecture.
[0093] In practical applications, in order to identify architectural problems and defects in advance during the architecture design phase, simulation verification can be carried out on the generated software architecture ontology topology diagram.
[0094] See Figure 2 This is a schematic diagram of a software architecture verification process provided in an embodiment of this application. Figure 2 As shown, the method specifically includes the following steps.
[0095] Step S201: Generate a virtual topology instance based on the software architecture ontology topology diagram.
[0096] Understandably, the software architecture ontology topology diagram carries architecture design information in a preset data format (such as JSON format), which cannot be directly used for runtime simulation verification. Therefore, the topology structure needs to be converted into an executable virtual instance to complete the sandbox initialization.
[0097] In this embodiment, the data corresponding to the software architecture ontology topology diagram can be parsed to restore the configuration information of the target architecture nodes, the data flow dependencies between nodes, field binding rules, and business constraints, thereby constructing a virtual topology instance in a memory environment. The virtual topology instance can reproduce the operational logic and rule constraints of the real architecture, providing an executable verification object for subsequent simulation verification.
[0098] In practical applications, a full set of virtual topology instances can be generated according to verification requirements, or only virtual topology instances corresponding to the local modules to be verified can be generated. This application embodiment does not impose specific restrictions on this.
[0099] For example, in verification scenarios involving heterogeneous system migration, only virtual topology instances corresponding to the gateway layer and data conversion layer involved in cross-system interoperability can be generated, thereby reducing verification resource consumption.
[0100] Step S202: In the preset isolation sandbox, the virtual topology instance is verified by simulating requests, and a verification report is generated.
[0101] In this embodiment of the application, after the deployment of the virtual topology instance is completed, simulated business request data can be injected into the isolation sandbox to trigger the operation of the rule engine of the virtual topology instance, simulating the data flow and business processing in the real scenario.
[0102] The simulated request data can be flexibly configured according to the verification scenario. For example, historical interface request messages, constructed boundary test messages, and abnormal scenario test messages can be used to cover verification requirements of different dimensions.
[0103] In practical applications, various design metrics can be verified, including but not limited to the accuracy of field mapping, the validity of business constraint rules, the correctness of data flow, and the interface compatibility between heterogeneous systems. This application embodiment does not impose absolute restrictions on specific verification dimensions and verification rules.
[0104] Once verification is complete, a verification report (which may include exception information and verification pass information) can be generated based on the verification results, providing a reference for optimizing and adjusting the software architecture design.
[0105] For example, in the scenario of migrating from a historical platform to a new business platform, historical interface request traffic of the historical platform can be injected into the isolation sandbox to simulate the real business call process, verify whether the state enumeration transition rules, parameter validation constraints, etc. in the new architecture meet expectations, and output the corresponding verification report.
[0106] Understandably, the preset isolation sandbox is an independent memory operating environment. The verification process is executed entirely within the isolation environment and will not interfere with the real business system, thus ensuring the security and independence of the verification process.
[0107] In this embodiment, by using the aforementioned isolated sandbox simulation verification method, the software architecture design system can complete architecture verification during the architecture design phase without waiting for code development to be completed. This effectively alleviates the problem of strong lag in traditional static verification methods and improves the early detection capability and reliability of architecture design. Furthermore, since this verification process is directly based on the design logic, there is no black-box conversion process from design logic to verification logic, which improves the interpretability of the verification.
[0108] In practical applications, constraints can be imposed on verification metrics to improve the relevance of verification. Verification reports may include interface consistency verification reports, load verification reports, and authentication link integrity verification reports.
[0109] See Figure 3 This is a schematic diagram of a verification report generation method provided in an embodiment of this application. Figure 3 As shown, the method specifically includes the following steps.
[0110] Step S301: Generate an interface consistency verification report based on the comparison results between the fields bound to the topology nodes in the virtual topology instance and the fields of the corresponding historical interfaces.
[0111] In practical applications, interface field mismatches are a major risk causing business integration failures during the migration of old and new software systems and the integration of heterogeneous systems. Therefore, by setting targeted interface consistency verification metrics, the field adaptation logic between old and new systems can be verified, and risks can be identified in advance.
[0112] Specifically, target field information (such as required parameter information) bound to each topology node in the virtual topology instance can be extracted and compared with the field definitions of the corresponding historical interfaces. Comparison dimensions may include field name, data type, value range, required parameters, protocol header parameters, etc.
[0113] For example, the software architecture design system can check whether the "request identifier" field in the topology node matches the field definition of the historical platform, and generate an interface consistency verification report accordingly.
[0114] Of course, those skilled in the art can choose full-field comparison or partial-field comparison according to actual verification needs, and the embodiments of this application do not impose absolute limitations on this.
[0115] Step S302: Generate a load verification report based on the fan-in and fan-out ratios of the topology nodes in the virtual topology instance.
[0116] In practical applications, the load on architectural nodes directly affects the operational stability of the entire software system. Therefore, in this embodiment, the load is verified at the topology level using the fan-in / fan-out ratio.
[0117] In the embodiments of this application, graph algorithms can be used to calculate the fan-in to fan-out ratio of each topology node in the virtual topology instance.
[0118] Here, fan-in refers to the number of upstream connections that call the topology node, and fan-out refers to the number of downstream connections that call the topology node. By analyzing the fan-in and fan-out ratios, the software architecture design system can evaluate the load pressure and dependency complexity of each topology node in the system architecture.
[0119] In practical applications, if the fan-in ratio of a node is too high, it indicates that the node has a performance bottleneck; if the fan-out ratio is abnormal, it indicates potential call chain risks. Based on this calculation and analysis, the software architecture design system can generate a load verification report, which can be used to help identify potential performance bottlenecks or insufficient redundancy for single points of failure.
[0120] Step S303: Generate an authentication link integrity verification report based on the calling relationship between topology nodes in the virtual topology instance.
[0121] In practical applications, the authentication chain is crucial for ensuring the security of system operations. If the authentication logic has a breakpoint or bypasses certain calls, it can lead to unauthorized access security risks. Therefore, in this embodiment, by setting authentication chain verification indicators, the full-chain coverage of the authentication logic can be completely verified.
[0122] Specifically, based on the call relationships between topology nodes in a virtual topology instance, all business call paths can be traced to verify whether authentication-related logic (such as token verification mechanisms) covers all business call links, whether a complete closed-loop verification link is formed, and whether there are any call bypasses that do not pass through authentication nodes. Based on the verification results, the number of complete authentication links, missing authentication link nodes, and their risk levels can be statistically analyzed, ultimately generating an authentication link integrity verification report.
[0123] It should be noted that the specific verification process can be completed using the aforementioned large language model or a dedicated test rule engine, and this application embodiment does not impose specific limitations on this. Furthermore, those skilled in the art can adjust the generation methods of the above three types of reports according to actual needs, and this application embodiment does not impose specific limitations on this.
[0124] In this embodiment, multi-dimensional verification is performed on interface consistency, node load characteristics, and authentication link integrity, enabling a comprehensive evaluation of the software architecture in terms of compatibility, performance, and security. It can identify differences in field definitions, performance bottlenecks, and logical deficiencies in security links during the integration of new and old systems at the architecture design stage, thereby ensuring the robustness and feasibility of the software architecture design.
[0125] See Figure 4 This is a schematic diagram of a verification process provided in an embodiment of this application. Figure 4 As shown, in the isolated memory evolution sandbox (i.e., the preset isolated sandbox) environment, based on the source system simulated request traffic (i.e., simulated requests from historical platforms), three types of verification operations can be performed in sequence: protocol header comparison, authentication link detection, and topology node calculation (topology node load calculation).
[0126] Specifically, firstly, the protocol header fields of the simulated request are extracted and matched against the field definitions bound to the topology nodes in the virtual topology instance. This verifies whether the assignment logic of the request identifier field and the cross-topology node tracing link meet expectations, thus verifying interface protocol compatibility. Next, along the complete call path of the request, it verifies whether the authentication logic covers all topology nodes and forms a closed loop. Finally, the fan-in / fan-out ratio of key topology nodes is calculated using graph algorithms to assess the node's traffic carrying capacity and redundancy level, identifying potential performance bottlenecks and single-point-of-failure risks. After completing all verifications, the execution results and anomaly information of each verification are summarized to generate a deductive diagnostic log (i.e., the verification report mentioned above).
[0127] In practical applications, in order to improve the efficiency of verification and repair, a self-healing strategy can be generated based on the above verification report.
[0128] In one possible implementation, after generating the verification report, the following is also included: Based on the anomaly type in the verification report, a search is performed in the self-healing strategy library to generate the corresponding self-healing strategy.
[0129] The anomaly types in the verification report refer to a set of classifications of architectural design defects identified based on a pre-defined isolation sandbox simulation verification. These can be categorized according to verification dimensions and problem attributes. For example, anomaly types may include interface field anomalies, authentication link anomalies, node load anomalies, etc.
[0130] Understandably, exception types can be used as query conditions for retrieving self-healing strategies, with different exception types corresponding to different self-healing strategies. A self-healing strategy refers to optimization suggestions for the software architecture ontology topology, typically generated based on exception types. A self-healing strategy library is a pre-built knowledge base used to store corresponding repair solutions for various exception types, including architecture migration templates and general problem repair solutions.
[0131] In practical applications, the self-healing strategy library can be preset by developers.
[0132] For example, if the exception type identified by the software architecture design system is "heterogeneous protocol field incompatibility" within the "interface field type exception," then the self-healing strategy retrieved from the self-healing strategy library could be "adding a data conversion adapter to the front-end gateway layer of the target architecture node." Furthermore, the self-healing strategy may also include specific pseudocode scripts (such as Lua or Java scripts) to automatically convert and map fields in the request body, thereby correcting the software architecture ontology topology.
[0133] In practical applications, the context corresponding to the exception can also be used directly as a search condition to search in the preset self-healing strategy library.
[0134] It should be noted that the software architecture topology diagram, self-healing strategy, and verification report can be output together directly, or the software architecture ontology topology diagram can be optimized directly according to the self-healing strategy, and the optimized software architecture ontology topology diagram, verification report, and self-healing strategy can be output. This application embodiment does not impose specific limitations on this.
[0135] In this embodiment of the application, by searching the self-healing strategy library according to the anomaly type in the verification report, a self-healing strategy for the software architecture ontology topology diagram is generated. This can realize the diagnosis of architectural design defects and the output of automatic repair suggestions, which can effectively improve the efficiency and accuracy of software architecture optimization.
[0136] In one possible implementation, a self-healing strategy library can be generated by analyzing historical verification reports and expert repair strategies through a fault analysis model.
[0137] Specifically, the software architecture design system can obtain historical verification reports and expert remediation strategies developed by developers for anomalies recorded in the reports. The fault analysis model can perform correlation analysis and pattern mining on this historical data to extract the mapping patterns between anomaly types and self-healing strategies.
[0138] Based on this mapping pattern, software architecture design systems can build a self-healing strategy library, which can include architecture migration templates, standardized repair solutions, and other content. Understandably, as system runtime increases, historical verification reports will contain a large number of architectural defect characteristics specific to certain business scenarios. Fault analysis models can use this data as training samples to iteratively update the model's parameters.
[0139] In this embodiment, the fault analysis model can gradually learn the business characteristics and architectural habits of a specific enterprise, thereby making the generated self-healing strategies increasingly accurate and better suited to the enterprise's actual business needs and scenarios. Furthermore, as the number of self-healing strategies in the self-healing strategy library increases, manual maintenance costs can be continuously reduced.
[0140] Furthermore, in one possible implementation, the software architecture design system can extend the verification nodes backward and integrate the architecture verification process into the development and operations integration process.
[0141] Specifically, the software architecture design system can obtain the real microservice interface status maintained in the microservice registry (such as Nacos or Eureka) and perform dynamic ontology comparison. Through this process, the software architecture design system can achieve bidirectional synchronous verification between the architecture design in the design state and the real service instances in the runtime state.
[0142] This allows for the timely detection of discrepancies between the architecture design and the actual deployment environment, ensuring that the software architecture plan remains consistent with online operation and improving the stability and controllability of operations and maintenance.
[0143] To facilitate understanding, the following explanation will be provided with specific examples.
[0144] See Figure 5 This is a schematic diagram of a software architecture design process provided in an embodiment of this application.
[0145] like Figure 5 As shown, firstly, the heterogeneous input layer obtains the enterprise-level AI knowledge base, historical system interface baseline, and unstructured requirement description input. Next, the input data enters the neural symbolic mapping engine (i.e., the large language model mentioned above), and uses ontology metadata and constraint dictionary (i.e., the preset rule base) to extract entities from the large model and construct a dynamic topology graph (i.e., the software architecture ontology topology graph).
[0146] Subsequently, the dynamic topology map enters the multi-dimensional verification sandbox for verification through concurrent load and redundancy simulation (such as fan-in fan-out ratio calculation), architecture topology compliance interception (such as authentication link integrity verification), and interface and field-level black-box review (consistency verification of fields bound to topology nodes and fields of corresponding historical interfaces). The verification results enter the calculation and self-healing layer to generate a multi-dimensional diagnosis and state matrix (i.e., verification report), and based on the report, generate intelligent repair and evolution strategies (i.e., self-healing strategies). At the same time, through the chart rendering engine, the visualization results are output.
[0147] Corresponding to the above embodiments, this application also provides an electronic device.
[0148] See Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 600 may include a processor 601, a memory 602, and a communication unit 603. These components communicate via one or more buses. Those skilled in the art will understand that the electronic device structure shown in the figures does not constitute a limitation on the embodiments of this application. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0149] The communication unit 603 is used to establish a communication channel, thereby enabling the electronic device to communicate with other devices.
[0150] The processor 601, serving as the control center of the electronic device, connects various parts of the electronic device 600 via various interfaces and lines. It executes software programs and / or modules stored in the memory 602, and calls data stored in the memory 602, to perform various functions and / or process data within the electronic device 600. The processor 601 can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 601 may consist only of a central processing unit (CPU). In this embodiment, the CPU may have a single processing core or include multiple processing cores.
[0151] Memory 602 is used to store the execution instructions of processor 601. Memory 602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0152] When the execution instructions in memory 602 are executed by processor 601, the electronic device 600 is able to perform some or all of the steps in the above method embodiments.
[0153] Corresponding to the above embodiments, this application also provides a computer-readable storage medium, wherein the computer-readable storage medium may store a program, wherein when the program runs, it can control the device where the computer-readable storage medium is located to execute some or all of the steps in the above method embodiments. In specific implementation, the computer-readable storage medium may be a disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0154] Corresponding to the above embodiments, this application also provides a computer program product containing executable instructions that, when executed on a computer, cause the computer to perform some or all of the steps in the above method embodiments.
[0155] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0156] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0157] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0158] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, read-only memory (ROM) or random access memory (RAM), a magnetic disk, or an optical disk.
[0159] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application shall be determined by the scope of the appended claims.
Claims
1. A software architecture design method, characterized by, include: The requirements specification document is parsed using a large language model to extract target business entities and business attribute data; Based on the target business entity, generate target architecture nodes and establish data flow dependencies between the target architecture nodes; Construct a mapping relationship between the target architecture node and the business attribute data; Based on the mapping relationship, field binding and constraint writing operations are performed on the target architecture node according to the business attribute data to generate a software architecture ontology topology diagram.
2. The method of claim 1, wherein, The requirements specification document includes historical interface definition documents and target requirements specification documents, and the business attribute data includes historical interface attribute data and target business attribute data.
3. The method of claim 2, wherein, Following the generation of the software architecture ontology topology diagram, the following is also included: Based on the software architecture ontology topology diagram, generate a virtual topology instance; In a pre-defined isolation sandbox, the virtual topology instance is verified using simulated requests, and a verification report is generated.
4. The method of claim 3, wherein, The verification report includes an interface consistency verification report, a load verification report, and an authentication link integrity verification report. The virtual topology instance is verified, and a verification report is generated, including: Based on the comparison results between the fields bound to the topology nodes in the virtual topology instance and the fields of the corresponding historical interfaces, an interface consistency verification report is generated. A load verification report is generated based on the fan-in and fan-out ratios of the topology nodes in the virtual topology instance. Based on the calling relationships between topology nodes in the virtual topology instance, an authentication link integrity verification report is generated.
5. The method of claim 3, wherein, Following the generation of the verification report, the following is also included: Based on the anomaly type in the verification report, a search is performed in the self-healing strategy library to generate a self-healing strategy corresponding to the anomaly type. The self-healing strategy is an optimization suggestion for the software architecture ontology topology diagram.
6. The method of claim 1, wherein, The process of parsing the requirements specification document using a large language model to extract target business entity and business attribute data includes: Using a large language model constrained by a pre-defined rule base, semantic understanding and reasoning analysis are performed on the requirements specification document to extract target business entities and business attribute data.
7. The method of claim 5, wherein, Before generating a self-healing strategy corresponding to the anomaly type by searching the self-healing strategy library based on the anomaly type in the verification report, the method further includes: By analyzing historical verification reports and expert repair strategies using a fault analysis model, a self-healing strategy library is generated.
8. An electronic device, comprising: include: processor; Memory; And a computer program, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, causes the electronic device to perform the method of any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 7.
10. A computer program product, characterised in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 7.
