CN117369806A - Interface generation method, device, computer equipment and storage medium - Google Patents

Interface generation method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117369806A
CN117369806A CN202210762544.6A CN202210762544A CN117369806A CN 117369806 A CN117369806 A CN 117369806A CN 202210762544 A CN202210762544 A CN 202210762544A CN 117369806 A CN117369806 A CN 117369806A
Authority
CN
China
Prior art keywords
data
interface
configuration
data source
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210762544.6A
Other languages
Chinese (zh)
Inventor
胡茜雅
郭懿心
梁寅
胥林波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210762544.6A priority Critical patent/CN117369806A/en
Publication of CN117369806A publication Critical patent/CN117369806A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/74Reverse engineering; Extracting design information from source code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present application relates to an interface generation method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: firstly, acquiring data source metadata for generating a management interface; then, analyzing the data source metadata to obtain data source field configuration data; then, the original mode data can be generated according to the data source field configuration data, and the original mode data is favorable for interface configuration processing; then, analyzing and configuring the original mode data based on preset mode configuration data to obtain resolvable mode data, so that interface configuration data are optimized uniformly; and finally, carrying out interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata. The background interface is generated by the configuration method, so that the generation efficiency of the background interface can be effectively improved.

Description

Interface generation method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technology, and in particular, to an interface generating method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
With the development of computer technology, the demand for software development is also increasing. Software development is the process of building a software system or software parts of a system according to user requirements. Software development is a system project that includes demand capture, demand analysis, design, implementation, and testing. Software is typically implemented in a programming language. Development can be performed typically using software development tools. When software development is performed, a background management interface may be required to be generated according to development requirements.
At present, background management interface development of a software development process can be generally carried out through a configurable management panel open source program, however, the development process of the development mode is complex, and the development efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an interface generation method, apparatus, computer device, computer-readable storage medium, and computer program product that enable efficient implementation of background management interface development.
In a first aspect, the present application provides an interface generation method. The method comprises the following steps:
acquiring metadata of a data source;
analyzing the data source metadata to obtain data source field configuration data;
Generating original mode data according to the data source field configuration data;
analyzing and configuring the original mode data based on preset mode configuration data to obtain resolvable mode data;
and performing interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata.
In a second aspect, the present application further provides an interface generating device. The device comprises:
the data acquisition module is used for acquiring metadata of a data source;
the metadata analysis module is used for analyzing the metadata of the data source to obtain configuration data of the data source field;
the data configuration module is used for generating original mode data according to the data source field configuration data;
the mode data analysis module is used for analyzing and configuring the original mode data based on preset mode configuration data to obtain resolvable mode data;
and the interface rendering module is used for performing interface rendering processing on the resolvable mode data and generating a data management interface corresponding to the data source metadata.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Acquiring metadata of a data source;
analyzing the data source metadata to obtain data source field configuration data;
generating original mode data according to the data source field configuration data;
analyzing and configuring the original mode data based on preset mode configuration data to obtain resolvable mode data;
and performing interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring metadata of a data source;
analyzing the data source metadata to obtain data source field configuration data;
generating original mode data according to the data source field configuration data;
analyzing and configuring the original mode data based on preset mode configuration data to obtain resolvable mode data;
and performing interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
Acquiring metadata of a data source;
analyzing the data source metadata to obtain data source field configuration data;
generating original mode data according to the data source field configuration data;
analyzing and configuring the original mode data based on preset mode configuration data to obtain resolvable mode data;
and performing interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata.
The interface generation method, the interface generation device, the computer equipment, the storage medium and the computer program product firstly acquire data source metadata for generating a management interface; then, analyzing the metadata of the data source to obtain configuration data of the data source field; then, the original mode data can be generated according to the data source field configuration data, and the original mode data is favorable for interface configuration processing; then, the original mode data can be analyzed and configured based on the preset mode configuration data to obtain the resolvable mode data, so that the interface configuration data are optimized uniformly; and finally, carrying out interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata. The background interface is generated by the configuration method, so that the generation efficiency of the background interface can be effectively improved.
Drawings
FIG. 1 is an application environment diagram of an interface generation method in one embodiment;
FIG. 2 is a flow diagram of an interface generation method in one embodiment;
FIG. 3 is a schematic diagram of filling in data source information in one embodiment;
FIG. 4 is a schematic diagram of filling in data source configuration information in one embodiment;
FIG. 5 is a diagram of data source default field configuration data in one embodiment;
FIG. 6 is a schematic diagram of an interface for modifying data source default field configuration data in one embodiment;
FIG. 7 is a diagram illustrating the effect of field configuration after completion in one embodiment;
FIG. 8 is a schematic diagram of an interface generation system in one embodiment;
FIG. 9 is a flow diagram of an interface generation process in one embodiment;
FIG. 10 is a block diagram of an interface generating device in one embodiment;
FIG. 11 is an internal block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In this context, it is to be understood that the terms involved:
ncf orm: a global Wide area network (Web) form generation tool based on a Vue (three-dimensional rendering solution product) technical stack expands a standard JSON Schema (application/mode+json, wherein JSON is JavaScript object notation) and supports rendering of JSON into form components;
the form generation engine analyzes the data source structure into JSON configuration according to a certain rule by analyzing metadata of the data source (database, distributed storage system and the like), and then renders the configuration into a form structure with semantics through Ncform.
The interface generation method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on the cloud or other servers. When the user needs to generate an interface, the data source metadata for interface generation can be designated through the terminal 102, and then the server 104 acquires the data source metadata from the designated database according to the instruction of the terminal 102; analyzing the metadata of the data source to obtain configuration data of the data source field; generating original mode data according to the data source field configuration data; analyzing and configuring the original mode data based on preset mode configuration data to obtain resolvable mode data; and performing interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata. The terminal 102 may be, but not limited to, various desktop computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, an interface generating method is provided, and the method is applied to the server 104 in fig. 1 for illustration, and includes the following steps:
in step 201, data source metadata is obtained.
The data source can be a database, wherein the database is a data warehouse for organizing, storing and managing data according to a data structure, and is a set of a large amount of data which is stored in a computer for a long time, organized, sharable and uniformly managed. Metadata, also called intermediate data and relay data, is data (data about data) describing data, mainly describing data attribute (property) information, and is used for supporting functions such as indicating storage location, history data, resource searching, file recording, etc. Metadata is an electronic catalog, and in order to achieve the purpose of cataloging, the contents or characteristics of data must be described and collected, so as to achieve the purpose of assisting in data retrieval. The data source may also be other data storage systems. In one embodiment, the solution of the present application is used to generate a background management interface of a data management application, where the database may specifically be a database related to the data management application, and the metadata is used to configure data of various form fields of the data management application.
Specifically, when a user needs to generate a specified management background interface, if the background management interface to be generated is in a form type or a table type, the generation of the management interface can be assisted by the interface generation method of the application scheme, so that the generation efficiency of the interface is improved. When generating the management interface, the user needs to specify the corresponding data source metadata, and then the server 104 can start to generate the interface according to the data source metadata specified by the user. In one embodiment, the solution of the present application is used to implement the generation of a background management interface of a data management application, where a user may fill in a system form for implementing interface generation through the terminal 102, and indicate a data source and metadata for interface generation in the system form. Server 104 determines the data source by parsing the system form submitted by the user and obtains the interface from the data source to generate the associated metadata.
And 203, analyzing the data source metadata to obtain data source field configuration data.
The data parsing specifically refers to converting the format of metadata of a data source, so as to obtain a corresponding data file. There are two common data formats that will need to be transmitted during network communication: JSON and XML (Extensible Markup Language ), and data parsing is correspondingly divided into JOSN data parsing and XML data parsing. The data analysis of the scheme is specifically JOSN data analysis, and different types of data values can be obtained through the data analysis. The data source field configuration data refers to data obtained by parsing data source metadata, the metadata being data describing data, and the data source field configuration data being data to which the data source metadata is directed. The data source field configuration data specifically comprises field key values, field names, field types, operation and other types of configuration data. The field key value and the field name are used for describing the function of the field, and the field type refers to the type of the input content corresponding to the field, and includes an input box (input), a number (number), an object (object), a selection box (select), a date and an event (date), and the like. The operation refers to the operation type corresponding to the field, including editing, viewing, copying, deleting, moving up and down, etc.
Specifically, in the scheme of the application, the form or the background management interface in the form is generated through the data source metadata, the form interface or the data base of the form interface is the data source field configuration data, after the data source metadata are obtained, the data source metadata can be analyzed to obtain the configuration data for various fields, and the server can further generate the form or the form interface according to the field configuration data, so that the corresponding data management background interface is obtained. In one embodiment, the method of the present application is used to enable generation of a background management interface for a data management application. At this time, the data configured by the data source field configuration data includes a field key value: fdata_type, fdata_name, flimit, etc., field name: data coding, data name, data limit, etc., field type: common input box, number, object, selection input box, etc., field operation: view, copy, edit, delete, etc.
Step 205, generating original mode data according to the data source field configuration data.
The schema data is schema data, which may be a collection of database objects. schema data is an abstract collection of metadata that contains a set of schema components, mainly declarations of elements and properties, definitions of complex and simple data types. These schema components are typically created when a batch of schema documents is processed. The schema document contains the source language definition of the schema component. In everyday use, a schema document is often referred to as a schema. The original pattern data in the scheme of the application is pattern data which is expanded on the basis of json schema. json schema is one criterion used to define json data constraints. According to the contract mode, both sides exchanging data can understand the request and the constraint of json data, and can verify the data according to the request and the constraint, so that the correctness of data exchange is ensured.
Specifically, after the data source field configuration data used for performing form or form configuration is obtained, in order to generate a data management form interface or a data management form interface by a more efficient method, the data source field configuration data can be converted into original mode data, the data can be used as basic data for form rendering or form rendering, the original mode data is subjected to rendering processing by the rendering engine of the application, so that a target interface can be obtained, and the form interface or the form interface can be correspondingly generated according to different types of the original mode data.
Step 207, analyzing and configuring the original mode data based on the preset mode configuration data to obtain resolvable mode data.
The preset mode configuration data refers to data preset in the server for refreshing the form configuration or the form configuration, and is mainly applicable to the selector configuration, and for the type of the selector configuration, there may be multiple applications sharing the same enumeration (data in the underlying data source is demapped by more semantically data), so that some general mapping relations are defined by the preset mode configuration data in the application to be used as selectable items of the selector form or description labels in the form. The resolvable mode data refers to data which can be rendered through a preset rendering tool and is obtained as a form component or a form component. In one embodiment, the preset rendering tool in the solution of the present application is specifically an ncfam tool, which is a configuration generating tool for developing a form or a table, and extends a json schem standard to support rendering the same into a form component. Therefore, when the original mode data is obtained, the original mode data is further required to be rendered according to the format requirement of the preset rendering tool, and the resolvable mode data which can be rendered by the preset rendering tool is generated.
Specifically, the scheme of the application realizes interface generation through a rendering tool, wherein basic data used for interface generation is original mode data, and the rendering tool is a preset rendering tool. Therefore, before the interface is generated, in order to enable the original mode data to be effectively rendered by the preset rendering tool, the original mode data needs to be analyzed and converted first, and meanwhile, part of data in the original mode data can be configured, for example, selectable items in a selector type form item can be configured to be universally set. In one embodiment, for a form, in the scheme of the application, rendering of a form component is achieved through ncfam, and configuration of form contents is performed simultaneously in a parsing process, so that a target interface in a form is constructed. And for the table, the rendering of the target interface of the table component is realized through a table rendering engine, and meanwhile, the contents such as the filtering table, the paging component and the like are processed in the rendering process, so that the target interface in the table form is constructed.
And 209, performing interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata.
The target interface is an interface which is required to be constructed by the interface generating method, and specifically can be a form interface or a form interface, and the page can manage data pointed by the metadata of the data source. And the interface rendering refers to generating a corresponding form interface or a form interface according to the configuration information in the resolvable mode data.
Specifically, after the resolvable mode data is obtained, the server may directly perform rendering processing on the resolvable mode data through a preset rendering tool, so as to generate a corresponding target interface. When the resolvable mode data in the form format is rendered, corresponding form elements can be rendered through a preset rendering tool, so that a form interface is constructed. When the resolvable mode data in the form format is rendered, a corresponding form interface can be directly rendered through a preset rendering tool. And the interfaces can effectively manage the corresponding data source data.
The interface generation method comprises the steps of firstly obtaining data source metadata for generating a management interface; then, analyzing the metadata of the data source to obtain configuration data of the data source field; then, the original mode data can be generated according to the data source field configuration data, and the original mode data is favorable for interface configuration processing; then, the original mode data can be analyzed and configured based on the preset mode configuration data to obtain the resolvable mode data, so that the interface configuration data are optimized uniformly; and finally, carrying out interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata. The background interface is generated by the configuration method, so that the generation efficiency of the background interface can be effectively improved.
In one embodiment, step 201 includes: acquiring data source information and data source configuration information; searching a target data source according to the data source information; and according to the data source configuration information, carrying out data pulling from the target data source to obtain the data source metadata.
The data source information is configured by the user through the terminal 102, and is used for indicating the server 104 to obtain a target data source of data, and the data source configured by the user through the terminal 102 may be specifically a database or a distributed memory KV (Key-Value) storage system. After the configuration is completed, the server 104 can interface with the corresponding data sources according to the data source information. The data source configuration information is also configured by the user through the terminal 102, and is used for performing detailed configuration on information in the data source, and when the configuration is completed, the server 104 can pull corresponding metadata of the data source from the target data source according to the data source configuration information.
Specifically, when the user needs to generate the background management interface for data management through configuration, the terminal 102 may send the data source information and the data source configuration information to the server 104 to specify the data source and configure the data information to set the target data managed by the background management interface for data management, and the server 104 may search the data source metadata in the data source from the network according to the data source information and the data source configuration information and the name specified by the data source information, and determine the field structure of the data source metadata, thereby constructing a corresponding form or a form interface to implement management. In one embodiment, the method of the present application is used to enable generation of a background management interface for a data management application. At this time, the data source information filled in by the user may specifically be shown in fig. 3, where the items include an application number, an application name, an application type, an application state, a hidden directory entry, an affiliated directory, a modifier, a function description, and the like, where the application number and the application name are used for designating a data management application of a target, and the application type is used for designating a data source, to describe whether the data is derived from a database or a distributed memory KV storage system. The data source configuration information may be shown in fig. 4, where the data that the user needs to fill specifically includes: the data are used for realizing detailed configuration of the data sources, and when the configuration is completed, the server 104 can pull the metadata from the target data sources according to the specific content filled by the user and obtain information such as field structures of the metadata. In this embodiment, the user designates the target metadata to be processed through the data source information and the data source configuration information, so that the server 104 can be effectively assisted to identify the data source to be processed, thereby ensuring the efficiency of metadata acquisition in the interface generation process and comprehensively improving the interface generation efficiency and accuracy.
In one embodiment, step 203 comprises: analyzing the metadata of the data source to obtain default field configuration data of the data source; and feeding back the default field configuration data of the data source to obtain the modified data source field configuration data based on the default field configuration data of the data source.
The default field configuration data of the data source refers to field configuration conditions in the default state of the metadata in the data source, and the configuration conditions represent the field configuration conditions pointed by the metadata in a database. The data source field configuration data is data modified by the data source default field configuration data, and a user can delete and search the fields in the data source default field configuration data according to service requirements, so that the field configuration condition is ensured to meet the actual requirements of the service.
Specifically, in the scheme of the application, in order to ensure that the field configuration data extracted from the data source can meet the actual needs of a user, the field configuration data needs to be modified to a certain extent in determining the default field configuration data of the data source metadata. 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 side, then the user can modify these field configuration data to a certain extent according to the actual service requirement, obtain the field configuration data of the data source which can be matched with the service requirement, then the modification result is fed back to the server 104, the server 104 receives the modified field configuration data of the data source, and then the interface generation process is started based on the modified field configuration data of the data source. In one embodiment, the method of the present application is used to enable generation of a background management interface for a data management application. At this time, the default field configuration data of the data source may specifically be shown in fig. 5, where the default field configuration data includes a field key value: fdata_type, fdata_name, flimit, etc., field name: data coding, data name, data limit, etc., field type: common input box, number, object, selection input box, etc., field operation: while the example of modifying the field configuration by the user may be shown in fig. 6, which is a field of a selection box type, in the case of the basic configuration, the user may set the field to support configuration enumeration, so as to map the source data into a more semantic description, and the effect after the configuration is completed may be shown in fig. 7. In this embodiment, modification of the data source field configuration data is supported, and a user can adjust the field according to actual service requirements, so as to ensure accuracy of field configuration.
In one embodiment, the preset pattern configuration data comprises preset form enumeration configuration data, step 207 comprising: analyzing the original mode data, and acquiring preset form enumeration configuration data when the original mode data is determined to be form data; and replacing the original enumeration configuration data in the original mode data with preset form enumeration configuration data to obtain the resolvable mode data.
The form is mainly responsible for the data acquisition function in the webpage. A form has three basic components: form label: included are a universal resource locator (Uniform Resource Locator, URL) of a common gateway interface (Common Gateway Interface, CGI) program for handling form data and a method of submitting data to a server. Form field: including text boxes, password boxes, hidden fields, multi-line text boxes, check boxes, radio boxes, drop down select boxes, and file upload boxes, among others. Form button: the system comprises a submit button, a reset button and a general button; the CGI script used to transfer data to the server or cancel the input may also use form buttons to control other processing tasks that define the processing script. The form interface created in the application is mainly used for editing and adding data. The preset form enumeration (map) configuration data refers to data pre-stored in the server for configuring selectable items of a form of a selector type. For selector types, there may be multiple applications sharing the same enumeration, so a configuration center is defined in this application, and the user may define some common mapping relationships as selectable options for the selector form item. When the original mode data is analyzed and configured, the original enumeration configuration can be directly replaced by the preset form enumeration configuration data of the configuration center in the analysis process. Where enumerated meaning refers to demapping data in the underlying data source with more semantically data. I.e. the data in the data source is male|female, which will be shown as male|female in the management background interface. Here configuration enumeration, i.e. configuring such a mapping, male= > man.
Specifically, the scheme of the application can be specifically used for generating a tabular target interface and a tabular target interface, and analyzing the original mode data when the tabular target interface is generated. After parsing is complete, there may be configuration data for a particular selector type. For example, there may be a case where multiple applications share the same enumeration, so this application predefines a configuration center, and the user may define some general mapping relationships in the configuration center based on these cases of sharing the same enumeration, and build preset model configuration data of an enumeration type as an option of the selector form item. After the analysis is completed, the server 104 may directly pull the enumeration data configured in the configuration center, replace the enumeration related configuration data of the original mode data with the enumeration related configuration data, and then generate resolvable mode data which can be analyzed by the preset rendering engine according to the rule of the preset rendering engine, and in the subsequent processing process, the resolvable mode data can be rendered by the preset rendering engine to obtain a corresponding form interface. In this embodiment, the form data is refreshed by identifying the preset form enumeration configuration data, so that a data management form interface can be more effectively generated, and the validity of the form interface is ensured.
In one embodiment, the data management interface includes a data management form interface, performing interface rendering processing on the resolvable mode data, and generating the data management interface corresponding to the metadata of the data source includes: performing interface rendering processing on the resolvable mode data, and generating form elements based on the resolvable mode data; and constructing a data management form interface based on the form unit elements.
The form element refers to various configuration components corresponding to the configuration data in the form interface, and in one embodiment, the form element may specifically include a selector, a text box, a radio, a picture (image), a date, an array (array), and the like.
Specifically, after the resolvable mode data are obtained, the server can directly carry out resolution rendering on the resolvable mode data through a preset rendering engine, form elements such as a selector, a text box, a single selection, a picture, a date and an array are generated according to each resolvable mode data, and then a form interface is constructed based on the form elements. The expression elements on the form interface are in one-to-one correspondence with the data source field configuration data, so that the real situation of the data source metadata can be effectively reflected, and the effective management of the data source metadata is realized. In one embodiment, the method of the present application is used to enable generation of a background management interface for a data management application. At this time, the preset rendering engine is specifically ncfam, the parser in the server directly renders the original mode data and then generates the resolvable mode data, the ncfam renders the resolvable mode data to generate a plurality of interface elements in the background management interface, and corresponding configurations are performed on the contents such as a selector, a text box, a single selection, a picture, a date, an array and the like in the interface according to the configuration data in the resolvable mode data, so that a complete background management interface is constructed, and the background management interface can reasonably manage various fields arranged in the form, including editing, copying, deleting, moving and the like of the field contents. In this embodiment, form elements are generated according to the resolvable mode data, so that a corresponding form interface is constructed, and the effectiveness of the form interface construction can be ensured, thereby ensuring the effect of interface creation.
In one embodiment, the preset pattern configuration data includes preset table enumeration configuration data and custom method data, and step 207 includes: analyzing the original mode data, and acquiring preset form enumeration configuration data and user-defined method data when the original mode data is determined to be form data; mapping the original enumeration configuration data in the original mode data by presetting the form enumeration configuration data to obtain a form description tag; processing the original mode data through the custom method data to obtain target text data; and obtaining the resolvable mode data according to the table description tag and the target text data.
Wherein, the table, also called a table, is not only a visual communication mode, but also a means for organizing and organizing data. Various forms of morphology are widely used in communication, scientific research and data analysis activities. Various forms often appear in many places such as print media, handwriting records, computer software, architectural decorations, traffic signs, and the like. The conventions and terminology used to describe tables exactly will also vary from context to context. In addition, the types, structures, flexibility, labeling methods, expression methods, and use are also quite different among different tables. The form in the present application refers to the interface content in form of a form, which is mainly used for querying/previewing data, and the interface specifically includes contents such as a filtering form, a form area, a paging component, and the like. The preset form enumeration configuration data is mainly used for mapping the original mode data into more semantic description tags, and the custom method data is used for preprocessing the original mode data source data and converting the original mode data source data into target texts, so that the use scenes are enriched. And synthesizing the table description tag and the target text data to obtain the resolvable mode data, and carrying out resolution rendering on the resolvable mode data by a preset rendering tool so as to generate a corresponding table interface.
Specifically, when the original mode data is table data, that is, it is determined that the interface to be constructed is an interface in a table form, the server will parse the original mode data and directly pull preset table enumeration configuration data and user-defined method data configured in the configuration center. The enumeration data is mainly used for mapping the bottom data of the original mode data into a description tag with more meaning; the self-defining method adopts the idea of low codes, preprocesses the original mode data by writing scripts by using a Javascript language, and converts the source data into a target text in a required text form by data clipping, thereby enriching the use scenes. In this embodiment, the original mode data in the form of a table is converted by an enumeration and custom method, so that the data can be rendered by a preset rendering engine for rendering the table, and the effectiveness of interface construction is ensured.
In one embodiment, the data management interface comprises a data management form interface, and step 209 comprises: performing table rendering processing on the resolvable mode data, and generating a screening table, a table area and a paging component based on the resolvable mode data; a data management form interface is constructed based on the screening form, the form area, and the paging component.
Wherein, the screening form is used for screening the pre-condition of the final rendering data of the form, and the form area refers to the cell area in the form and is used for displaying numbers and other items for quick reference and analysis. The paging component is used for providing paging function of the tables and corresponds to a plurality of tables of different interfaces.
Specifically, after the resolvable mode data are obtained, the server can directly carry out resolution rendering on the resolvable mode data through a preset rendering engine, and the resolvable mode data can be specifically divided into two rendering processes when the table is rendered, firstly, because the resolvable mode data possibly contain form elements such as a screenable field (namely, a preset condition for screening final rendering data of the table) and the like, the preset form rendering engine can be called to render the resolvable mode data to generate a screening table. And then, a preset table rendering engine is called to render the resolvable mode data to generate a table area and a paging component, and finally, the screening table, the table area and the paging component are combined to construct a data management table interface. In one embodiment, the method of the present application is used to enable generation of a background management interface for a data management application. At this time, the preset rendering engine includes an ncfam for rendering the form and a form rendering engine, the parser in the server directly renders the original mode data and then generates the resolvable mode data, the ncfam renders the data of the part of the filterable fields in the resolvable mode data to generate the filtered form, and the form rendering engine renders the rest data in the resolvable mode data to construct a form area and a paging component, so that a complete background management interface is constructed, and the background management interface can reasonably manage various fields arranged in the form and is mainly used for inquiring and previewing the data. In this embodiment, the screening form, the form area and the paging component are generated according to the resolvable mode data, so that a corresponding form interface is constructed, the effectiveness of the construction of the form interface can be ensured, and the effect of the interface creation is ensured.
The application also provides an application scene, and the application scene applies the interface generation method. Specifically, the application of the interface generation method in the application scene is as follows:
when a user needs to construct a data management application background interface for processing data in a database, in order to improve the generation efficiency of the background interface, a form interface and a form interface can be generated through the scheme of the application, so that management of source data is realized. The scheme of the application is specifically implemented through an interface generation system, and the system can be mainly divided into a front end, a node access layer and a controlled core service as shown in fig. 8. Wherein the front end self-lapping form rendering engine based on ncfam; the node access layer manages non-sensitive configurations (enumeration, directory configuration, etc.); the controlled core service layer does not break the original policy boundary (such as the policy of accessing db, ckv or other data), all accesses to the service are performed based on the controlled model, and meanwhile, the same machine deployment does not need to use a separate machine cost, so that the cost is reduced and the efficiency is improved. When constructing a page, a user can submit a creation request of an interface through the page provided by the system, and provide data source information and data source configuration information processed by a background interface, and the system can search a target data source according to the data source information; and according to the data source configuration information, carrying out data pulling from the target data source to obtain the data source metadata.
After the data source metadata are obtained, the data source metadata can be further analyzed to obtain the default field configuration data of the data source; and feeding back default field configuration data of the data source to the user, wherein the user can adaptively adjust the field configuration data based on the feedback of the system, and the data source field configuration data obtained based on the modification of the default field configuration data of the data source is fed back to the system after the adjustment is completed. After the data source field configuration data is obtained, the system converts the data source field configuration data into original mode data according to rules preset by a user, including rules of data sources, fields, authorities and the like.
Then, for the interface generation process, referring to fig. 9, first, for the form interface, the system will parse the original mode data to obtain preset form enumeration configuration data; and then, replacing the original enumeration configuration data in the original mode data with preset form enumeration configuration data to obtain the resolvable mode data. Performing interface rendering processing on the resolvable mode data through an Ncform rendering engine, and generating various form elements based on the resolvable mode data; and finally, constructing a data management form interface based on the form unit elements.
For the generation of the form interface, the system analyzes the original mode data and acquires preset form enumeration configuration data and user-defined method data when the original mode data is determined to be the form data; mapping the original enumeration configuration data in the original mode data by preset form enumeration configuration data to obtain a form description tag; processing the original mode data through the custom method data to obtain target text data; and obtaining the resolvable mode data according to the table description tag and the target text data. Finally, performing table rendering processing on the resolvable mode data, and generating a screening form, a table area and a paging component based on the resolvable mode data; a data management form interface is constructed based on the screening form, the form area, and the paging component.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an interface generating device for realizing the interface generating method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the interface generating device or devices provided below may refer to the limitation of the interface generating method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 10, there is provided an interface generating apparatus including:
the data acquisition module 1001 is configured to acquire metadata of a data source.
The metadata parsing module 1003 is configured to parse metadata of a data source to obtain configuration data of a data source field.
The data configuration module 1005 is configured to generate the raw mode data according to the data source field configuration data.
The mode data parsing module 1007 is configured to parse and configure the original mode data based on the preset mode configuration data, so as to obtain parsable mode data.
The interface rendering module 1009 is configured to perform an interface rendering process on the resolvable mode data, and generate a data management interface corresponding to the data source metadata.
In one embodiment, the data acquisition module is specifically configured to: acquiring data source information and data source configuration information; searching a target data source according to the data source information; and according to the data source configuration information, carrying out data pulling from the target data source to obtain the data source metadata.
In one embodiment, the metadata parsing module 1003 is specifically configured to: analyzing the metadata of the data source to obtain default field configuration data of the data source; and feeding back the default field configuration data of the data source to obtain the modified data source field configuration data based on the default field configuration data of the data source.
In one embodiment, the preset pattern configuration data includes preset form enumeration configuration data, and the pattern data parsing module 1007 is specifically configured to: analyzing the original mode data, and acquiring preset form enumeration configuration data when the original mode data is determined to be form data; and replacing the original enumeration configuration data in the original mode data with preset form enumeration configuration data to obtain the resolvable mode data.
In one embodiment, the data management interface includes a data management form interface, and the interface rendering module 1009 is specifically configured to: performing interface rendering processing on the resolvable mode data, and generating form elements based on the resolvable mode data; and constructing a data management form interface based on the form unit elements.
In one embodiment, the preset mode configuration data includes preset table enumeration configuration data and custom method data, and the mode data parsing module 1007 is specifically configured to: analyzing the original mode data, and acquiring preset form enumeration configuration data and user-defined method data when the original mode data is determined to be form data; mapping the original enumeration configuration data in the original mode data by presetting the form enumeration configuration data to obtain a form description tag; processing the original mode data through the custom method data to obtain target text data; and obtaining the resolvable mode data according to the table description tag and the target text data.
In one embodiment, the data management interface includes a data management form interface, and the interface rendering module 1009 is specifically configured to: performing table rendering processing on the resolvable mode data, and generating a screening table, a table area and a paging component based on the resolvable mode data; a data management form interface is constructed based on the screening form, the form area, and the paging component.
The respective modules in the interface generating apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 11. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data related to interface generation. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an interface generation method.
It will be appreciated by those skilled in the art that the structure shown in fig. 11 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-described method embodiments.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (11)

