Page building method and device and medium

By obtaining and structured analysis of user's business demand information, combining pre-built business database tables and protocol generation models, the front-end target protocol is determined, and the front-end automatic page building is realized, which solves the problems of low page building efficiency and high threshold in the existing technology, and improves development efficiency and user experience.

CN120010827AActive Publication Date: 2025-05-16ZHEJIANG LAB
View PDF 9 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology has problems such as long construction cycle, poor business adaptability, and lagging demand response in page construction, which is difficult to meet the management needs of users for rapid iteration. The low-code construction method of front-end is out of touch with the server, and the threshold is high, so it cannot be dynamically adjusted to meet the needs of user diversity.

Method used

By obtaining user's business requirements information, performing structured analysis, and determining the front-end target protocol based on pre-built business database tables and pre-trained protocol generation models, the front-end target protocol is realized automatically to build pages according to the protocol, and close collaboration does not require technical communication.

Benefits of technology

It improves page development efficiency, lowers development thresholds, realizes close cooperation between front and back ends, can quickly respond to users' diverse needs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010827A_ABST
    Figure CN120010827A_ABST
Patent Text Reader

Abstract

The invention discloses a page building method and device and a medium, and the method comprises the steps: carrying out the structural analysis of business demand information of a user, and obtaining an analysis result comprising data source description and a data operation type; based on a pre-constructed business database table, retrieving the analysis result to obtain recall information corresponding to the business demand information; generating a mapping relation between the data operation type and the HTTP request method; and according to the recall information and the mapping relationship, through a pre-trained protocol generation model, determining a front-end and back-end target protocol corresponding to the business demand information, so that a front end carries out page construction according to the front-end and back-end target protocol. Therefore, the front end and the rear end automatically cooperate to build the page, technical communication of front-end and rear-end personnel is not needed, and the page development efficiency is improved. Besides, the protocol generation model quickly determines the front-end and rear-end target protocols according to the analysis result, manual protocol design is not needed, and the development problem caused by unreasonable protocol design is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a page building method, device 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 and performance of web page construction. The traditional page construction method based on manual coding has problems such as long construction cycle, poor business adaptability, and delayed demand response, which makes it difficult to meet users' management needs for rapid iteration.

[0003] At present, the front-end low-code construction platform improves the efficiency of page construction through a visual interface and pre-built components, providing great convenience for users. However, although the front-end low-code construction method improves the construction efficiency, it is still disconnected from the server (back-end), resulting in a large amount of collaboration between front-end and back-end personnel in actual applications, and the threshold for builders is high. In addition, the front-end low-code construction method is based on pre-built components, and cannot be dynamically adjusted according to the actual business needs of users to meet the diverse construction needs of users, reducing the user experience.

[0004] Therefore, how to improve page building efficiency, lower the building threshold, and meet the diverse building needs of users is an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0005] In view of this, one aspect of the present application provides a page building method, the method comprising: Obtain user's business demand information; Performing structured analysis on the business demand information to obtain analysis results including data source description and data operation type; Based on the pre-built business database table, the analysis result is retrieved to obtain the recall information corresponding to the business demand information; and a mapping relationship between the data operation type and the HTTP request method is generated; According to the recall information and the mapping relationship, the front-end and back-end target protocols corresponding to the business demand information are determined through a pre-trained protocol generation model, so that the front-end can build the page according to the front-end and back-end target protocols.

[0006] Optionally, the structurally parsing the business requirement information to obtain a parsing result including a data source description and a data operation type includes: Extracting the core data entity in the business requirement information to obtain the data source description; Identify the business requirement information to obtain the data operation type; The data source description and the data operation type are represented as a tuple to obtain the parsing result.

[0007] Optionally, the business database table is constructed by the following steps: Obtain 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; The semantic summary in the initial database table is vectorized and calculated; and based on the cosine similarity algorithm, the search capability of the initial database table is constructed to obtain the business database table.

[0008] Optionally, 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 demand information, including: Inject the recall information and the mapping relationship into the Prompt project; Generate a target API service code corresponding to the business requirement information through a target model according to a pre-built API service code library and the Prompt project; 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.

