A method, apparatus, and medium for page building

Through structured analysis of user business needs and protocol generation model, the front-end target protocol is automatically determined, which solves the problems of long construction cycle and high threshold in traditional page construction methods, and achieves efficient and low-threshold page development.

CN120010827BActive Publication Date: 2025-07-04ZHEJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510496316.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-07-04
Estimated Expiration
2045-04-21

AI Technical Summary

Technical Problem

Traditional page construction methods have long construction cycles, poor business adaptability, and lagging demand response. The disconnection between front and back ends leads to a high threshold for building personnel, which cannot meet the diversity needs of users.

Method used

By performing structured analysis of user business demand information, using pre-built business database tables and protocol generation models, the front-end target protocols are automatically determined to realize front-end page construction.

Benefits of technology

Achieve close collaboration between front and back ends, improve page development efficiency, reduce construction thresholds, meet user diversity needs, reduce repetitive work, and improve development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010827B_ABST
    Figure CN120010827B_ABST
Patent Text Reader

Abstract

The present application discloses a page building method, apparatus and medium. The method includes: performing structured parsing on the business requirement information of a user to obtain a parsing result including a data source description and a data operation type; retrieving the parsing result based on a pre-constructed business database table to obtain recall information corresponding to the business requirement information; and generating a mapping relationship between the data operation type and the HTTP request method; according to the recall information and the mapping relationship, determining the front-end and back-end target protocols corresponding to the business requirement information through a pre-trained protocol generation model, so that the front-end builds a page according to the front-end and back-end target protocols. Thus, the front-end and back-end automatically cooperate to build a page, without the need for technical communication between the front-end and back-end personnel, improving the page development efficiency. In addition, the protocol generation model quickly determines the front-end and back-end target protocols according to the parsing result, without manual design of the protocol, reducing development problems caused by unreasonable protocol design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a page building method, apparatus, and medium. Background Art

[0002] With the continuous development of Internet technology and the acceleration of digital transformation, users have higher and higher requirements for the efficiency, performance, etc. of Web page building. The traditional page building method based on manual coding has problems such as long building cycles, poor business adaptability, and lagging demand response, and it is difficult to meet the rapid iteration management needs of users.

[0003] Currently, front-end low-code building platforms improve the page building efficiency through visual interfaces and pre-built components, providing great convenience for users. However, the front-end low-code building method, although improving the building efficiency, is still quite disconnected from the server side (backend), resulting in a large amount of collaboration between front-end and back-end personnel in actual applications and a high threshold for building personnel. In addition, the front-end low-code building method is implemented based on pre-built components and cannot be dynamically adjusted according to the actual business needs of users to meet the diverse building needs of users, reducing the user experience.

[0004] Therefore, how to improve the page building efficiency, lower the building threshold, and meet the diverse building needs of users is an urgent problem for those skilled in the art to solve. Summary of the Invention

[0005] In view of this, one aspect of this application provides a page building method, and the method includes:

[0006] Obtain the business requirement information of the user;

[0007] Perform structured parsing on the business requirement information to obtain a parsing result including a data source description and a data operation type;

[0008] Based on a pre-built business database table, retrieve the parsing result to obtain recall information corresponding to the business requirement information; and generate a mapping relationship between the data operation type and the HTTP request method;

[0009] According to the recall information and the mapping relationship, determine the front-end and back-end target protocols corresponding to the business requirement information through a pre-trained protocol generation model, so that the front-end can build a page according to the front-end and back-end target protocols.

[0010] Optionally, the performing structured parsing on the business requirement information to obtain a parsing result including a data source description and a data operation type includes:

[0011] Extract the core data entities in the business requirement information to obtain the data source description;

[0012] Identify the business requirement information to obtain the data operation type;

[0013] Represent the data source description and the data operation type in a binary tuple to obtain the parsing result.

[0014] Optionally, the business database table is constructed through the following steps:

[0015] Obtain the target business data set;

[0016] Generate a semantic summary based on the target business data set to construct an initial database table; the semantic summary includes a table-level semantic summary, a field-level semantic summary, and a three-dimensional semantic description summary;

[0017] Perform vectorization calculation on the semantic summary in the initial database table; and construct the search ability of the initial database table based on the cosine similarity algorithm to obtain the business database table.

[0018] Optionally, according to the recall information and the mapping relationship, determine the front-end and back-end target protocols corresponding to the business requirement information through a pre-trained protocol generation model, including:

[0019] Inject the recall information and the mapping relationship into the Prompt engineering;

[0020] According to the pre-constructed API service code library and the Prompt engineering, generate the target API service code corresponding to the business requirement information through the target model;

[0021] Input the recall information and the target API service code into the protocol generation model to obtain the front-end and back-end target protocols.

[0022] Optionally, the protocol generation model is obtained through the following steps:

[0023] Construct an initial protocol model;

[0024] Based on the pre-constructed front-end and back-end interaction protocol standards, construct a training sample set; the training sample set includes sample input pairs and sample output pairs; the sample input pairs include sample recall information generated based on the business database table and sample API service codes generated through the target model; the sample output pairs are data that conform to the front-end and back-end interaction protocol standards;

