Interface generation method, apparatus, computer equipment and storage medium

By acquiring and parsing data source metadata, generating raw schema data, and parsing and configuring it, the problem of complex backend management interface development is solved, and efficient interface generation is achieved.

CN117369806BActive Publication Date: 2026-11-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210762544.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2026-11-17
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

In existing technologies, the development process for back-end management interfaces is complex and inefficient.

Method used

By acquiring data source metadata, parsing it into data source field configuration data, generating raw schema data, and parsing and configuring it based on preset schema configuration data, parsing schema data is obtained, and finally, interface rendering processing is performed to generate a data management interface.

Benefits of technology

It improves the efficiency of generating backend management interfaces, simplifies the development process, and increases development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117369806B_ABST
    Figure CN117369806B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer device, storage medium, and computer program product for generating an interface. The method includes: first, acquiring data source metadata for generating a management interface; then, obtaining data source field configuration data by parsing the data source metadata; subsequently, generating raw pattern data based on the data source field configuration data, which facilitates configurable interface processing; next, parsing and configuring the raw pattern data based on preset pattern configuration data to obtain parsable pattern data, thereby uniformly optimizing the interface configuration data; finally, performing interface rendering processing on the parsable pattern data to generate the data management interface corresponding to the data source metadata. This application generates a backend interface through a configurable method, which can effectively improve the efficiency of backend interface generation.
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 an interface generation method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of computer technology, the demand for software development is constantly increasing. Software development is the process of building a software system or a software component of a system according to user requirements. Software development is a systematic engineering project that includes requirements gathering, requirements analysis, design, implementation, and testing. Software is generally implemented using a programming language. Software development tools are typically used for development. Sometimes, during software development, it is necessary to generate a backend management interface based on the development requirements.

[0003] Currently, the backend management interface for software development can generally be developed using open-source configurable management panels. However, this development method is relatively complex and has low efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can efficiently realize the development of backend management interfaces, addressing the aforementioned technical problems.

[0005] Firstly, this application provides a method for generating an interface. The method includes:

[0006] Retrieve data source metadata;

[0007] Parse the data source metadata to obtain the data source field configuration data;

[0008] Generate raw schema data based on the data source field configuration data;

[0009] The original pattern data is parsed and configured based on the preset pattern configuration data to obtain parsable pattern data.

[0010] The parsable pattern data is processed for interface rendering to generate a data management interface corresponding to the data source metadata.

[0011] Secondly, this application also provides an interface generation apparatus. The apparatus includes:

[0012] The data acquisition module is used to acquire metadata from the data source;

[0013] The metadata parsing module is used to parse the data source metadata to obtain the data source field configuration data.

[0014] The data configuration module is used to generate raw schema data based on the data source field configuration data;

[0015] The pattern data parsing module is used to parse and configure the original pattern data based on preset pattern configuration data to obtain parsable pattern data;

[0016] The interface rendering module is used to perform interface rendering processing on the parsable modal data and generate a data management interface corresponding to the data source metadata.

[0017] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0018] Retrieve data source metadata;

[0019] Parse the data source metadata to obtain the data source field configuration data;

[0020] Generate raw schema data based on the data source field configuration data;

[0021] The original pattern data is parsed and configured based on the preset pattern configuration data to obtain parsable pattern data.

[0022] The parsable pattern data is processed for interface rendering to generate a data management interface corresponding to the data source metadata.

[0023] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0024] Retrieve data source metadata;

[0025] Parse the data source metadata to obtain the data source field configuration data;

[0026] Generate raw schema data based on the data source field configuration data;

[0027] The original pattern data is parsed and configured based on the preset pattern configuration data to obtain parsable pattern data.

[0028] The parsable pattern data is processed for interface rendering to generate a data management interface corresponding to the data source metadata.

[0029] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0030] Retrieve data source metadata;

[0031] Parse the data source metadata to obtain the data source field configuration data;

[0032] Generate raw schema data based on the data source field configuration data;

[0033] The original pattern data is parsed and configured based on the preset pattern configuration data to obtain parsable pattern data.

[0034] The parsable pattern data is processed for interface rendering to generate a data management interface corresponding to the data source metadata.

[0035] The aforementioned interface generation method, apparatus, computer equipment, storage medium, and computer program product first acquire data source metadata used to generate the management interface; then, by parsing the data source metadata, data source field configuration data is obtained; subsequently, raw pattern data can be generated based on the data source field configuration data, which facilitates interface configuration processing; next, the raw pattern data can be parsed and configured based on preset pattern configuration data to obtain parsable pattern data, thereby uniformly optimizing the interface configuration data; finally, interface rendering processing can be performed on the parsable pattern data to generate the data management interface corresponding to the data source metadata. This application generates the backend interface through a configuration-based method, which can effectively improve the generation efficiency of the backend interface. Attached Figure Description

[0036] Figure 1 This is a diagram illustrating the application environment of the interface generation method in one embodiment;

[0037] Figure 2 This is a flowchart illustrating the interface generation method in one embodiment;

[0038] Figure 3 This is a schematic diagram illustrating the filling of data source information in one embodiment.

[0039] Figure 4 This is a schematic diagram illustrating the filling in of data source configuration information in one embodiment.

[0040] Figure 5 A schematic diagram illustrating the configuration of default fields in a data source in one embodiment;

[0041] Figure 6 This is a schematic diagram of the interface for modifying the default field configuration data of the data source in one embodiment;

[0042] Figure 7 This is a schematic diagram showing the effect after field configuration is completed in one embodiment.

[0043] Figure 8This is a schematic diagram of the interface generation system in one embodiment;

[0044] Figure 9 This is a flowchart illustrating the interface generation process in one embodiment;

[0045] Figure 10 This is a structural block diagram of an interface generation device in one embodiment;

[0046] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] In this article, it is important to understand the following terms:

[0049] Ncform: A global wide area web (WEB) form generation tool based on the Vue (3D rendering solution product) technology stack. It extends the standard JSON Schema (application / schema + JSON, where JSON is a simplified JavaScript object schema) and supports rendering JSON into form components.

[0050] Form generation engine: The engine parses the metadata of the data source (database, distributed storage system, etc.), parses the data source structure into JSON configuration according to certain rules, and then renders the configuration into a semantic form structure through Ncform.

[0051] The interface generation method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on the cloud or other servers. When a user needs to generate an interface, they can specify the data source metadata for interface generation through terminal 102. Then, server 104 retrieves the data source metadata from the specified database according to the instructions of terminal 102; parses the data source metadata to obtain data source field configuration data; generates original pattern data based on the data source field configuration data; parses and configures the original pattern data based on preset pattern configuration data to obtain parsable pattern data; and performs interface rendering processing on the parsable pattern data to generate the data management interface corresponding to the data source metadata. Terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.

[0052] In one embodiment, such as Figure 2 As shown, an interface generation method is provided, which can be applied to... Figure 1 Taking server 104 as an example, the following steps are included:

[0053] Step 201: Obtain data source metadata.

[0054] Specifically, the data source can be a database, which is a data warehouse that organizes, stores, and manages data according to a data structure. It is a large collection of organized, shareable, and uniformly managed data stored long-term on a computer. Metadata, also known as intermediary data or relay data, is data about data, mainly describing data properties. It is used to support functions such as indicating storage location, historical data, resource lookup, and file records. Metadata is a kind of electronic catalog. To achieve the purpose of cataloging, it is necessary to describe and collect the content or characteristics of the data, thereby assisting in data retrieval. The data source can also be other data storage systems. In one embodiment, the solution of this application is used to generate the backend management interface of a data management application. In this case, the database can be a database related to the data management application, and the metadata is used to configure the data of various form fields of the data management application.

[0055] Specifically, when a user needs to generate a specified management backend interface, if the required backend management interface is a form or table, the interface generation method of this application can be used to assist in generating the management interface and improve the efficiency of interface generation. When generating the management interface, the user needs to specify the corresponding data source metadata, and then the server 104 can start generating the interface based on the user-specified data source metadata. In one embodiment, the solution of this application is used to generate the backend management interface of a data management application. In this case, the user can fill in a system form for interface generation through the terminal 102, indicating the data source and the metadata used for interface generation in the system form. The server 104 determines the data source by parsing the system form submitted by the user and obtains the metadata related to interface generation from the data source.

[0056] Step 203: Parse the data source metadata to obtain the data source field configuration data.

[0057] Specifically, data parsing refers to the conversion of data source metadata into the corresponding data file. Data transmission during network communication commonly uses two formats: JSON and XML (Extensible Markup Language). Data parsing is correspondingly divided into JOSN data parsing and XML data parsing. This application's solution specifically uses JOSN data parsing, which allows the acquisition of different types of data values. Data source field configuration data refers to the data obtained by parsing data source metadata. Metadata describes the data, while data source field configuration data is the data pointed to by the data source metadata. Data source field configuration data specifically includes configuration data such as field keys, field names, field types, and operations. Field keys and field names describe the function of the field, while field types refer to the type of input content, including input boxes, numbers, objects, select boxes, and dates / events. Operations refer to the operation types corresponding to the field, including edit, view, copy, delete, move up, and move down.

[0058] Specifically, the solution in this application generates a backend management interface in tabular or form format using data source metadata. The data basis for generating the form or table interface is the data source field configuration data. After obtaining the data source metadata, the data source metadata can be parsed to obtain configuration data for various fields. The server can then further generate a table or form interface based on this field configuration data, thereby obtaining the corresponding data management backend interface. In one embodiment, the method of this application is used to generate the backend management interface of a data management application. In this case, the data configured in the data source field configuration data includes field key values: Fdata_type, Fdata_name, Flimit, etc.; field names: data code, data name, data limit, etc.; field types: ordinary input box, number, object, selection input box, etc.; and field operations: view, copy, edit, delete, etc.

[0059] Step 205: Generate raw schema data based on the data source field configuration data.

[0060] Schema data, specifically a collection of database objects, is an abstract set of metadata containing a set of schema components: primarily declarations of elements and attributes, and definitions of complex and simple data types. These schema components are typically created when processing a batch of schema documents. A schema document contains the source language definitions of these schema components. In everyday use, a schema document is often referred to as a schema. The original schema data in this application is an extension of the JSON schema. The JSON schema is a standard used to define JSON data constraints. Based on this convention, both parties exchanging data can understand the requirements and constraints of the JSON data and can also use it to validate the data, ensuring the correctness of the data exchange.

[0061] Specifically, after obtaining the data source field configuration data used for form or table configuration, in order to generate the data management table interface or data management form interface in a more efficient way, the data source field configuration data can be converted into raw pattern data. This data can be used as the basic data for form rendering or table rendering. The target interface can be obtained by rendering the raw pattern data through the rendering engine of this application. Depending on the data type of the raw pattern data, the form interface or table interface can be generated accordingly.

[0062] Step 207: Parse and configure the original pattern data based on the preset pattern configuration data to obtain parsable pattern data.

[0063] The preset pattern configuration data refers to the data pre-set on the server to refresh form or table configurations. It is primarily applicable to selector configurations. For selector configuration types, multiple applications may share the same enumeration (using more semantic data to map data in the underlying data source). Therefore, this application uses preset pattern configuration data to define some common mapping relationships, serving as optional elements for selector form items or descriptive tags in tables. Parsable pattern data refers to data that can be rendered using a preset rendering tool to obtain form or table components. In one embodiment, the preset rendering tool in this application is specifically the Ncform tool, a configuration generation tool for developing forms or tables that extends the standard JSON scheme and supports rendering it into form components. Therefore, after obtaining the original pattern data, it is necessary to render the original pattern data according to the format requirements of the preset rendering tool to generate parsable pattern data that can be rendered by the preset rendering tool.

[0064] Specifically, the solution of this application uses a rendering tool to generate the interface. The basic data used for interface generation is the original pattern data, and the rendering tool is a preset rendering tool. Therefore, before generating the interface, in order for the original pattern data to be effectively rendered by the preset rendering tool, it is necessary to parse and transform the original pattern data. Simultaneously, some data in the original pattern data can be configured. For example, the optional items in selector-type form items can be configured with general settings. In one embodiment, for forms, the solution of this application uses Ncform to render the form components, and configures the form content during the parsing process, thereby constructing a target interface in the form of a form. For tables, a table rendering engine is used to render the target interface of the table components, and the filtering form and pagination components are processed during the rendering process, thereby constructing a target interface in the form of a table.

[0065] Step 209: Perform UI rendering on the parsable schema data to generate the data management interface corresponding to the data source metadata.

[0066] The target interface refers to the interface that the interface generation method of this application needs to construct. Specifically, it can be a table-based interface or a form-based interface, which can manage the data pointed to by the data source metadata. Interface rendering refers to generating the corresponding form or table interface based on the configuration information in the parsable schema data.

[0067] Specifically, once parsable schema data is obtained, the server can directly render the data using a preset rendering tool to generate the corresponding target interface. When rendering parsable schema data in form format, the preset rendering tool can render the corresponding form elements to construct the form interface. Conversely, when rendering parsable schema data in table format, the preset rendering tool can directly render the corresponding table interface. These interfaces can effectively manage the corresponding data source.

[0068] The aforementioned interface generation method first obtains the data source metadata used to generate the management interface; then, by parsing the data source metadata, it obtains the data source field configuration data; subsequently, it generates raw pattern data based on the data source field configuration data, which facilitates the configurable processing of the interface; next, it parses and configures the raw pattern data based on preset pattern configuration data to obtain parsable pattern data, thereby uniformly optimizing the interface configuration data; finally, it performs interface rendering processing on the parsable pattern data to generate the data management interface corresponding to the data source metadata. This application generates the backend interface through a configurable method, which can effectively improve the generation efficiency of the backend interface.

[0069] In one embodiment, step 201 includes: obtaining data source information and data source configuration information; finding the target data source based on the data source information; and pulling data from the target data source based on the data source configuration information to obtain data source metadata.

[0070] The data source information is configured by the user through terminal 102, instructing server 104 to retrieve the target data source. Specifically, the data source configured by the user through terminal 102 can be a database or a distributed in-memory key-value (KV) storage system. Once configured, server 104 can connect to the corresponding data source based on the data source information. The data source configuration information is also configured by the user through terminal 102, used for detailed configuration of information within the data source. Once configured, server 104 can retrieve the corresponding data source metadata from the target data source based on the data source configuration information.

[0071] Specifically, when a user needs to generate a backend management interface for data management through configuration, they can send data source information and data source configuration information to the server 104 via terminal 102 to specify the data source and configure the data information to set the target data managed by the backend management interface. The server 104 can then, based on the data source information and configuration information, and according to the name specified in the data source information, search for the data source metadata in the network and determine the field structure of the data source metadata, thereby constructing a corresponding form or table interface to achieve management. In one embodiment, the method of this application is used to generate the backend management interface of a data management application. In this case, the data source information filled in by the user can be specifically referred to... Figure 3 As shown, the items include application ID, application name, application type, application status, hidden directory entry, directory, modifier, and function description. The application ID and application name specify the target data management application, while the application type specifies the data source, indicating whether the data originates from a database or a distributed in-memory key-value storage system. The data source configuration information can be found by referring to... Figure 4 As shown, the data that users need to fill in includes: dynamic routing, configuration key-value pairs, configuration server name, whether to use database sharding and table partitioning, database and table names, operation type, and related query number, etc. This data is used to configure the data source in detail. After the configuration is completed, server 104 can retrieve metadata from the target data source according to the specific content filled in by the user and obtain information such as the field structure of the metadata. In this embodiment, the user specifies the target metadata to be processed through data source information and data source configuration information, which can effectively help server 104 identify the data source to be processed, thereby ensuring the efficiency of metadata acquisition during the interface generation process and comprehensively improving the efficiency and accuracy of interface generation.

[0072] In one embodiment, step 203 includes: parsing the data source metadata to obtain the data source default field configuration data; and feeding back the data source default field configuration data to obtain the data source field configuration data modified based on the data source default field configuration data.

[0073] The default field configuration data of the data source refers to the field configuration in the data source under the default state of the metadata. These configurations represent the field configurations pointed to by the metadata in the database. The data source field configuration data, on the other hand, is the data obtained by modifying the default field configuration data of the data source. Users can add, delete, modify, and query fields in the default field configuration data of the data source according to business needs, thereby ensuring that the field configurations meet the actual business requirements.

[0074] Specifically, in the solution of this application, in order to ensure that the field configuration data extracted from the data source meets the actual needs of the user, it is necessary to modify the default field configuration data of the data source in the data source metadata to a certain extent. Therefore, after obtaining the default field configuration data of the data source, the default field configuration data of the data source can be directly fed back to the user on the terminal 102. Then, the user can modify these field configuration data to a certain extent according to the actual business needs to obtain the data source field configuration data that matches the business needs, and then feed the modification result back to the server 104. The server 104 receives the modified data source field configuration data and then starts the interface generation process based on the modified data source field configuration data. In one embodiment, the method of this application is used to generate the backend management interface of the data management application. At this time, the default field configuration data of the data source can be specifically referred to Figure 5 As shown, this includes field key values: Fdata_type, Fdata_name, Flimit, etc.; field names: data code, data name, data limit, etc.; field types: ordinary input box, number, object, selection input box, etc.; and field operations: four main types of configuration data: view, copy, edit, and delete. An example of how users can modify field configurations can be found in [reference needed]. Figure 6 As shown in the image, this is a field of type select box. With the basic configuration, users can set the field to support configurable enumerations, thereby mapping the source data into a more semantic description. The effect after configuration can be seen by referring to... Figure 7 As shown in the figure. In this embodiment, modification of data source field configuration data is supported. Users can adjust the fields according to actual business needs, thereby ensuring the accuracy of field configuration.

[0075] In one embodiment, the preset mode configuration data includes preset form enumeration configuration data. Step 207 includes: parsing the original mode data; when it is determined that the original mode data is form data, obtaining the preset form enumeration configuration data; replacing the original enumeration configuration data in the original mode data with the preset form enumeration configuration data to obtain parsable mode data.

[0076] In this application, forms primarily handle data collection. A form has three basic components: Form tags: These contain the Uniform Resource Locator (URL) for the Common Gateway Interface (CGI) program used to process form data, as well as the method for submitting data to the server. Form fields: These include text boxes, password boxes, hidden fields, multi-line text boxes, checkboxes, radio buttons, dropdown selection boxes, and file upload boxes. Form buttons: These include submit buttons, reset buttons, and general buttons; used to send data to the CGI script on the server or cancel input. Form buttons can also control other processing tasks defined by processing scripts. The form interface created in this application is mainly used for editing and adding data. Preset form enumeration (map) configuration data refers to the data pre-stored on the server for configuring the optional options of form items for selector types. For selector types, multiple applications may share the same enumeration; therefore, this application defines a configuration center where users can define some common mapping relationships as optional options for selector form items. When parsing and configuring the original pattern data, the original enumeration configuration can be directly replaced with the preset form enumeration configuration data from the configuration center during the parsing process. Here, enumeration refers to mapping the data in the underlying data source with more semantic data. That is, if the data in the data source is MALE|FEMALE, it will be displayed as male|female in the management backend interface. Configuring the enumeration here means configuring this mapping: MALE => male.

[0077] Specifically, the solution of this application can be used to generate table-type target interfaces and form-type target interfaces. When generating a form-type target interface, the original pattern data is parsed. After parsing, there may be configuration data of special selector types. For example, multiple applications may share the same enumeration. Therefore, this application predefines a configuration center. Users can define some general mapping relationships in the configuration center based on these shared enumeration cases, and construct preset model configuration data of enumeration type as the optional options for selector form items. After parsing, the server 104 can directly pull the configured enumeration data in the configuration center, replace the enumeration-related configuration data of the original pattern data with it, and then generate parsable pattern data that the preset rendering engine can parse according to the rules of the preset rendering engine. In subsequent processing, the parsable pattern data can be rendered by the preset rendering engine to obtain the corresponding form interface. In this embodiment, by identifying the preset form enumeration configuration data to refresh the form data, the data management form interface can be generated more effectively, ensuring the validity of the form interface.

[0078] In one embodiment, the data management interface includes a data management form interface. The data management interface corresponding to the data source metadata is generated by performing interface rendering processing on parsable pattern data, generating form elements based on the parsable pattern data, and constructing the data management form interface based on the form elements.

[0079] Form elements refer to various configuration components generated corresponding to the configuration data within the form interface. In one embodiment, form elements may specifically include selectors, text boxes, radio buttons, images, dates, and arrays.

[0080] Specifically, after obtaining the parsable pattern data, the server can directly parse and render this parsable pattern data using a preset rendering engine. Based on each parsable pattern data, form elements such as selectors, text boxes, radio buttons, images, dates, and arrays are generated, and then a form interface is constructed based on these form elements. The expressive elements on the form interface correspond one-to-one with the data source field configuration data, effectively reflecting the true situation of the data source metadata, thereby achieving effective management of the data source metadata. In one embodiment, the method of this application is used to generate the backend management interface of a data management application. In this case, the preset rendering engine is specifically Ncform. The parser in the server directly renders the original pattern data and then generates parsable pattern data. Ncform then renders the parsable pattern data, generating numerous interface elements in the backend management interface, and configures the selectors, text boxes, radio buttons, images, dates, and arrays in the interface according to the configuration data in the parsable pattern data, thereby constructing a complete backend management interface. This backend management interface allows for reasonable management of various fields set within the form, including editing, copying, deleting, and moving field content. In this embodiment, form elements are generated based on parsable pattern data, and then the corresponding form interface is constructed. This ensures the effectiveness of the form interface construction and thus guarantees the quality of the interface creation.

[0081] In one embodiment, the preset mode configuration data includes preset table enumeration configuration data and custom method data. Step 207 includes: parsing the original mode data; when the original mode data is determined to be table data, obtaining the preset table enumeration configuration data and custom method data; mapping the original enumeration configuration data in the original mode data through the preset table enumeration configuration data to obtain table description tags; processing the original mode data through the custom method data to obtain target text data; and obtaining parsable mode data based on the table description tags and target text data.

[0082] Tables, also known as charts, serve as both a visual communication mode and a means of organizing data. They are widely used in communication, scientific research, and data analysis. Tables appear in numerous places, including printed media, handwritten records, computer software, architectural decorations, and traffic signs. The conventions and terminology used to accurately describe tables vary depending on the context. Furthermore, different tables differ significantly in type, structure, flexibility, annotation methods, expression methods, and usage. In this application, "table" refers to a tabular interface, primarily used for querying / previewing data. The interface includes filter forms, table areas, and pagination components. The preset table enumeration configuration data is mainly used to map raw schema data into more semantic descriptive labels, while the custom method data is used to preprocess the raw schema data source, converting it into target text to enrich the usage scenarios. By combining the table description labels and target text data, parsable schema data is obtained. The preset rendering tool can parse and render this parsable schema data to generate the corresponding table interface.

[0083] Specifically, when the original schema data is tabular data, meaning the interface to be built is determined to be in tabular format, the server parses the original schema data and directly retrieves the pre-configured preset table enumeration configuration data and custom method data from the configuration center. The enumeration data is primarily used to map the underlying data of the original schema data into more semantic descriptive tags. The custom methods employ a low-code approach, using JavaScript to preprocess the original schema data, transforming it into the required text format through data trimming, thereby enriching the usage scenarios. In this embodiment, the transformation of the original schema data in tabular format using enumeration and custom methods ensures that this data can be used for rendering with the preset rendering engine for tables, guaranteeing the effectiveness of the interface construction.

[0084] In one embodiment, the data management interface includes a data management table interface, and step 209 includes: performing table rendering processing on parsable pattern data, generating a filter form, a table area, and a pagination component based on the parsable pattern data; and constructing the data management table interface based on the filter form, the table area, and the pagination component.

[0085] The filter form is used to filter the prerequisites for the final rendered data in the table. The table area refers to the cell range in the table, used to display numbers and other items for quick reference and analysis. The pagination component is used to provide pagination functionality for the table, corresponding to multiple tables on different interfaces.

[0086] Specifically, after obtaining the parsable pattern data, the server can directly parse and render this parsable pattern data using a preset rendering engine. The table rendering process can be divided into two steps. First, since the parsable pattern data may contain form elements such as filterable fields (i.e., preconditions used to filter the final rendered data), the preset form rendering engine can be called to render the parsable pattern data, generating a filter form. Then, the preset table rendering engine is called to render the parsable pattern data, generating table areas and pagination components. Finally, the filter form, table areas, and pagination components are combined to construct the data management table interface. In one embodiment, the method of this application is used to generate the backend management interface of a data management application. At this point, the preset rendering engine includes Ncform for rendering forms and a table rendering engine. The parser in the server directly renders the original pattern data and then generates parsable pattern data. Ncform renders the data in the filterable fields of the parsable pattern data to generate a filter form, while the table rendering engine renders the remaining data in the parsable pattern data to construct a table area and pagination components, thereby building a complete backend management interface. This backend management interface allows for the reasonable management of the various fields set in the form and is mainly used for data querying and previewing. In this embodiment, the generation of the filter form, table area, and pagination components based on the parsable pattern data, and the subsequent construction of the corresponding table interface, ensures the effectiveness of the table interface construction and thus guarantees the quality of the interface creation.

[0087] This application also provides an application scenario in which the above-described interface generation method is applied. Specifically, the application of the interface generation method in this scenario is as follows:

[0088] When users need to build a backend interface for a data management application that processes data from a database, in order to improve the efficiency of backend interface generation, the solution in this application can be used to generate form and table interfaces to manage the source data. Specifically, the solution in this application is implemented through an interface generation system, which can be referenced... Figure 8As shown, it is mainly divided into a front-end, a Node.js access layer, and a controlled core service. The front-end uses a self-developed form rendering engine based on Ncform; the Node.js access layer manages non-sensitive configurations (enumerations, directory configurations, etc.); the controlled core service layer does not break the original policy boundaries (such as policies for accessing databases, ckv, or other data), and all access to business logic is based on the controlled model. Furthermore, on-device deployment eliminates the need for separate machines, reducing costs and increasing efficiency. During page construction, users can submit interface creation requests through the system-provided page, providing the data source information and configuration information for the back-end interface. The system can then locate the target data source based on the data source information and retrieve data from the target data source according to the data source configuration information to obtain the data source metadata.

[0089] After obtaining the data source metadata, the system can further parse it to obtain the default field configuration data. This default field configuration data is then fed back to the user, who can make adaptive adjustments based on the system's feedback. After the adjustments are complete, the user submits the adjusted data back to the system, which then receives the modified data source field configuration data. Once the data source field configuration data is obtained, the system will convert it into raw schema data according to the user's pre-configured rules, including rules related to the data source, fields, and permissions.

[0090] Then, for the interface generation process, you can refer to... Figure 9 First, for the form interface, the system parses the raw pattern data to obtain preset form enumeration configuration data. Then, it replaces the raw enumeration configuration data in the raw pattern data with the preset form enumeration configuration data to obtain parsable pattern data. Next, the Ncform rendering engine processes the parsable pattern data for interface rendering, generating various form elements based on the parsable pattern data. Finally, the data management form interface is constructed based on these form elements.

[0091] For generating the table interface, the system parses the original pattern data and, upon confirming that the original pattern data is table data, obtains preset table enumeration configuration data and custom method data. Then, it maps the original enumeration configuration data in the original pattern data using the preset table enumeration configuration data to obtain table description tags. The system then processes the original pattern data using the custom method data to obtain target text data. Based on the table description tags and target text data, it obtains parsable pattern data. Finally, it performs table rendering processing on the parsable pattern data, generating filter forms, table areas, and pagination components. The data management table interface is then constructed based on the filter forms, table areas, and pagination components.

[0092] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0093] Based on the same inventive concept, this application also provides an interface generation apparatus for implementing the interface generation method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more interface generation apparatus embodiments provided below can be found in the limitations of the interface generation method described above, and will not be repeated here.

[0094] In one embodiment, such as Figure 10 As shown, an interface generation apparatus is provided, comprising:

[0095] The data acquisition module 1001 is used to acquire metadata from the data source.

[0096] The metadata parsing module 1003 is used to parse the data source metadata and obtain the data source field configuration data.

[0097] Data configuration module 1005 is used to generate raw schema data based on the data source field configuration data.

[0098] The pattern data parsing module 1007 is used to parse and configure the original pattern data based on the preset pattern configuration data to obtain parsable pattern data.

[0099] The interface rendering module 1009 is used to perform interface rendering processing on parsable modal data and generate a data management interface corresponding to the data source metadata.

[0100] In one embodiment, the data acquisition module is specifically used to: acquire data source information and data source configuration information; locate the target data source based on the data source information; and pull data from the target data source based on the data source configuration information to obtain data source metadata.

[0101] In one embodiment, the metadata parsing module 1003 is specifically used to: parse the data source metadata to obtain the default field configuration data of the data source; and return the default field configuration data of the data source to obtain the data source field configuration data modified based on the default field configuration data of the data source.

[0102] In one embodiment, the preset pattern configuration data includes preset form enumeration configuration data. The pattern data parsing module 1007 is specifically used to: parse the original pattern data; when it is determined that the original pattern data is form data, obtain the preset form enumeration configuration data; replace the original enumeration configuration data in the original pattern data with the preset form enumeration configuration data to obtain parsable pattern data.

[0103] In one embodiment, the data management interface includes a data management form interface, and the interface rendering module 1009 is specifically used for: performing interface rendering processing on parsable pattern data, generating form elements based on the parsable pattern data, and constructing the data management form interface based on the form elements.

[0104] In one embodiment, the preset pattern configuration data includes preset table enumeration configuration data and custom method data. The pattern data parsing module 1007 is specifically used to: parse the original pattern data; when the original pattern data is determined to be table data, obtain the preset table enumeration configuration data and custom method data; map the original enumeration configuration data in the original pattern data through the preset table enumeration configuration data to obtain table description labels; process the original pattern data through the custom method data to obtain target text data; and obtain parsable pattern data based on the table description labels and target text data.

[0105] In one embodiment, the data management interface includes a data management table interface, and the interface rendering module 1009 is specifically used to: perform table rendering processing on parsable pattern data, generate a filter form, a table area and a pagination component based on the parsable pattern data; and construct the data management table interface based on the filter form, the table area and the pagination component.

[0106] Each module in the aforementioned interface generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0107] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to interface generation. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an interface generation method.

[0108] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0109] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0110] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0111] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.

[0112] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0113] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0114] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0115] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for generating an interface, characterized in that, The method includes: Retrieve data source metadata; Parse the data source metadata to obtain the data source field configuration data; Generate raw schema data based on the data source field configuration data; The original pattern data is parsed. When the original pattern data is determined to be form data, preset form enumeration configuration data is obtained. The original enumeration configuration data in the original pattern data is replaced with the preset form enumeration configuration data to obtain parsable pattern data. The parsable pattern data is generated according to the format requirements of the preset rendering tool and can be directly parsed and rendered by the preset rendering tool. When the original pattern data is determined to be table data, preset table enumeration configuration data and custom method data are obtained; the original enumeration configuration data in the original pattern data is mapped using the preset table enumeration configuration data to obtain table description tags; the original pattern data is processed using the custom method data to obtain target text data; based on the table description tags and the target text data, parsable pattern data is obtained. The parsable pattern data is data that can be rendered by a preset rendering engine that renders tables. The preset rendering engine includes Ncform for rendering forms and a table rendering engine. Ncform is used to render the data of the filterable field portion in the parsable pattern data to generate a filter form. The table rendering engine is used to render the remaining data in the parsable pattern data to construct a table area and pagination components, thereby constructing the backend management interface. The parsable pattern data is processed for interface rendering to generate a data management interface corresponding to the data source metadata.

2. The method according to claim 1, characterized in that, The acquisition of data source metadata includes: Obtain data source information and data source configuration information; Find the target data source based on the data source information; Based on the data source configuration information, data is retrieved from the target data source to obtain data source metadata.

3. The method according to claim 1, characterized in that, The process of parsing the data source metadata to obtain the data source field configuration data includes: Parse the data source metadata to obtain the default field configuration data of the data source; The system returns the default field configuration data of the data source, and then obtains the data source field configuration data modified based on the default field configuration data of the data source.

4. The method according to claim 1, characterized in that, The data management interface includes a data management form interface, which performs interface rendering processing on the parsable modal data to generate the data management interface corresponding to the data source metadata, including: The parsable pattern data is processed for interface rendering, and form elements are generated based on the parsable pattern data; A data management form interface is constructed based on the aforementioned form elements.

5. The method according to claim 1, characterized in that, The data management interface includes a data management table interface. The interface rendering process for the parsable schema data generates the data management interface corresponding to the data source metadata, including: The parsable pattern data is processed into a table for rendering, and a filter form, table area, and pagination component are generated based on the parsable pattern data. A data management table interface is constructed based on the filter form, the table area, and the pagination component.

6. An interface generation apparatus, characterized in that, The device includes: The data acquisition module is used to acquire metadata from the data source; The metadata parsing module is used to parse the data source metadata to obtain the data source field configuration data. The data configuration module is used to generate raw schema data based on the data source field configuration data; The pattern data parsing module is used to parse the original pattern data. When the original pattern data is determined to be form data, it obtains preset form enumeration configuration data; it replaces the original enumeration configuration data in the original pattern data with the preset form enumeration configuration data to obtain parsable pattern data. The parsable pattern data is data generated according to the format requirements of a preset rendering tool and can be directly parsed and rendered by the preset rendering tool. When the original pattern data is determined to be table data, it obtains preset table enumeration configuration data and custom method data; it maps the original enumeration configuration data in the original pattern data using the preset table enumeration configuration data to obtain... Table description tags; the original pattern data is processed by the custom method data to obtain target text data; based on the table description tags and the target text data, parsable pattern data is obtained. The parsable pattern data is data that can be rendered by a preset rendering engine that renders the table. The preset rendering engine includes Ncform for rendering forms and a table rendering engine. Ncform is used to render the data of the filterable field part in the parsable pattern data to generate a filter form. The table rendering engine is used to render the remaining data in the parsable pattern data to construct a table area and pagination components, thereby constructing a backend management interface. The interface rendering module is used to perform interface rendering processing on the parsable modal data and generate a data management interface corresponding to the data source metadata.

7. The apparatus according to claim 6, characterized in that, The data acquisition module is specifically used for: acquiring data source information and data source configuration information; finding the target data source based on the data source information; and pulling data from the target data source based on the data source configuration information to obtain data source metadata.

8. The apparatus according to claim 6, characterized in that, The metadata parsing module is specifically used to: parse the data source metadata to obtain the data source default field configuration data; and return the data source default field configuration data to obtain the data source field configuration data modified based on the data source default field configuration data.

9. The apparatus according to claim 6, characterized in that, The data management interface includes a data management form interface, and the interface rendering module is specifically used to: perform interface rendering processing on the parsable pattern data, and generate form elements based on the parsable pattern data; A data management form interface is constructed based on the aforementioned form elements.

10. The apparatus according to claim 6, characterized in that, The data management interface includes a data management table interface. The interface rendering module is specifically used to: perform table rendering processing on the parsable pattern data, and generate a filter form, table area and pagination component based on the parsable pattern data. A data management table interface is constructed based on the filter form, the table area, and the pagination component.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

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

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • JSON self-definition-based report generation system and method

    CN106649225A