Design scheme processing method and program product

CN122884475APending Publication Date: 2026-10-09SOUTHERN POWER GRID DIGITAL GRID RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611036178.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0004]本发明提供了一种设计方案处理方法及程序产品,以解决相关技术中基于通用代码生成工具进行代码片段生成,代码与项目架构适配性差,无法实现从需求到开发的全流程智能化处理的问题

Benefits of technology

[0010]本发明实施例的技术方案,首先,通过接收用户输入,从所述用户输入中提取设计需求信息和参数实体,对所述用户输入进行意图识别以获得意图类别,其中,所述用户输入为自然语言需求描述或需求文档;基于用户输入获取设计需求信息、参数实体和意图类别,为后续设计方案生成提供数据基础和处理方向;接着,通过响应于所述意图类别包括生成设计方案,基于所述设计需求信息对向量知识库进行检索,以获得与所述设计需求信息语义相关的第一知识片段,对所述设计需求信息进行解析以形成结构化的需求知识图谱,根据所述需求知识图谱和所述第一知识片段生成与所述设计需求信息匹配的初步设计方案;基于向量知识库精准匹配语义相关的上下文知识片段,实现历史数据的高效复用,基于上下文准确理解用户意图,基于设计需求信息生成需求知识图谱,实现对设计需求的详细分析理解,进而生成初步设计方案不仅贴合设计需求,同时通过上下文知识片段保障设计方案的合理性和专业度;接着,通过将所述初步设计方案中的结构化查询语言语句提交至规则引擎执行合规校验,获得第一合规报告,根据所述第一合规报告对所述初步设计方案进行修正,得到中间设计方案;基于规则引擎实现代码质量的自动化校验与问题精准定位,避免人工审核易疏漏且效率低下的问题,进而输出第一合规报告实现对初步设计方案的定向修正,保证设计方案的合规性;最后,通过将所述用户输入中的原始需求上下文、所述第一知识片段、所述第一合规报告、所述中间设计方案以及预设的包含思维链引导指令的提示词模板发送至大语言模型,驱动所述大语言模型生成目标设计方案,对所述目标设计方案执行校验后输出;通过大语言模型基于多源信息进行目标设计方案生成,通过包含思维链引导指令的提示词模板约束大语言模型按照标准化、规范化的推理逻辑输出内容,保障目标设计方案的专业性、合规性和逻辑严密性,实现从需求解析到代码生成的全链路贯通与持续演进,大幅提高目标设计方案的生成效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122884475A_ABST
    Figure CN122884475A_ABST
Patent Text Reader

Abstract

The application discloses a design scheme processing method and a program product, the method comprises the following steps: receiving user input to extract design requirement information and parameter entities, and obtaining an intention category; in response to the intention category comprising generating a design scheme, searching based on the design requirement information to obtain a first knowledge fragment, and analyzing to form a requirement knowledge graph, and generating a matched preliminary design scheme according to the requirement knowledge graph and the first knowledge fragment; submitting a structured query language statement in the preliminary design scheme to a rule engine to perform compliance verification, obtaining a first compliance report, and modifying the preliminary design scheme according to the report to obtain an intermediate design scheme; sending an original requirement context in the user input, the first knowledge fragment, the first compliance report, the intermediate design scheme and a prompt word template containing a thinking chain guide instruction to a large language model to generate a target design scheme, and outputting after performing verification on the target design scheme; and ensuring that the generated target design scheme is in line with user requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software development technology, and in particular to a design scheme processing method and program product. Background Technology

[0002] As artificial intelligence technology continues to penetrate the field of software development, the software R&D model is rapidly iterating and upgrading from tool-assisted R&D to a new R&D model of human-machine intelligent collaboration. As the core carrier supporting the development of the entire business line, the R&D platform has basic functions such as code management, build deployment, testing and maintenance, but it is insufficient in terms of intelligence level and cannot achieve full-process intelligence from requirements to development.

[0003] Most related technologies rely on general-purpose code generation tools to generate code snippets, using only basic keywords for instruction parsing. They lack a deep semantic understanding of the contextual information, such as the project's business scenarios, rules, and overall technical architecture. The generated code often deviates from project technical specifications, database constraints, and business logic, exhibiting poor compatibility with the original project architecture. This necessitates extensive secondary modifications and debugging by developers before integration and deployment, increasing their workload and failing to achieve a closed-loop intelligent development process. Therefore, a design solution approach is urgently needed to improve the efficiency and intelligence of design solution processing. Summary of the Invention

[0004] This invention provides a design scheme processing method and program product to solve the problem in related technologies where code snippet generation based on general code generation tools has poor code adaptability to project architecture and cannot achieve intelligent processing of the entire process from requirements to development.

[0005] According to one aspect of the present invention, a design scheme processing method is provided, the method comprising: Receive user input, extract design requirement information and parameter entities from the user input, and perform intent recognition on the user input to obtain intent category, wherein the user input is a natural language requirement description or requirement document; In response to the intent category including generating a design scheme, the vector knowledge base is retrieved based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information. The design requirement information is parsed to form a structured requirement knowledge graph. A preliminary design scheme matching the design requirement information is generated based on the requirement knowledge graph and the first knowledge fragment. The structured query language statements in the preliminary design scheme are submitted to the rule engine for compliance verification to obtain a first compliance report. The preliminary design scheme is then modified based on the first compliance report to obtain an intermediate design scheme. The original requirement context, the first knowledge fragment, the first compliance report, the intermediate design scheme, and the preset prompt word template containing the thought chain guidance instructions are sent to the large language model to drive the large language model to generate the target design scheme. The target design scheme is then validated and output.

[0006] According to another aspect of the present invention, a design processing apparatus is provided, the apparatus comprising: The input module is used to receive user input, extract design requirement information and parameter entities from the user input, and perform intent recognition on the user input to obtain intent category, wherein the user input is a natural language requirement description or requirement document; The first design module is configured to respond to the intent category including generating a design scheme, retrieve a vector knowledge base based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information, parse the design requirement information to form a structured requirement knowledge graph, and generate a preliminary design scheme matching the design requirement information based on the requirement knowledge graph and the first knowledge fragment. The second design module is used to submit the structured query language statements in the preliminary design scheme to the rule engine for compliance verification, obtain a first compliance report, and revise the preliminary design scheme according to the first compliance report to obtain an intermediate design scheme. The third design module is used to send the original requirement context, the first knowledge fragment, the first compliance report, the intermediate design scheme, and the preset prompt word template containing the thought chain guidance instructions from the user input to the large language model, drive the large language model to generate the target design scheme, and output the target design scheme after verification.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the design processing method described in any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the design processing method of any embodiment of the present invention.

