Method for intelligently generating back-end interface of large language model based on dynamic data updating
Through the method of intelligently generating back-end interfaces based on dynamic data update, problems such as long development cycle and insufficient intelligent support in the existing technology are solved, and fast and intelligent interface development is achieved, which improves development efficiency and quality.
Patent Information
- Application Number
- CN202411777915.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-15
AI Technical Summary
The existing back-end interface development technology has problems such as long development cycle, low demand resolution efficiency, insufficient intelligent support, weak dynamic adaptability and insufficient data resources, which is difficult to meet the needs of rapid iteration of modern software systems.
A method for intelligently generating back-end interfaces based on dynamic data update is proposed. By collecting and cleaning historical data, building a dynamic knowledge base, using the large language model to analyze natural language requirements, generate interface metadata, and automatically generate interface prototypes through low-code platforms for verification.
It realizes rapid analysis of natural language requirements, generates high-quality interface metadata, reduces manual participation and development cycles, improves the system's ability to adapt to complex needs and the accuracy of generated results, supports full-process automation, and improves development efficiency and quality.
Smart Images

Figure CN119829659A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method for intelligently generating a backend interface based on a large language model with dynamic data updates. Background Art
[0002] With the rapid development of the Internet and software technology, the design and development of back-end interfaces have become a key link in the construction of modern software systems. The back-end interface is responsible for data exchange and business logic processing between different systems or components, and its development quality has an important impact on the stability and scalability of the software system. However, in the face of increasingly complex and diversified needs, the existing back-end interface development methods still have many technical bottlenecks and challenges, which urgently need to be broken through and improved.
[0003] First, the traditional back-end interface development method generally has the problem of long development cycles. Developers need to manually write interface documents, define data structures, implement interface functions, and test and optimize in the subsequent stages. This process is not only time-consuming and labor-intensive, but also prone to further prolonging the development cycle when requirements change frequently, affecting the overall progress of the project.
[0004] Secondly, the current interface development model is inefficient in terms of requirements analysis. Users usually put forward requirements in the form of unstructured natural language, and developers need to manually analyze these requirements and convert them into specific interface design solutions. This method relies on manual understanding, is inefficient, and is prone to inconsistencies between requirements and final implementation due to misunderstandings, thereby increasing the cost of rework and correction.
[0005] In addition, existing technologies are also insufficient in terms of intelligent support for interface development. Although some auxiliary development tools can help generate interfaces, they rely on developers to provide detailed design inputs and are unable to independently analyze user needs and generate interface definitions. This limitation makes it difficult for the development process to fully utilize automation and intelligent technologies, greatly limiting the improvement of development efficiency.
[0006] Insufficient dynamic adaptability is also one of the outstanding shortcomings of existing interface development technology. In scenarios where requirements frequently change or are added, developers often need to repeatedly adjust interface design and implementation. This repetitive work not only increases the development burden, but may also introduce new errors due to omissions in the adjustment process, reducing system stability and development efficiency.
[0007] In terms of data resource utilization, although many development teams have accumulated a large amount of data resources in historical projects, such as interface design documents and user feedback, these data are usually stored in a scattered manner and lack systematic management and mining methods. Therefore, historical data cannot be fully utilized to provide reference and support for the development of new interfaces, resulting in a waste of resources.
[0008] In addition, although the low-code development platform has improved development efficiency to a certain extent, its support for complex interfaces is still insufficient. Especially in scenarios involving complex business logic or multi-dimensional data interaction, developers still need to manually intervene to complete the design and implementation of the interface, which limits the actual application scope of the low-code platform and reduces its potential for efficiency improvement.
[0009] In summary, the existing backend interface development technology has significant deficiencies in efficiency, intelligence, dynamic adaptability, and resource utilization. These problems are particularly prominent in a dynamically changing demand environment, and there is an urgent need for an intelligent solution that can break through these technical bottlenecks to improve development efficiency and quality and meet the needs of rapid iteration of modern software systems. Summary of the invention
[0010] In order to solve the above problems in the prior art, the present invention proposes a method for intelligently generating a backend interface based on a large language model with dynamic data update, which is characterized by comprising the following steps:
[0011] Step 1: Collect and clean historical data, extract interface historical data and store it in a structured database;
[0012] Step 2: Import historical data from the structured database into the knowledge base through the index structure and real-time synchronization mechanism; monitor new user needs and changes in the latest training data in real time through the dynamic data update module, and dynamically update the knowledge base content; and dynamically adjust the index weight and data recommendation strategy based on user behavior and interaction history based on the knowledge base adaptive module;
[0013] Step 3: Preprocess the data in the dynamic knowledge base to generate training sets, validation sets, and test sets, load and train the large language model, and fine-tune the model based on the task data;
[0014] Step 4: Use the large language model to parse natural language requirements, identify user intent and key entities, and generate interface metadata based on context understanding capabilities and domain knowledge base reasoning;
[0015] Step 5: Syntax check the generated interface metadata and optimize it based on the dynamic knowledge base;
[0016] Step 6: Import the generated interface metadata into the low-code prototype builder for functional verification.
[0017] The step 1 includes extracting historical data related to the backend interface from interface design documents, API call logs and user feedback records.
[0018] The dynamic data update module in the dynamic knowledge base captures new user requirements and changes in the latest training data through a listener mechanism, and dynamically determines the update order using a real-time synchronization priority calculation formula:
[0019] P u =λ1·S d +λ2·F c +λ3·T r
[0020] Among them, P u Represents priority, S d represents the importance score of the updated data, F c represents the update frequency, T r It represents the timeliness of demand, and λ1, λ2, and λ3 are weight adjustment coefficients.
[0021] The adjustment algorithm for dynamically adjusting the index weight is:
[0022]
[0023] Among them, W i is the final weight of the field, F i is the historical access frequency of the field, R i is the recent relevance score of the field, U i is the number of user interactions of the field, μ is the average number of interactions, and α, β, γ are adjustment coefficients.
[0024] When preprocessing data for a large language model, format conversion is used to convert the interface metadata into a structured JSON format, and training sets, validation sets, and test sets are generated to meet the model training requirements.
[0025] The fine-tuning of the large language model is based on a task-specific dataset, and the fine-tuning process includes adjusting the learning rate, batch size, and training rounds to improve the model's adaptability to specific scenarios.
[0026] The generated interface metadata includes interface name, function description, input parameters and their data types, return value format and business logic rules.
[0027] When optimizing the interface metadata, the domain specifications in the dynamic knowledge base are combined to simplify redundant fields and automatically supplement missing fields.
[0028] When the interface metadata is imported into the low-code platform, the low-code platform parses the metadata and automatically generates a visual interface prototype.
[0029] The generated interface is verified by calling simulation, load testing and user behavior matching testing to evaluate the correctness, stability and matching degree of the interface with user needs.
[0030] The present invention realizes intelligent generation of backend interfaces through a large language model based on dynamic data updates, which has the following beneficial effects:
[0031] 1. Efficiency: By combining a dynamic knowledge base with a large language model, it is able to quickly parse natural language requirements and generate interface metadata, greatly reducing manual involvement and development cycles.
[0032] 2. Intelligence: Through the dynamic data update module and the knowledge base adaptive module, the system can capture changes in user needs in real time, dynamically adjust the index weight and recommendation strategy, and improve the system's ability to adapt to complex needs and the accuracy of generated results.
[0033] 3. Standardization: Syntax verification and dynamic optimization of interface metadata are performed to ensure that the generated interface complies with domain specifications and design best practices, effectively avoiding development problems caused by non-standard definitions.
[0034] 4. Scalability: Supports automatic generation of interface prototypes and functional verification through the low-code platform, realizing full-process automation from demand analysis to interface implementation, and adapting to application needs in multiple scenarios and fields.
[0035] 5. Reliability: By verifying the correctness, stability and demand matching degree of the interface, combined with the dynamic knowledge base optimization strategy, the generated interface can accurately meet user needs and has high stability and practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application, but do not constitute an improper limitation of the present invention. In the drawings:
[0037] Figure 1 A flow chart of the method of the present invention is shown. DETAILED DESCRIPTION
[0038] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments, wherein the exemplary embodiments and descriptions are only used to explain the present invention, but are not intended to limit the present invention. Figure 1 As shown, the method of intelligently generating a backend interface based on a large language model with dynamic data update of the present invention includes the following contents:
[0039] Step 1: Collect historical data and clean and summarize
[0040] This embodiment provides a specific implementation method for collecting historical data and cleaning and summarizing it, which is used to provide a reliable data basis for subsequent back-end interface generation. The following are detailed technical implementation steps and methods:
[0041] Determination and collection of data sources
[0042] Historical data sources include but are not limited to the following types:
[0043] Interface design document: Extract the design document from the completed project archive, focusing on the interface definition part, such as interface name, input parameters, return value, and business logic description.
[0044] API call log: Extract real call data from the call log of the backend service, including the call frequency of the interface, the actual data type of the passed parameters and its corresponding response results.
[0045] User feedback records: Collect user comments and problem records related to the interface to explore potential logical problems or optimization directions in the requirements.
[0046] The collected raw data is stored in a distributed storage system, such as HDFS or a local relational database, to ensure the scalability and reliability of data storage.
[0047] Data cleaning and normalization
[0048] Clean the collected raw data to ensure the integrity and consistency of the data, including the following technical operations:
[0049] Data deduplication: Use SQL queries or scripts to filter duplicate records in the data. For example, compare the interface name, parameter fields, and return value format, and only keep one duplicate record.
[0050] Format correction: Automatically or semi-automatically repair irregular parts of the data. For example, when field names do not comply with naming rules, they are uniformly adjusted to comply with CamelCase naming standards.
[0051] Missing field filling: Use interpolation algorithms or rule inference to fill in missing fields in the data. For example, infer the missing return value data type through existing API call logs, or generate default values based on the data features of similar interfaces.
[0052] Irrelevant data elimination: Eliminate information irrelevant to the interface metadata, such as error stack or debugging information in the log, which may interfere with subsequent analysis.
[0053] Interface metadata extraction
[0054] Extract interface metadata from the cleaned data, mainly including the following:
[0055] Interface name: Extract the unique identification name of the interface for subsequent queries and generated basic indexes.
[0056] Parameter list: Analyze the interface definition or call log to extract the name, data type and default value of the input parameter. For example, the parameter structure automatically parsed from the log record is {"userId":"int","isActive":"boolean"}.
[0057] Return value format: Extract the field structure and data type of the return value according to the interface design document or the actual call return result, such as {"status":"string","data":"object"}.
[0058] Business logic description: Use natural language processing (NLP) technology to extract the functional description of the interface from design documents or user feedback, and summarize it into retrievable text information, such as "API for querying the user's current status."
[0059] Store in structured database
[0060] The extracted interface metadata is stored in a database in a structured manner. The storage database can be a relational database (such as MySQL) or a NoSQL database (such as MongoDB). The specific storage structure design is as follows:
[0061] Table name: InterfaceMetadata
[0062] Field definition:
[0063] id: unique identifier of the interface metadata (primary key)
[0064] interface_name: interface name
[0065] parameters: parameter list stored in JSON format
[0066] return_format: return value structure stored in JSON format
[0067] description: business logic description of text type
[0068] After the data is stored, the efficiency of database queries is optimized through indexing, which facilitates quick retrieval and utilization in subsequent steps.
[0069] Through the above steps, this embodiment realizes the systematic collection, cleaning and normalization of historical data, and provides a high-quality interface metadata foundation for the subsequent dynamic knowledge base construction through structured storage. The whole process is efficient and scalable, and technical personnel can directly implement and apply it to relevant scenarios.
[0070] Step 2: Build a dynamic knowledge base
[0071] This embodiment proposes a method for building a dynamic knowledge base, based on Elasticsearch as the basic architecture, and realizes the classified storage and dynamic update of metadata by designing a reasonable index structure. At the same time, it combines innovative formulas to optimize the index weight distribution, retrieval efficiency and recommendation strategy to meet the requirements of high efficiency and real-time performance of the knowledge base in a dynamic environment.
[0072] First, the dynamic knowledge base is constructed through Elasticsearch, and a reasonable index structure is designed to classify, store and efficiently manage interface metadata. The index structure of interface metadata mainly includes the following fields: the interface name is used to quickly locate the interface, which is a string type and supports full-text search with word segmentation; the parameter list uses a nested JSON type to store input parameters and their data types, which is convenient for parsing complex parameters; the return value structure also uses a nested JSON type to store the structure and data type of the interface return value to ensure the integrity of the interface results; the function description is a text type, which supports word segmentation search, and combines weight adjustment to optimize search sorting, so that the function-related description is more in line with user search needs. In the implementation process, the batch insert API is used to load the extracted interface metadata into the Elasticsearch index, and the dynamic mapping function is used to automatically adjust the index structure according to the field type to ensure the consistency and accuracy of data storage.
[0073] A dynamic data update module is deployed in the dynamic knowledge base. The listener mechanism captures changes in user requirements and real-time updates of training data, and synchronizes the changes to the knowledge base. The listener mechanism is designed based on an event-driven framework (such as Apache Kafka or RabbitMQ), which can capture new requirements or newly generated interface metadata in real time, encapsulate them as update requests, and push them to the dynamic data update module. When processing concurrent update requests, the update order is dynamically determined by the following priority calculation formula:
[0074] P u =λ1·S d +λ2·F c +λ3·T r
[0075] Among them, S d Represents the importance score of the updated data, defined as:
[0076]
[0077] F c Indicates the update frequency, that is, the number of times the data is triggered within a certain period of time, reflecting the urgency of data update. Timeliness factor T r Defined as:
[0078]
[0079] By assigning weight coefficients λ1, λ2, and λ3 to these factors, the update priority strategy can be flexibly controlled, so that update requests with high importance, high frequency, and strong timeliness are given priority, further improving the real-time response capability of the knowledge base. Real-time synchronization operations use the _update_by_query interface of Elasticsearch to update the captured data changes to the index in real time, ensuring the immediacy and consistency of the knowledge base content.
[0080] In order to optimize the retrieval efficiency and responsiveness of the knowledge base, the dynamic index adjustment algorithm optimizes the weight and sorting of index fields through the following formula:
[0081]
[0082] Among them, W i represents the final weight of field i; F i Indicates the historical access frequency of the field, reflecting the long-term importance of the field; R i Represents the most recent relevance score of the field, generated by the latest search request; U i is the number of user interactions for the field; μ is the average number of user interactions, which is used as the benchmark value for weight adjustment; α, β, γ are adjustment coefficients. Through this formula, the exponential nonlinear adjustment mechanism is used to significantly improve the priority of high-frequency fields, while ensuring that low-frequency fields obtain basic weights, thereby avoiding retrieval performance problems caused by data sparsity. In addition, by dynamically adjusting the number of shards and replicas of Elasticsearch, the knowledge base can balance retrieval efficiency and storage performance when the amount of data increases.
[0083] An adaptive module is also deployed in the knowledge base to dynamically adjust the index weight distribution and recommendation strategy by analyzing user behavior. The adaptive module uses log analysis tools to extract user search behavior data, including search keywords, click frequency, and jump rate, to generate user behavior portraits and provide optimization basis for personalized services. In the recommendation strategy, the index field weight is dynamically adjusted based on the user behavior portrait, and the following recommendation formula is combined to improve the relevance of the search results:
[0084]
[0085] Among them, R u is the recommendation score of user u; K is the total number of contents; I uk represents the number of interactions between user u and content k; S uk represents the relevance score of content k; T c is the current time; T ukIndicates the time when content k was last interacted with; δ is the time decay factor. Through the adjustment of the time decay factor, the recommended content can dynamically balance the importance of historical interaction data while strengthening the recommendation weight of recent interaction content, so as to better adapt to the dynamic needs of users.
[0086] Through this embodiment, the constructed dynamic knowledge base realizes the efficient classification storage and real-time update of large-scale data, and significantly improves the retrieval accuracy, response speed and recommendation effect in a dynamic environment by introducing innovative formulas. Professionals in the technical field can refer to the above detailed implementation methods for designing and optimizing similar dynamic knowledge base systems.
[0087] Step 3: Perform data preprocessing, training and fine-tuning on the large language model
[0088] This embodiment details how to preprocess, train and fine-tune the data extracted from the dynamic knowledge base to build a large language model that adapts to the needs of a specific domain. The specific implementation methods include the steps of data preprocessing, parameter settings for model training, and task-specific data fine-tuning processes to improve the adaptability and domain understanding ability of the model.
[0089] First, extract a dataset related to the target task from the dynamic knowledge base. These data usually include interface metadata, user requirements, function descriptions and other information. To make these data suitable for the training requirements of the large language model, a series of preprocessing steps are required. Specifically, it includes text cleaning, annotation processing and format conversion.
[0090] Text cleaning: Text cleaning is the first step in data preprocessing, aiming to remove noise and irrelevant information to ensure the quality of the input data. Common text cleaning operations include:
[0091] Delete irrelevant special symbols or punctuation;
[0092] Unify the case format in the text;
[0093] Handle spelling mistakes and lexical inconsistencies in the text;
[0094] Remove stop words (such as "de", "he", "shi", etc.), which do not have actual semantic contributions;
[0095] Unify the digital expression in the text (for example, convert "1,000" to "1000").
[0096] Annotation processing: When processing interface metadata, annotation processing is required to ensure that the model can identify and understand specific fields. For example:
[0097] Label key information such as interface name, parameter list, and return value format so that the model can capture these features during training;
[0098] For the interface description text, extract the entities (such as interface type, parameter type, return value type, etc.) and label them to ensure that the model can understand their meaning based on the context.
[0099] Format conversion: The purpose of format conversion is to convert raw data into a structure suitable for large language model training. For example:
[0100] Convert interface metadata and description information into JSON format or structured text format for easy input into the model;
[0101] Organize the interface's input parameters, output results, description text and other information into a unified text template to ensure that different types of data can be correctly parsed during model training.
[0102] After completing data preprocessing, the next step is to load the selected large language model and train it. Model selection usually depends on the complexity of the target task and the characteristics of the data. For example, the GPT series model is a commonly used large language model that has powerful natural language understanding and generation capabilities. According to the characteristics of the dataset, you can choose an appropriate pre-trained model (such as GPT-3 or GPT-4) as the base model and fine-tune it as needed.
[0103] Loading a pre-trained large language model: After selecting and loading a large language model, you first need to initialize the model and set the key parameters for model training. Common key parameters include:
[0104] Learning Rate: controls the step size of the model weight update. Generally speaking, a lower learning rate helps stabilize the training process but increases the training time; a higher learning rate can speed up the training but may cause the model to be unstable during the training process.
[0105] Batch Size: Controls the amount of input data in each training. A larger batch size can improve training efficiency but may require more memory; a smaller batch size can reduce memory usage but may cause instability in the training process.
[0106] Epochs: refers to the number of complete iterations that the model performs on the training dataset. More epochs help improve the accuracy of the model, but also increase the training time.
[0107] In this phase, preliminary training is performed using the preprocessed dataset, during which the model’s loss function and optimization algorithm are monitored to ensure that the model can learn the patterns in the input data.
[0108] Fine-tuning of task-specific datasets: In order to make the large language model better adaptable to the needs of a specific domain, fine-tuning is needed to improve the model's adaptability. In this process, the model is fine-tuned using a task dataset for a specific scenario to further optimize its understanding and reasoning capabilities for domain-specific needs. The fine-tuning steps include:
[0109] Task definition: Define specific tasks (such as automatic interface generation, API call optimization, etc.) according to the target application scenario, and create relevant data sets for the tasks;
[0110] Preparation of fine-tuning datasets: Collect data from task-related fields, build training sets, validation sets, and test sets suitable for the task, and ensure that the data is representative and covers different scenarios;
[0111] Fine-tuning process: By continuing to train the model on task-specific datasets, the model's weights and parameters are adjusted so that it can better understand and generate task-related content. During fine-tuning, a smaller learning rate is usually used to avoid drastic changes based on what has already been learned.
[0112] Through the above steps, the large language model that has been initially trained and fine-tuned can better adapt to the needs of specific fields and improve its performance in specific tasks. For example, in the task of automatic interface generation, the fine-tuned model can accurately identify the functional requirements, parameter types, and return value types of the interface based on the user's natural language input, thereby generating high-quality interface metadata.
[0113] This embodiment ensures the adaptability and accuracy of the large language model in specific tasks through a detailed description of the data preprocessing, model training and fine-tuning process. The technical means adopted provide guarantees for the effectiveness of the large language model in domain-specific applications.
[0114] Step 4: Parse natural language requirements and generate interface metadata
[0115] This embodiment describes a method for parsing the user's natural language needs and generating interface metadata using a fine-tuned large language model. Through the powerful natural language understanding capabilities of the large language model and the domain knowledge support in the dynamic knowledge base, the user's demand intentions and key entities can be accurately identified, thereby inferring and generating complete interface metadata, providing a basis for subsequent optimization and implementation.
[0116] In the specific implementation process, the model first performs semantic analysis and intent recognition on the input data through the natural language requirements input by the user. Natural language requirements may involve functional descriptions of the interface, input parameters and their types, return value structure, business logic rules, and other content. The fine-tuned large language model uses its contextual understanding ability to identify the user's core requirements and their implicit constraints based on the semantic features of the input text. For example, for the input requirement "Create an API interface for user login, which needs to receive a username and password and return a login success or failure status", the model will identify "user login" as the core function of the interface, extract "user name" and "password" as input parameters, and infer that the format of the return value should contain status information.
[0117] During the parsing process, the large language model combines the domain knowledge in the dynamic knowledge base to further enrich and correct the parsing results. The dynamic knowledge base stores information such as interface design patterns, data type specifications, business logic examples, etc. related to the target domain, and can provide semantic guidance during model reasoning. For example, the dynamic knowledge base may contain domain knowledge such as "user name" is usually a string type and "password" fields need to be encrypted. This information can be called by the model during the reasoning process to generate an interface definition that meets the domain specifications.
[0118] Based on the parsing results, the model inference generates preliminary interface metadata. The generated metadata usually includes the following:
[0119] Interface name: The interface name is automatically generated based on the functional description of the user's requirements. It is usually a semantically clear phrase, such as "UserLoginAPI".
[0120] Functional description: Extract key requirements from user input and generate a functional description of the interface to facilitate subsequent developers to understand. For example, "API for verifying user login credentials".
[0121] Input parameters: Identify the input data in the user requirements and infer its parameter name and data type. For example, "user name" is defined as String type, and "password" is defined as encrypted String type.
[0122] Return value format: The return data structure after the inference interface is executed, usually including status code, information field or output content related to business logic. For example, the return value format may include status code (statusCode), login success information (message), etc.
[0123] In the process of generating interface metadata, the model will also combine the field specifications and industry standards in the dynamic knowledge base to perform preliminary verification of the data structure. For example, it ensures that the field names in the input parameters and return values comply with the naming rules (such as camel case naming), and the data type selection complies with general coding specifications or domain-specific requirements.
[0124] Through the above steps, the fine-tuned large language model can not only accurately parse natural language requirements, but also generate high-quality, structured interface metadata. This process significantly reduces the conversion cost between user requirements and technical implementation, and provides a solid foundation for subsequent interface metadata optimization and function implementation. This embodiment ensures the accuracy of parsing and the standardization of generated results through technical means, and can be widely used in automated interface generation and related fields.
[0125] Step 5: Generate and optimize interface metadata
[0126] This embodiment describes in detail the specific methods for verifying, optimizing and dynamically adjusting the initially generated interface metadata to ensure the overall improvement of the generated interface data in terms of structural integrity, content accuracy and generation efficiency, while enhancing its adaptability and intelligence level.
[0127] After the interface metadata is initially generated, syntax checking is first performed to ensure the integrity and consistency of the data structure. The syntax checking process includes a comprehensive check of field definitions, data types, naming rules, etc. For example, the input parameters and return value fields of the interface are parsed to check whether the parameter naming complies with the naming rules (such as camel case or underscore nomenclature), and whether the data type correctly matches user requirements and standard specifications (such as String, Integer, Boolean, etc.). In addition, it is necessary to ensure that the dependencies between fields are reasonable. For example, there should be no invalid or conflicting definitions in the parameter fields of the composite structure. Through this process, subsequent implementation problems caused by non-standard data definitions can be effectively avoided.
[0128] After completing the syntax check, the interface metadata is compared and optimized in combination with the dynamic update function of the dynamic knowledge base. The optimization process uses the domain knowledge and historical interface data stored in the dynamic knowledge base to cross-validate the generated metadata. For example, by comparing the currently generated interface metadata with the interface data of similar functions in the dynamic knowledge base, analyze whether there are redundancies, omissions or potential errors in its function description, parameter list and return value structure. Optimization also includes the merging and splitting of fields to ensure that the interface design meets both user needs and domain best practices. For example, for redundant return value fields, they can be automatically simplified through the domain specifications of the knowledge base, while for parameter fields that may be omitted, they are inferred and supplemented based on the knowledge base.
[0129] In addition, according to the specific needs and behavior patterns of users, the interface recommendation strategy is dynamically adjusted to improve the applicability and intelligence level of interface generation. User behavior data (such as demand history, search keywords, call frequency, etc.) are dynamically captured and stored in the knowledge base. By analyzing these data, the recommendation strategy is optimized. For example, for interface types in high-frequency user needs, the system gives priority to recommending similar interface structures when generating metadata; for newly proposed needs, the model combines contextual reasoning and domain specifications in the knowledge base to generate more targeted interface metadata. The dynamic adjustment of the recommendation strategy can adopt a weighted recommendation algorithm, and the weight is updated in real time according to the user's behavior characteristics to achieve more accurate generation results.
[0130] Throughout the entire process, the generation and optimization of interface metadata is highly automated and dynamically adaptable, ensuring that the standardization and efficiency of interface design are maintained while satisfying the personalized needs of users. The interface metadata finally generated can accurately reflect user needs, and the data structure is standardized and clear, and can be directly applied to the subsequent interface implementation stage. This embodiment effectively improves the quality and efficiency of interface generation through scientific verification and optimization methods, as well as intelligent adjustment of dynamic recommendation strategies, and provides technical support for the realization of automated interface design.
[0131] Step 6: Import the interface metadata into the low-code platform and complete verification
[0132] This embodiment describes in detail the specific method of importing the generated interface metadata into the low-code platform and completing verification, so as to realize the automatic generation, function verification and optimization adjustment of the interface prototype, and ensure that the finally generated back-end interface can meet user needs with high quality.
[0133] First, import the generated interface metadata into the prototype builder in the low-code platform. The low-code platform automatically generates a preliminary prototype of the interface by parsing the interface metadata, including functional modules, parameter structure, and return value format. The prototype builder uses built-in visualization tools to convert key information in the metadata (such as interface name, input parameters, return value type, etc.) into operable interface elements, which is convenient for developers to intuitively view and adjust. Through this automated process, the workload of manual code writing is greatly reduced, and the efficiency of interface development is improved.
[0134] After the interface prototype is generated, the functional verification phase begins. The focus of the verification includes the correctness and stability of the interface and the degree of matching with user requirements. The specific implementation process is as follows:
[0135] Correctness verification: By calling the generated interface, verify whether its input parameters and return values are consistent with the structure defined in the metadata. For example, check whether the interface can correctly receive and process the parameters passed in by the user, and whether the return value conforms to the expected format and data type. For complex parameter types (such as nested structures or arrays), further test their performance under boundary conditions, such as null values, overlong strings, or illegal data.
[0136] Stability verification: Verify the operational stability of the interface through high concurrency and large data volume simulation tests. For example, in the simulated concurrent user access scenario, test whether the interface can maintain normal response; in the case of large data volume input, test whether the interface can handle it correctly without timeout or crash. Stability verification is usually combined with the performance monitoring module of the low-code platform to evaluate the stability performance of the interface through log analysis and indicator statistics.
[0137] Requirements matching verification: Based on the original requirements input by the user, the generated interface functions are compared and verified to ensure that the interface's functional modules, business logic, and data processing flow are consistent with user expectations. For example, verify whether the interface fully implements the functions described by the user's requirements and whether it contains all the required parameter fields and return value content.
[0138] If the verification passes, the interface generation process is completed and enters the next stage of deployment or integration. If problems are found during the verification process, the interface metadata is adjusted based on the feedback and re-imported into the low-code platform for verification. Adjustment steps include but are not limited to modifying parameter definitions, optimizing data structures, or adjusting return value formats to better meet user needs. Stability issues during verification can be resolved by optimizing the interface implementation logic or adjusting performance parameters (such as request timeout settings, resource allocation strategies, etc.).
[0139] After each adjustment, repeat the above verification steps until the generated interface meets the requirements in terms of correctness, stability and demand matching, ensuring that the final generated backend interface is of high quality and practicality. This embodiment significantly improves the efficiency of interface development and testing by automating the process of importing interface metadata into the low-code platform and verifying it. At the same time, it ensures the high quality and reliability of the interface generation results through iterative optimization, providing a solid foundation for subsequent system integration and application.
[0140] The above description is only a preferred embodiment of the present invention, so all equivalent changes or modifications made according to the structure, characteristics and principles described in the scope of the patent application of the present invention are included in the scope of the patent application of the present invention.
Claims
1. A method for intelligently generating a backend interface based on a large language model with dynamic data updates, characterized in that: The following steps are involved: Step 1: Collect and clean historical data, extract interface historical data and store it in a structured database; Step 2: Import historical data from the structured database into the knowledge base through the index structure and real-time synchronization mechanism; monitor new user needs and changes in the latest training data in real time through the dynamic data update module, and dynamically update the knowledge base content; and dynamically adjust the index weight and data recommendation strategy based on user behavior and interaction history based on the knowledge base adaptive module; Step 3: Preprocess the data in the dynamic knowledge base to generate training sets, validation sets, and test sets, load and train the large language model, and fine-tune the model based on the task data; Step 4: Use the large language model to parse natural language requirements, identify user intent and key entities, and generate interface metadata based on context understanding capabilities and domain knowledge base reasoning; Step 5: Syntax check the generated interface metadata and optimize it based on the dynamic knowledge base; Step 6: Import the generated interface metadata into the low-code prototype builder for functional verification.
2. The method for intelligently generating a backend interface based on a large language model with dynamic data update according to claim 1, characterized in that: The step 1 includes extracting historical data related to the backend interface from interface design documents, API call logs and user feedback records.
3. The method for intelligently generating a backend interface based on a large language model with dynamic data update according to claim 1, characterized in that: The dynamic data update module in the dynamic knowledge base captures new user requirements and changes in the latest training data through a listener mechanism, and dynamically determines the update order using a real-time synchronization priority calculation formula: P u =λ1·S d +λ2·F c +λ3·T r Among them, P u Represents priority, S d represents the importance score of the updated data, F c represents the update frequency, T r It represents the timeliness of demand, and λ1, λ2, and λ3 are weight adjustment coefficients.
4. The method for intelligently generating a backend interface based on a large language model with dynamic data update according to claim 1, characterized in that: The adjustment algorithm for dynamically adjusting the index weight is: Among them, W i is the final weight of the field, F i is the historical access frequency of the field, R i is the recent relevance score of the field, U i is the number of user interactions of the field, μ is the average number of interactions, and α, β, γ are adjustment coefficients.
5. The method for intelligently generating a backend interface based on a large language model with dynamic data update according to claim 1, characterized in that: When preprocessing data for a large language model, format conversion is used to convert the interface metadata into a structured JSON format, and training sets, validation sets, and test sets are generated to meet the model training requirements.
6. The method for intelligently generating a backend interface based on a large language model with dynamic data update according to claim 1, characterized in that: The fine-tuning of the large language model is based on a task-specific dataset, and the fine-tuning process includes adjusting the learning rate, batch size, and training rounds to improve the model's adaptability to specific scenarios.
7. The method for intelligently generating a backend interface based on a large language model with dynamic data update according to claim 1, characterized in that: The generated interface metadata includes interface name, function description, input parameters and their data types, return value format and business logic rules.
8. The method for intelligently generating a backend interface based on a large language model with dynamic data update according to claim 1, characterized in that: When optimizing the interface metadata, the domain specifications in the dynamic knowledge base are combined to simplify redundant fields and automatically supplement missing fields.
9. The method for intelligently generating a backend interface based on a large language model with dynamic data update according to claim 1, characterized in that: When the interface metadata is imported into the low-code platform, the low-code platform parses the metadata and automatically generates a visual interface prototype.
10. The method for intelligently generating a backend interface based on a large language model with dynamic data update according to claim 1, characterized in that: The generated interface is verified by calling simulation, load testing and user behavior matching testing to evaluate the correctness, stability and matching degree of the interface with user needs.