[0025] Iteratively train the initial protocol model through the training sample set until a preset iteration condition is reached to obtain the protocol generation model.

[0026] Optionally, achieving the preset iteration condition includes:

[0027] Obtain the protocol output result of the initial protocol model training;

[0028] Determine the standardized score of the protocol output result in the specified dimension; the specified dimension includes protocol structure correctness, protocol field correctness, and protocol generation efficiency;

[0029] Obtain the current weight corresponding to each of the specified dimensions;

[0030] Determine the comprehensive score of the output result of the current iteration according to the standardized score and the current weight;

[0031] When the comprehensive score of the output result reaches the preset value, it is determined that the preset iteration condition is achieved.

[0032] Optionally, the front end builds a page according to the front-end and back-end target protocols, including:

[0033] Parse the front-end and back-end target protocols to determine the target components;

[0034] Load the target components from the pre-built component library;

[0035] Through the API interface corresponding to the target API service code, obtain the target data corresponding to the business requirement information from the business database table;

[0036] After binding the target data and the target components, perform rendering through a data-driven renderer to obtain the target page.

[0037] Another aspect of the present application provides a page building device, and the device includes:

[0038] A requirement information acquisition module, configured to acquire the business requirement information of the user;

[0039] A requirement information parsing module, configured to perform structured parsing on the business requirement information to obtain a parsing result including a data source description and a data operation type;

[0040] A retrieval module, configured to retrieve the parsing result based on a pre-built business database table to obtain the recall information corresponding to the business requirement information; and generate a mapping relationship between the data operation type and the HTTP request method;

[0041] A target protocol determination module, configured to determine the front-end and back-end target protocols corresponding to the business requirement information through a pre-trained protocol generation model according to the recall information and the mapping relationship, so that the front end builds a page according to the front-end and back-end target protocols.

[0042] Another aspect of the present application provides a page building device, including a memory and a processor. A computer program that can run on the processor is stored on the memory. When the processor executes the program, the steps of the page building method are implemented.

[0043] Another aspect of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the page building method are implemented.

[0044] The beneficial effects generated by the page building method, device and medium provided by the present application are as follows: by directly parsing the business requirement information of the user and based on the pre-constructed business database table and the pre-trained protocol generation model, the front-end and back-end target protocols are determined, so that the front-end can automatically build the page according to the front-end and back-end target protocols. The front-end and back-end cooperate closely, without the need for technical communication between the front-end and back-end personnel, improving the page development efficiency. In addition, the protocol generation model quickly determines the front-end and back-end target protocols according to the parsing result, without the need for developers to manually write interface documents and design protocol details, saving a large amount of repetitive work and reducing subsequent development problems caused by unreasonable protocol design, further improving the development efficiency. Description of the Drawings

[0045] Figure 1 It is a schematic flowchart of a page building method provided by an embodiment of the present application;

[0046] Figure 2 It is a schematic principle diagram of a page building method provided by an embodiment of the present application;

[0047] Figure 3 It is a schematic structural diagram of a page building system provided by an embodiment of the present application;

[0048] Figure 4 It is a schematic structural diagram of a page building device provided by an embodiment of the present application;

[0049] Figure 5 It is a schematic structural diagram of a page building device provided by another embodiment of the present application.

[0050] The reference numerals are as follows: 50 is the memory, 51 is the processor, 52 is the display screen, 53 is the input / output interface, 54 is the communication interface, 55 is the power supply, 56 is the communication bus, 501 is the computer program, 502 is the operating system, and 503 is the data. Detailed Embodiments

[0051] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "the", and "said" used in this application and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0052] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to a determination".

[0053] Figure 1 A flowchart diagram of a page building method provided for an embodiment of this application is as Figure 1 shown, and the method includes:

[0054] S10: Obtain the business requirement information of the user;

[0055] Figure 2 A schematic diagram of the principle of a page building method provided for an embodiment of this application is as Figure 2 shown. In a specific embodiment, in order to meet the diverse and personalized page building needs of users, page building can be carried out based on the business requirements of users.

[0056] In a specific embodiment, the business requirement information input by the user may be in the form of text, or in the form of voice, or in the form of tables, files, etc., and this application does not make specific limitations on this. However, it should be noted that regardless of the form of the input business requirement information, it will be uniformly converted into the form of text input for subsequent parsing of the business requirement information. For example, a voice conversion module is set to convert the input voice into business requirement information in text form.

[0057] In an alternative embodiment, natural language processing technology can be used to preliminarily screen the unstructured text requirements submitted by the user, identify the key information and possible ambiguity points therein, and promptly feedback them to the user for clarification and supplementation to ensure that the obtained business requirement information can accurately reflect the user's intention.

[0058] Figure 3The following is a schematic structural diagram of a page building system provided by an embodiment of the present application. It should be noted that the page building method provided by the embodiment of the present application is described with the server, that is, the backend as the execution entity. As Figure 3 shown, in an optional embodiment, the page building system includes a front end, a server (i.e., the backend), and an agent. In a specific embodiment, the user inputs user requirement information through the front end. Further, the front end transmits the requirement information to the server for processing.