[0009] According to another aspect of the present invention, embodiments of the present disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the design processing method as described in any of the embodiments of the present disclosure.

[0010] The technical solution of this invention firstly involves receiving user input, extracting design requirement information and parameter entities from the user input, and performing intent recognition on the user input to obtain an intent category. The user input is either a natural language requirement description or a requirement document. Based on the user input, the design requirement information, parameter entities, and intent category are obtained, providing a data foundation and processing direction for subsequent design scheme generation. Next, in response to the intent category including generating a design scheme, a vector knowledge base is retrieved based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information. The design requirement information is parsed to form a structured requirement knowledge graph. A preliminary design scheme matching the design requirement information is generated based on the requirement knowledge graph and the first knowledge fragment. Accurate matching of semantically related contextual knowledge fragments based on the vector knowledge base enables efficient reuse of historical data. Accurate understanding of user intent based on context, and generation of a requirement knowledge graph based on design requirement information, enable detailed analysis and understanding of design requirements. This results in a preliminary design scheme that not only meets design requirements but also ensures the rationality and professionalism of the design scheme through contextual knowledge fragments. Then… The process involves submitting the structured query language statements in the preliminary design scheme to a rule engine for compliance verification, obtaining a first compliance report, and then revising the preliminary design scheme based on the first compliance report to obtain an intermediate design scheme. The rule engine enables automated code quality verification and precise problem localization, avoiding the inefficiencies and oversights of manual review. This results in the output of the first compliance report, enabling targeted revisions to the preliminary design scheme and ensuring its compliance. Finally, the process involves sending the original requirement context from the user input, the first knowledge fragment, the first compliance report, the intermediate design scheme, and a preset prompt template containing thought chain guidance instructions to a large language model. This drives the large language model to generate a target design scheme, which is then verified and output. By generating the target design scheme based on multi-source information using the large language model and constraining it to output content according to standardized and normalized reasoning logic using the prompt template containing thought chain guidance instructions, the professionalism, compliance, and logical rigor of the target design scheme are ensured. This achieves seamless integration and continuous evolution from requirement analysis to code generation, significantly improving the efficiency of target design scheme generation.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a design scheme processing method provided in Embodiment 1 of the present invention; Figure 2a This is a flowchart of a design scheme processing method provided in Embodiment 2 of the present invention; Figure 2b This is a schematic diagram of the interaction timing of a design engineer's intelligent agent in a design scheme processing method provided according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of a processing device according to a design scheme provided in Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the design scheme processing method of the embodiments of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," "preliminary," "intermediate," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising," "including," and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0017] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0018] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0019] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0020] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0021] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0022] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0023] Example 1 Figure 1 This is a flowchart illustrating a design scheme processing method according to Embodiment 1 of the present invention. This embodiment is applicable to situations where design schemes are processed based on user input. This method can be executed by a design scheme processing device, which can be implemented in hardware and / or software, optionally through an electronic device such as a mobile terminal, PC, or server. Figure 1 As shown, the method may specifically include: S110. Receive user input, extract design requirement information and parameter entities from the user input, and perform intent recognition on the user input to obtain intent category, wherein the user input is a natural language requirement description or requirement document.

[0024] In this embodiment of the invention, user input can be understood as user-inputted requirement data. Design requirement information can be requirement data related to the design scheme extracted from the user input. Parameter entities can be relevant parameters included in the user input. Intent category can be the design scheme processing intent direction determined based on the user input.

[0025] Optionally, user input can be a natural language requirement description or a requirement document. The natural language requirement description can be the requirement content entered by the user in the form of text, voice, etc., while the requirement document can be a text file entered by the user, such as a requirement specification or functional design document. Specifically, standardized input entry points for user input can be provided through unified Application Programming Interface Gateway (API Gateway), Web Workbench (WW), Integrated Development Environment Plugin (IDE Plugin), etc. For example, this could include obtaining a natural language requirement description through dialogue, or obtaining a requirement document through user-uploaded files.

[0026] Optionally, user input can be parsed to extract design requirement information and parameter entities related to the design scheme. The design requirement information may include business objects, business fields, relationships between business objects, and field constraints. Parameter entities may include table names, database types, and validation rule IDs. Specifically, natural language processing technology can be used to extract key information from user input to obtain design requirement information.

[0027] Optionally, user input can be matched with an intent classification vector library for similarity to determine its corresponding intent category.

[0028] Based on the above scheme, optionally, the step of performing intent recognition on the user input to obtain the intent category includes: converting the user input into a high-dimensional vector through an embedding model, performing cosine similarity matching between the high-dimensional vector and a preset intent classification vector library, and determining the intent category based on the matching result. The intent category includes a recommended design template, a generated design scheme, and an optimized design scheme. The recommended design template is used to match existing design templates based on the user input. The generated design scheme is used to generate structured query language statements based on the requirements of natural language description. The optimized design scheme is used to iteratively optimize existing design schemes.

[0029] Embedding models (or embeddings) can be understood as neural network models that transform unstructured data such as text and images into high-dimensional dense vectors. These transformed vectors express the semantic features of the original data, ensuring that semantically similar content is close in distance within the vector space. High-dimensional vectors can be understood as arrays of multi-dimensional numbers generated through the embedding model, which can be used to accurately represent the semantic features of text. An intent classification vector library is a database that stores vectors corresponding to multiple intent categories, which can be used for user intent matching and classification.

[0030] Specifically, user input can be transformed into a high-dimensional vector representation through an embedding model. This high-dimensional vector representation is then matched with a pre-defined intent classification vector library using cosine similarity. Cosine similarity measures the degree of similarity between the directions of two vectors. The similarity is assessed by calculating the cosine of the angle between the two vectors, with a value ranging from -1 to 1. A value closer to 1 indicates greater similarity in the directions of the two vectors. The matching result is then determined based on the cosine similarity. Next, a pre-defined similarity threshold is used to filter the matching results to determine the intent category. The matching result can include the calculated similarity and the corresponding matched intent category.