[0009] Optionally, the protocol generation model is obtained by following the steps: Build an initial protocol model; Based on the pre-built front-end and back-end interaction protocol standard, a training sample set is constructed; the training sample set includes a sample input pair and a sample output pair; the sample input pair includes sample recall information generated based on the business database table and a sample API service code generated by the target model; the sample output pair is data that conforms to the front-end and back-end interaction protocol standard; The initial protocol model is iteratively trained through the training sample set until a preset iteration condition is reached to obtain the protocol generation model.

[0010] Optionally, meet the preset iteration conditions, including: Obtaining a protocol output result of the initial protocol model training; Determining a standardized score of the protocol output result on 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; Determine a comprehensive score of an output result of a current iteration according to the standardized score and the current weight; When the comprehensive score of the output result reaches a preset value, it is determined that the preset iteration condition is met.

[0011] Optionally, the front end builds a page according to the front-end and back-end target protocols, including: Parsing the front-end and back-end target protocols to determine the target components; Loading the target component from a pre-built component library; Obtaining target data corresponding to the business demand information from the business database table through the API interface corresponding to the target API service code; After the target data and the target component are bound, the target page is obtained by rendering through a data-driven renderer.

[0012] Another aspect of the present application provides a page building device, the device comprising: Demand information acquisition module, used to obtain user's business demand information; A demand information parsing module, used to perform structured parsing on the business demand information to obtain parsing results including data source description and data operation type; A retrieval module is used to retrieve the parsing result based on a pre-built business database table to obtain the recall information corresponding to the business demand information; and generate a mapping relationship between the data operation type and the HTTP request method; The target protocol determination module is used to determine the front-end and back-end target protocols corresponding to the business demand information based on the recall information and the mapping relationship through a pre-trained protocol generation model, so that the front-end can build the page according to the front-end and back-end target protocols.

[0013] Another aspect of the present application provides a page building device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the steps of the page building method when executing the program.

[0014] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the page building method are implemented.

[0015] The page building method, device and medium provided by the present application have the following beneficial effects: by directly parsing the user's business demand information, and based on the pre-built business database table and pre-trained protocol generation model, the front-end and back-end target protocols are determined, so that the front-end automatically builds the page according to the front-end and back-end target protocols, and the front-end and back-end work closely together, without the need for technical communication between the front-end and back-end personnel, thereby improving the efficiency of page development. In addition, the protocol generation model quickly determines the front-end and back-end target protocols based on the parsing results, without the need for developers to manually write interface documents and design protocol details, saving a lot of repetitive work, reducing subsequent development problems caused by unreasonable protocol design, and further improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of a flow chart of a page building method provided in an embodiment of the present application; Figure 2 A schematic diagram of the principle of a page building method provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of a page building system provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a page building device provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of a page building device provided in another embodiment of the present application.

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

[0018] 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 of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0019] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these 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 the present 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 "at the time of" or "when" or "in response to determining".

[0020] Figure 1 A schematic diagram of a page building method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes: S10: Obtaining user's business demand information; Figure 2 A schematic diagram of the principle of a page building method provided in an embodiment of the present application is shown as follows: Figure 2 As shown, in a specific embodiment, in order to meet the user's diverse and personalized page building needs, page building can be performed based on the user's business needs.

[0021] In a specific embodiment, the business demand information input by the user may be in the form of text, voice, table, file, etc., which is not specifically limited in this application. However, it should be noted that no matter what form the business demand information input is in, it will be uniformly converted into a text input form to facilitate subsequent business demand information analysis. For example, a voice conversion module is set to convert the voice input into business demand information in text form.

[0022] In an optional embodiment, natural language processing technology can be used to conduct preliminary screening of unstructured text requirements submitted by users, identify key information and possible ambiguous points, and provide timely feedback to users for clarification and supplementation, ensuring that the acquired business requirement information can accurately reflect the user's intentions.

[0023] Figure 3 This is a schematic diagram of the structure of a page building system provided in an embodiment of the present application. It should be noted that the page building method provided in the embodiment of the present application is described with the server, that is, the backend as the execution subject. Figure 3 As shown, in an optional embodiment, the page building system includes a front end, a server (ie, a back end) and an agent. In a specific embodiment, the user inputs user demand information through the front end, and further, the front end transmits the demand information to the server for processing.