[0059] S11: Structurally analyze the business requirement information to obtain an analysis result including a data source description and a data operation type;

[0060] In a specific embodiment, after the server obtains the business requirement information input by the front-end user, it calls the business requirement analysis module in the Agent to structurally analyze the business requirement information to obtain an analysis result including a data source description and a data operation type. Among them, the data source description may include, but is not limited to, database table names, field names, and data source systems, and the data operation types include, but are not limited to, query, insert, add, update, and delete.

[0061] Specifically, in an optional embodiment, a general large model (for example, a natural language processing model) can be called to analyze the business requirement information, so as to extract an analysis result including a data source description and a data operation type. In an optional embodiment, the obtained analysis result is verified, and the analysis result is dynamically optimized to ensure the quality of the analysis result.

[0062] In an optional embodiment, the user describes the requirements in text. The business requirement analysis module, based on prompt engineering and combined with the semantic understanding ability of the general large model, deeply semantically analyzes the unstructured business requirement information to obtain an analysis result.

[0063] S12: Based on the pre-constructed business database table, retrieve the analysis result to obtain the recall information corresponding to the business requirement information; and generate a mapping relationship between the data operation type and the HTTP request method;

[0064] Further, as Figure 2 shown, based on the pre-constructed business database table, retrieve the analysis result obtained in step S11 to obtain the recall information corresponding to the user's business requirement information. Specifically, index the metadata of the pre-constructed business database table (including, but not limited to, table names, field names, field types, and field descriptions), so as to quickly locate and analyze the database tables and field information associated with the data source description in the analysis result.

[0065] Meanwhile, according to the data operation type and the design specifications of the standard Application Programming Interface (API) (e.g., RESTful API specifications), the mapping relationship between the data operation type and the HTTP request method is automatically generated. For example, the query operation corresponds to the GET request, the addition operation corresponds to the POST request, and the mandatory field verification logic is included in the POST request. The modification operation corresponds to the PUT request, the primary key ID and the modified fields are associated in the PUT request, the deletion operation corresponds to the DELETE request, and the permission verification logic is included in the DELETE request.

[0066] S13: According to the recall information and the mapping relationship, a pre-trained protocol generation model is used to determine the front-end and back-end target protocols corresponding to the business requirement information, so that the front-end can build the page according to the front-end and back-end target protocols.

[0067] Furthermore, in an optional embodiment, based on the retrieved recall information and the automatically generated mapping relationship, a pre-trained protocol generation model is used to determine the front-end and back-end target protocols corresponding to the requirement information, that is, to determine the front-end and back-end protocols that can be used for the current user requirements.

[0068] In an optional embodiment, the pre-trained protocol generation model can be trained based on a large amount of historical project data and industry best practices, including different types of page functions, business processes, data interaction modes, etc. By continuously collecting new project data and user feedback, the model is regularly updated and optimized to better adapt to the changing business requirements and technological trends.

[0069] After determining the front-end and back-end target protocols, as Figure 3 shown, combining the characteristics of the front-end and the back-end, the protocol instance generation module in the Agent is called to generate a compatible code template and sample code, further simplifying the development process, reducing the development difficulty, and accelerating the page online speed. Specifically, the front-end retrieves the target components based on the front-end and back-end target protocols for rendering, thereby realizing page building.

[0070] In an optional embodiment, after building the page for the user requirements, a performance monitoring tool can be deployed to monitor the performance metrics such as the page loading speed, response time, resource utilization rate, etc. in real time, and potential performance bottlenecks can be discovered in a timely manner. At the same time, according to the performance monitoring data, the page is optimized. For example, the loading order of the front-end code is optimized, images and static resources are compressed, the back-end database query statements are adjusted, etc., to ensure that the page can still maintain good performance in complex scenarios such as high-concurrency access.

[0071] In another alternative embodiment, a user feedback channel can be established. For example, a feedback button can be set on the page, or a user satisfaction questionnaire can be sent regularly to collect opinions and suggestions from users on aspects such as page functions and user experience. Based on the user feedback, the business requirement information is re-evaluated and adjusted, and a new round of requirement analysis, protocol generation, and page optimization processes are initiated to form a continuous improvement loop, continuously improving the quality of the page and user satisfaction.

[0072] Thus, the page building method provided by the embodiments of the present application directly analyzes the business requirement information of users, and based on the pre-constructed business database table and the pre-trained protocol generation model, determines the front-end and back-end target protocols, so that the front-end can automatically build the page according to the front-end and back-end target protocols. The front-end and back-end cooperate closely, without the need for technical communication between front-end and back-end personnel, improving the page development efficiency. In addition, the protocol generation model quickly determines the front-end and back-end target protocols according to the analysis results, without the need for developers to manually write interface documents and design protocol details, saving a large amount of repetitive work and reducing subsequent development problems caused by unreasonable protocol design, further improving the development efficiency.