1. An interface generation method, characterized in that the method comprises:
acquiring metadata of a data source;
analyzing the data source metadata to obtain data source field configuration data;
generating original mode data according to the data source field configuration data;
analyzing and configuring the original mode data based on preset mode configuration data to obtain resolvable mode data;
And performing interface rendering processing on the resolvable mode data to generate a data management interface corresponding to the data source metadata.
2. The method of claim 1, wherein the obtaining data source metadata comprises:
acquiring data source information and data source configuration information;
searching a target data source according to the data source information;
and according to the data source configuration information, data pulling is carried out from the target data source, so as to obtain data source metadata.
3. The method of claim 1, wherein parsing the data source metadata to obtain data source field configuration data comprises:
analyzing the data source metadata to obtain data source default field configuration data;
and feeding back the default field configuration data of the data source to obtain the configuration data of the data source field, which is modified based on the default field configuration data of the data source.
4. The method of claim 1, wherein the preset pattern configuration data comprises preset form enumeration configuration data, wherein parsing the original pattern data based on the preset pattern configuration data to obtain parseable pattern data comprises:
Analyzing the original mode data, and acquiring preset form enumeration configuration data when the original mode data is determined to be form data;
and replacing the original enumeration configuration data in the original mode data with the preset form enumeration configuration data to obtain the resolvable mode data.
5. The method of claim 4, wherein the data management interface comprises a data management form interface, wherein performing an interface rendering process on the resolvable mode data, and wherein generating the data management interface corresponding to the data source metadata comprises:
performing interface rendering processing on the resolvable mode data, and generating form elements based on the resolvable mode data;
and constructing a data management form interface based on the table element.
6. The method of claim 1, wherein the preset pattern configuration data comprises preset form enumeration configuration data and custom method data, wherein parsing the original pattern data based on the preset pattern configuration data to obtain parseable pattern data comprises:
analyzing the original mode data, and acquiring preset form enumeration configuration data and user-defined method data when the original mode data is determined to be form data;
Mapping the original enumeration configuration data in the original mode data through the preset form enumeration configuration data to obtain a form description tag;
processing the original mode data through the custom method data to obtain target text data;
and obtaining the resolvable mode data according to the table description tag and the target text data.
7. The method of claim 6, wherein the data management interface comprises a data management table interface, wherein performing an interface rendering process on the resolvable mode data, and wherein generating the data management interface corresponding to the data source metadata comprises:
performing table rendering processing on the resolvable mode data, and generating a screening form, a table area and a paging component based on the resolvable mode data;
and constructing a data management table interface based on the screening table, the table area and the paging component.
8. An interface generating device, the device comprising:
the data acquisition module is used for acquiring metadata of a data source;
the metadata analysis module is used for analyzing the metadata of the data source to obtain configuration data of the data source field;
The data configuration module is used for generating original mode data according to the data source field configuration data;
the mode data analysis module is used for analyzing and configuring the original mode data based on preset mode configuration data to obtain resolvable mode data;
and the interface rendering module is used for performing interface rendering processing on the resolvable mode data and generating a data management interface corresponding to the data source metadata.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202210762544.6A 2022-06-30 2022-06-30 Interface generation method, device, computer equipment and storage medium Pending CN117369806A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210762544.6A CN117369806A (en) 2022-06-30 2022-06-30 Interface generation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210762544.6A CN117369806A (en) 2022-06-30 2022-06-30 Interface generation method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117369806A true CN117369806A (en) 2024-01-09