[0031] Optionally, the intent category may include, but is not limited to, multiple categories such as recommended design templates, generated design solutions, and optimized design solutions. Recommended design templates can be used to match existing design templates based on user input. Generated design solutions can be used to generate structured query language statements based on the needs described in natural language. Optimized design solutions can be used to iteratively optimize existing design solutions. Specifically, recommended design templates can be used to embed and vectorize user input and perform similarity matching with a vector knowledge base to obtain recommended existing design templates. Generated design solutions can be used to generate compliant structured query language (SQL) statements based on the needs described in natural language, combined with the context retrieved from the vector knowledge base and the prompt word templates of the thought chain guidance instructions. Optimized design solutions can be used to continuously iteratively optimize the generated table structure in the form of multi-turn dialogues.

[0032] S120. In response to the intent category including generating a design scheme, the vector knowledge base is retrieved based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information. The design requirement information is parsed to form a structured requirement knowledge graph. A preliminary design scheme matching the design requirement information is generated based on the requirement knowledge graph and the first knowledge fragment.

[0033] The Vector Knowledge Base (Elasticsearch) is a knowledge storage and retrieval system based on vector embedding technology. It transforms unstructured knowledge such as text and images into high-dimensional vectors through an embedding model and stores them in the Vector Knowledge Base. During retrieval, semantic-level matching can be achieved through vector similarity calculation. The first knowledge fragment can be a contextual knowledge fragment related to the design solution selected from the Vector Knowledge Base. The requirement knowledge graph can be the result of a knowledge graph constructed based on design requirement information, which may include entity types such as business objects and business fields related to the design requirements, as well as relationships such as associations and constraints between entities. The preliminary design solution can be a preliminary design solution generated based on the requirement knowledge graph and the first knowledge fragment.

[0034] Optionally, in response to the intent category including generating a design scheme, the vector knowledge base can be retrieved based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information. The design requirement information is then parsed to form a structured requirement knowledge graph. Based on the requirement knowledge graph and the first knowledge fragment, a preliminary design scheme matching the design requirement information is generated.

[0035] In this way, scattered technical documents, historical code, interface specifications and other knowledge can be transformed into a semantically searchable vector knowledge base in advance, so that contextual information can be obtained by searching the vector knowledge base later. Then, based on the complete R&D context, the user's intent can be understood and accurate results can be generated, reducing the cost of repeated configuration and knowledge retrieval.

[0036] Optionally, based on the above scheme, the step of retrieving the vector knowledge base based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information includes: inputting the design requirement information into an embedding model to generate a query vector; sending the query vector to a vector retrieval engine, so that the vector retrieval engine adopts a hierarchical navigation small-world algorithm to progressively traverse from the high level to the low level in the multi-layer graph index of the vector knowledge base; calculating the similarity between the query vector and the vector corresponding to the traversed candidate knowledge fragments through cosine similarity; and obtaining multiple first knowledge fragments from the multiple candidate knowledge fragments based on the similarity corresponding to the multiple candidate knowledge fragments in the vector knowledge base, wherein the first knowledge fragment includes historical design templates, interface specifications, field naming conventions, and technical control specifications.

[0037] The query vector can be a semantic vector generated by an embedding model based on design requirements information for vector retrieval. The vector retrieval engine can be an engine used for vector retrieval to determine relevant contextual information. Candidate knowledge fragments can be knowledge fragments with high similarity selected in the initial screening. The first knowledge fragment can be the knowledge fragment that is semantically related to the design requirements information in the final screening.

[0038] Specifically, the structured entities, relationships, constraints, and other information obtained by parsing the design requirements information through Named Entity Recognition (NER) can be input into the embedded model to generate a query vector. Then, the query vector is sent to the vector retrieval engine, which uses the Hierarchical Navigable Small World (HNSW) algorithm to progressively traverse from the top to the bottom in the multi-layer graph index of the vector knowledge base. The Hierarchical Navigable Small World (HNSW) algorithm is a graph indexing algorithm for high-dimensional vector approximate nearest neighbor retrieval. It achieves efficient vector search by constructing a multi-layer graph structure. During retrieval, it traverses layer by layer from the highest layer to the finest layer, combining high recall and low latency. Through the multi-layer graph structure, millisecond-level semantic retrieval can be achieved.

[0039] After obtaining multiple candidate knowledge fragments through traversal, the similarity between the query vector and the corresponding vectors of the traversed candidate knowledge fragments can be calculated using cosine similarity. A Top-K approximate nearest neighbor retrieval is then performed, and Top-K related candidate knowledge fragments are obtained through cosine similarity calculation. The retrieval results across multiple vector knowledge base segments are distributed and merged, and then uniformly reordered based on global relevance. Results with similarity below a preset threshold are filtered out, and a structured retrieval context is output as the final first knowledge fragment, achieving efficient semantic matching. The first knowledge fragment can contain various fragment information such as historical design templates, interface specifications, field naming conventions, and technical control specifications. Multiple first knowledge fragments form a structured context for use in subsequent generation steps.

[0040] Among these, historical design templates can be standardized templates for reusable database designs and functional designs from past projects. Interface specifications can be historical interface definition standards, parameter passing rules, format requirements, and calling constraints. Field naming conventions can be historical database field naming rules, formats, and terminology conventions. Technical control specifications can be control specifications used to constrain information related to database design, code writing, and solution construction, and may include microservice interface naming formats, distributed transaction processing models, service layer calling specifications, table naming specifications, field naming specifications, and index naming specifications.

[0041] Based on the above scheme, optionally, the step of parsing the design requirement information to form a structured requirement knowledge graph includes: extracting business objects and business fields from the design requirement information, wherein the business objects are used to represent the database table to be generated, and the business fields are used to represent the columns in the database table to be generated, and determining the business object to which each business field belongs; identifying the relationships between the business objects, and extracting the constraints of the business fields, wherein the relationships include master-slave relationships, one-to-many relationships, and many-to-many relationships, and the constraints include data type constraints, length constraints, uniqueness constraints, and mandatory constraints; and constructing a structured requirement knowledge graph based on the business objects, relationships, and constraints.

[0042] Here, business objects can be business entities extracted from design requirements. Business objects can be used to represent the database tables to be generated. Business fields are used to represent the columns in the database tables to be generated. The relationships between business objects can be understood as the business linkages and data associations between different business objects.

