Design scheme generation method and device, equipment, medium and program product
By combining multimodal perception models and large models, modal feature vectors and task feature vectors are generated, and target large models are selected. This solves the problem of traditional software design solutions relying on the experience of developers and improves the generation efficiency and comprehensiveness.
Patent Information
- Application Number
- CN202511949977.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional software design solutions are easily influenced by the subjective experience of developers, and their comprehensiveness and generation efficiency need to be improved.
The software design scheme generation request is processed by a pre-trained multimodal perception model, generating modal feature vectors and task feature vectors. The target large model is then selected, and semantic analysis is performed using software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge to generate first and second prompt words. These prompt words guide the target large model to reason under the software design requirements and generate a design scheme.
This improves the comprehensiveness and efficiency of software design solution generation, reduces the subjective influence of developers' experience, and ensures that the generated solutions meet user needs.
Smart Images

Figure CN121807268A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of artificial intelligence and financial technology, and in particular to a method, apparatus, device, medium, and program product for generating design solutions. Background Technology
[0002] A software design scheme is a core technical document that connects requirements analysis with actual development and implementation in the software development process. Traditional software design schemes are mostly generated by developers based on the requirements analysis content and using traditional design tools.
[0003] Traditional software design solutions require a high level of skill from developers, and their design perspectives and content are easily influenced by the subjective experience of developers, resulting in room for improvement in both the comprehensiveness and efficiency of solution generation. Summary of the Invention
[0004] In view of the above problems, this disclosure provides a design scheme generation method, apparatus, equipment, medium and program product.
[0005] According to a first aspect of this disclosure, a design scheme generation method is provided, the method comprising: responding to receiving a software design scheme generation request; processing the software design scheme generation request through a pre-trained multimodal perception model to obtain a modal feature vector, the modal feature vector indicating the modal type and language type contained in the software design scheme generation request; generating a software design task association graph based on multiple software design sub-tasks indicated by the software design scheme generation request and the association relationships between the multiple software design sub-tasks; fusing the number of sub-tasks, domain knowledge crossover, and inference chain length indicated by the software design task association graph to obtain a task feature vector; and based on the modal feature vector and the task... Feature vectors are filtered from multiple candidate large models to obtain the target large model. These candidate large models are pre-trained using software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge. The target large model is then used to perform semantic analysis on the software design scheme generation request to obtain multiple first prompt words and multiple second prompt words. The first prompt words indicate the software functional requirements of the software design scheme to be generated, and the second prompt words indicate the software design requirements of the software design scheme to be generated. Based on the first and second prompt words, the target large model is guided to reason under the software design requirements and based on the software functional requirements to obtain the target design scheme.
[0006] According to embodiments of this disclosure, generating a software design task association graph based on multiple software design subtasks indicated by a software design scheme generation request and the relationships between these subtasks includes: performing semantic parsing on the software design scheme generation request to break it down into multiple software design subtasks, where the subtasks constrain the reasoning order and granularity of the target large model; calculating the association degree between the multiple software design subtasks based on their execution dependencies, semantic similarity, and data transfer relationships, where the execution dependencies characterize the mandatory order of execution of the software design subtasks; and constructing the software design task association graph using the multiple software design subtasks as nodes, their execution dependencies as edges, and their association degrees as edge weights.
[0007] According to embodiments of this disclosure, fusing the number of subtasks, domain knowledge crossover, and inference chain length indicated by the software design task association graph to obtain a task feature vector includes: traversing the node set of the software design task association graph using a depth-first search algorithm to obtain the number of subtasks, where the number of subtasks represents the operational complexity of generating the software design scheme; obtaining the domain crossover based on the number of cross-domain entities and the total number of entities in the software design task association graph, where the domain crossover represents the knowledge complexity of generating the software design scheme; determining the logical chain level based on the syntactic tree structure corresponding to the software design task association graph, and based on the dominance depth and relative subtree size of each node in the syntactic tree structure; obtaining the inference chain length based on the maximum value of the logical chain level, where the inference chain length represents the inference complexity of generating the software design scheme; and fusing the number of subtasks, domain crossover, and inference chain length to obtain the task feature vector.
[0008] According to embodiments of this disclosure, multiple candidate large models each have a matching model capability vector, which indicates the modality support type, language coverage, and inference complexity threshold of the corresponding candidate large model. The selection process among multiple candidate large models based on modality feature vectors and task feature vectors includes: fusing the modality feature vectors and task feature vectors to obtain a request feature vector; traversing multiple model capability vectors based on the modality type and language type indicated by the request feature vector to obtain multiple candidate model capability vectors; calculating the similarity between the request feature vector and the multiple candidate model capability vectors respectively; and selecting from the corresponding candidate large models based on the obtained similarities to obtain the target large model.
[0009] According to embodiments of this disclosure, software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge each have matching data types. For each candidate large model, the candidate large model is obtained in advance using the following method: software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and / or data knowledge are respectively input into a conversion module that matches the corresponding data type to obtain multiple sets of candidate vector data, which are stored in a preset vector knowledge base; based on the software design scheme generation task indicated by preset prompt words, the target vector data is retrieved from the preset vector knowledge base, and the preset prompt words and target vector data are combined into training samples; the preset large model is supervised and fine-tuned using the training samples to obtain the candidate large model.
[0010] According to embodiments of this disclosure, when the data type is a document, software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and / or data knowledge are respectively input into a conversion module that matches the corresponding data type to obtain multiple sets of candidate vector data, including: parsing software design knowledge, enterprise architecture management knowledge, and / or data modeling domain knowledge and performing preprocessing to obtain standard text; splitting the standard text at the paragraph level to obtain multiple text units, extracting business keywords from each text unit, filtering based on the business keywords in a preset business domain knowledge base to obtain corresponding business domain tags; performing block processing on the standard text based on the business domain tags to obtain multiple text blocks, and using a pre-trained language model to convert the multiple text blocks into multiple text vectors as multiple sets of candidate vector data.
[0011] According to embodiments of this disclosure, when the data type is a data source, software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and / or data knowledge are respectively input into a conversion module that matches the corresponding data type to obtain multiple sets of candidate vector data, including: extracting data knowledge to obtain metadata, the metadata including a data model and at least one of interface fields, database tables, and data items; converting the metadata into vectors and combining them with corresponding hierarchical association relationships to serve as multiple sets of candidate vector data, the hierarchical association relationship representing the degree of association between the data model and the interface fields, database tables, or data items.
[0012] According to embodiments of this disclosure, semantic analysis of a software design scheme generation request using a target large model to obtain multiple first prompt words and multiple second prompt words includes: extracting keywords from the software design scheme generation request based on a preset software design task dimension to obtain task elements, which indicate the software functional requirements of the software design scheme to be generated; processing the software design scheme generation request using the target large model based on preset constraint extraction rules to obtain constraint types, which indicate the software design requirements of the software design scheme to be generated; and mapping constraint types and task elements to preset prompt word templates based on the association between constraint types and task dimensions to obtain multiple second prompt words and multiple first prompt words.
[0013] A second aspect of this disclosure provides a design scheme generation apparatus, comprising: a modality perception module, configured to, in response to receiving a software design scheme generation request, process the software design scheme generation request through a pre-trained multimodal perception model to obtain a modality feature vector, wherein the modality feature vector indicates the modality type and language type contained in the software design scheme generation request; a task parsing module, configured to, based on multiple software design sub-tasks indicated by the software design scheme generation request and the relationships between the multiple software design sub-tasks, generate a software design task association graph, and fuse the number of sub-tasks, domain knowledge crossover, and inference chain length indicated by the software design task association graph to obtain a task feature vector; and a filtering module, configured to, based on the modality feature vector... The system uses task feature vectors to filter through multiple candidate large models to obtain the target large model. These candidate large models are pre-trained using software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge. A semantic analysis module uses the target large model to perform semantic analysis on the software design scheme generation request, obtaining multiple first prompt words and multiple second prompt words. The first prompt words indicate the software functional requirements of the software design scheme to be generated, and the second prompt words indicate the software design requirements. A reasoning module guides the target large model to reason based on the multiple first and second prompt words, considering the software design requirements and functional requirements, to obtain the target design scheme.
[0014] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the methods described above.
[0015] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the methods described above.
[0016] The fifth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0017] According to the design scheme generation method, apparatus, equipment, medium, and program product provided in this disclosure, a large-scale model is trained using software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge, enabling the large-scale model to possess software design expert capabilities. Based on the received software design scheme generation request, the corresponding modal feature vector and task feature vector are calculated in real time. A matching target large-scale model is selected based on the modal feature vector and task feature vector. Prompt words indicating the software design scheme generation request guide the target large-scale model to generate software design schemes under the software design requirements and based on software functional needs. Because the target large-scale model has undergone sufficient learning using software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge, and matches the modal and task features of the user-sent software design scheme generation request, it at least partially solves the problem that software design scheme generation is greatly influenced by the subjective experience of developers, achieving the technical effect of improving the efficiency of software design scheme generation. Attached Figure Description
[0018] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0019] Figure 1 The illustrations depict application scenarios of methods, apparatus, devices, media, and program products generated according to embodiments of the present disclosure.
[0020] Figure 2 A flowchart illustrating a design scheme generation method according to an embodiment of the present disclosure is shown schematically.
[0021] Figure 3 A flowchart illustrating the generation of software design task association graphs according to embodiments of the present disclosure is shown schematically.
[0022] Figure 4 A flowchart illustrating the process of obtaining a task feature vector according to an embodiment of the present disclosure is shown schematically.
[0023] Figure 5 The diagram illustrates an application example of the design scheme generation method according to embodiments of the present disclosure.
[0024] Figure 6 This schematically illustrates an application flowchart of a design scheme generation method according to an embodiment of the present disclosure;
[0025] Figure 7 A schematic diagram illustrating a design scheme generation apparatus according to embodiments of the present disclosure is shown; and
[0026] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a design generation method according to an embodiment of the present disclosure. Detailed Implementation
[0027] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0028] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0029] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0030] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0031] In the technical solution disclosed herein, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.
[0032] It should be noted that in the embodiments disclosed herein, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary and are intended only to illustrate the feasibility of implementing the technical solutions disclosed herein. However, they do not mean that the applicant has used or necessarily used such solutions.
[0033] The embodiments of this disclosure provide a design scheme generation method. Based on the modal feature vector and task feature vector of the software design scheme generation request indication, a target large model is selected, enabling the application's target large model to generate design schemes that match the scheme generation request. Semantic analysis of the software design scheme generation request is performed using the target large model to obtain multiple first prompt words and multiple second prompt words, converting user requirements into prompt word forms easily understood by the target large model. Guided by the multiple first prompt words and multiple second prompt words, the large model generates design schemes based on structured requirements under generation constraints, improving the generation efficiency of the target design scheme and ensuring the comprehensiveness of the generated target design schemes.
[0034] Figure 1 The illustration shows an application scenario of the design scheme generation method according to an embodiment of the present disclosure.
[0035] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0036] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0038] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0039] It should be noted that the design scheme generation method provided in this application embodiment can generally be executed by server 105. Correspondingly, the design scheme generation apparatus provided in this application embodiment can generally be located in server 105. The design scheme generation method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the design scheme generation apparatus provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0040] It should be understood that Figure 1 The number of terminal devices, networks 104, and servers 105 shown is merely illustrative. Any number of terminal devices, networks 104, and servers 105 can be used depending on implementation needs.
[0041] The following will be based on Figure 1 The described scene, through Figures 2-6 The design scheme generation method of the embodiments of this disclosure will be described in detail.
[0042] Figure 2 A flowchart illustrating a design scheme generation method according to an embodiment of the present disclosure is shown schematically.
[0043] like Figure 2 As shown, the design scheme generation method of this embodiment includes operations S210 to S250.
[0044] In operation S210, in response to receiving a software design scheme generation request, the software design scheme generation request is processed through a pre-trained multimodal perception model to obtain modal feature vectors.
[0045] According to embodiments of this disclosure, a software design solution generation request can be made by a user using input such as voice, text, video and / or images to express the user's needs for a production software design solution, and the modal feature vector indicates the modal type and language type contained in the software design solution generation request.
[0046] Furthermore, a pre-trained multimodal perception model is used to perform modality and language detection on the software design scheme generation request. The input is the software design scheme generation request, and the output is a modality feature vector representing the modality type and language type. When the software scheme generation request includes visual modality, audio modality and / or video modality, the corresponding data of visual modality, audio modality and / or video modality are separated and converted into request text.
[0047] For example, the multimodal perception model can be a multitask multilingual multimodal pre-trained model (M3P), and the modal feature vector can be a modal identifier matrix, such as [text:0 / 1,image:0 / 1,audio:0 / 1,video:0 / 1,language:00 / 01 / 10 / 11]).
[0048] The difficulty of generating the target design scheme corresponding to the request for the task complexity representation scheme generation; multiple candidate large models are obtained in advance by training using enterprise data resources, and the types of large models among the multiple candidate large models are different; enterprise data resources include at least one of software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge.
[0049] In operation S220, multiple software design sub-tasks and their relationships are generated based on the software design scheme to generate a software design task association graph. The number of sub-tasks, domain knowledge crossover, and inference chain length indicated by the software design task association graph are fused to obtain a task feature vector.
[0050] For example, a software design task association graph is generated using multiple software design subtasks as nodes and the execution dependencies between multiple software design subtasks as edges. The number of subtasks, the degree of domain knowledge overlap, and the length of the inference chain indicated by the software design task association graph are concatenated to obtain a task feature vector.
[0051] In operation S230, based on modal feature vectors and task feature vectors, multiple candidate large models are selected to obtain the target large model.
[0052] According to embodiments of this disclosure, multiple candidate large models are pre-obtained by training using software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge.
[0053] Furthermore, software design knowledge is used to indicate professional experience and knowledge in software design, such as architectural design logic, business-technology mapping rules, interface and interaction design specifications, design optimization methodologies, and problem solution libraries. Enterprise architecture management knowledge is used to indicate enterprise-level technical specifications, constraint rules, architecture evolution rules, and resource allocation logic. Data modeling domain knowledge is used to indicate modeling methodologies, business entity abstraction capabilities, data relationship definition logic, and modeling quality standards. Data knowledge is used to indicate the design specifications and design logic of data models, database tables, and data items.
[0054] According to embodiments of this disclosure, a large model typically refers to a machine learning model with a huge number of parameters, a large training data scale, and high computational resource requirements, especially an artificial intelligence model based on deep learning. Such models usually have strong generalization ability and multi-task processing ability, and can complete complex tasks such as natural language processing (NLP), computer vision (CV), and speech recognition.
[0055] For example, the model types of multiple candidate large models may include hybrid expert architecture large models, multimodal large models, multilingual large models, multimodal multilingual large models, etc. Multiple candidate large models can be obtained by supervising and fine-tuning the aforementioned large models using enterprise data resources such as software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge.
[0056] For example, multiple candidate large models each have matching modal feature vectors and task feature vectors. Based on the software design scheme, the corresponding modal feature vectors and task feature vectors are requested to traverse multiple candidate large models to obtain the target large model.
[0057] When operating S240, semantic analysis is performed on the software design scheme generation request using the target large model to obtain multiple first prompt words and multiple second prompt words.
[0058] According to embodiments of this disclosure, a plurality of first prompt words indicate the software functional requirements of the software design scheme to be generated, and a plurality of second prompt words indicate the software design requirements of the software design scheme to be generated. The software functional requirements characterize the user's description of the requirements for the software design scheme to be generated, and the software design requirements characterize the user's technical requirements for the software design scheme to be generated, which may include technology stack requirements, performance requirements, security requirements, format requirements, management specification requirements, etc.
[0059] For example, the semantic analysis capabilities of the target large model are used to perform semantic analysis on the software solution generation request to obtain multiple first prompt words and multiple second prompt words.
[0060] When operating S250, based on multiple first prompt words and multiple second prompt words, the target large model is guided to reason under the software design requirements and based on the software functional requirements to obtain the target design scheme.
[0061] For example, the target large model here refers to a large model in the software design solution generation scenario that is specifically used to generate a target design solution based on the pre-trained software design expert capabilities and guided by multiple first prompt words and multiple second prompt words.
[0062] Through the above operations S210 to S250, by utilizing the target large model that matches real-time user needs, the quality of generated software design solutions is improved while achieving optimal allocation of computing resources. Guided by multiple first prompt words and multiple second prompt words, the target large model automatically generates target design solutions, assisting developers in designing software solutions efficiently and with high stability.
[0063] Figure 3 A flowchart illustrating the generation of software design task association graphs according to embodiments of the present disclosure is shown.
[0064] To achieve accurate matching between the target large model and the software design scheme generation request, the complexity of the software design task is accurately quantified by constructing a software design task association graph, providing accurate basic data for the selection of the target large model. In some embodiments, generating a software design task association graph based on multiple software design sub-tasks indicated by the software design scheme generation request and the association relationship between the multiple software design sub-tasks specifically includes operations S310 to S330.
[0065] When operating S310, semantic parsing is performed on the software design scheme generation request, and the software design scheme generation request is broken down into multiple software design sub-tasks.
[0066] According to embodiments of this disclosure, the reasoning order and reasoning granularity of the target large model are constrained among multiple software design subtasks. The reasoning order can refer to the execution order of the multiple software design subtasks, and the reasoning granularity can refer to the "smallest execution unit" after the software design scheme generation request is broken down.
[0067] Furthermore, the software design scheme generation request and the corresponding prompt template are input into the pre-trained large model. The output of the pre-trained large model includes a list of tasks containing multiple software design sub-tasks, corresponding task descriptions, execution dependencies, and domain labels. The task description refers to the functional description of the corresponding software design sub-task, the execution dependency represents the mandatory order of execution of the software design sub-tasks, and the domain label represents the application domain of the software design sub-tasks.
[0068] For example, a software design solution generation request could be "Design a mobile office application for banking personnel," and the corresponding prompt template could be "You are a software architecture analysis expert. Please analyze this requirement strictly according to the following structure: 1. Core business areas (e.g., 'transfer', 'deposit'); 2. List of required functional modules (listed with '-'); 3. Implicit non-functional requirements (e.g., 'high concurrency', 'data security'); 4. Execution dependencies between functional modules. Please ensure that the module granularity is appropriate, with each module corresponding to a main user or backend service."
[0069] In operation S320, the correlation degree between multiple software design subtasks is calculated based on the execution dependency, semantic similarity, and data transfer relationship between them.
[0070] According to embodiments of this disclosure, semantic similarity characterizes the functional conceptual relevance between software design subtasks, and data transfer relationship characterizes the data flow between software design subtasks.
[0071] Furthermore, firstly, based on the execution dependencies between software design subtasks, the execution dependency degree is obtained; then, the task description of each software design subtask is encoded to obtain a functional description vector, and the cosine similarity between multiple functional description vectors is calculated to obtain the semantic similarity between the corresponding software design subtasks; then, based on the data transmission relationship between software design subtasks, the data association degree is obtained; finally, the execution dependency degree, semantic similarity, and data association degree are weighted and fused to obtain the association degree between the corresponding software design subtasks.
[0072] For example, if there is an execution dependency between two software design subtasks, the execution dependency is 1; otherwise, the execution dependency is 0. The task description is encoded using the Sentence-BERT model to obtain a functional description vector. If there is a data transfer relationship between two software design subtasks, the data association is 1; otherwise, the data association is 0. The weights corresponding to execution dependency, semantic similarity, and data association can be 0.5, 0.3, and 0.2, respectively, and the sum of the weights is less than 1.
[0073] In operating S330, a software design task association graph is constructed using multiple software design subtasks as nodes, the execution dependencies between multiple software design subtasks as edges, and the degree of association between multiple software design subtasks as edge weights.
[0074] For example, the software design task association graph can be represented as G=(V,E,W), where V represents the set of nodes, E represents the set of edges, and W represents the edge weights.
[0075] Figure 4A flowchart illustrating the process of obtaining a task feature vector according to an embodiment of the present disclosure is shown.
[0076] In some embodiments, the number of subtasks indicated by the software design task association graph, the degree of domain knowledge overlap, and the length of the inference chain are fused to obtain the task feature vector, specifically including operations S410 to S440.
[0077] When operating S410, the number of subtasks is obtained by traversing the node set of the software design task association graph using the depth-first search (DFS) algorithm.
[0078] According to embodiments of this disclosure, the number of subtasks characterizes the operational complexity of generating software design schemes, reflects the total number of "minimum execution units" that need to be completed independently after the software design scheme generation task embodied in the software design scheme generation request is broken down, and reflects the degree of task decomposition and the scale of execution links.
[0079] For example, a depth-first search algorithm is used to traverse the software design task association graph. During traversal, starting from any unvisited node, all its successor nodes are recursively visited, and the nodes are marked as 'visiting' or 'completed'. When a successor node of a node is found to be in the 'visiting' state, a circular dependency is determined and an exception is triggered. After the traversal is completed, the number of all nodes marked as 'completed' is counted as the number of subtasks.
[0080] In operating S420, the domain crossover degree is obtained based on the number of cross-domain entities and the total number of entities in the software design task association graph.
[0081] According to embodiments of this disclosure, domain crossover characterizes the knowledge complexity of the generated software design scheme, reflecting the degree to which the task depends on knowledge from different professional domains.
[0082] For example, domain labels of multiple software design subtasks are extracted, the frequency of occurrence of each domain label is counted, the sum of the frequency of occurrence of each domain label is the total number of tasks, the sum of the frequency of occurrence of non-core domain labels is the number of cross-domain tasks, and the domain crossover degree is obtained based on the ratio of the number of cross-domain tasks to the total number of tasks.
[0083] When operating S430, based on the syntactic tree structure corresponding to the software design task association graph, the logical chain level is determined based on the dominance depth and relative subtree size of each node in the syntactic tree structure, and the inference chain length is obtained based on the maximum value of the logical chain level.
[0084] According to embodiments of this disclosure, the length of the reasoning chain represents the reasoning complexity of generating a software design scheme. The longer the reasoning chain, the more complex the causal and progressive relationships between the requirements and the conclusions, requiring multiple logical deductions to form a complete scheme, and the higher the overall cognitive complexity of the task.
[0085] Furthermore, firstly, a loop detection algorithm based on depth-first search is used to detect strongly connected loops in the software design task association graph. Based on predefined removal rules, these strongly connected loops are broken, transforming the software design task association graph into a directed acyclic graph (DAG). Then, direct edges in the DAG with indirect dependencies and whose weights are lower than the average weight of indirect paths are removed. Next, one or more initial task nodes with zero in-degree are selected as root nodes. Starting from each root node, a depth-first traversal is performed. When any node has multiple predecessors or successors, only the in-edge or out-edge with the highest weight is retained, ultimately generating a syntactic tree structure. Then, the dominance depth and relative subtree size are calculated for each node in the syntactic tree structure. Logical levels are divided for each node based on preset depth and size thresholds, with the maximum value of the logical level determining the inference chain length.
[0086] For example, the loop detection algorithm based on depth-first search can be the Tarjan algorithm. The removal rule can include removing the edge with the smallest edge weight in the loop. The dominance depth can be the path length from the corresponding node to the root node, reflecting the vertical position of the node in the main dependency chain. The relative subtree size can be the ratio of the number of subtree nodes rooted at this node to the total number of nodes in the whole tree. Each logical level has a preset corresponding depth threshold and size threshold. Nodes with a dominance depth less than the depth threshold and a relative subtree size greater than the size threshold are assigned to the corresponding logical level.
[0087] In operation S440, the number of subtasks, domain overlap, and inference chain length are fused to obtain the task feature vector.
[0088] For example, the number of subtasks, domain overlap, and inference chain length are concatenated to obtain the task feature vector.
[0089] Through the above operations, a structured process for generating requests based on software design schemes is achieved, ensuring the interpretability of task feature vector quantification; it can comprehensively and objectively reflect the overall complexity of the software design scheme generation task, providing accurate numerical basis for subsequent large model selection.
[0090] To automatically match target large models with corresponding processing capabilities and rules based on task complexity and modal features, thereby improving the quality of software design scheme generation and the rational utilization of resources, in some embodiments, the selection process from multiple candidate large models includes:
[0091] First, the modality feature vector and the task feature vector are fused to obtain the request feature vector.
[0092] For example, the modality feature vector and the task feature vector are concatenated to obtain the request feature vector.
[0093] Then, based on the modality and language type indicated by the request feature vector, multiple model capability vectors are traversed to obtain multiple candidate model capability vectors.
[0094] According to embodiments of this disclosure, multiple candidate large models each have a matching model capability vector, which indicates the modality support type, language coverage, and inference complexity threshold of the corresponding candidate large model.
[0095] For example, the modality type (e.g., audio support) and language type (e.g., Chinese support) indicated by the request feature vector can be used as filters to quickly filter out candidate large models that do not conform to the modality type and language type.
[0096] In order to clearly demonstrate the design scheme generation capability of candidate large models in practical applications, in the embodiments of this disclosure, the capabilities of the aforementioned large models are quantified from different dimensions by means of model capability vectors, which facilitates the selection and invocation of target large models and improves the response speed when invoking target large models.
[0097] According to embodiments of this disclosure, the model capability vector is used to indicate the capability dimension of the corresponding candidate large model. It can be pre-annotated during training, used as a capability index of the corresponding candidate large model, and stored in the model capability index library.
[0098] For example, the model capability vector may include a 512-dimensional vector converted from the corresponding modality support type, language coverage, and inference complexity threshold.
[0099] Then, the similarity between the requested feature vector and the capability vectors of multiple candidate models is calculated respectively. Based on the obtained similarity, the target large model is obtained by filtering among the corresponding candidate large models.
[0100] For example, for each candidate model capability vector, the cosine similarity between the request feature vector and the candidate model capability vector is calculated, the multiple cosine similarities are sorted in descending order, and the candidate large model with the largest cosine similarity is taken as the target large model.
[0101] Traditional general-purpose models do not integrate enterprise-specific architecture standards and data modeling specifications. In practical applications, the software design solutions output deviate from the actual requirements of enterprises, requiring a lot of manual correction.
[0102] To improve the ability to generate large-scale model software design solutions, during the training process of the large-scale model, enterprise data resources are used to integrate enterprise-specific architecture standards and data modeling specifications into the large-scale model. This ensures that the design solutions output by the large-scale model meet the enterprise's internal requirements and reduces the cost of manual correction.
[0103] In some embodiments, software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge each have matching data types. For each candidate large model, the candidate large model is obtained in advance using the following method: software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and / or data knowledge are respectively input into a conversion module that matches the corresponding data type to obtain multiple sets of candidate vector data, which are stored in a preset vector knowledge base; based on the software design scheme generation task indicated by preset prompt words, the target vector data is retrieved from the preset vector knowledge base, and the preset prompt words and target vector data are combined into training samples; the preset large model is supervised and fine-tuned using the training samples to obtain the candidate large model.
[0104] According to embodiments of this disclosure, a preset vector knowledge base includes multiple sets of candidate vector data. Each set of candidate vector data has a matching software design scheme generation task. For example, order-related document vectors and data model association vectors correspond to "order system design task". During training, the software design scheme generation task indicated by preset prompt words is retrieved from the preset vector knowledge base and the corresponding target vector data is called. The preset prompt words are combined to form training samples. For example, the preset prompt words are: input: design requirement description; output: order system design scheme, data model, and database table structure that conform to enterprise standards. The training samples are input into the basic large model, and supervised fine-tuning is used to iteratively optimize the large model.
[0105] Document-based enterprise data resources mainly include software design schemes accumulated by the enterprise in history, enterprise architecture management standards, and knowledge in the field of data modeling. Traditional document processing technology only focuses on the text itself and ignores the extraction of multi-dimensional knowledge such as business logic and enterprise norms.
[0106] To overcome the limitations of traditional document processing and achieve multi-dimensional knowledge extraction from software design-related documents, providing ample knowledge reserves for large models, in some embodiments, software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and / or data knowledge are input into conversion modules that match the corresponding data types to obtain multiple sets of candidate vector data. This includes: parsing and preprocessing software design knowledge, enterprise architecture management knowledge, and / or data modeling domain knowledge to obtain standard text; splitting the standard text at the paragraph level to obtain multiple text units; extracting business keywords from each text unit; filtering based on business keywords in a preset business domain knowledge base to obtain corresponding business domain tags; and segmenting the standard text based on the business domain tags to obtain multiple text blocks; and using a pre-trained language model to convert the multiple text blocks into multiple text vectors as multiple sets of candidate vector data.
[0107] According to embodiments of this disclosure, a preset business domain knowledge base includes multiple business domain tags, each of which has matching business keywords.
[0108] For example, firstly, documents of different formats (such as software design documents, enterprise architecture management standard documents, and data modeling domain knowledge documents) are formatted and plain text content is extracted. If the document contains images (such as architecture diagrams and data flow diagrams), optical character recognition technology (supporting multiple languages and complex layouts) is used to extract text information and graphic element descriptions from the images. The aforementioned information is then cleaned (e.g., redundant information is removed and terminology is standardized) to obtain standard text. Next, the standard text is split into multiple text units at the paragraph level. Regular expressions are used to extract business keywords from each text unit. Based on the business keywords, the corresponding business domain tags are obtained by filtering in a preset business domain knowledge base. Then, when multiple text units share the same business domain tag, they are segmented based on the semantic integrity between the multiple text units. For example, they are segmented by chapter. If multiple text units correspond to multiple business domain tags, they are segmented at the point where the business domain tags switch. Finally, the BERT model is used to convert multiple text blocks into multiple text vectors.
[0109] Enterprise data resources of various data source types include data models, database tables, and data items stored in the enterprise asset repository. In response to the characteristics of dispersed data sources and unclear relationships within an enterprise, data extraction and relationship quantification are performed on enterprise data resources to ensure the accuracy of vector data.
[0110] In some embodiments, when the data type is a data source, software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and / or data knowledge are respectively input into a conversion module that matches the corresponding data type to obtain multiple sets of candidate vector data. This includes: extracting data knowledge to obtain metadata, which includes a data model and at least one of interface fields, database tables, and data items; converting the metadata into vectors and combining them with corresponding hierarchical relationships to serve as multiple sets of candidate vector data, where the hierarchical relationships characterize the degree of association between the data model and the interface fields, database tables, or data items.
[0111] Furthermore, firstly, data is extracted from the enterprise's data to obtain metadata, which may include data models, interface fields, database tables, and data items. Then, parsing tools are used to parse the data model to obtain the relationships between the data model and the data source, and between the data model and the database tables. Based on a preset association rule engine, the mapping relationship between interface fields and database table fields is sorted out, data items are broken down into the smallest fields, and the affiliation of each field is recorded to obtain hierarchical association relationships. Then, the metadata is converted into vectors using an embedding model and combined with the corresponding hierarchical association relationships to serve as multiple sets of candidate vector data.
[0112] For example, the parsing tool can be a graph parsing tool, and the relationship between the data model and the data source can be the business data source to which the data model belongs, such as "order model" associating with "order database". The relationship between the data model and the database table can be the database table corresponding to the model entity, such as "order entity" as corresponding to the order_info table. The preset association rule engine includes mapping type (1:1 / 1:N / N:1) and conversion logic (such as unit conversion and field concatenation). The mapping relationship between the interface field and the database table field can include direct mapping and indirect mapping. The affiliation of each field includes the database table / interface to which it belongs and the business domain to which it belongs. The hierarchical relationship can be <data source ID> → contain → <model ID> → map → → contain → <field ID> → split → <data item ID> → reference → <data item ID>.
[0113] To accurately pinpoint users' core needs when generating software design solutions using a target-oriented large model, and to avoid misunderstandings caused by colloquial or fragmented expressions, in some embodiments, the target-oriented large model is used to perform semantic analysis on the solution generation request, resulting in multiple primary prompt words and multiple secondary prompt words, including:
[0114] First, based on the preset software design task dimensions, keywords are extracted from the software design scheme generation request to obtain task elements.
[0115] According to embodiments of this disclosure, task elements indicate the software functional requirements of the software design scheme to be generated, and task dimensions indicate the requirement dimensions involved in the software design scheme. There can be multiple task dimensions, and multiple task dimensions can be represented as a task dimension set D={d1 (architectural design), d2 (functional module), d3 (data design), d4 (interface design), d5 (security design), d6 (deliverable)}.
[0116] For example, the semantic analysis capabilities of the target large model are used to extract task elements from the software design scheme generation request based on the task dimension, and the task dimension to which each task element belongs is labeled.
[0117] Then, the target large model is used to process the software design scheme generation request based on the preset constraint extraction rules to obtain the constraint type.
[0118] According to embodiments of this disclosure, constraint extraction rules indicate the correspondence between software design requirements and constraint types in the software design scheme to be generated; there are multiple constraint types, which can be represented as a constraint type set, which can be represented as C={c1 (technology stack constraint), c2 (performance constraint), c3 (security constraint), c4 (format constraint), c5 (compliance constraint)}; preset constraint rules indicate the mapping relationship between constraint types and constraint items, such as "containing 'using XX framework' → c1", "containing 'supporting XX concurrency' → c2", "containing 'encryption' → c3".
[0119] For example, by utilizing the semantic analysis capabilities of the target large model and following the correspondence indicated by the preset constraint extraction rules, the constraint types corresponding to the software design requirements in the software design scheme generation request can be obtained.
[0120] Then, based on the relationship between constraint type and task dimension, constraint type and task element are mapped to preset prompt word templates to obtain multiple first prompt words and multiple second prompt words.
[0121] For example, firstly, the cosine similarity between task dimension and task type is calculated as the correlation between the two, and the correlation with a correlation greater than a preset threshold is retained to form a "task dimension-constraint type" association table; then, the task elements and constraint types corresponding to each task dimension are mapped to preset prompt word templates to obtain multiple first prompt words and multiple second prompt words.
[0122] For example, the preset prompt word template can include roles and tasks. Tasks are such as being based on xx requirements (corresponding to multiple first prompt words) and satisfying xx constraints + output requirements (corresponding to multiple second prompt words). For each task dimension, a specific role and output format are preset, such as d1→backend architect, d3→database engineer, d1→architectural diagram text description, d3→table structure + ER diagram.
[0123] Figure 5 The diagram illustrates an application example of the design scheme generation method according to embodiments of the present disclosure. Figure 6 The flowchart illustrating the application of the design scheme generation method according to an embodiment of the present disclosure is shown.
[0124] Next, combined Figures 5-6 The present disclosure will further introduce the practical application of the design scheme generation method of the present invention.
[0125] like Figure 5 As shown, the design scheme generation method is deployed on an AI technology platform. It utilizes the Infrastructure as a Service (IaaS) layer to provide basic computing resources, such as GPI, AI chips, SSDs, FPGAs, and other basic resources. It utilizes the Platform as a Service (PaaS) layer to provide a platform for developing, managing, training, and running large models. For example, it uses a deep learning development framework as an AI framework, utilizes container cloud and CI / CD to provide deployment services, utilizes a model management module to manage the parameter scale of large models such as hybrid expert architecture, multimodal, and multilingual models, and utilizes prompt word engineering, RAG, Agent, fine-tuning, and basic data for model training. Data is called through the Application Programming Interface (API) layer.
[0126] Combination Figure 6 During the training process, users send software design scheme generation requests through the interactive interface. These requests are then sent to the backend service, which calls the large model API interface of the AI technology platform. The AI technology platform processes the training data and returns the generated results to the backend service. The backend service then returns the generated results to the interactive interface for display to the user. Simultaneously, the backend service interacts with the database to store or retrieve data. Finally, the backend service stores the AI-generated asset documents into the enterprise asset platform.
[0127] Based on the above-described design scheme generation method, this disclosure also provides a design scheme generation apparatus. The following will be combined with... Figure 7 The device is described in detail.
[0128] Figure 7 A schematic block diagram of a design scheme generation apparatus according to an embodiment of the present disclosure is shown.
[0129] like Figure 7 As shown, the design scheme generation device 700 of this embodiment includes a modality perception module 710, a task parsing module 720, a filtering module 730, a semantic analysis module 740, and a reasoning module 750.
[0130] The modality perception module 710, in response to receiving a software design scheme generation request, processes the request using a pre-trained multimodal perception model to obtain a modality feature vector. This modality feature vector indicates the modality type and language type included in the software design scheme generation request. In one embodiment, the modality perception module 710 can perform the operation S210 described above, which will not be repeated here.
[0131] The task parsing module 720 is used to generate multiple software design sub-tasks indicated by the request based on the software design scheme, as well as the relationships between the multiple software design sub-tasks, to generate a software design task association graph. The number of sub-tasks indicated by the software design task association graph, the degree of domain knowledge overlap, and the length of the inference chain are then fused to obtain a task feature vector. In one embodiment, the task parsing module 720 can be used to perform the operation S220 described above, which will not be repeated here.
[0132] The filtering module 730 is used to filter multiple candidate large models based on modal feature vectors and task feature vectors to obtain a target large model. These multiple candidate large models are pre-obtained through training using software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and data knowledge. In one embodiment, the filtering module 730 can be used to perform the operation S230 described above, which will not be repeated here.
[0133] The semantic analysis module 740 is used to perform semantic analysis on the software design scheme generation request using the target large model, obtaining multiple first prompt words and multiple second prompt words. The multiple first prompt words indicate the software functional requirements of the software design scheme to be generated, and the multiple second prompt words indicate the software design requirements of the software design scheme to be generated. In one embodiment, the filtering module 730 can be used to perform the operation S230 described above, which will not be repeated here.
[0134] The reasoning module 750 is used to guide the target large model to reason under the software design requirements and based on the software functional requirements, based on multiple first prompt words and multiple second prompt words, to obtain the target design scheme. In one embodiment, the reasoning module 750 can be used to execute the operation S250 described above, which will not be repeated here.
[0135] According to embodiments of this disclosure, any plurality of modules among the modal perception module 710, task parsing module 720, filtering module 730, semantic analysis module 740, and inference module 750 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the modal perception module 710, task parsing module 720, filtering module 730, semantic analysis module 740, and inference module 750 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the modality perception module 710, task parsing module 720, filtering module 730, semantic analysis module 740, and reasoning module 750 may be implemented at least partially as a computer program module that can perform corresponding functions when the computer program module is run.
[0136] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a design generation method according to an embodiment of the present disclosure.
[0137] like Figure 8 As shown, an electronic device 800 according to an embodiment of this disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0138] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0139] According to embodiments of this disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0140] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0141] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0142] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the item recommendation method provided in the embodiments of this disclosure.
[0143] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0144] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0145] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by processor 801, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0146] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0148] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0149] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for generating a design scheme, characterized in that, The method includes: In response to receiving a software design scheme generation request, the software design scheme generation request is processed through a pre-trained multimodal perception model to obtain a modal feature vector, which indicates the modal type and language type contained in the software design scheme generation request; Based on the software design scheme, multiple software design sub-tasks are generated as indicated by the request, and the relationships between these multiple software design sub-tasks are also generated. A software design task association graph is then generated. The number of sub-tasks, the degree of cross-domain knowledge, and the length of the inference chain indicated by the software design task association graph are fused together to obtain a task feature vector. Based on the modal feature vector and the task feature vector, a target large model is obtained by screening multiple candidate large models. The multiple candidate large models are obtained in advance by training using software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge and data knowledge. The target large model is used to perform semantic analysis on the software design scheme generation request to obtain multiple first prompt words and multiple second prompt words. The multiple first prompt words indicate the software functional requirements of the software design scheme to be generated, and the multiple second prompt words indicate the software design requirements of the software design scheme to be generated. Based on the multiple first prompt words and the multiple second prompt words, the target large model is guided to reason under the software design requirements and based on the software functional requirements to obtain the target design scheme.
2. The method according to claim 1, characterized in that, The generation of a software design task association graph, which generates multiple software design sub-tasks based on the software design scheme and the relationships between these sub-tasks, includes: The software design scheme generation request is semantically parsed and broken down into multiple software design sub-tasks. The multiple software design sub-tasks constrain the reasoning order and reasoning granularity of the target large model. Based on the execution dependencies, semantic similarity, and data transfer relationships among the multiple software design subtasks, the correlation degree among the multiple software design subtasks is calculated, whereby the execution dependencies characterize the mandatory order of execution of the software design subtasks. A software design task association graph is constructed using the multiple software design subtasks as nodes, the execution dependencies between the multiple software design subtasks as edges, and the correlation between the multiple software design subtasks as edge weights.
3. The method according to claim 1, characterized in that, The process of fusing the number of subtasks, domain knowledge overlap, and inference chain length indicated by the software design task association graph to obtain the task feature vector includes: The number of subtasks is obtained by traversing the node set of the software design task association graph using a depth-first search algorithm. The number of subtasks represents the operational complexity of generating the software design scheme. Based on the number of cross-domain entities and the total number of entities in the software design task association graph, the domain crossover degree is obtained, which represents the knowledge complexity of the generated software design scheme. Based on the syntax tree structure corresponding to the software design task association graph, the logic chain level is determined based on the dominance depth and relative subtree size of each node in the syntax tree structure, and the inference chain length is obtained based on the maximum value of the logic chain level. The inference chain length represents the reasoning complexity of generating the software design scheme. The task feature vector is obtained by fusing the number of subtasks, the domain overlap, and the inference chain length.
4. The method according to claim 1, characterized in that, Each of the multiple candidate large models has a matching model capability vector, which indicates the modality support type, language coverage, and inference complexity threshold of the corresponding candidate large model. The process of selecting from multiple candidate large models based on the modality feature vector and the task feature vector includes: The modality feature vector and the task feature vector are fused to obtain the request feature vector; Based on the modality and language type indicated by the request feature vector, multiple model capability vectors are traversed to obtain multiple candidate model capability vectors. The similarity between the requested feature vector and the multiple candidate model capability vectors is calculated respectively. Based on the obtained multiple similarities, the target large model is obtained by filtering among the corresponding candidate large models.
5. The method according to claim 1, characterized in that, The software design knowledge, the enterprise architecture management knowledge, the data modeling domain knowledge, and the data knowledge each have matching data types. For each candidate large model, the candidate large model is obtained in advance using the following method: The software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge, and / or data knowledge are respectively input into a conversion module that matches the corresponding data type to obtain multiple sets of candidate vector data, which are then stored in a preset vector knowledge base. The task of generating a software design scheme based on preset prompt words is to retrieve target vector data from a preset vector knowledge base, and then combine the preset prompt words and the target vector data into training samples. The candidate large model is obtained by supervising the fine-tuning of the preset large model using the training samples.
6. The method according to claim 5, characterized in that, When the data type is a document, the step of inputting the software design knowledge, the enterprise architecture management knowledge, the data modeling domain knowledge, and / or the data knowledge into a conversion module that matches the corresponding data type to obtain multiple sets of candidate vector data includes: The software design knowledge, enterprise architecture management knowledge, and / or data modeling domain knowledge are analyzed and preprocessed to obtain standard text; The standard text is split into paragraphs to obtain multiple text units. Business keywords are extracted from each text unit. Based on the business keywords, the corresponding business domain tags are obtained by filtering in a preset business domain knowledge base. The standard text is segmented based on the business domain label to obtain multiple text blocks. The multiple text blocks are then converted into multiple text vectors using a pre-trained language model to serve as multiple sets of candidate vector data.
7. The method according to claim 5, characterized in that, When the data type is a data source, the step of inputting the software design knowledge, the enterprise architecture management knowledge, the data modeling domain knowledge, and / or the data knowledge into a conversion module that matches the corresponding data type to obtain multiple sets of candidate vector data includes: Data extraction is performed on the data knowledge to obtain metadata, which includes at least one of the following: data model and interface fields, database tables, and data items. The metadata is converted into vectors and combined with the corresponding hierarchical relationships to form multiple sets of candidate vector data. The hierarchical relationships characterize the degree of association between the data model and the interface fields, the database tables, or the data items.
8. The method according to claim 1, characterized in that, The semantic analysis of the software design scheme generation request using the target large model yields multiple first prompt words and multiple second prompt words, including: Based on the preset software design task dimensions, keywords are extracted from the software design scheme generation request to obtain task elements, which indicate the software functional requirements of the software design scheme to be generated. The target large model is used to process the software design scheme generation request based on preset constraint extraction rules to obtain the constraint type. The constraint extraction rules indicate the software design requirements of the software design scheme to be generated. Based on the relationship between the constraint type and the task dimension, the constraint type and the task element are respectively mapped to preset prompt word templates to obtain the plurality of second prompt words and the plurality of first prompt words.
9. A design scheme generation device, characterized in that, The device includes: The modality awareness module is used to respond to a received software design scheme generation request by processing the software design scheme generation request through a pre-trained multimodal awareness model to obtain a modality feature vector, wherein the modality feature vector indicates the modality type and language type contained in the software design scheme generation request; The task parsing module is used to generate multiple software design sub-tasks indicated by the request based on the software design scheme and the relationship between the multiple software design sub-tasks, generate a software design task association graph, and fuse the number of sub-tasks indicated by the software design task association graph, the degree of cross-domain knowledge and the length of the inference chain to obtain a task feature vector. The filtering module is used to filter multiple candidate large models based on the modality feature vector and the task feature vector to obtain the target large model. The multiple candidate large models are obtained in advance by training using software design knowledge, enterprise architecture management knowledge, data modeling domain knowledge and data knowledge. The semantic analysis module is used to perform semantic analysis on the software design scheme generation request using the target large model to obtain multiple first prompt words and multiple second prompt words. The multiple first prompt words indicate the software functional requirements of the software design scheme to be generated, and the multiple second prompt words indicate the software design requirements of the software design scheme to be generated. The reasoning module is used to guide the target large model to reason based on the multiple first prompt words and the multiple second prompt words, under the software design requirements and based on the software functional requirements, to obtain the target design scheme.
10. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. The characteristic is that, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having executable instructions stored thereon, characterized in that, When executed by the processor, this instruction causes the processor to perform the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 8.