[0073] In an alternative embodiment, the business requirement information is structurally analyzed to obtain an analysis result including a data source description and a data operation type, including:

[0074] Extract the core data entities in the business requirement information to obtain the data source description;

[0075] Identify the business requirement information to obtain the data operation type;

[0076] Represent the data source description and the data operation type in a binary tuple to obtain the analysis result.

[0077] In a specific embodiment, the core data entities in the business requirement information are extracted. For example, "employee information" is extracted to obtain the data source description, that is, business entity recognition is realized. At the same time, the business requirement information is identified to obtain the data operation type. For example, the data operation type is "query operation".

[0078] Furthermore, the data source description and the data operation type are represented in a binary tuple, that is, <data source description, data operation type>, so as to obtain a structured semantic unit, that is, a structured analysis result.

[0079] Based on the above embodiments, as an alternative embodiment, the business database table is constructed through the following steps:

[0080] Obtain the target business data set;

[0081] Generate semantic summaries based on the target business dataset to construct an initial database table; the semantic summaries include table-level semantic summaries, field-level semantic summaries, and three-dimensional semantic description summaries;

[0082] Perform vectorization calculations on the semantic summaries in the initial database table; and based on the cosine similarity algorithm, construct the search ability of the initial database table to obtain the business database table.

[0083] In a specific embodiment, when constructing the business database table, first obtain the target business dataset. It should be noted that the business database table can be updated according to different business requirements to meet the page building requirements of different businesses.

[0084] Furthermore, generate semantic summaries based on the obtained target business dataset. Specifically, in an alternative embodiment, natural language processing technology of a general large model combined with a double verification mechanism of manual annotation can be used to generate semantic summaries for relational business database tables, where the semantic summaries include table-level semantic summaries, field-level semantic summaries, and three-dimensional semantic description summaries.

[0085] Specifically, extract metadata such as table names, primary keys, and foreign keys to construct a table-level description, that is, construct a table-level semantic summary. Perform semantic annotation on the field names, data types, constraint conditions, etc. of each field to obtain a field-level semantic summary. Furthermore, generate a three-dimensional semantic description including the table function description, the business meaning of the fields, and the association relationship between the table function description and the business meaning of the fields, that is, obtain a three-dimensional semantic description summary. Thus, construct the primary database table through the table-level semantic summary, field-level semantic summary, and three-dimensional semantic description summary.

[0086] Furthermore, as Figure 3 shown, vectorize the semantic summaries, that is, perform vectorization calculations on the semantic summaries in the initial database table. Specifically, in an alternative embodiment, the Aliyun-opensearchEmbedding text vectorization technology can be used to perform vectorization calculations on the semantic summaries in the initial database table. During the calculation process, split and construct the table-level basic information vector of the initial database table and multiple vector descriptions of the field-level information of each field of the table.

[0087] Meanwhile, based on the cosine similarity algorithm, the search ability of the initial database table is constructed to obtain the business database table. Specifically, multi-level retrieval matching is implemented based on the cosine similarity algorithm. First, table-level rough screening is performed, and candidate tables are recalled through table-level semantic vector matching. Further, field-level fine screening is carried out. Specifically, secondary matching is performed using field-level semantic vectors. For example, the query function of the requirements document needs to be able to modify "query employees under 30 years old". Through table-level retrieval, the "employee information table" is recalled, and the "age" field is located through field-level retrieval, and accurate retrieval conditions are combined to generate an intelligent mapping from business requirements to data entities.

[0088] In an alternative embodiment, the calculated summary vector can be stored. Specifically, vectorized storage of database table data can be performed through vector databases such as Opeanseacrh.

[0089] Correspondingly, based on the construction of the business database table in the embodiment of the present application, as an alternative embodiment, based on the pre-constructed business database table, the parsing result is retrieved to obtain the recall information corresponding to the business requirement information. Specifically, based on the multi-level vector retrieval system of the business database table, table-level semantic matching is performed. Specifically, table-level vectorized descriptions are matched through the cosine similarity algorithm (which can include but is not limited to metadata such as table names, primary keys, and foreign keys). At the same time, field-level semantic matching is performed. Specifically, fine-grained semantic alignment is performed for the data fields in the requirements (such as field names, data types, and business meanings).

[0090] As an alternative embodiment, according to the recall information and the mapping relationship, the front-end and back-end target protocols corresponding to the business requirement information are determined through a pre-trained protocol generation model, including:

[0091] Inject the recall information and the mapping relationship into the Prompt engineering;

[0092] According to the pre-constructed API service code library and Prompt engineering, the target API service code corresponding to the business requirement information is generated through the target model;

[0093] The recall information and the target API service code are input into the protocol generation model to obtain the front-end and back-end target protocols.

[0094] In a specific embodiment, small sample examples of the code knowledge base are injected into the prompt (Prompt), and the recall information retrieved in the above embodiment and the automatically generated mapping relationship are injected into the pre-constructed Prompt engineering. Further Figure 3The target API service code generation model shown above generates the target API service code corresponding to the business requirement information by calling the target model from the general model library according to the pre-constructed API service code library and Prompt engineering. Among them, the target model can be a large language model, which is not limited in this application. As Figure 3 shown, further, input the recall information and the target API service code into the protocol generation model, and the front-end and back-end target protocols can be obtained.