[0043] Optionally, key information can be extracted from design requirements using natural language processing technology. First, named entity recognition (NER) can be performed to automatically identify and classify entities of specific categories from the text, thereby obtaining core entities such as business object names, field names, and business terms. Next, relationship extraction can be performed to identify relationships such as master-slave, one-to-many, and many-to-many relationships between business objects. Then, constraint extraction can be performed to obtain rules and constraints such as data type constraints, length constraints, uniqueness constraints, and required field constraints for business fields. Finally, a structured requirement knowledge graph can be constructed based on business objects, relationships, and constraints.

[0044] In this context, a master-detail relationship can be understood as a primary-secondary relationship between two business objects. A one-to-many relationship can be understood as one master business object corresponding to multiple subordinate business objects, while a single subordinate object corresponds to only one master object. A many-to-many relationship can be understood as two types of business objects corresponding to multiple entities in each other. Field constraints can be understood as various data validation and format constraints that business fields must adhere to. Data type constraints can be understood as constraints on the data type of fields, such as, but not limited to, constraints on integer, string, date, and floating-point types. Length constraints can be understood as constraints on the maximum and minimum storage length of string and character fields. Uniqueness constraints can be understood as constraints that require field data to be unique and not duplicated in the data table. Required constraints can be understood as constraints that require fields to be assigned a value and cannot be empty when storing data.

[0045] Based on the above scheme, optionally, the preliminary design scheme includes a preliminary structured query language statement; the step of generating a preliminary design scheme that matches the design requirement information based on the requirement knowledge graph and the first knowledge fragment includes: generating a preliminary structured query language statement that matches the design requirement information based on the business objects, the relationships and the constraints in the requirement knowledge graph, and the historical design templates and technical control specifications in the first knowledge fragment.

[0046] Among them, the preliminary structured query language statement can be a structured query language statement generated without compliance optimization based on the business objects, relationships and constraints in the requirement knowledge graph, as well as the historical design templates and technical control specifications in the first knowledge fragment.

[0047] Specifically, based on the business objects, relationships, and constraints in the requirements knowledge graph, as well as the historical design templates and technical control specifications in the first knowledge segment, a preliminary structured query language statement matching the design requirements information can be generated.

[0048] Unstructured text is vectorized and stored in Elasticsearch using an embedding model. A multi-layer graph index is built based on the HNSW algorithm to achieve millisecond-level semantic retrieval. Scattered domain knowledge is transformed into a structured domain model through NER three-layer parsing. Scattered domain knowledge is effectively integrated with design specifications. Natural language processing and information extraction techniques are used to transform it into standard structured domain knowledge, establishing semantic connections between requirements, code, and design, and solving the problem of scattered and difficult-to-reuse R&D knowledge.

[0049] S130. Submit the structured query language statement in the preliminary design scheme to the rule engine for compliance verification to obtain a first compliance report. Based on the first compliance report, revise the preliminary design scheme to obtain an intermediate design scheme.

[0050] The Structured Query Language (SCL) statements in this context can be understood as the SCL statements in the preliminary design that require compliance verification by the rule engine. The rule engine can be a component that separates business rules from application logic. Its core working mechanism includes three elements: rule definition, fact matching, and execution actions. By transforming technical control specifications into structured rule expressions, it automatically performs pattern matching and verification evaluation when triggered during code generation or submission. The first compliance report can be a compliance verification result document generated for the preliminary design, which may include, but is not limited to, a list of violating rules, location of problematic code, and remediation suggestions. The intermediate design can be the design scheme that has undergone compliance verification and problem correction after the preliminary design, but has not yet undergone deep optimization and final verification using a large language model.

[0051] Optionally, the structured query language statements in the preliminary design can be submitted to the rule engine for compliance verification to obtain a first compliance report. The preliminary design can then be revised based on the first compliance report to obtain an intermediate design.

[0052] Based on the above solution, optionally, submitting the structured query language statement in the preliminary design scheme to the rule engine for compliance verification to obtain a first compliance report includes: submitting the structured query language statement in the preliminary design scheme to the rule engine; through the rule engine, converting the technical control specifications into structured rule expressions, taking the code parsing result of the structured query language statement as a fact, using the structured rule expression as a matching template, performing pattern matching and condition evaluation on the fact, recording the successfully matched rules as a list of violation rules, triggering corresponding verification actions for the successfully matched rules, generating problem code location and repair suggestions; and generating the first compliance report based on the list of violation rules, problem code location and repair suggestions.

[0053] Structured rule expressions can be used to transform technical control specifications in natural language form into machine-readable, matchable, and executable rule code expressions. Code parsing results can be understood as the data results obtained after syntactic decomposition, structural analysis, and parameter extraction of structured query language statements. Facts can be understood as the parsed SQL statement code data and structural characteristics. Matching templates can be structured rule expressions used for comparison and verification. The list of violating rules can be a summary list of all structured rule expressions that successfully matched and triggered violations during the verification process. Verification actions can be the corresponding processing operations preset by the rule engine for different violating rules, such as, but not limited to, marking violations, logging, and generating remediation suggestions.

[0054] Specifically, the structured query language statements in the preliminary design can be submitted to the rule engine, which then enables automated verification under business constraints. First, the rule engine converts technical control specifications into structured rule expressions. Next, fact matching is performed, triggering real-time automated verification throughout the code generation, submission, and compilation processes. The code parsing results of the structured query language statements are used as facts, and the structured rule expressions serve as matching templates to match the fact execution patterns and evaluate the conditions, determining whether a violation condition has been triggered. Successfully matched rules are then recorded as a list of violation rules, and corresponding verification actions are triggered for each rule, generating the location of the problematic code and remediation suggestions. Finally, a first compliance report is generated based on the list of violation rules, the location of the problematic code, and the remediation suggestions. The location of the problematic code can be used to identify information such as the line number, fields, and syntax nodes of the violating statements in the violating structured rule expressions. The remediation suggestions can be code rectification and specification optimization suggestions generated by the rule engine based on the violation rules.

[0055] By using a rules engine, code quality can be automatically verified and issues can be accurately located, ensuring that the generated code conforms to coding standards and business constraints without the need for manual item-by-item checks.

[0056] S140. The original requirement context, the first knowledge fragment, the first compliance report, the intermediate design scheme, and the preset prompt word template containing the thought chain guidance instructions in the user input are sent to the large language model to drive the large language model to generate the target design scheme, and the target design scheme is verified and then output.

[0057] The original requirement context can be user-inputted requirement information, scenario descriptions, additional requirements, etc. The thought chain guidance instruction can be an instruction generated based on thought chain guidance technology. Thought chain guidance (CoT) can be a prompt word engineering technique that guides the large language model to gradually unfold the reasoning process by designing step-by-step reasoning templates in the prompt words, decomposing complex single-step reasoning into multiple intermediate reasoning steps, thereby improving the model's reasoning accuracy on complex tasks. The prompt word template can be a template containing thought chain guidance instructions, used to standardize the model's output logic. The large language model (LLM) can be a model used to integrate the reasoning structure to generate the final target design solution. The target design solution can be understood as a logically complete, compliant, and user-relevant design solution formed after optimization and iteration of the large language model.

[0058] Optionally, the user-inputted original requirement context, first knowledge fragment, first compliance report, intermediate design scheme, and preset prompt word templates containing thought chain guidance instructions can be sent to the large language model to drive the large language model to execute the three-stage thought chain reasoning and generate the target design scheme. By adopting prompt word engineering and thought chain guidance strategies, the reasoning process designed by humans is simulated, transforming vague natural language requirements into logically clear design schemes.

[0059] Optionally, using the large language model and the modified structured query language statement as the starting point, and the verification results and remediation suggestions in the first knowledge fragment and the first compliance report as reference constraints, a three-stage chain of thought reasoning is executed to generate a reasoning result containing the target structured query language statement, thereby obtaining the target design scheme and completing the accurate conversion from requirements to design scheme. The three-stage chain of thought reasoning includes: the first stage decomposing complex requirements into independently processable sub-tasks; the second stage simulating a manually designed reasoning path based on the chain of thought prompts template and gradually deriving the table structure design logic; and the third stage integrating the reasoning results of the first two stages into an executable design scheme. The target design scheme may include SQL statements, design scheme descriptions, or optimization suggestions.

[0060] The large language model can automatically convert user-input natural language requirements into SQL statements without the need for manual step-by-step transmission. This solves the problem of long conversion cycles from requirements to design, enabling a leap from manual design to intelligent generation and significantly shortening the conversion cycle.

[0061] Based on the obtained target design scheme, the target design scheme can be verified, and the final result can be output after it passes the verification.

[0062] Based on the above scheme, optionally, the step of performing verification on the target design scheme and outputting the result includes: performing a target verification operation on the target structured query language statement in the target design scheme. The target verification operation includes a syntax verification operation, a semantic verification operation, and a specification verification operation. The syntax verification operation includes checking whether the syntax of the target structured query language statement conforms to the target database specification. The semantic verification operation includes verifying whether there is ambiguity or conflict in the table name and field name. The specification verification operation includes checking whether the table name, field name, and index name conform to the technical control specification by comparing with the platform naming specification.

[0063] The target Structured Query Language (SMQ) statement can be the SQL statement to be validated in the target design scheme. The target validation operation can be a validation operation performed on the target design scheme.

[0064] Optionally, target validation operations can be performed on the target structured query language statements in the target design scheme. These target validation operations include at least several types of operations such as syntax validation, semantic validation, and canonical validation.

[0065] Specifically, the target structured query language (SCL) statements can be subjected to syntax validation to check if their syntax conforms to the target database specifications. Next, semantic validation can be performed to verify whether table names and field names are ambiguous or conflicting. Finally, a specification validation can be performed to check whether table names, field names, and index names comply with platform naming conventions. Once all the above validations pass, the final target design scheme can be output. The target database specifications may include, but are not limited to, the syntax and writing standards corresponding to the target database. Table name ambiguity can be understood as semantic ambiguity, unclear reference, or identification conflicts caused by duplicate table names. Field name conflicts can be understood as duplicate field names, naming conflicts, or semantic contradictions within the same or related data tables. Index naming can be understood as the naming rules and final naming results for database indexes.

[0066] Optionally, after the target design scheme is verified, the target design scheme can be sent to the user, and the operation data of this interaction can be fed back to the vector knowledge base to trigger incremental updates, drive the model to continuously iterate and optimize, and form a closed loop of execution-feedback-optimization.

[0067] Optionally, based on the above scheme, the method further includes: responding to the intent category including recommended design templates, using the design requirement information as query input, performing a vector knowledge base retrieval to obtain historical design templates semantically related to the design requirement information, and displaying the historical design templates as target design templates.

[0068] The target design template can be a historical design template that is semantically related to the design requirement information and retrieved based on the design requirement information.

[0069] Specifically, in response to intent categories including recommended design templates, design requirement information can be used as query input. The design requirement information is vectorized and matched with a vector knowledge base to obtain historical design templates that are semantically related to the design requirement information. These historical design templates are then displayed as target design templates.

[0070] Optionally, a design engineer agent can be built based on the Spring Artificial Intelligence (SpringAI) multi-model adaptation platform and combined with a vector knowledge base to empower business operations. This agent is used for the design and implementation of database table structures. Through the SpringAI multi-model adaptation platform, the agent can flexibly schedule different large language models to cope with complex database design tasks, and leverage the vector knowledge base to ensure the compliance and reusability of the design solution.

[0071] Specifically, the design engineer agent can extract design requirement information and parameter entities from user input, perform intent recognition on the user input to obtain intent categories, generate design solutions in response to intent categories, and then retrieve vector knowledge bases based on design requirement information to obtain first knowledge fragments semantically related to the design requirement information. The design requirement information is then parsed to form a structured requirement knowledge graph. Based on the requirement knowledge graph and the first knowledge fragments, a preliminary design solution matching the design requirement information is generated, achieving efficient and intelligent transformation from user requirements to design solutions. The SpringAI framework is an AI application development framework based on the Spring ecosystem. Through standardized interfaces such as Chat Client, Embedding Client, and Vector Store, it can encapsulate the underlying implementations of different AI models and vector knowledge bases, enabling developers to quickly build AI applications using Spring's familiar programming patterns.

[0072] The technical solution of this invention firstly involves receiving user input, extracting design requirement information and parameter entities from the user input, and performing intent recognition on the user input to obtain an intent category. The user input is either a natural language requirement description or a requirement document. Based on the user input, the design requirement information, parameter entities, and intent category are obtained, providing a data foundation and processing direction for subsequent design scheme generation. Next, in response to the intent category including generating a design scheme, a vector knowledge base is retrieved based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information. The design requirement information is parsed to form a structured requirement knowledge graph. A preliminary design scheme matching the design requirement information is generated based on the requirement knowledge graph and the first knowledge fragment. Accurate matching of semantically related contextual knowledge fragments based on the vector knowledge base enables efficient reuse of historical data. Accurate understanding of user intent based on context, and generation of a requirement knowledge graph based on design requirement information, enable detailed analysis and understanding of design requirements. This results in a preliminary design scheme that not only meets design requirements but also ensures the rationality and professionalism of the design scheme through contextual knowledge fragments. Then… The process involves submitting the structured query language statements in the preliminary design scheme to a rule engine for compliance verification, obtaining a first compliance report, and then revising the preliminary design scheme based on the first compliance report to obtain an intermediate design scheme. The rule engine enables automated code quality verification and precise problem localization, avoiding the inefficiencies and oversights of manual review. This results in the output of the first compliance report, enabling targeted revisions to the preliminary design scheme and ensuring its compliance. Finally, the process involves sending the original requirement context from the user input, the first knowledge fragment, the first compliance report, the intermediate design scheme, and a preset prompt template containing thought chain guidance instructions to a large language model. This drives the large language model to generate a target design scheme, which is then verified and output. By generating the target design scheme based on multi-source information using the large language model and constraining it to output content according to standardized and normalized reasoning logic using the prompt template containing thought chain guidance instructions, the professionalism, compliance, and logical rigor of the target design scheme are ensured. This achieves seamless integration and continuous evolution from requirement analysis to code generation, significantly improving the efficiency of target design scheme generation.

[0073] Example 2 Figure 2a This is a flowchart illustrating a design scheme processing method according to Embodiment 2 of the present invention, detailing the processing procedure where the intent category includes optimizing the design scheme. Specific implementation details can be found in the description of this embodiment. Technical features that are the same as or similar to those in the foregoing embodiments will not be repeated here. Figure 2a As shown, the method may specifically include: S210. Receive user input, extract design requirement information and parameter entities from the user input, and perform intent recognition on the user input to obtain intent category, wherein the user input is a natural language requirement description or requirement document.

[0074] S220. In response to the intent category including an optimized design scheme, obtain the design scheme to be optimized, use the structured query language statement in the design scheme to be optimized as the query input, retrieve the vector knowledge base to obtain a second knowledge fragment related to the design scheme to be optimized, and submit the design scheme to be optimized to the rule engine to perform compliance verification to obtain a second compliance report.

[0075] The first part refers to the design scheme to be optimized, which can be a user-input design scheme that needs optimization. The second knowledge fragment can be contextual information retrieved from a vector knowledge base based on the design scheme to be optimized. The second compliance report can be a report obtained by performing compliance verification on the design scheme to be optimized, which may include a list of violation rules in the design scheme to be optimized, the location of the problematic code, and remediation suggestions.

[0076] Optionally, in response to an intent category including an optimized design scheme, the system can receive user input of the design scheme to be optimized, or determine the storage location of the design scheme to be optimized based on user input and retrieve it from that storage location. Then, using the structured query language in the design scheme to be optimized as query input, the system retrieves a vector knowledge base to obtain a second knowledge fragment related to the design scheme to be optimized. This second knowledge fragment may include relevant historical design schemes, historical code templates, interface specifications, field naming conventions, and other contextual information. Furthermore, the design scheme to be optimized can be submitted to a rules engine for compliance verification to obtain a second compliance report.

[0077] S230. Using the second knowledge fragment and the second compliance report as optimization constraints, and using a preset prompt word template containing thought chain guidance instructions as reasoning guidance, the large language model is driven to generate an optimized design scheme with the design scheme to be optimized as the optimization starting point, and the optimized design scheme is verified and output.

[0078] Optionally, the second knowledge fragment and the second compliance report can be used as optimization constraints. A preset prompt template containing thought chain guidance instructions can be used as reasoning guidance to drive the large language model to reason step-by-step, starting with the design scheme to be optimized. The optimized scheme generates an optimized design scheme, which is then validated and output. The validation operations include at least syntax validation, semantic validation, and specification validation.

[0079] The technical solution of this invention firstly obtains a design scheme to be optimized by responding to the intent category including an optimized design scheme. Using a structured query language statement from the design scheme to be optimized as query input, the vector knowledge base is searched to obtain a second knowledge fragment related to the design scheme to be optimized. The design scheme to be optimized is then submitted to the rule engine for compliance verification to obtain a second compliance report. Obtaining the second knowledge fragment provides rich reference for the optimized design scheme, and the compliance verification clarifies the direction of compliance optimization. Next, by using the second knowledge fragment and the second compliance report as optimization constraints, and using a preset prompt word template containing thought chain guidance instructions as reasoning guidance, the large language model is driven to generate an optimized design scheme starting from the design scheme to be optimized. The optimized design scheme is then verified and output. Based on the second knowledge fragment and the second compliance report as constraints, the professionalism and standardization of the optimized design scheme are ensured. The prompt word template containing thought chain guidance instructions guides the large language model to reason step by step, clearly presenting the logical deduction process of the scheme optimization, improving the rationality and interpretability of the scheme optimization, and achieving high-quality optimization of the design scheme.

[0080] Example 3 Figure 3 This is a schematic diagram of a design scheme processing device provided in Embodiment 3 of the present invention. This device is used to execute the design scheme processing method provided in any of the above embodiments. This device and the design scheme processing methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the design scheme processing device can be referred to the embodiments of the above design scheme processing methods. Figure 3 As shown, the device includes: an input module 310, a first design module 320, a second design module 330, and a third design module 340.

[0081] The system includes the following modules: an input module 310, which receives user input, extracts design requirement information and parameter entities from the user input, and performs intent recognition on the user input to obtain an intent category, wherein the user input is a natural language requirement description or requirement document; a first design module 320, which, in response to the intent category including generating a design scheme, retrieves a vector knowledge base based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information, parses the design requirement information to form a structured requirement knowledge graph, and generates a preliminary design scheme matching the design requirement information based on the requirement knowledge graph and the first knowledge fragment; a second design module 330, which submits the structured query language statement in the preliminary design scheme to a rule engine for compliance verification to obtain a first compliance report, and corrects the preliminary design scheme based on the first compliance report to obtain an intermediate design scheme; and a third design module 340, which sends the original requirement context, the first knowledge fragment, the first compliance report, the intermediate design scheme, and a preset prompt word template containing thought chain guidance instructions from the user input to a large language model, drives the large language model to generate a target design scheme, performs verification on the target design scheme, and outputs the result.