[0024] S11: Perform structured analysis on the business requirement information to obtain analysis results including data source description and data operation type; In a specific embodiment, after the server obtains the business demand information input by the front-end user, it calls the business demand parsing module in the Agent to perform structured parsing on the business demand information to obtain a parsing result including a data source description and a data operation type. The data source description may include but is not limited to a database table name, a field name, and a data source system, and the data operation type may include but is not limited to query, insert, add, update, and delete.

[0025] Specifically, in an optional embodiment, a general large model (e.g., a natural language processing model) may be called to parse the business demand information, thereby extracting parsing results including data source descriptions and data operation types. In an optional embodiment, the obtained parsing results are verified and dynamically optimized to ensure the quality of the parsing results.

[0026] In an optional embodiment, the user describes the requirements in text form, and the business requirement parsing module, based on prompt engineering and combined with the semantic understanding ability of the general large model, performs deep semantic analysis on the unstructured business requirement information to obtain the analysis results.

[0027] S12: Based on the pre-built business database table, the parsing result is retrieved to obtain the recall information corresponding to the business demand information; and a mapping relationship between the data operation type and the HTTP request method is generated; Further, such as Figure 2 As shown, based on the pre-constructed business database table, the parsing result obtained in step S11 is retrieved to obtain the recall information corresponding to the user's business demand information. Specifically, the metadata (including but not limited to the table name, field name, field type and field description) of the pre-constructed business database table is indexed, so as to quickly locate and parse the database table and field information associated with the data source description in the parsing result.

[0028] At the same time, according to the data operation type and the standard Application Programming Interface (API) design specifications (for example, 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 add operation corresponds to the POST request, and the POST request contains the required field verification logic. The modification operation corresponds to the PUT request, and the PUT request associates the primary key ID and the modified field. The deletion operation corresponds to the DELETE request, and the DELETE request contains the permission verification logic.

[0029] S13: According to the recall information and the mapping relationship, the front-end and back-end target protocols corresponding to the business demand information are determined through the pre-trained protocol generation model, so that the front-end can build the page according to the front-end and back-end target protocols.

[0030] 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 demand information, that is, to determine the front-end and back-end protocols that can be used corresponding to the current user demand.

[0031] 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 patterns, etc. By continuously collecting new project data and user feedback, the model is regularly updated and optimized to better adapt to changing business needs and technology trends.

[0032] After determining the front-end and back-end target protocols, such as Figure 3 As shown in the figure, combining the characteristics of the front-end and back-end, calling the protocol instance generation module in the Agent to generate compatible code templates and sample codes, further simplifying the development process, reducing the development difficulty, and speeding up the page launch. Specifically, the front-end calls the target component for rendering based on the front-end and back-end target protocols, thereby realizing page construction.

[0033] In an optional embodiment, after building a page that meets user needs, a performance monitoring tool can be deployed to monitor the page loading speed, response time, resource utilization and other performance indicators in real time to promptly discover potential performance bottlenecks. At the same time, the page is optimized based on the performance monitoring data, for example, optimizing the loading order of the front-end code, compressing images and static resources, adjusting the back-end database query statements, etc., to ensure that the page can still maintain good performance in complex scenarios such as high concurrent access.

[0034] In another optional embodiment, a user feedback channel can be established, for example, a feedback button is set on the page, user satisfaction questionnaires are sent regularly, etc., to collect users' opinions and suggestions on page functions, user experience, etc. Based on user feedback, the business demand information is re-evaluated and adjusted, and a new round of demand analysis, protocol generation and page optimization process is started, forming a closed loop of continuous improvement, and constantly improving the quality of the page and user satisfaction.

[0035] Therefore, the page building method provided in the embodiment of the present application directly analyzes the user's business demand information, and determines the front-end and back-end target protocols based on the pre-built business database table and the pre-trained protocol generation model, so that the front-end automatically builds the page according to the front-end and back-end target protocols, and the front-end and back-end work closely together, without the need for technical communication between the front-end and back-end personnel, thereby improving the efficiency of page development. In addition, the protocol generation model quickly determines the front-end and back-end target protocols based on the analysis results, without the need for developers to manually write interface documents and design protocol details, saving a lot of repetitive work, reducing subsequent development problems caused by unreasonable protocol design, and further improving development efficiency.

[0036] In an optional embodiment, the business requirement information is structured and parsed to obtain parsing results including a data source description and a data operation type, including: Extract the core data entities in the business requirement information and obtain the data source description; Identify business demand information and obtain data operation types; The data source description and the data operation type are represented as a tuple to obtain the parsing result.

[0037] In a specific embodiment, the core data entity in the business demand information is extracted, for example, "employee information" is extracted to obtain the data source description, that is, business entity identification is achieved. At the same time, the business demand information is identified to obtain the data operation type, for example, the data operation type is "query operation".

[0038] Furthermore, the data source description and the data operation type are represented as a tuple, that is, <data source description, data operation type>, thereby obtaining a structured semantic unit, that is, a structured parsing result.

[0039] Based on the above embodiment, as an optional embodiment, the business database table is constructed by the following steps: Obtain target business data set; Generate semantic summaries based on the target business data set to build the initial database table; semantic summaries include table-level semantic summaries, field-level semantic summaries, and three-dimensional semantic description summaries; The semantic summary in the initial database table is vectorized and calculated; and based on the cosine similarity algorithm, the search capability of the initial database table is constructed to obtain the business database table.

[0040] In a specific embodiment, when constructing a business database table, a target business data set is first obtained. It should be noted that the business database table can be updated according to different business requirements to meet the page construction requirements of different businesses.

[0041] Furthermore, a semantic summary is generated based on the acquired target business data set. Specifically, in an optional embodiment, a natural language processing technology of a general large model can be used in combination with a manual annotation double verification mechanism to generate a semantic summary for a relational business database table, wherein the semantic summary includes a table-level semantic summary, a field-level semantic summary, and a three-dimensional semantic description summary.

[0042] Specifically, metadata such as table name, primary key, foreign key, etc. are extracted to construct a table-level description, that is, a table-level semantic summary. Semantic annotation is performed on the field name, data type, constraint conditions, etc. of each field to obtain a field-level semantic summary. Furthermore, a three-dimensional semantic description is generated that includes the table function description, field business meaning, and the relationship between the table function description and the field business meaning, that is, a three-dimensional semantic description summary is obtained. Thus, a primary database table is constructed through the table-level semantic summary, the field-level semantic summary, and the three-dimensional semantic description summary.

[0043] Further, such as Figure 3 As shown, the semantic summary is vectorized, that is, the semantic summary in the initial database table is vectorized. Specifically, in an optional embodiment, the Aliyun-opensearchEmbedding text vectorization technology can be used to vectorize the semantic summary in the initial database table, and during the calculation process, the table-level basic information vector of the initial database table and multiple vectors of field-level description information of each field of the table are constructed.

[0044] At the same time, based on the cosine similarity algorithm, the search capability of the initial database table is constructed to obtain the business database table. Specifically, based on the cosine similarity algorithm, multi-level retrieval matching is implemented. First, table-level rough screening is performed, and candidate tables are recalled through table-level semantic vector matching. Further field-level fine screening is performed. Specifically, field-level semantic vectors are used for secondary matching. For example, the demand document query function needs to meet the requirement of "querying employees under 30 years old", recalling the "employee information table" through table-level retrieval, locating the "age" field through field-level retrieval, and combining to generate precise retrieval conditions to achieve intelligent mapping from business needs to data entities.

[0045] In an optional embodiment, the summary vector generated by calculation may be stored. Specifically, vectorized storage of database table data may be performed through a vector database such as Opeanseacrh.

[0046] Correspondingly, based on the construction of the business database table in the embodiment of the present application, as an optional embodiment, the analysis result is retrieved based on the pre-constructed business database table to obtain the recall information corresponding to the business demand information. Specifically, based on the multi-level vector retrieval system of the business database table, table-level semantic matching is performed. Specifically, the table-level vectorized description is matched through the cosine similarity algorithm (which may include but is not limited to metadata such as table name, primary key and foreign key. At the same time, field-level semantic matching is performed. Specifically, fine-grained semantic alignment is performed for the data fields in the demand (for example, field name, data type, business meaning, etc.).

[0047] As an optional embodiment, 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 demand information, including: Inject recall information and mapping relationships into the Prompt project; Generate target API service code corresponding to business requirement information through target model according to pre-built API service code library and prompt project; Input the recall information and target API service code into the protocol generation model to obtain the front-end and back-end target protocols.

[0048] In a specific embodiment, a small sample example of the code knowledge base is injected into the prompt word (Prompt), and the recall information retrieved in the above embodiment and the automatically generated mapping relationship are injected into the pre-built Prompt project. Figure 3 The target API service code generation model shown in the figure, based on the pre-built API service code library and prompt project, calls the target model from the general model library to generate the target API service code corresponding to the business requirement information. Among them, the target model can be a large language model, which is not limited in this application. Figure 3 As shown, further, 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.

[0049] like Figure 2 As shown, after parsing the business demand information to obtain the recall information and mapping relationship, the target API service code is generated in combination with the API service code library. The target API service code is combined with the front-end and back-end interaction protocol standards to determine the front-end and back-end target protocols.

[0050] In an optional embodiment, the construction of the API service code library covers the code knowledge system of the entire life cycle of data operations. The API service code library, with the Spring framework as the technical foundation, vertically integrates the RESTful API design specifications, data persistence operation standards and framework layered architecture (including interface layer, service layer, DAO layer). Based on the mapping relationship between the data operation type and the HTTP request method obtained in the above embodiment, combined with the Spring Data JPA specification, a structured API service code library is formed. The API service code library includes reusable code snippets such as standard interface definitions, general exception handling, and data validation rules.

[0051] In an optional embodiment, a domain-specific API service code library is constructed through a retrieval-augmented generation (RAG) technical architecture. Specifically, the API service code library initially constructed in the above embodiment is searched and enhanced by recalling code templates matching the operation type through cosine similarity.

[0052] On this basis, in a specific embodiment, the recall results are semantically aligned with the target API service code fragments for multimodal input fusion to generate 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 containing logic such as data verification and permission control for the front-end to call.

[0053] In an optional embodiment, the protocol generation model is obtained by the following steps: Build an initial protocol model; Based on the pre-built front-end and back-end interaction protocol standards, a training sample set is constructed; 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 by the target model; the sample output pairs are data that conform to the front-end and back-end interaction protocol standards; The initial protocol model is iteratively trained through the training sample set until the preset iteration condition is reached to obtain the protocol generation model.

[0054] In a specific embodiment, due to the originality of the protocol itself, the ability of the general model to generate the corresponding end-to-end interaction protocol based on the large model is insufficient. In an optional embodiment, through the SFT mode, a model with the ability to generate data in JSON format is preferentially selected to train the protocol generation module, thereby realizing the personalized generation capability of data-driven protocols.

[0055] First, prepare the training sample set. Specifically, based on the pre-built standardized front-end and back-end interaction protocol standard, batch build the training sample set including sample input pairs and sample output pairs. The sample input pair includes sample recall information (including data tables, data fields, data operations, etc.) generated based on the business database table and the sample API service code generated by the target model. The sample output pair is data that complies with the front-end and back-end interaction protocol standard, that is, front-end and back-end interaction protocol JSON format data that complies with the protocol specification. In an optional embodiment, automatic labeling can be used to generate the basic protocol through a template, and correct it through manual correction, so as to construct a high-quality training sample set.

[0056] In an optional embodiment, the training sample set can be divided into a training set and a test set with preset ratios, for example, 80% of the training set and 20% of the test set. The initial protocol model initially constructed is iteratively trained through the training set, and the performance of the trained model is tested and optimized through the test set.

[0057] When optimizing the trained model, first perform domain adaptation pre-training, and use the API documentation and JSONSchema training model to understand the protocol structure. Then use SFT supervision fine-tuning, focus on tuning the learning rate and number of training rounds, and gradually optimize the front-end and back-end protocol generation effects, thereby obtaining a protocol generation model.

[0058] In an optional embodiment, the design can be based on data-driven thinking. Figure 2 The front-end and back-end interaction protocol standards based on business metadata are shown to realize the front-end page display based on the back-end data. Specifically, the front-end and back-end interaction protocol standards include the overall page layout protocol. For example, the layout protocol of the Query-List class page is: {title: 'Page name', queryFields: [field1, field2], tableToolbars: [query'], tableColumns: [field1, field2]} The overall layout protocol of this page includes the standardized definition of page title, query condition configuration, operation toolbar and table column information. Among them, title is the page name, queryFields is the query condition, tableToolbars is the operation type, and tableColumns is the list information.

[0059] The front-end and back-end interaction protocol standards include query condition protocol specifications. In a specific embodiment, a metadata description protocol for query fields is established, and the queryFields query condition protocol is as follows: { type: 'string', ame: 'Field ID', title: 'Field Description', 'x-component': 'multiInput'} The query condition protocol specification contains metadata information such as data type definition, field identification, business description, and front-end component mapping. multiInput is component information.

[0060] The front-end and back-end interaction protocol standards include the complete protocol structure that defines the operation, i.e. the interactive 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}}} ]}, the query operation protocol contains key elements such as operation type identification, component type, associated API interface and parameter binding.

[0061] The front-end and back-end interaction protocol standards also include a protocol mapping mechanism, which is used to establish intelligent mapping rules between database fields and front-end components, automatically match corresponding components (input / select / datePicker) by field type (string / number / date), and generate data verification rules in combination with field constraints (required / unique).

[0062] Based on the above embodiment, as an optional embodiment, achieving the preset iteration condition includes: Obtain the protocol output results of the initial protocol model training; Determine the standardized scores of the protocol output results on the specified dimensions; the specified dimensions include protocol structure correctness, protocol field correctness and protocol generation efficiency; Get the current weight corresponding to each specified dimension; Determine the comprehensive score of the output result of the current iteration based on the standardized score and the current weight; When the comprehensive score of the output result reaches a preset value, it is determined that the preset iteration condition is met.

[0063] In a specific embodiment, the initial protocol model is iteratively trained using a training sample set, and when it is determined that a preset iterative training is reached, in an optional embodiment, when a preset number of iterations is reached, it is determined that a preset iteration condition is reached.

[0064] In another optional embodiment, a comprehensive score is calculated for the output results of the model, and whether the preset iteration conditions are met is evaluated based on the comprehensive score results. Specifically, the protocol output results of the initial protocol model training are obtained, and the protocol output results are evaluated in three dimensions: protocol structure correctness, protocol field correctness, and protocol generation efficiency.

[0065] In an optional embodiment, a linear weighted synthesis method is combined with a dynamic weight adjustment mechanism to determine the standardized score of the protocol output result on a specified dimension. Specifically, the standardized score is determined according to formula (1): (1) in, is the standardized score, is the raw score on the specified dimension, is the minimum value of all scores on the corresponding specified dimension, is the maximum value of all scores on the corresponding specified dimension. The value range of is between 0 and 1, that is, .

[0066] Furthermore, the current weight corresponding to each specified dimension is obtained, and the comprehensive score of the output result of the current iteration is determined based on the standardized score and the current weight. 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.

[0067] Furthermore, the comprehensive score of the output result of the current iteration is calculated according to formula (2): (2) in, is the comprehensive score of the output result. In a specific embodiment, when the comprehensive score of the output result When it is greater than or equal to a preset value, it is determined that the preset iteration condition is met. When , it is determined that the iterative training reaches the preset iterative condition.

[0068] In an optional embodiment, the trained protocol generation model is deployed for testing and during operation, the training data is regularly updated, and the model is continuously retrained and optimized. Figure 3As shown in the figure, the trained protocol generation model is managed and called uniformly by the Agent to complete the end-to-end private protocol generation later.

[0069] As an optional embodiment, the front end builds the 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 component from a pre-built component library; 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; After binding the target data and the target component, the target page is obtained by rendering through the data-driven renderer.

[0070] First of all, it should be noted that the embodiment of the present application uses the front end as the execution subject to illustrate the process of front-end page rendering. Figure 3 As shown, the data-driven renderer is driven by 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, table column configuration, etc. in the front-end and back-end target protocols to determine the target components that can currently meet user needs.

[0071] Furthermore, the automatic mapping and rendering of page elements is realized based on the pre-built component library. Specifically, according to the component type (e.g., MultiInput, DatePicker, etc.) and parameter configuration defined in the protocol, the target component is loaded from the pre-built component library.

[0072] At the same time, through the API interface corresponding to the target API service code, the target data corresponding to the business demand information is obtained from the business database table, and the target data is dynamically bound to the target component to achieve real-time rendering and updating of the data, thereby obtaining the target page. Figure 3 As shown in the figure, the target page after construction is shown to the user in the previous step.

[0073] Therefore, the page building method provided in the embodiment of the present application realizes the automatic generation of target API service code, automatic determination of front-end and back-end target protocols, and automatic loading of target components based on the user's business needs, thereby improving development efficiency, lowering development thresholds, and enhancing the user's page building experience.

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

[0075] Figure 4A schematic diagram of the structure of a page building device provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the device comprises: The demand information acquisition module 40 is used to acquire the user's business demand information; The demand information parsing module 41 is used to perform structured parsing on the business demand information to obtain parsing results including data source description and data operation type; The retrieval module 42 is used to retrieve the parsing results based on the pre-built business database table to obtain the recall information corresponding to the business demand information; and generate a mapping relationship between the data operation type and the HTTP request method; The target protocol determination module 43 is used to determine the front-end and back-end target protocols corresponding to the business demand information based on the recall information and the mapping relationship through a pre-trained protocol generation model, so that the front-end can build pages according to the front-end and back-end target protocols.

[0076] In addition, the page building device provided in the embodiment of the present application also includes: The core data entity extraction module is used to extract the core data entities in the business requirement information and obtain the data source description; The demand information identification module is used to identify the business demand information and obtain the data operation type; The binary representation module is used to represent the data source description and the data operation type in binary form to obtain the parsing result.

[0077] A business data set acquisition module is used to acquire a target business data set; The semantic summary generation module is used to 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; The vectorized calculation module is used to perform vectorized calculation on the semantic summary in the initial database table; and based on the cosine similarity algorithm, the search capability of the initial database table is constructed to obtain the business database table.

[0078] Injection module, used to inject recall information and mapping relationships into the Prompt project; The API service code generation module is used to generate the target API service code corresponding to the business requirement information through the target model based on the pre-built API service code library and Prompt project; The front-end and back-end target protocol determination module is used to 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.

[0079] An initial protocol model building module, used to build an initial protocol model; The training sample set construction module is used to construct a training sample set based on the pre-built front-end and back-end interaction protocol standard; the training sample set includes a sample input pair and a sample output pair; the sample input pair includes sample recall information generated based on the business database table and a sample API service code generated by the target model; the sample output pair is data that complies with the front-end and back-end interaction protocol standard; The iterative training module is used to iteratively train the initial protocol model through the training sample set until the preset iteration condition is reached to obtain the protocol generation model.

[0080] A protocol output result acquisition module is used to obtain the protocol output result of the initial protocol model training; Determine the standardized scores of the protocol output results on the specified dimensions; the specified dimensions include protocol structure correctness, protocol field correctness and protocol generation efficiency; The weight acquisition module is used to obtain the current weight corresponding to each specified dimension; A comprehensive score determination module, used to determine the comprehensive score of the output result of the current iteration according to the standardized score and the current weight; The preset condition determination module is used to determine that the preset iteration condition is met when the comprehensive score of the output result reaches a preset value.

[0081] The target component determination module is used to parse the front-end and back-end target protocols to determine the target component; The target component loading module is used to load the target component from the pre-built component library; The target data acquisition module is used to obtain the target data corresponding to the business demand information from the business database table through the API interface corresponding to the target API service code; The rendering module is used to bind the target data and the target component, and then render the target page through the data-driven renderer.

[0082] Figure 5 A schematic diagram of the structure of a page building device provided in another embodiment of the present application is shown in FIG. Figure 5 As shown, the page building device includes: a memory 50 for storing a computer program; The processor 51 is used to implement the steps of the page building method mentioned in the above embodiment when executing the computer program.

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

[0084] 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 can be implemented in at least one hardware form of a digital signal processor (Digital Signal Processor, referred to as DSP), a field programmable gate array (Field-Programmable Gate Array, referred to as FPGA), and a programmable logic array (Programmable Logic Array, referred to as PLA). The processor 51 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (Central Processing Unit, referred to as CPU); 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 (Graphics Processing Unit, referred to as GPU), 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 also include an artificial intelligence (Artificial Intelligence, referred to as AI) processor, which is used to process computing operations related to machine learning.

[0085] The memory 50 may include one or more computer-readable storage media, which may be non-transitory. The memory 50 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 50 is at least used to store the following computer program 501, wherein, 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 aforementioned 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. Data 503 may include, but is not limited to, relevant data involved in the page building method, etc.

[0086] 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 .

[0087] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the page building device, and may include more or fewer components than those shown in the figure.

[0088] The page building device provided in 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.

[0089] It should be noted that, although the operations are depicted in a specific order in the accompanying drawings, this should not be understood as requiring these operations to be performed in the specific order shown or to be performed sequentially, or requiring all illustrated operations to be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation 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 comprises: Obtain user's business demand information; Performing structured analysis on the business demand information to obtain analysis results including data source description and data operation type; Based on the pre-built business database table, the analysis result is retrieved to obtain the recall information corresponding to the business demand information; and a mapping relationship between the data operation type and the HTTP request method is generated; According to the recall information and the mapping relationship, the front-end and back-end target protocols corresponding to the business demand information are determined through a pre-trained protocol generation model, so that the front-end can build the page according to the front-end and back-end target protocols.

2. The page building method according to claim 1, characterized in that: The structural analysis of the business requirement information to obtain the analysis results including the data source description and the data operation type includes: Extracting the core data entity in the business requirement information to obtain the data source description; Identify the business requirement information to obtain the data operation type; The data source description and the data operation type are represented as a tuple to obtain the parsing result.

3. The page building method according to claim 1, characterized in that: The business database table is constructed by the following steps: Obtain 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; The semantic summary in the initial database table is vectorized and calculated; and based on the cosine similarity algorithm, the search capability of the initial database table is constructed to obtain the business database table.

4. The page building method according to claim 1, characterized in that: According to the recall information and the mapping relationship, the front-end and back-end target protocols corresponding to the business demand information are determined by using a pre-trained protocol generation model, including: Inject the recall information and the mapping relationship into the Prompt project; Generate a target API service code corresponding to the business requirement information through a target model according to a pre-built API service code library and the Prompt project; 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.

5. The page building method according to claim 4, characterized in that: The protocol generation model is obtained by the following steps: Build an initial protocol model; Based on the pre-built front-end and back-end interaction protocol standard, a training sample set is constructed; the training sample set includes a sample input pair and a sample output pair; the sample input pair includes sample recall information generated based on the business database table and a sample API service code generated by the target model; the sample output pair is data that conforms to the front-end and back-end interaction protocol standard; The initial protocol model is iteratively trained through the training sample set until a preset iteration condition is reached to obtain the protocol generation model.

6. The page building method according to claim 5, characterized in that: Meet the preset iteration conditions, including: Obtaining a protocol output result of the initial protocol model training; Determining a standardized score of the protocol output result on 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; Determine a comprehensive score of an output result of a current iteration according to the standardized score and the current weight; When the comprehensive score of the output result reaches a preset value, it is determined that the preset iteration condition is met.

7. The page building method according to claim 1, characterized in that: The front end builds the page according to the front-end and back-end target protocols, including: Parsing the front-end and back-end target protocols to determine the target components; Loading the target component from a pre-built component library; Obtaining target data corresponding to the business demand information from the business database table through the API interface corresponding to the target API service code; After the target data and the target component are bound, the target page is obtained by rendering through a data-driven renderer.

8. A page building device, characterized in that: The device comprises: Demand information acquisition module, used to obtain user's business demand information; A demand information parsing module, used to perform structured parsing on the business demand information to obtain parsing results including data source description and data operation type; A retrieval module is used to retrieve the parsing result based on a pre-built business database table to obtain the recall information corresponding to the business demand information; and generate a mapping relationship between the data operation type and the HTTP request method; The target protocol determination module is used to determine the front-end and back-end target protocols corresponding to the business demand information based on the recall information and the mapping relationship through a pre-trained protocol generation model, so that the front-end can build the page according to the front-end and back-end target protocols.

9. A page building device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps of the page building method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the page building method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Multi-component abstract association fusion method and device in page design

    CN115080046A

  • Low-code page building system and method and computer readable storage medium

    CN115617327A

  • Page management method, device and equipment for mid-background management system and storage medium

    CN116028746A

  • Modeling system and method based on low codes

    CN116775003A

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

    CN118733169A