[0095] As Figure 2 shown, after parsing the business requirement information to obtain the recall information and the mapping relationship, combine the API service code library to generate the target API service code. The target API service code combines the front-end and back-end interaction protocol standards to determine the front-end and back-end target protocols.

[0096] In an alternative embodiment, the construction of the API service code library covers the code knowledge system of the entire life cycle of data operations. This API service code library is based on the Spring framework, vertically integrating the RESTful API design specification, data persistence operation standard, and framework layering architecture (including the interface layer, service layer, and DAO layer). Based on the mapping relationship between the data operation types and HTTP request methods obtained from the above embodiment, combined with the Spring Data JPA specification, a structured API service code library is formed. This API service code library includes reusable code snippets such as standard interface definitions, general exception handling, and data verification rules.

[0097] In an alternative embodiment, a domain-specific API service code library is constructed through the Retrieval-Augmented Generation (RAG) technical architecture. Specifically, the initially constructed API service code library is retrieved and enhanced by recalling code templates that match the operation type through cosine similarity.

[0098] On this basis, in a specific embodiment, the recall result is semantically aligned with the fragments of the target API service code for multi-modal input fusion to generate the front-end and back-end target protocols that conform to the Spring framework specification. The generated front-end and back-end target protocols are deployed on the server side to form a RESTful API service layer including logics such as data verification and permission control for the front-end to call.

[0099] In an alternative embodiment, the protocol generation model is obtained through the following steps:

[0100] Construct an initial protocol model;

[0101] Construct a training sample set based on a pre - constructed front - end and back - end interaction protocol standard; the training sample set includes sample input pairs and sample output pairs; the sample input pairs include sample recall information generated based on business database tables and sample API service codes generated by a target model; the sample output pairs are data that conform to the front - end and back - end interaction protocol standard.

[0102] Use the training sample set to iteratively train the initial protocol model until a preset iteration condition is met to obtain a protocol generation model.

[0103] In a specific embodiment, due to the originality of the protocol itself, when generating the corresponding end - to - end interaction protocol based on a large model, the capabilities of general models are insufficient. In an alternative embodiment, through the SFT mode, a model with the ability to generate JSON - formatted data is preferentially selected to train the protocol generation module, thereby realizing the personalized generation ability of data - driven protocols.

[0104] First, prepare the training sample set. Specifically, based on a pre - constructed standardized front - end and back - end interaction protocol standard, batch - construct a training sample set including sample input pairs and sample output pairs. Among them, the sample input pairs include sample recall information (including data tables, data fields, data operations, etc.) generated based on business database tables and sample API service codes generated by a target model. The sample output pairs are data that conform to the front - end and back - end interaction protocol standard, that is, front - end and back - end interaction protocol JSON - formatted data that conforms to the protocol specification. In an alternative embodiment, automated annotation can be used to generate a basic protocol through a template and then corrected manually to construct a high - quality training sample set.

[0105] In an alternative embodiment, the training sample set can be divided into a training set and a test set in a preset proportion. For example, an 80% training set and a 20% test set. Use the training set to iteratively train the initially constructed initial protocol model, and use the test set to test and optimize the performance of the trained model.

[0106] When optimizing the trained model, first perform domain - adaptation pre - training. The API documentation and JSONSchema can be used to train the model to understand the protocol structure. Then use SFT supervised fine - tuning, focusing on optimizing the learning rate and the number of training epochs, and gradually optimize the front - end and back - end protocol generation effect. Thus, a protocol generation model is obtained.

[0107] In an alternative embodiment, based on the data - driven idea, design Figure 2 the front - end and back - end interaction protocol standard based on business metadata as shown, to realize the front - end page display based on background data. Specifically, the front - end and back - end interaction protocol standard includes the overall page layout protocol. For example, the page layout protocol for the query - list (Query - List) type page is:

[0108] {title: 'Page Name',

[0109] queryFields: ['Field 1', 'Field 2'],

[0110] tableToolbars: ['Query'],

[0111] tableColumns: ['Field 1', 'Field 2']}

[0112] The overall layout protocol of this page includes the standardized definitions of page title, query condition configuration, operation toolbar, and table column information. Among them, title is the page name, queryFields are the query conditions, tableToolbars are the operation types, and tableColumns are the list information.

[0113] The front-end and back-end interaction protocol standard includes the protocol specification for query conditions. In a specific embodiment, a metadata description protocol for query fields is established, and the queryFields query condition protocol is as follows:

[0114] { type:'string', name: 'Field ID', title: 'Field Description', 'x-component':'multiInput'}

[0115] The protocol specification for query conditions includes metadata information such as data type definition, field identifier, business description, and front-end component mapping. multiInput is the component information.

[0116] The front-end and back-end interaction protocol standard includes defining the complete protocol structure of operations, that is, the interaction behavior protocol specification. For example, the query operation protocol: {"type": "search", "x-component": "button / / Component information", "children": [{"apiUrl": http:Target API service code, "label": "Query", "name": "search", "params": {"defaultParams": {"Field 1", "Field 2"}}}]}, and this query operation protocol includes key elements such as operation type identifier, component type, associated API interface, and parameter binding.

[0117] The front-end and back-end interaction protocol standard also includes a protocol mapping mechanism for establishing intelligent mapping rules between database fields and front-end components. By automatically matching the corresponding components (input / select / datePicker) based on the field type (string / number / date) and generating data verification rules in combination with field constraint conditions (required / unique).

[0118] Based on the above embodiments, as an alternative embodiment, meeting the preset iteration conditions includes:

[0119] Obtaining the protocol output result of the initial protocol model training;

[0120] Determining the standardized score of the protocol output result in a specified dimension; the specified dimension includes protocol structure correctness, protocol field correctness, and protocol generation efficiency;

[0121] Obtaining the current weight corresponding to each specified dimension;

[0122] Determining the comprehensive score of the output result of the current iteration according to the standardized score and the current weight;

[0123] When the comprehensive score of the output result reaches the preset value, it is determined that the preset iteration condition is met.

[0124] In a specific embodiment, the initial protocol model is iteratively trained through a training sample set. When it is determined that the preset iterative training is reached, in an alternative embodiment, when the preset iteration times are reached, it is determined that the preset iteration condition is met.

[0125] In another alternative embodiment, the comprehensive score of the output result of the model is calculated, and it is evaluated whether the preset iteration condition is met according to the comprehensive score result. Specifically, the protocol output result of the initial protocol model training is obtained, and the protocol output result is evaluated in three dimensions: protocol structure correctness, protocol field correctness, and protocol generation efficiency.

[0126] In an alternative embodiment, the linear weighted synthesis method is adopted in combination with the dynamic weight adjustment mechanism to determine the standardized score of the protocol output result in the specified dimension. Specifically, the standardized score is determined according to formula (1):

[0127] (1)

[0128] Wherein, is the standardized score, is the original score in the specified dimension, is the minimum value of all scores in the corresponding specified dimension, is the maximum value of all scores in the corresponding specified dimension. Among them, the standardized score The value range of is between 0 and 1, that is,

[0129] Further, obtain the current weights corresponding to each specified dimension, and determine the comprehensive score of the output result of the current iteration according to the standardized score and the current weights. Specifically, the weights of different specified dimensions are and , in an optional embodiment, the weight corresponding to the correctness of the protocol field is greater than the weight corresponding to the correctness of the protocol structure, and the weight corresponding to the correctness of the protocol structure is greater than the weight corresponding to the protocol generation efficiency. For example, the weight corresponding to the correctness of the protocol structure is 0.3, the weight corresponding to the correctness of the protocol field is 0.6, and the weight corresponding to the protocol generation efficiency is 0.1.

[0130] Further, calculate the comprehensive score of the output result of the current iteration according to formula (2):

[0131] (2)

[0132] where is the comprehensive score of the output result. In a specific embodiment, when the comprehensive score of the output result is greater than or equal to the preset value, it is determined that the preset iteration condition is reached. For example, when , it is determined that the iterative training reaches the preset iteration condition.

[0133] In an optional embodiment, the trained protocol generation model is tested and deployed, and during the running process, the training data is updated regularly, and the model is continuously retrained and optimized. Further, as Figure 3 shown, the trained protocol generation model is uniformly managed and called by the Agent to complete the end-to-end private protocol generation subsequently.

[0134] As an optional embodiment, the front end builds a page according to the front-end and back-end target protocols, including:

[0135] Parse the front-end and back-end target protocols to determine the target components;

[0136] Load the target components from the pre-built component library;

[0137] Through the API interface corresponding to the target API service code, obtain the target data corresponding to the business requirement information from the business database table;

[0138] After binding the target data and the target components, render through the data-driven renderer to obtain the target page.

[0139] First of all, it should be noted that the process of front-end page rendering is described in this application embodiment with the front end as the execution subject. In a specific embodiment, asFigure 3 As shown, the data-driven renderer is driven through the standardized interaction protocol JSON format. When the business application initializes the page, it dynamically obtains the generated front-end and back-end target protocols, and parses the metadata such as page layout, query conditions, and table column configurations in the front-end and back-end target protocols, so as to determine the target components that can meet the user's needs currently.

[0140] Furthermore, the automatic mapping and rendering of page elements are realized based on the pre-built component library. Specifically, according to the component types (such as MultiInput, DatePicker, etc.) and parameter configurations defined in the protocol, the target components are loaded from the pre-built component library.

[0141] At the same time, through the API interface corresponding to the target API service code, the target data corresponding to the business requirement information is obtained from the business database table, and the target data is dynamically bound to the target components to realize the real-time rendering and update of the data, thereby obtaining the target page. At this time, as Figure 3 shown, the built target page is displayed to the user through the front end.

[0142] Thus, the page building method provided by the embodiments of the present application realizes the automatic generation of the target API service code, the automatic determination of the front-end and back-end target protocols, and the automatic loading of the target components based on the user's business requirements, improves the development efficiency, reduces the development threshold, and thus enhances the user's page building experience.

[0143] In the above embodiments, the page building method is described in detail. The present application also provides an embodiment corresponding to a page building device.

[0144] Figure 4 As shown in the structural schematic diagram of a page building device provided by the embodiments of the present application, as Figure 4 shown, the device includes:

[0145] A requirement information acquisition module 40, configured to acquire the business requirement information of the user;

[0146] A requirement information parsing module 41, configured to perform structured parsing on the business requirement information to obtain a parsing result including a data source description and a data operation type;

[0147] A retrieval module 42, configured to retrieve the parsing result based on the pre-built business database table to obtain the recall information corresponding to the business requirement information; and generate a mapping relationship between the data operation type and the HTTP request method;

[0148] A target protocol determination module 43, configured to determine the front-end and back-end target protocols corresponding to the service requirement information according to the recall information and the mapping relationship through a pre-trained protocol generation model, so that the front-end can build a page according to the front-end and back-end target protocols.

[0149] In addition, the page building device provided by the embodiment of the present application further includes:

[0150] A core data entity extraction module, configured to extract the core data entities in the service requirement information to obtain a data source description;

[0151] A requirement information recognition module, configured to recognize the service requirement information to obtain a data operation type;

[0152] A binary tuple representation module, configured to represent the data source description and the data operation type in a binary tuple to obtain an analysis result.

[0153] A service data set acquisition module, configured to acquire a target service data set;

[0154] A semantic summary generation module, configured to generate a semantic summary according to the target service data set to construct an initial database table; the semantic summary includes a table-level semantic summary, a field-level semantic summary, and a three-dimensional semantic description summary;

[0155] A vectorization calculation module, configured to perform vectorization calculation on the semantic summary in the initial database table; and construct the search ability of the initial database table based on the cosine similarity algorithm to obtain a service database table.

[0156] An injection module, configured to inject the recall information and the mapping relationship into the Prompt project;

[0157] An API service code generation module, configured to generate the target API service code corresponding to the service requirement information through a target model according to a pre-constructed API service code library and the Prompt project;

[0158] A front-end and back-end target protocol determination module, configured to input the recall information and the target API service code into a protocol generation model to obtain the front-end and back-end target protocols.

[0159] An initial protocol model construction module, configured to construct an initial protocol model;

[0160] A training sample set construction module, configured to construct a training sample set based on a pre-constructed front-end and back-end interaction protocol standard; the training sample set includes sample input pairs and sample output pairs; the sample input pairs include sample recall information generated based on the service database table and sample API service codes generated through the target model; the sample output pairs are data that conform to the front-end and back-end interaction protocol standard;

[0161] An iterative training module for iteratively training an initial protocol model through a training sample set until a preset iteration condition is reached to obtain a protocol generation model.

[0162] A protocol output result acquisition module for acquiring the protocol output result of the initial protocol model training;

[0163] Determine the standardized score of the protocol output result in the specified dimension; the specified dimension includes protocol structure correctness, protocol field correctness, and protocol generation efficiency;

[0164] A weight acquisition module for acquiring the current weight corresponding to each specified dimension;

[0165] A comprehensive score determination module for determining the comprehensive score of the output result of the current iteration according to the standardized score and the current weight;

[0166] A preset condition determination module for determining that the preset iteration condition is reached when the comprehensive score of the output result reaches the preset value.

[0167] A target component determination module for parsing the front-end and back-end target protocols to determine the target components;

[0168] A target component loading module for loading the target components from a pre-built component library;

[0169] A target data acquisition module for acquiring the target data corresponding to the business requirement information from the business database table through the API interface corresponding to the target API service code;

[0170] A rendering module for rendering the target data and the target components after binding through a data-driven renderer to obtain a target page.

[0171] Figure 5 The structural schematic diagram of a page building device provided by another embodiment of the present application is as Figure 5 shown. The page building device includes: a memory 50 for storing a computer program;

[0172] A processor 51 for implementing the steps of the page building method mentioned in the above embodiment when executing the computer program.

[0173] The page building device provided in this embodiment may include but is not limited to a laptop computer or a desktop computer, etc.

[0174] Among them, the processor 51 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 51 may be implemented in at least one hardware form of a digital signal processor (DSP for short), a field-programmable gate array (FPGA for short), or a programmable logic array (PLA for short). The processor 51 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the central processing unit (CPU for short); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 51 may be integrated with a graphics processing unit (GPU for short), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 51 may further include an artificial intelligence (AI for short) processor, and the AI processor is used to process computational operations related to machine learning.

[0175] The memory 50 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 50 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 50 is at least used to store the following computer program 501. After the computer program is loaded and executed by the processor 51, it can implement the relevant steps of the page building method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 50 may also include an operating system 502 and data 503, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 502 may include Windows, Unix, Linux, etc. The data 503 may include, but is not limited to, relevant data involved in the page building method.

[0176] In some embodiments, the page building device may further include a display screen 52, an input / output interface 53, a communication interface 54, a power supply 55, and a communication bus 56.

[0177] Those skilled in the art can understand that Figure 5 the structure shown in

[0178] The page building device provided by the embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the page building method in the above embodiment.

[0179] It should be noted that although the operations are depicted in a specific order in the drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all of the illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of the various system modules and components in the above embodiments should not be construed as required in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

Claims

1. A page building method, characterized in that, The method includes: Obtain the business requirement information of the user; Perform structured parsing on the business requirement information to obtain a parsing result including a data source description and a data operation type; Based on the pre-constructed business database table, retrieve the parsing result to obtain the recall information corresponding to the business requirement information; and generate a mapping relationship between the data operation type and the HTTP request method; the recall information is the database table and field information in the business database table associated with the data source description; According to the recall information and the mapping relationship, determine the front-end and back-end target protocols corresponding to the business requirement information through a pre-trained protocol generation model, so that the front-end can build a page according to the front-end and back-end target protocols; The front-end builds a page according to the front-end and back-end target protocols, including: Parse the front-end and back-end target protocols to determine the target components; Load the target components from the pre-constructed component library; Through the API interface corresponding to the target API service code, obtain the target data corresponding to the business requirement information from the business database table; After binding the target data and the target components, perform rendering through a data-driven renderer to obtain a target page.

2. The page building method according to claim 1, wherein The performing structured parsing on the business requirement information to obtain a parsing result including a data source description and a data operation type includes: Extract the core data entities in the business requirement information to obtain the data source description; Identify the business requirement information to obtain the data operation type; Represent the data source description and the data operation type in a binary tuple to obtain the parsing result.

3. The page building method according to claim 1, wherein The business database table is constructed through the following steps: Obtain the target business data set; Generate a semantic summary according to the target business data set to construct an initial database table; the semantic summary includes a table-level semantic summary, a field-level semantic summary, and a three-dimensional semantic description summary; Perform vectorization calculation on the semantic summary in the initial database table; and based on the cosine similarity algorithm, construct the search ability of the initial database table to obtain the business database table.

4. The page building method according to claim 1, wherein According to the recall information and the mapping relationship, determining the front-end and back-end target protocols corresponding to the business requirement information through a pre-trained protocol generation model includes: Inject the recall information and the mapping relationship into the Prompt project; According to the pre-constructed API service code library and the Prompt project, generate the target API service code corresponding to the business requirement information through the target model; Input the recall information and the target API service code into the protocol generation model to obtain the front-end and back-end target protocols.

5. The page building method according to claim 4, wherein, The protocol generation model is obtained through the following steps: Construct an initial protocol model; Construct a training sample set based on a pre - constructed front - end and back - end interaction protocol standard; the training sample set includes sample input pairs and sample output pairs; the sample input pairs include sample recall information generated based on the business database table and sample API service code generated by the target model; the sample output pairs are data that conform to the front - end and back - end interaction protocol standard. Use the training sample set to iteratively train the initial protocol model until a preset iteration condition is reached, so as to obtain the protocol generation model.

6. The page building method according to claim 5, wherein Reaching the preset iteration condition includes: Obtain the protocol output result of the initial protocol model training. Determine the standardized score of the protocol output result in a specified dimension; the specified dimension includes protocol structure correctness, protocol field correctness, and protocol generation efficiency. Obtain the current weight corresponding to each of the specified dimensions. Based on the standardized score and the current weight, determine the comprehensive score of the output result of the current iteration. When the comprehensive score of the output result reaches a preset value, it is determined that the preset iteration condition is reached.

7. A page building device, characterized in that, The device includes: A requirement information acquisition module, used to acquire the business requirement information of the user. A requirement information parsing module, used to perform structured parsing on the business requirement information to obtain a parsing result including a data source description and a data operation type. A retrieval module, used to retrieve the parsing result based on a pre - constructed business database table to obtain the recall information corresponding to the business requirement information; and generate a mapping relationship between the data operation type and the HTTP request method; the recall information is the database table and field information in the business database table associated with the data source description. A target protocol determination module, used to determine the front - end and back - end target protocol corresponding to the business requirement information through a pre - trained protocol generation model according to the recall information and the mapping relationship, so that the front - end can build a page according to the front - end and back - end target protocol. A target component determination module, used to parse the front - end and back - end target protocol to determine the target component. A target component loading module, used to load the target component from a pre - constructed component library. A target data acquisition module, used to obtain the target data corresponding to the business requirement information from the business database table through the API interface corresponding to the target API service code. A rendering module, used to bind the target data and the target component and then perform rendering through a data - driven renderer to obtain a target page.

8. A page building device, comprising a memory and a processor, wherein a computer program capable of running on the processor is stored on the memory, characterized in that, When the processor executes the program, it implements the steps of the page building method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the page building method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Display object generation method and system, electronic equipment and storage medium

    CN118733169A

  • Application construction method and system, medium and electronic equipment

    CN119127150A