Family

ID=89391525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210762544.6A Pending CN117369806A (en) 2022-06-30 2022-06-30 Interface generation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117369806A (en)

Similar Documents

Publication Publication Date Title
US11334711B2 (en) Management of building plan documents utilizing comments and a correction list
US10817516B2 (en) Result types for conditional data display
US11010537B2 (en) Web-intrinsic interactive documents
CA2669479C (en) Generating end-user presentations from structured data
US20040237040A1 (en) System and method of processing an electronic form using layered aspects
US7720885B2 (en) Generating a word-processing document from database content
US20100057760A1 (en) Generic data retrieval
US11200374B2 (en) Methods to create and use responsive forms with externalized configurations and artifacts
CN115858526A (en) Multidimensional visual test data management system based on uncertain data source formats
CN114647409A (en) Large-screen visualization application creation platform, method, computing device and storage medium
US20140075288A1 (en) Electronic device and method for displaying images on screen
CN114371845A (en) Form generation method and device
US20080263018A1 (en) Method and System for Mapping Business Objects to Relational Database Tables
US8862976B1 (en) Methods and systems for diagnosing document formatting errors
US8082496B1 (en) Producing a set of operations from an output description
CN109948133B (en) Data form realization method based on Layu
CN117369806A (en) Interface generation method, device, computer equipment and storage medium
CN114201157A (en) Method and system for customizing target service module by low code
US20120170077A1 (en) Rendering electronic documents having linked textboxes
CN114239525A (en) Contract template editing method and device, computer equipment and storage medium
US20180189499A1 (en) Dynamic security report generator
US20220035991A1 (en) System and method for dynamic linking between graphic documents and comment data bases
CN116610827A (en) Method and device for automatically generating presentation file and system for managing presentation file
CN117591110A (en) Page generation method, device, equipment, storage medium and program product
Shen et al. Visualdb: Managing and publishing scientific data on the web

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination