Product prototype identification and code automatic generation system based on AI large model and RAG
By using an AI-based large model and RAG-based product prototype identification and automatic code generation system, the problems of insufficient retrieval efficiency and accuracy and insufficient multimodal analysis capabilities of existing RAG systems have been solved. This system achieves efficient and accurate automatic code generation and knowledge accumulation, thereby improving software development efficiency and standardization.
Patent Information
- Application Number
- CN202511171879.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2026-01-09
AI Technical Summary
Existing technologies for product prototype identification and automatic code generation suffer from limitations in the efficiency and accuracy of RAG system retrieval, insufficient data preprocessing quality, inadequate multimodal analysis capabilities, redundant generated code or code that does not conform to industry best practices, poor generalization ability, and poor maintainability.
The system employs an AI-based large-scale model and RAG-based product prototype identification and automatic code generation system, which includes a product prototype intelligent identification and semantic parsing module, a project private knowledge base and RAG retrieval module, a database table structure automatic generation module, a basic code automatic generation module, and an interactive modification and optimization module. It analyzes product prototypes through a multimodal large-scale model, builds a project private knowledge base, automatically generates database table structures and basic code, and provides interactive modification and optimization.
It significantly improves the accuracy and engineering adaptability of generated code, reduces the time investment of developers, promotes close collaboration between programmers and the system, accelerates the project integration process of new members, realizes knowledge accumulation and efficient reuse, and promotes the intelligent and efficient transformation of the software development industry.
Smart Images

Figure CN121300761A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software engineering technology, specifically to a product prototype identification and automatic code generation system based on AI large models and RAG. Background Technology
[0002] In recent years, the combination of natural language processing capabilities based on large AI models and retrieval-enhanced generation (RAG) technology has provided a new technical path for product prototype identification and automatic code generation. Large AI models, trained on massive amounts of data, possess semantic understanding capabilities capable of parsing key information in user requirement descriptions; while RAG technology, through dynamic retrieval from external knowledge bases, provides domain-specific and precise knowledge support for model generation. This combination of technologies enables deep fusion analysis of multimodal data (such as textual requirements, design sketches, and interaction logic) in product prototype identification, and, in the code generation stage, combines semantic retrieval from project-level code repositories to improve the accuracy and engineering adaptability of generated code. For example, project-level RAG technology, through indexing and semantic understanding of the entire code repository, significantly reduces the illusion problem of large models, greatly improving the matching degree between generated code and actual development requirements.
[0003] However, current technologies still face a series of challenges in practical applications. First, the retrieval efficiency and accuracy of RAG systems are limited by the quality of data preprocessing and index structure design. Common problems include missing key documents, document integration exceeding contextual limitations, and difficulties in data extraction from complex PDF documents. Second, large models still suffer from the "illusion" phenomenon when processing complex business logic, and the generated code may contain redundant logic or not conform to industry best practices, requiring developers to invest extra effort in correction and optimization. Furthermore, existing tools lack the ability to fuse and analyze text, images, and interactive data in multimodal prototype recognition scenarios, making it difficult to achieve end-to-end automation from prototype design to code generation. Simultaneously, the high dependence of traditional methods on labeled data limits the model's generalization ability in new domains or specific demand scenarios, and the generated code has poor maintainability, increasing subsequent iteration costs. To address these issues, we propose a product prototype recognition and automatic code generation system based on AI large models and RAG. Summary of the Invention
[0004] To address the aforementioned technical challenges, this solution provides a product prototype recognition and automatic code generation system based on AI large-scale models and RAG. This technical solution resolves the problems of RAG system retrieval being limited by preprocessing and indexing, easily missing key documents, hypercontext, or difficulty in extracting complex PDFs; large-scale models having illusions when handling complex business, resulting in redundant code or code that does not conform to best practices; insufficient multimodal recognition fusion, difficulty in full-link automation, and reliance on labeled data, leading to poor generalization and maintainability.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A product prototype recognition and automatic code generation system based on AI large-scale models and RAG, including: The product prototype intelligent recognition and semantic parsing module uses a multimodal large model to receive and parse product prototypes to extract key semantic information; The project's private knowledge base and RAG retrieval module are used to build and manage the project's private knowledge base. Through retrieval enhancement generation technology, relevant knowledge fragments are retrieved based on the query content to enhance the context. The database table structure automatic generation module automatically generates database table structure definitions based on semantic parsing results and the context provided by RAG, and includes conflict detection and optimization mechanisms. The basic code automatic generation module automatically generates multi-layer architecture basic code based on database table structure definition, semantic parsing results and RAG-provided context, ensuring compliance with project specifications. The interactive modification and optimization module provides a user interface for programmers to review, modify, and optimize the generated results, and feeds back the modifications to the system to optimize the model and knowledge base.
[0006] Preferably, the product prototype intelligent recognition and semantic parsing module includes: The input interface receives graphical prototypes and text prototypes. The graphical prototypes include UI / UX design files, image files of hand-drawn sketches, and screenshots. The text prototypes include product requirement documents, user stories, and function descriptions. The multimodal large model performs image recognition on the graphical prototype to parse interface elements and layout relationships, performs natural language processing on the text prototype to parse business logic and entity descriptions, and achieves correlation analysis by aligning graphic and text features through attention-based cross-modal fusion technology. The key information extraction unit extracts entities, attributes, relationships between entities, and business processes from the analysis results. The semantic standardization unit transforms the extracted information into a structured intermediate representation that includes an entity-attribute mapping table and an entity relationship graph.
[0007] Preferably, the project's private knowledge base and RAG retrieval module include: The knowledge base building unit collects historical code repositories, database schemas, and internal documents. The data processing unit converts knowledge base content into vector representations through an embedding model. The code snippets are vectorized after extracting an abstract syntax tree and generating sequences based on the features of the syntax tree nodes. The intelligent retrieval unit converts the query content into a vector and retrieves knowledge fragments by calculating semantic similarity and combining metadata tag matching. The context enhancement unit sorts the search results by relevance and then concatenates them to form an enhanced context. Through a feedback loop mechanism, the accuracy of the generated results is used as a supervision signal to dynamically adjust the vector search weights or update the search strategy.
[0008] Preferably, the database table structure automatic generation module includes: The input processing unit receives the structured intermediate representation of semantic parsing and the database schema provided by RAG; The model reasoning unit identifies relationships between entities based on input and references historical design cases provided by RAG. The structure generation unit generates a table structure definition that includes table names, field names, data types, and constraints. The optimization unit identifies design conflicts in the table structure, including foreign key errors, missing intermediate tables in many-to-many relationships, redundant fields, and performance bottlenecks, and outputs optimization suggestions.
[0009] Preferably, the basic code automated generation module includes: The code input unit receives the table structure definition, semantically parsed interface element information, and historical code provided by RAG; The code generation unit generates multi-layered architecture code. The backend code includes error handling logic implemented using exception handling middleware, and the frontend code includes API-based data binding logic. Standardize the verification unit and compare the code specifications retrieved by RAG using static code analysis tools; The document generation unit adds comments to the code and generates data flow documentation.
[0010] Preferably, the processing of the graphical prototype by the multimodal large model includes: Analyze the layer structure and component attribute parameters of UI / UX design drafts; Interface components based on hand-drawn sketches are identified using edge detection and deep learning models. Entity recognition and relation extraction techniques are used to locate business entities in the text prototype. When there are discrepancies between the results of image and text analysis, the explicit description of the original text should be used for correction.
[0011] Preferably, the data processing unit performs: Natural language documents are split into short paragraphs based on semantic integrity and then vectorized separately. Extract an abstract syntax tree from the code snippet and generate a serialized representation based on the features of the syntax tree nodes, then vectorize it; The vector database uses an index structure that supports efficient retrieval and is equipped with a regular update mechanism.
[0012] Preferably, when the model reasoning unit determines the relationship between entities: Set a unique constraint from the foreign key in the table for a one-to-one relationship; For one-to-many relationships, set a foreign key with a prefix identifier in the "many" side table; Create an intermediate table for many-to-many relationships, with the primary keys of the two entities serving as foreign keys; When multiple feasible solutions that conform to database design specifications exist, the mapping method consistent with historical design cases should be given priority.
[0013] Preferably, the backend API interface generated by the code generation unit includes: The request method and path parameters containing resource identifiers are selected based on the type of business operation. The request body parameters, which include data validation rules, and the response body structure, which includes status codes; The logic for handling parameter validation failures and database errors is implemented through an exception handling middleware.
[0014] Preferably, the interactive modification and optimization module includes: The interface display unit uses tables to show table structure fields and syntax highlighting to display the code. Modify the operation unit to support editing table structure fields and code logic; The feedback learning unit converts the modified differences into training samples, which are used to fine-tune the parameters of the large model generated by the code, forming a closed-loop optimization mechanism.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: The product prototype identification and automatic code generation system proposed in this invention intelligently analyzes product prototypes and automatically generates database table structures and basic code that conform to project specifications. This significantly reduces the time programmers spend on requirements understanding, database design, and basic coding. Utilizing the understanding and generation capabilities of AI large-scale models, combined with the precise knowledge retrieval of RAG technology, the system effectively solves the problems of knowledge silos and consistency in traditional development processes, ensuring the accuracy and engineering adaptability of generated code. Through interactive modification and optimization mechanisms, it promotes close collaboration between programmers and the system, accelerates the project integration process for new members, and achieves knowledge accumulation and efficient reuse. This provides strong support for the intelligent and efficient transformation of the software development industry and promotes the overall improvement of the industry's technical level. Attached Figure Description
[0016] Figure 1 This is a system module diagram of the present invention; Figure 2 This is a system workflow diagram of the present invention. Detailed Implementation
[0017] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.
[0018] Reference Figure 1 As shown, the product prototype recognition and automatic code generation system based on AI large model and RAG has the core goal of deeply integrating cutting-edge multimodal understanding capabilities and retrieval enhancement generation technology to realize the automated and intelligent conversion process from product design prototype to runnable basic code, significantly improving software development efficiency and ensuring consistency with project specifications.
[0019] The entire process begins with the intelligent product prototype recognition and semantic parsing module. This module's input interface is meticulously designed to accept a wide variety of product prototype materials from real-world development scenarios. Graphical prototypes not only include design drafts generated by professional UI / UX design tools such as Sketch or Figma, containing rich layers and metadata, but also are compatible with scanned images of hand-drawn sketches and screenshots of software interfaces commonly used in the early stages of development or rapid communication. Textual prototypes comprehensively cover structured product requirement documents, user story cards describing user goals, and relatively free functional descriptive text. This broad input compatibility ensures that the system can handle product design inputs at different stages and with varying levels of detail, closely mirroring real-world workflows. The multimodal large model, responsible for core analysis, utilizes advanced computer vision technology to deeply process graphic prototypes: For structured design files, the model deeply analyzes their layer structure and hierarchical relationships, accurately identifying and extracting the types of interface components contained within, such as buttons, input boxes, and drop-down menus, while simultaneously acquiring key attribute parameters such as their position coordinates, size, color, and text content; for hand-drawn sketches or screenshots with lower fidelity, the system uses edge detection algorithms to locate the outline boundaries of interface elements, and then combines this with a deep learning image classification model pre-trained on a large amount of interface data to identify the specific category of the component. This combined strategy effectively overcomes the recognition challenges posed by the blurriness and irregularity of informal prototype images. For text prototype processing, relying on powerful natural language processing capabilities, the system uses a named entity recognition model to accurately locate the business entity objects described in the text, such as "user," "product," and "order," and uses a relation extraction model to analyze the semantic relationships between these entities, such as "user creates order" or "product belongs to category," and uses techniques such as dependency parsing to understand the logical steps and operational sequence of the business process. To bridge the semantic gap between image and text information, the system employs attention-based cross-modal fusion techniques, such as a visual-language attention model architecture. This dynamically calculates the association weights between image region feature vectors and text word feature vectors, achieving precise alignment and deep association analysis of image and text features. For example, it performs strong semantic association matching between the visual feature of the "submit button" in a specific area of the design drawing and the textual description of "the confirmation operation after the user completes the form" in the requirement text. From the above fusion analysis results, the key information extraction unit systematically extracts the core entity objects that form the foundation of the system, the specific attribute fields of each entity, the various relationship types between entities, and key business process steps.To ensure that downstream modules can process this information efficiently and consistently, the semantic standardization unit is responsible for converting this extracted information into a highly structured intermediate representation. This includes a clear entity-attribute mapping table, whose structure is similar to database field definitions, listing in detail the entity name, attribute name, and expected data type; and an entity relationship graph, where nodes clearly represent entities and labeled edges represent the relationship type and direction between entities. This standardized data structure lays a unified and reliable data foundation for subsequent database design and code generation.
[0020] The project's private knowledge base and RAG retrieval module constitute the core knowledge engine for the system's intelligence. The knowledge base construction unit is responsible for systematically collecting and integrating the project's proprietary knowledge assets, including code repositories from historical version control systems, database schema definition files, API interface documents, and internal technical specifications and design decision documents. The data processing unit performs refined preprocessing on this diverse and structurally varied data: for natural language documents, such as design documents or API descriptions, the system breaks them down into logically coherent short paragraphs based on semantic integrity, typically with 2 to 3 sentences per semantic unit, as short text is easier to match precisely in vector space; for code snippets, the processing is more complex. First, a parser extracts the abstract syntax tree (AST), then, by traversing the AST nodes, structural features such as node type, identifier name, and key expressions are preserved, serializing it into a string sequence that represents the code structure and semantics. All preprocessed text paragraphs and code serialization representations are then converted into high-dimensional vector representations using a high-performance text embedding model. These vectors are stored in a dedicated vector database designed to support efficient approximate nearest neighbor search, and an optimized index structure is built to accelerate large-scale retrieval. To maintain the timeliness and accuracy of the knowledge base content, the system employs a strict, periodic update mechanism, such as daily or weekly incremental index rebuilding, to ensure that newly added project knowledge can be retrieved promptly. The intelligent retrieval unit first converts user- or system-generated queries into query vectors. Then, it calculates the cosine similarity score between the query vector and all knowledge fragment vectors in the high-dimensional space of the vector database. Simultaneously, it performs a weighted matching degree calculation based on the metadata tags of the knowledge fragments, selecting the most semantically relevant fragments. The context enhancement unit then sorts these fragments in descending order based on the calculated relevance, selecting the most relevant fragments and combining them to form enhanced contextual hints. The system also embeds a crucial feedback loop mechanism. When the results of code generation or design generation are subsequently verified as correct or contain errors, this verification signal is used to dynamically adjust the weight configuration of vector retrieval. For example, it can increase the retrieval priority of specific document types or code modules, or trigger updates to the retrieval strategy when necessary, such as increasing the preference weight for specific team naming conventions. This forms a continuously reinforcing closed loop where knowledge utilization and optimization mutually promote each other.
[0021] The database table structure automatic generation module intelligently generates optimized database schema designs using structured semantic information and enhanced retrieval contextual knowledge provided upstream. The input processing unit receives structured intermediate representations from the semantic parsing module and relevant historical database schema examples retrieved by RAG as important references. Based on these inputs and in conjunction with database design specifications, the model inference unit analyzes and determines the specific technical implementation of entity relationship mapping: For a one-to-one relationship between two entities, such as the relationship between a user and their profile, the system sets a foreign key field in the user profile table pointing to the primary key of the user table, and adds a unique constraint to this field to ensure a strict single-instance association; for a one-to-many relationship, such as a user having multiple orders, the system creates a foreign key field in the order table representing the "many" side, pointing to the primary key of the user table, and uses a naming convention with association prefixes to improve the readability and maintainability of field names; for complex many-to-many relationships, such as the association between products and orders, the system automatically creates a dedicated intermediate table, using the primary keys of both entities as foreign key fields in this intermediate table and combining them to form the primary key, while also allowing the addition of fields describing association attributes, such as the quantity of products. When multiple feasible design solutions conforming to database design paradigms exist, the system prioritizes the mapping method consistent with historical design cases retrieved by RAG. This ensures that the newly generated schema can seamlessly integrate into the project's existing database environment, reducing integration friction. The structure generation unit ultimately outputs complete and executable table structure definition statements, including table names conforming to project naming conventions, all field names, precise data type definitions, primary / foreign key constraints, necessary indexes, and default value settings. The optimization unit incorporates a static analysis engine for conflict detection and performance prediction: it can identify potential design flaws, such as foreign key circular references that may cause operational deadlocks, missing many-to-many relationship intermediate tables, redundant fields with duplicate definitions, and factors that may cause future performance bottlenecks, such as frequently used query fields without indexes or poorly designed fields storing excessively long text. The detection results include specific optimization suggestions, such as explicitly stating "add an index to the user ID field in the order table" or "split product descriptions into a separate details table to optimize storage," providing valuable reference for developers' final decisions.
[0022] The automated code generation module is responsible for transforming the database schema and product semantics into multi-layered architectural foundation code that conforms to project specifications. The code input unit integrates table structure definitions, UI element binding information obtained from semantic parsing, and relevant historical code snippets retrieved by RAG as generation templates and specification sources. Based on this, the code generation unit generates clearly structured layered code: In the backend Controller layer, API interface code strictly adheres to RESTful design principles. The request method for each interface is precisely selected based on business operation semantics, and resource identifiers are explicitly included in the path parameters. The request body parameter definitions include specific data validation rule annotations. The response body structure includes standard HTTP status codes. Crucially, the system generates and integrates a global exception handling middleware to uniformly handle common exceptions, such as automatically returning structured error messages when client-submitted parameter validation fails, or returning appropriate server-side error responses when database operations encounter exceptions. This centralized error handling mechanism greatly improves the robustness and maintainability of the generated code. In the frontend, based on the parsed UI element information, the corresponding framework component code skeleton is generated, and API call and data binding logic is integrated, such as using an HTTP library to initiate requests and mapping response data to component states or properties. The code style verification unit integrates industry-standard static code analysis tools and loads project-specific coding style configurations retrieved from RAG to automatically check the generated code for style and potential issues, ensuring that the code style is strictly consistent with team practices. The documentation generation unit automatically adds compliant comments to key functions and methods and, based on the generated API paths and entity relationship models, automatically generates sequence diagrams describing the core data flow process of the system, improving the project's understandability and maintainability.
[0023] The interactive modification and optimization module is a crucial element in ensuring the system output meets final development requirements and serves as a bridge for continuous learning and evolution. The interface display unit presents the generated database table structure in an intuitive, editable table format, allowing developers to clearly view and modify the definition of each field. The generated code is displayed through an editor that supports syntax highlighting and code folding, improving the efficiency of code review. The modification operation unit grants developers full control, allowing them to directly edit any details of the table structure or adjust the business logic implementation of the code. At its core is the feedback learning unit: any modifications made by developers to the generated results are precisely captured by the system. The system uses a difference comparison algorithm to calculate the specific differences between the initial generated version and the developer's modified version. These differences, along with the original input that triggered the generation and the RAG retrieval context, are carefully constructed by the system as training samples. These samples are used to periodically fine-tune the system's large code generation model, for example, by employing efficient fine-tuning techniques, enabling the model to gradually learn and adapt to the team's specific coding style, design preferences, and subtle differences in the business domain, thus forming a closed-loop optimization mechanism that continuously improves output quality and increasingly aligns with actual project needs.
[0024] refer to Figure 2 As shown, the workflow of the above system is as follows: The product prototype intelligent recognition module receives multimodal inputs such as UI design drafts, hand-drawn sketches, and requirement documents. The multimodal large model parses interface elements and business logic, aligns text and image information through cross-modal fusion, extracts entity attributes and relationship graphs, and outputs them in a standardized manner. The RAG module retrieves relevant code and schema from the project's private knowledge base: the knowledge base serializes the code AST into vectors and stores them; the intelligent retrieval unit integrates semantic similarity and metadata matching to obtain knowledge fragments, forming an enhanced context. The database generation module combines the semantic parsing results with the RAG context to automatically construct the table structure (including relationship mapping rules such as foreign key constraints and intermediate tables), and outputs an optimized schema after conflict detection. The code generation module generates layered architecture code based on this: the backend integrates RESTful interfaces and global exception handling middleware, the frontend implements API data binding, and static analysis ensures compliance with specifications. Developers review the modification results in the interactive interface, and the system automatically captures optimization differences for fine-tuning the generated model, forming a closed-loop optimization.
[0025] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A product prototype recognition and automatic code generation system based on AI large-scale models and RAG, characterized in that, include: The product prototype intelligent recognition and semantic parsing module uses a multimodal large model to receive and parse product prototypes to extract key semantic information; The project's private knowledge base and RAG retrieval module are used to build and manage the project's private knowledge base. Through retrieval enhancement generation technology, relevant knowledge fragments are retrieved based on the query content to enhance the context. The database table structure automatic generation module automatically generates database table structure definitions based on semantic parsing results and the context provided by RAG, including conflict detection and optimization mechanisms; The basic code automatic generation module automatically generates multi-layer architecture basic code based on database table structure definitions, semantic parsing results, and the context provided by RAG. The interactive modification and optimization module provides a user interface for programmers to review, modify, and optimize the generated results, and feeds back the modifications to the system to optimize the model and knowledge base.
2. The product prototype recognition and automatic code generation system based on AI large model and RAG as described in claim 1, characterized in that, The product prototype intelligent recognition and semantic parsing module includes: The input interface receives graphical prototypes and text prototypes. The graphical prototypes include UI / UX design files, image files of hand-drawn sketches, and screenshots. The text prototypes include product requirement documents, user stories, and function descriptions. The multimodal large model performs image recognition on the graphical prototype to parse interface elements and layout relationships, performs natural language processing on the text prototype to parse business logic and entity descriptions, and achieves correlation analysis by aligning graphic and text features through attention-based cross-modal fusion technology. The key information extraction unit extracts entities, attributes, relationships between entities, and business processes from the analysis results. The semantic standardization unit transforms the extracted information into a structured intermediate representation that includes an entity-attribute mapping table and an entity relationship graph.
3. The product prototype recognition and automatic code generation system based on AI large model and RAG as described in claim 1, characterized in that, The project's private knowledge base and RAG retrieval module include: The knowledge base building unit collects historical code repositories, database schemas, and internal documents. The data processing unit converts knowledge base content into vector representations through an embedding model. The code snippets are vectorized after extracting an abstract syntax tree and generating sequences based on the features of the syntax tree nodes. The intelligent retrieval unit converts the query content into a vector and retrieves knowledge fragments by calculating semantic similarity and combining metadata tag matching. The context enhancement unit sorts the search results by relevance and then concatenates them to form an enhanced context. Through a feedback loop mechanism, the accuracy of the generated results is used as a supervision signal to dynamically adjust the vector search weights or update the search strategy.
4. The product prototype recognition and automatic code generation system based on AI large model and RAG according to claim 2, characterized in that, The database table structure automatic generation module includes: The input processing unit receives the structured intermediate representation of semantic parsing and the database schema provided by RAG; The model reasoning unit identifies relationships between entities based on input and references historical design cases provided by RAG. The structure generation unit generates a table structure definition that includes table names, field names, data types, and constraints. The optimization unit identifies design conflicts in the table structure, including foreign key errors, missing intermediate tables in many-to-many relationships, redundant fields, and performance bottlenecks, and outputs optimization suggestions.
5. The product prototype recognition and automatic code generation system based on AI large model and RAG according to claim 1, characterized in that, The basic code automated generation module includes: The code input unit receives the table structure definition, semantically parsed interface element information, and historical code provided by RAG; The code generation unit generates multi-layered architecture code. The backend code includes error handling logic implemented using exception handling middleware, and the frontend code includes API-based data binding logic. Standardize the verification unit and compare the code specifications retrieved by RAG using static code analysis tools; The document generation unit adds comments to the code and generates data flow documentation.
6. The product prototype recognition and automatic code generation system based on AI large model and RAG according to claim 2, characterized in that, The processing of the graphical prototype by the multimodal large model includes: Analyze the layer structure and component attribute parameters of UI / UX design drafts; Interface components based on hand-drawn sketches are identified using edge detection and deep learning models. Entity recognition and relation extraction techniques are used to locate business entities in the text prototype. When there are discrepancies between the results of image and text analysis, the explicit description of the original text should be used for correction.
7. The product prototype recognition and automatic code generation system based on AI large model and RAG according to claim 3, characterized in that, The data processing unit performs: Natural language documents are split into short paragraphs based on semantic integrity and then vectorized separately. Extract an abstract syntax tree from the code snippet and generate a serialized representation based on the features of the syntax tree nodes, then vectorize it; The vector database uses an index structure that supports efficient retrieval and is equipped with a regular update mechanism.
8. The product prototype recognition and automatic code generation system based on AI large model and RAG according to claim 4, characterized in that, When the model reasoning unit determines the relationships between entities: Set a unique constraint from the foreign key in the table for a one-to-one relationship; For one-to-many relationships, set a foreign key with a prefix identifier in the "many" side table; Create an intermediate table for many-to-many relationships, with the primary keys of the two entities serving as foreign keys; When multiple feasible solutions that conform to database design specifications exist, the mapping method consistent with historical design cases should be given priority.
9. The product prototype recognition and automatic code generation system based on AI large model and RAG according to claim 5, characterized in that, The backend API interfaces generated by the code generation unit include: The request method and path parameters containing resource identifiers are selected based on the type of business operation. The request body parameters, which include data validation rules, and the response body structure, which includes status codes; The logic for handling parameter validation failures and database errors is implemented through an exception handling middleware.
10. The product prototype recognition and automatic code generation system based on AI large model and RAG according to claim 1, characterized in that, The interactive modification and optimization module includes: The interface display unit uses tables to show table structure fields and syntax highlighting to display the code. Modify the operation unit to support editing table structure fields and code logic; The feedback learning unit converts the modified differences into training samples, which are used to fine-tune the parameters of the large model generated by the code, forming a closed-loop optimization mechanism.