[0082] The technical solution of this invention embodiment firstly receives user input through input module 310, extracts design requirement information and parameter entities from the user input, and performs intent recognition on the user input to obtain intent categories, wherein the user input is a natural language requirement description or requirement document; based on the user input, the design requirement information, parameter entities, and intent categories are obtained, providing a data foundation and processing direction for subsequent design scheme generation; next, in response to the intent category including generating a design scheme, the first design module 320 searches a vector knowledge base based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information, parses the design requirement information to form a structured requirement knowledge graph, and generates a preliminary design scheme matching the design requirement information based on the requirement knowledge graph and the first knowledge fragment; based on the vector knowledge base, it accurately matches semantically related contextual knowledge fragments, realizes efficient reuse of historical data, accurately understands user intent based on context, and generates a requirement knowledge graph based on design requirement information, realizing detailed analysis and understanding of design requirements, thereby generating a preliminary design scheme that not only fits the design requirements but also ensures the rationality and professionalism of the design scheme through contextual knowledge fragments; then... The second design module 330 submits the structured query language statements in the preliminary design scheme to the rule engine for compliance verification, obtaining a first compliance report. Based on the first compliance report, the preliminary design scheme is revised to obtain an intermediate design scheme. The rule engine enables automated code quality verification and precise problem localization, avoiding the inefficiencies and oversights of manual review. The first compliance report is then output to provide targeted corrections to the preliminary design scheme, ensuring its compliance. Finally, the third design module 340 sends the original requirement context from the user input, the first knowledge fragment, the first compliance report, the intermediate design scheme, and a preset prompt template containing thought chain guidance instructions to the large language model. This drives the large language model to generate a target design scheme, which is then verified and output. The large language model generates the target design scheme based on multi-source information. The prompt template containing thought chain guidance instructions constrains the large language model to output content according to standardized and normalized reasoning logic, ensuring the professionalism, compliance, and logical rigor of the target design scheme. This achieves seamless integration and continuous evolution from requirement analysis to code generation, significantly improving the efficiency of target design scheme generation.

[0083] Optionally, based on the above scheme, the input module 310 includes an intent category determination submodule. The intent category determination submodule is used to convert the user input into a high-dimensional vector through an embedding model, perform cosine similarity matching between the high-dimensional vector and a preset intent classification vector library, and determine the intent category based on the matching result. The intent category includes a recommended design template, a generated design scheme, and an optimized design scheme. The recommended design template is used to match existing design templates based on the user input. The generated design scheme is used to generate structured query language statements based on the requirements of natural language description. The optimized design scheme is used to iteratively optimize existing design schemes.

[0084] Based on the above scheme, optionally, the first design module 320 includes: a traversal submodule and a knowledge fragment acquisition submodule. The traversal submodule is used to input the design requirement information into the embedding model to generate a query vector, and send the query vector to the vector retrieval engine, so that the vector retrieval engine uses a hierarchical navigation small-world algorithm to progressively traverse from the high-level to the low-level in the multi-layer graph index of the vector knowledge base. The knowledge fragment acquisition submodule is used to calculate the similarity between the query vector and the vector corresponding to the traversed candidate knowledge fragments using cosine similarity, and based on the similarity corresponding to multiple candidate knowledge fragments in the vector knowledge base, obtain multiple first knowledge fragments from the multiple candidate knowledge fragments, wherein the first knowledge fragments include historical design templates, interface specifications, field naming conventions, and technical control specifications.

[0085] Based on the above scheme, optionally, the first design module 320 includes: a first extraction submodule, a second extraction submodule, and a graph construction submodule. The first extraction submodule is used to extract business objects and business fields from the design requirement information, wherein the business objects represent the database tables to be generated, and the business fields represent the columns in the database tables to be generated, and to determine the business object to which each business field belongs; the second extraction submodule is used to identify the relationships between the business objects and to extract the constraints of the business fields, wherein the relationships include master-slave relationships, one-to-many relationships, and many-to-many relationships, and the constraints include data type constraints, length constraints, uniqueness constraints, and mandatory constraints; the graph construction submodule is used to construct a structured requirement knowledge graph based on the business objects, relationships, and constraints.

[0086] Based on the above scheme, optionally, the preliminary design scheme includes preliminary structured query language statements; the first design module 320 includes: a statement generation submodule. The statement generation submodule is used to generate preliminary structured query language statements that match the design requirement information, based on the business objects, relationships, and constraints in the requirement knowledge graph, as well as the historical design templates and technical control specifications in the first knowledge fragment.

[0087] Based on the above scheme, optionally, the second design module 330 includes: a statement submission submodule, a fact matching submodule, and a report generation submodule. The statement submission submodule is used to submit the structured query language statement from the preliminary design scheme to the rule engine; the fact matching submodule is used to convert the technical control specifications into structured rule expressions through the rule engine, take the code parsing result of the structured query language statement as a fact, use the structured rule expression as a matching template, perform pattern matching and condition evaluation on the fact, record successfully matched rules as a list of violations, trigger corresponding verification actions for successfully matched rules, and generate problem code location and repair suggestions; the report generation submodule is used to generate the first compliance report based on the list of violations, problem code location, and repair suggestions.

[0088] Based on the above scheme, optionally, the third design module 340 includes a verification submodule. The verification submodule is used to perform target verification operations on the target structured query language statement in the target design scheme. The target verification operations include syntax verification, semantic verification, and specification verification. The syntax verification operation includes checking whether the syntax of the target structured query language statement conforms to the target database specification. The semantic verification operation includes verifying whether there are ambiguities or conflicts in table names and field names. The specification verification operation includes checking whether the table names, field names, and index names conform to the technical control specifications by comparing them with the platform naming specifications.

[0089] Based on the above scheme, the device may optionally further include: a report generation module and a scheme optimization module. The report generation module is configured to, in response to the intent category including optimized design schemes, obtain a design scheme to be optimized, use a structured query language statement in the design scheme to be optimized as query input, retrieve the vector knowledge base to obtain a second knowledge fragment related to the design scheme to be optimized, and submit the design scheme to be optimized to the rule engine for compliance verification to obtain a second compliance report; The scheme optimization module is used to take the second knowledge fragment and the second compliance report as optimization constraints, use the preset prompt word template containing the thought chain guidance instruction as reasoning guidance, drive the large language model to generate an optimized design scheme with the design scheme to be optimized as the optimization starting point, and perform verification on the optimized design scheme before outputting it.

[0090] Optionally, based on the above solution, the device further includes a template query module. The template query module is configured to, in response to the intent category including recommended design templates, use the design requirement information as query input, perform a vector knowledge base retrieval to obtain historical design templates semantically related to the design requirement information, and display the historical design templates as target design templates.

[0091] The design processing apparatus provided in the embodiments of the present invention can execute the design processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0092] Example 4 Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0093] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0094] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0095] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as design scheme processing methods.

[0096] In some embodiments, the design processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the design processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the design processing method by any other suitable means (e.g., by means of firmware).

[0097] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0098] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0099] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0100] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0101] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0102] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0103] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0104] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0105] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A design scheme processing method, characterized in that, include: Receive user input, extract design requirement information and parameter entities from the user input, and perform intent recognition on the user input to obtain intent category, wherein the user input is a natural language requirement description or requirement document; In response to the intent category including generating a design scheme, the vector knowledge base is retrieved based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information. The design requirement information is parsed to form a structured requirement knowledge graph. A preliminary design scheme matching the design requirement information is generated based on the requirement knowledge graph and the first knowledge fragment. The structured query language statements in the preliminary design scheme are submitted to the rule engine for compliance verification to obtain a first compliance report. The preliminary design scheme is then modified based on the first compliance report to obtain an intermediate design scheme. The original requirement context, the first knowledge fragment, the first compliance report, the intermediate design scheme, and the preset prompt word template containing the thought chain guidance instructions are sent to the large language model to drive the large language model to generate the target design scheme. The target design scheme is then validated and output.

2. The design scheme processing method according to claim 1, characterized in that, The step of performing intent recognition on the user input to obtain the intent category includes: The user input is transformed into a high-dimensional vector through an embedding model. The high-dimensional vector is then matched with a pre-defined intent classification vector library using cosine similarity. The intent category is determined based on the matching result. The intent category includes a recommended design template, a generated design scheme, and an optimized design scheme. The recommended design template is used to match existing design templates based on the user input. The generated design scheme is used to generate structured query language statements based on the requirements of natural language description. The optimized design scheme is used to iteratively optimize existing design schemes.

3. The design scheme processing method according to claim 1, characterized in that, The step of retrieving a vector knowledge base based on the design requirement information to obtain a first knowledge fragment semantically related to the design requirement information includes: The design requirement information is input into the embedded model to generate a query vector, and the query vector is sent to the vector retrieval engine so that the vector retrieval engine adopts the hierarchical navigation small-world algorithm to progressively traverse from the high level to the low level in the multi-layer graph index of the vector knowledge base. The similarity between the query vector and the vector corresponding to the traversed candidate knowledge fragments is calculated by cosine similarity. Based on the similarity between the candidate knowledge fragments in the vector knowledge base, multiple first knowledge fragments are obtained from the candidate knowledge fragments. The first knowledge fragments include historical design templates, interface specifications, field naming conventions and technical control specifications.

4. The design scheme processing method according to claim 1, characterized in that, The process of parsing the design requirement information to form a structured requirement knowledge graph includes: Extract the business objects and business fields from the design requirements information, wherein the business objects are used to represent the database tables to be generated, and the business fields are used to represent the columns in the database tables to be generated, and determine the business objects to which each business field belongs; Identify the relationships between the business objects and extract the constraints of the business fields, wherein the relationships include master-slave relationships, one-to-many relationships, and many-to-many relationships, and the constraints include data type constraints, length constraints, uniqueness constraints, and required field constraints; Construct a structured requirement knowledge graph based on business objects, relationships, and constraints.

5. The design scheme processing method according to claim 4, characterized in that, The preliminary design scheme includes preliminary structured query language statements; the step of generating a preliminary design scheme that matches the design requirement information based on the requirement knowledge graph and the first knowledge fragment includes: Based on the business objects, relationships, and constraints in the requirement knowledge graph, as well as the historical design templates and technical control specifications in the first knowledge fragment, a preliminary structured query language statement matching the design requirement information is generated.

6. The design scheme processing method according to claim 1, characterized in that, The step of submitting the structured query language statements in the preliminary design scheme to the rule engine for compliance verification and obtaining the first compliance report includes: The structured query language statements in the preliminary design scheme are submitted to the rule engine; Through the rule engine, technical control specifications are transformed into structured rule expressions. The code parsing results of the structured query language statements are taken as facts. The structured rule expressions are used as matching templates to perform pattern matching and condition evaluation on the facts. The successfully matched rules are recorded as a list of violations. Corresponding verification actions are triggered for the successfully matched rules, and the problem code location and repair suggestions are generated. The first compliance report is generated based on the list of violation rules, the location of the problematic code, and the suggested remediation.

7. The design scheme processing method according to claim 1, characterized in that, The output after verifying the target design scheme includes: The target structured query language statement in the target design scheme is subjected to target validation operations. The target validation operations include syntax validation, semantic validation, and specification validation. The syntax validation includes checking whether the syntax of the target structured query language statement conforms to the target database specification. The semantic validation includes verifying whether there are ambiguities or conflicts in table names and field names. The specification validation includes checking whether the table names, field names, and index names conform to the technical control specifications by comparing them with the platform naming specifications.

8. The design scheme processing method according to claim 1, characterized in that, Also includes: In response to the intent category including an optimized design scheme, the system obtains the design scheme to be optimized, uses the structured query language statement in the design scheme to be optimized as the query input, retrieves the vector knowledge base to obtain a second knowledge fragment related to the design scheme to be optimized, and submits the design scheme to be optimized to the rule engine to perform compliance verification and obtain a second compliance report. Using the second knowledge fragment and the second compliance report as optimization constraints, and the preset prompt word template containing thought chain guidance instructions as reasoning guidance, the large language model is driven to generate an optimized design scheme with the design scheme to be optimized as the optimization starting point, and the optimized design scheme is verified and output.

9. The design scheme processing method according to claim 1, characterized in that, Also includes: In response to the intent category including recommended design templates, the design requirement information is used as the query input to perform a vector knowledge base retrieval to obtain historical design templates semantically related to the design requirement information, and the historical design templates are displayed as target design templates.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the design processing method as described in any one of claims 1-9.