Method, device and equipment for dynamic generation and display of column data, and storage medium
By setting up dynamic column configuration interfaces and data source configuration interfaces on a low-code platform, the dynamic generation and display of column data are realized, which solves the problems of low development efficiency and high communication costs in traditional methods, and improves development efficiency and versatility under changing business requirements.
Patent Information
- Application Number
- CN202310483501.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2043-04-28
AI Technical Summary
In low-code platforms, traditional methods require rewriting code or customizing business data tables to adapt to changes in business needs, resulting in low development efficiency, high communication costs, and complex column data generation logic, making it impossible to achieve dynamic generation and display of column data.
By setting up a dynamic column configuration interface and a data source configuration interface on a low-code platform, configuring the column field names and values respectively, and using the mapping field names to associate the data source component and the dynamic column component, column data is generated and displayed, realizing dynamic generation and display in a graphical interface.
It enables dynamic column data generation and display on a low-code platform without the need for code customization to meet changing business requirements, improving development efficiency and versatility while reducing communication costs.
Smart Images

Figure CN116561201B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of low-code platform, and particularly relates to a method and device for dynamic generation and display of column data, equipment and storage medium. BACKGROUND
[0002] In the technical field of low-code platform, some column data is usually added in a certain business data table. The added column data can be a summary processing of multiple data items in the original business data table, or table item data in another business data table is added to the business data table, so that the generated column data in the same business scenario can dynamically change based on the change of business requirements. However, in traditional project development, we generally code based on business scenario requirements, or customize a fixed business data table. At this time, when each business requirement changes, code rewriting or business data table customization is required. However, with the diversity of business requirement changes in business scenarios, more and more business data tables need to be customized and developed, and there is no general way to realize dynamic generation and display of column data. Therefore, a method applied to low code is needed to realize dynamic generation and display of column data. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a method and device for dynamic generation and display of column data, which aims to realize dynamic generation and display of column data in a graphical interface based on a low-code platform.
[0004] In a first aspect, a method for dynamic generation and display of column data is provided according to the embodiments of the present application, which is applied to a low-code platform. The method comprises:
[0005] displaying a dynamic column configuration interface and obtaining dynamic column attribute parameters configured in the dynamic column configuration interface;
[0006] generating a dynamic column field component according to the dynamic column attribute parameters;
[0007] displaying a data source configuration interface and obtaining dynamic column data parameters configured in the data source configuration interface, the dynamic column data parameters comprising a first business data table and at least one field logic parameter; each field logic parameter comprises a mapping field name, a data field parameter and a field mapping logic, the data field parameter being field information in the first business data table, and the mapping field name being used to represent the relationship between the field logic parameter and the dynamic column field component;
[0008] generating a database execution script for querying the first business data table according to the field logic parameter;
[0009] generate a data source component corresponding to the dynamic column field component according to the dynamic column field component and the corresponding data source component;
[0010] generate column data according to the dynamic column field component and the corresponding data source component;
[0011] add the column data to a second business data table and display.
[0012] In a second aspect, an embodiment of the present application provides a device for dynamic generation and display of column data, applied to a low-code platform; the device comprises:
[0013] a first display module, configured to display a dynamic column configuration interface and acquire a dynamic column attribute parameter configured in the dynamic column configuration interface;
[0014] a first component generation module, configured to generate a dynamic column field component according to the dynamic column attribute parameter;
[0015] a second display module, configured to display a data source configuration interface and acquire a dynamic column data parameter configured in the data source configuration interface, the dynamic column data parameter comprising a first business data table and at least one field logic parameter; each field logic parameter comprises a mapping field name, a data field parameter and a field mapping logic, the data field parameter being field information in the first business data table, and the mapping field name being used to represent a relationship between the field logic parameter and the dynamic column field component;
[0016] a second component generation module, configured to generate a database execution script for querying the first business data table according to the field logic parameter, and generate a data source component corresponding to the dynamic column field component according to an execution result of the database execution script and the mapping field name;
[0017] an association module, configured to generate column data according to the dynamic column field component and the corresponding data source component;
[0018] a column data display module, configured to add the column data to a second business data table and display.
[0019] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the method for dynamic generation and display of column data according to any one of the first aspect when executing the computer program.
[0020] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the method for dynamically generating and displaying column data according to any one of the first aspect.
[0021] The present application provides a method and device for dynamically generating and displaying column data, and a storage medium. The field name of a column to be dynamically generated and displayed is configured separately from the numerical value in the column by respectively configuring a dynamic column configuration interface and a data source configuration interface. The data source configuration interface is used to query a data source component for dynamically displaying data from a first data table, and the dynamic column configuration interface is used to generate a dynamic column component of the field name of the dynamic column. The data source component and the dynamic column component are associated by mapping the field name, so as to generate column data and add the column data to a second business table to meet the display requirements of a specific application scenario. At this time, query search and other operations can be performed based on the data table after the dynamic column is added. Therefore, compared with related technologies, the present application can realize the dynamic generation and display of column data based on a low-code platform and an image interface. BRIEF DESCRIPTION OF DRAWINGS
[0022] Figure 1 FIG. 1 is a flowchart of a method for dynamically generating and displaying column data according to an embodiment of the present application;
[0023] Figure 2 FIG. 2 is a setting interface diagram of a column generation parameter of a dynamic column configuration interface according to an embodiment of the present application;
[0024] Figure 3 FIG. 3 is a diagram of a data source configuration interface according to an embodiment of the present application;
[0025] Figure 4 FIG. 4 is a flowchart of one specific embodiment of a method for dynamically generating and displaying column data according to an embodiment of the present application;
[0026] Figure 5 FIG. 5 is a module diagram of a device for dynamically generating and displaying column data according to an embodiment of the present application;
[0027] Figure 6 FIG. 6 is a hardware structure diagram corresponding to the method for dynamically generating and displaying column data according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0029] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing only embodiments of this application and is not intended to be limiting of this application.
[0030] In the technical field of low-code platform technology, some column data is usually added in a certain business data table. The added column data can be a summary processing of multiple data items in the original business data table, or table item data in another business data table is added to the business data table to meet the dynamic change of the generated column data based on the change of business requirements in the same business scenario. However, in the traditional project, we generally code based on the business scenario requirements, or customize a fixed business data table. At this time, when each business requirement changes, code rewriting or business data table customization is required. However, with the diversity of business requirement changes in the business scenario, more and more business data tables need to be customized and developed, resulting in low development efficiency, high communication cost, and inability to dynamically configure according to the change of the business scenario, which brings complex column data generation logic and low list generation efficiency. Therefore, there is an urgent need for a method applied to low code to realize dynamic generation and display of column data. Based on this, the method, device, equipment and storage medium for dynamic generation and display of column data provided by the present application aim to realize dynamic generation and display of column data based on a low-code platform to improve the generality of dynamic generation and display of column data.
[0031] Referring to Figure 1 The method for dynamic generation and display of column data provided by the embodiment of the present application comprises:
[0032] Step S100, display a dynamic column configuration interface and obtain dynamic column attribute parameters configured in the dynamic column configuration interface;
[0033] Step S200, generate a dynamic column field component according to the dynamic column attribute parameters;
[0034] Step S300, display a data source configuration interface and obtain dynamic column data parameters configured in the data source configuration interface. The dynamic column data parameters include a first business data table and at least one field logic parameter. Each field logic parameter includes a mapping field name, a data field parameter and a field mapping logic. The data field parameter is field information in the first business data table, and the mapping field name is used to represent the relationship between the field logic parameter and the dynamic column field component;
[0035] Step S400, generate a database execution script for querying the first business data table according to the field logic parameter;
[0036] Step S500, generating a data source component corresponding to the dynamic column field component according to the execution result of the database execution script and the mapping field name;
[0037] Step S600, generating column data according to the dynamic column field component and the corresponding data source component;
[0038] Step S700, adding the column data to the second business data table and displaying.
[0039] Therefore, by respectively setting the dynamic column configuration interface and the data source configuration interface, the field name of the column to be dynamically generated and displayed is configured separately from the value in the column, wherein the data source configuration interface is used to query the data source component for dynamic column display from the first data table, the dynamic column configuration interface is used to generate the dynamic column component of the field name of the dynamic column, and the data source component and the dynamic column component are associated through the mapping field name, so as to generate column data and add it to the second business table to meet the display requirements of specific application scenarios. At this time, query search and other operations can be performed based on the data table after the dynamic column is added. Therefore, compared with related technologies, the present application can realize the dynamic generation and display of column data based on a low-code platform.
[0040] The dynamic column configuration interface in step S100 and the data source configuration interface in step S300 are both used for user interaction, which can be configured through setting the input box of the dynamic column data parameter, or setting the fixed format text (such as table, etc.) input mode or voice and the like. For this, the present application embodiment does not limit how the dynamic column configuration interface and the data source configuration interface interact, and the improvement of the present application is mainly in the decoupling setting of the dynamic column attribute parameter and the dynamic column data parameter to realize the generation and display of the dynamic column. Therefore, the implementation mode of the dynamic column configuration interface and the data source configuration interface is not described in detail here.
[0041] In step S200, the dynamic column attribute parameter is used to record the generation rule of the field name of the column to be dynamically added; and in step S400, the dynamic column data parameter is used to record the generation logic of the value of the added column. It should be noted that the dynamic column field component corresponds to a component displaying the field name of the column data. The mapping field name can be set as a variable pointing to the dynamic column field component, or can have the same name as the variable pointing to the dynamic column field component set in the dynamic column attribute parameter, so that the association between the two can be established based on whether the names are consistent. The field mapping logic represents the relationship between the data field parameter and the mapping field name; the data source component displays the component of the value corresponding to the field name of each added column; for example, taking Table 1 as follows:
[0042] Personnel Department 2021-1-1 2021-1-2 2021-1-3 2021-1-4 2021-1-5 Zhang San Xx Day shift Day shift Day shift Night shift Day shift Li Si YY Night shift Night shift Night shift Day shift Night shift .... ... ... ... ... ... ...
[0043] Table 1
[0044] The field names "2021-1-1" to "2021-1-5" are determined by the dynamic column field component configured by the dynamic column attribute parameter. For the dynamic column field component "2021-1-1", "day shift" is determined by the data source component generated based on the dynamic column data parameter.
[0045] It should be noted that the first business data table is the source data of the value of the newly added column data. For example, in Table 1, the value represents shift information, and there is a separate shift table record, and the first business data table represents the shift table. The second business data table is the original data table of the newly added column data. For example, if the shift table needs to be added to the shift information that meets the condition, both the first data table and the second data table are the shift table; or the shift information that meets the condition is added to the workshop personnel management table, the first data table is the workshop personnel management table, and the second data table is the shift table.
[0046] It should be noted that the database execution script is a script file for querying the database and performing operations on the query results based on field mapping logic. For example, the operation logic of the mapping field name "A" in the field mapping logic is to sum the column data of "C" and "D" in the first business data table, and the database execution script includes a database query statement for querying "C" and "D" columns in the first business data table that meet the condition, and also includes data summation of the values of the queried "C" and "D" columns to obtain the column unit value corresponding to each mapping field name.
[0047] It should be noted that by separately configuring the dynamic column attribute parameter and the dynamic column data parameter, the general processing logic can be realized before associating the first business data table. After the above interface operation is provided, the user can generate and display dynamic column data based on the interface, without the need for code customization or re-creation of a new table to meet the dynamic needs of the business.
[0048] It can be understood that the dynamic column attribute parameter includes a column generation condition parameter, first column basic information, and a dynamic column variable.
[0049] In step S200, a dynamic column field component is generated according to the dynamic column attribute parameter, including:
[0050] The number of columns is determined according to the column generation condition parameter.
[0051] The first column basic information is iterated and instantiated N times according to the number of columns and the dynamic column variable, to obtain N dynamic column field components; N is equal to the number of columns.
[0052] The first column basic information represents the display format of the field name of the time type, for example, if the first column basic information display format is set as the time format, such as "year-month-day", the field name in the format of "year-month-day" is generated; if it is set as "year", the column data is incremented according to the year; and if it is set as "month".
[0053] The column generation condition parameter is used to determine the range of the numerical value in the column data and define the change rule between each column data, so that the number of columns can be determined according to the column generation condition parameter. In some embodiments, the column generation condition parameter includes the number of columns and the start condition, in other embodiments, the column generation condition parameter includes the number of columns and the end condition, and in other embodiments, the column generation condition parameter includes the start condition and the end condition. For example, referring to FIG. 6, the dynamic column configuration interface is provided with a start column configuration drop-down table and an end column configuration table, and when the first column basic information is set as "year-month-day", "today" is selected in the start column configuration, and "today" is selected in the end column configuration, and when the column generation condition parameter defines that the column data is incremented according to the day, the number of columns can be determined as 1. Figure 2
[0054] It should be noted that in some embodiments, the dynamic column field component and the data source component are generated in sequence after the dynamic column attribute parameter and the dynamic column data parameter are configured. At this time, the data source component and the dynamic column field component are created in sequence in one process, as shown in FIG. 5. Figure 4
[0055] It can be understood that the column iteration instantiation processing includes:
[0056] Obtaining a column conversion script;
[0057] Generating a first component index according to the column generation condition parameter and a preset index generation rule;
[0058] Determining second column basic information corresponding to the first component index according to the column generation condition parameter and the first column basic information;
[0059] Converting the format of the second column basic information according to the column conversion script to obtain a dynamic column data source data structure instance;
[0060] Splicing the first component index and the corresponding dynamic column variable to obtain a column component name;
[0061] Binding the dynamic column data source data structure instance and the column component name to obtain a dynamic column field component of the current iteration instantiation processing;
[0062] In step S600, column data is generated according to the dynamic column field component and the corresponding data source component, including:
[0063] The column data is generated by binding the column unit value in the dynamic column field component and the data source component with the same column component name as the mapping name.
[0064] It should be noted that the column conversion script is a logical script for generating the field name of each column data according to the set first column basic information and column selection parameter. The column conversion script can be configured through the dynamic column configuration interface, or the mapping table of the first column basic information and the column conversion script can be set in the program in advance. For example, the number of columns is set to N, the first column basic information is “year-month-day”, the logical script adopts an incremental mode, the starting condition in the column selection parameter is “2021-1-1”, and the format conversion adds corresponding week information. Taking this as an example, for the first column data, according to the column conversion script, the first column basic information, and the starting condition, it can be determined that the field name of the first column data is “2021-1-01 Monday”, the field name of the second column data is “2021-1-02 Tuesday”, and the field name of the Nth column data is “2021-1-0N Sunday”. At this time, N dynamic column structure instances can be obtained, which are “2021-1-01 Monday”, “2021-1-02 Tuesday”... “2021-1-0N Sunday”.
[0065] It should be noted that in some embodiments, the first component index is sequentially set based on the generation order of the dynamic column data source data structure instance, such as setting the first component index to 2 bits. For the first dynamic column data source data structure instance, the generation order is the first bit, and the first component index is 01. Assuming that the dynamic column variable is set to “HK_AUTO_F”, the column component name corresponding to the first dynamic column data source data structure instance is “HK_AUTO_F_01”. At this time, for the dynamic column field component, the data source data structure is as follows:
[0066] {
[0067] columnName: "HK_AUTO_Fxxx",
[0068] columnDescript: "2023-02-22",
[0069] };
[0070] Among them, “columnName” corresponds to the column component name, and “columnDescript” corresponds to the field name.
[0071] It should be noted that the data source data structure corresponding to the field logic parameter is as follows:
[0072]
[0073] Wherein, the "Field Name" corresponds to the mapping field name; the "Field Logic" represents the database execution statement logic based on the field mapping logic and the data field parameter, and the database execution script can be generated based on each "Field Logic"; when the mapping field name is consistent with the column component name, it indicates that the data source component corresponding to the data source data structure corresponds to the dynamic column component; at the same time, the processing between the dynamic column field component and the data source component can be independent of each other.
[0074] It can be understood that the column generation condition parameter includes a column type, a start condition and an end condition; according to the column generation condition parameter, the number of columns is determined, including:
[0075] The start condition and the end condition are subtracted to obtain a selection interval.
[0076] According to the column type, the selection interval is converted to obtain the number of columns.
[0077] It should be noted that the column type represents the change rule between each column data, such as the column type being day, which indicates that each column data changes according to the day interval. The column type can be a default configuration or a user interface manual configuration.
[0078] It should be noted that for the application program, the start condition and the end condition are stored in a data type, such as character type or integer type, so the column number can be obtained after conversion based on the column type.
[0079] It can be understood that the attribute type of the dynamic column variable is one of a scene attribute and a local attribute; the first business data table is determined by the following steps:
[0080] When the dynamic column variable is a scene attribute, at least one first business data table is selected from the third business data table under the scene attribute in the preset configuration interface.
[0081] It should be noted that the scene attribute indicates that the dynamic column variable can be shared by the data source component with the same scene attribute, and the local attribute indicates that the dynamic column variable can only be associated with one business data table.
[0082] It can be understood that step S600, according to the field logic parameter, generates a database execution script for querying the first business data table, including:
[0083] When the field mapping logic indicates that grouping is needed, the data field parameter is processed by row-column conversion, and the database execution script is generated according to the row-column conversion processing result, the first business data table and the mapping field name;
[0084] When the field mapping logic indicates that grouping is not needed, the data field parameters are mapped one-to-one with the mapping field names and script statements are generated, and the query results of the script statements are bound with the mapping fields to generate a database execution script.
[0085] It should be noted that the field mapping logic includes grouping information, which is used to indicate whether grouping is needed, so as to generate one column of data from multiple columns of data according to a certain conversion relationship, thereby realizing row-column conversion.
[0086] The field mapping logic also includes conditional logic and calculation formulas. Taking the data field parameter "F01" as an example, the conditional logic is set to "F01 = 1", trueValue: "F01", and falseCalue: "0". This indicates that for the column data of the field information "F01" in the first business table, if the value of the record in this column of F01 is 1, the actual column cell value corresponding to "F01 = 1" in the first business table is displayed, otherwise 0 is displayed. Taking the calculation formula as an example, the aggregateMethod is set to "sum", and the fieldLogic is "F01". The grouping information is 10 records under "F01". This indicates that the sum of the 10 column data of the field information "F01" in the first business table is calculated, and the aggregated data obtained by summing the 10 records is used as the value of the column data under the mapping field name. It should be noted that the conditional logic and the calculation formula can be mixedly used, and the present application does not limit how the field mapping logic number is set and combined. Those skilled in the art can selectively set the field mapping logic number according to actual needs.
[0087] For example, as shown in the following Figure 3 The data source configuration interface is provided with a query box of the business data table (i.e., the selection box on the side of "Business Data Table") for the user to set the data field parameters, and an input area of the field logic parameters, which is used to add the default field mapping logic by clicking "Add Logic" and display the input boxes of the input field names and the data field parameters. Alternatively, the custom field mapping logic such as grouping information and calculation formulas can be added by adding "Advanced Formula".
[0088] It can be understood that the row-column conversion processing of the data field parameters includes:
[0089] According to the data field parameters, column grouping information in the first business data table is determined from the field mapping logic.
[0090] Column calculation logic defined in the data field parameters is obtained from the field mapping logic.
[0091] According to the column calculation logic and the column grouping information, a database query statement is generated.
[0092] It should be noted that the grouping principle of the data field parameters is defined in the field mapping logic, such as 10 groups for one data, or 20 groups for one data, or 10 groups meeting the condition for one data, or 10 groups meeting the condition for one data, so that the column grouping information corresponding to the data field parameters can be determined.
[0093] For example, referring to Figure 4 As shown in the figure, the following describes the dynamic generation and display method of column data of the embodiment of the application with the specific application process under the low-code platform in the application as an example.
[0094] Referring to Figure 4 As shown in the figure, taking the number of generated dynamic column components and data source components as an example, the dynamic column attribute parameters and dynamic column data parameters are configured in the dynamic column configuration interface and the data source configuration interface respectively according to steps S100 and S300, the dynamic column attribute parameters include first column basic information, dynamic column variable, column conversion script, start condition and end condition; the default column type is day. The dynamic column data parameters include a first business data table and a plurality of field logic parameters; after the configuration is completed, the corresponding variables in the low-code platform are initialized according to the configured dynamic column attribute parameters and dynamic column data parameters. Specifically, first, according to the input start condition, end condition and column type, the number of columns cnt is calculated. Set the temporary variable i = 0, and initialize the storage space aryFiled of the cnt dynamic column field components and the storage space aryDataSourceField of the data source data structure. Take i as the iteration number, start from i = 0 and enter the iteration processing. First, perform column iteration instantiation processing to generate the dynamic column field component corresponding to the current iteration number and store it in aryField. Then, the data source data structure corresponding to the field logic parameter corresponding to the current iteration number is generated and stored in aryDataSourceField. When the column iteration instantiation processing and the data source data structure are both processed, i is executed. ++, and when i < cnt, the iteration processing is performed again until i >= cnt. When i >= cnt, the database execution script is automatically generated according to the data source data structure in aryDataSourceField, the execution result of the database execution script and the dynamic column field component are associated one by one through the column component name and the mapping field name, and are added to the second business table. At this time, the query conditions required for creating a business scenario based on the second business data table can be created to meet different business needs.
[0095] According to the device for dynamically generating and displaying column data applied to a low-code platform provided by the application, referring to Figure 5 As shown in the figure, the device comprises:
[0096] The first display module 100 is configured to display a dynamic column configuration interface and obtain a dynamic column attribute parameter configured in the dynamic column configuration interface.
[0097] The first component generation module 200 is configured to generate a dynamic column field component according to the dynamic column attribute parameter.
[0098] The second display module 300 is configured to display a data source configuration interface and obtain a dynamic column data parameter configured in the data source configuration interface, the dynamic column data parameter comprising a first business data table and at least one field logic parameter; each field logic parameter comprises a mapping field name, a data field parameter and a field mapping logic, the data field parameter being field information in the first business data table, and the mapping field name being used to represent a relationship between the field logic parameter and the dynamic column field component.
[0099] The second component generation module 400 is configured to generate a database execution script for querying the first business data table according to the field logic parameter, and generate a data source component corresponding to the dynamic column field component according to an execution result of the database execution script and the mapping field name.
[0100] The association module 500 is configured to generate column data according to the dynamic column field component and the corresponding data source component.
[0101] The column data display module 600 is configured to add the column data to the second business data table and display the column data.
[0102] It can be understood that the electronic device provided in the embodiments of the present application comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the method for dynamically generating and displaying column data.
[0103] The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0104] Please refer to Figure 6 , Figure 6 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device comprises:
[0105] The processor 801 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute a related program to implement the technical solutions provided in the embodiments of the present application.
[0106] The memory 802 can be implemented in the form of a read only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM), etc. The memory 802 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 802 and are called and executed by the processor 801 to implement the method for dynamically generating and displaying column data according to the embodiments of the present application.
[0107] The input / output interface 803 is configured to realize information input and output.
[0108] The communication interface 804 is configured to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0109] The bus 805 is configured to transmit information between various components (for example, the processor 801, the memory 802, the input / output interface 803 and the communication interface 804) of the device.
[0110] The processor 801, the memory 802, the input / output interface 803 and the communication interface 804 are connected to each other through the bus 805 to realize the communication connection between the device.
[0111] It can be understood that the computer readable storage medium provided by the embodiments of the present application stores a computer program, and the computer program is executed by the processor to implement the method for dynamically generating and displaying column data.
[0112] The memory is a non-transitory computer readable storage medium, which can be used to store a non-transitory software program and a non-transitory computer executable program. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, for example, at least one magnetic disk storage device, a flash memory device or other non-transitory solid state storage device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and the remote memory can be connected to the processor through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0113] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It can be known by those skilled in the art that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0114] The apparatus embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0115] It should be noted that in each specific embodiment of the present application, when relevant processing needs to be performed on data related to the identity or characteristics of the user, such as user information, user behavior data, user history data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards in the relevant countries and regions. In addition, when the present application needs to obtain sensitive personal information of the user, the user's separate permission or separate consent will be obtained through a pop-up window or by jumping to a confirmation page, and after obtaining the user's separate permission or separate consent, the necessary user-related data required for the normal operation of the present application will be obtained.
[0116] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.
[0117] The terms "comprising" and "having" and any variations thereof in the specification and above drawings of the present application are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0118] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the association between the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0119] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.
[0120] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e. they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0121] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0122] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0123] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method of dynamic generation and display of column data, characterized by, The method is applied to a low-code platform, and the method comprises the following steps: A dynamic column configuration interface is displayed, and a dynamic column attribute parameter configured in the dynamic column configuration interface is obtained; A dynamic column field component is generated according to the dynamic column attribute parameter; A data source configuration interface is displayed, and a dynamic column data parameter configured in the data source configuration interface is obtained, the dynamic column data parameter comprising a first business data table and at least one field logic parameter; each field logic parameter comprises a mapping field name, a data field parameter and a field mapping logic, the data field parameter being field information in the first business data table, and the mapping field name being used to represent the relationship between the field logic parameter and the dynamic column field component; A database execution script for querying the first business data table is generated according to the field logic parameter; A data source component corresponding to the dynamic column field component is generated according to the execution result of the database execution script and the mapping field name; Column data is generated according to the dynamic column field component and the corresponding data source component; The column data is added to a second business data table and displayed.
2. The method of dynamic generation and display of column data of claim 1, wherein, The dynamic column attribute parameter comprises a column generation condition parameter, first column basic information and a dynamic column variable; The dynamic column field component is generated according to the dynamic column attribute parameter, and the method comprises the following steps: The number of columns is determined according to the column generation condition parameter; N times of iteration column instantiation processing is performed on the first column basic information according to the number of columns and the dynamic column variable, so as to obtain N dynamic column field components; N is equal to the number of columns.
3. The method of dynamic generation and display of column data of claim 2, wherein, The iteration column instantiation processing comprises the following steps: A column conversion script is obtained; A first component index is generated according to the column generation condition parameter and a preset index generation rule; Second column basic information corresponding to the first component index is determined according to the column generation condition parameter and the first column basic information; The second column basic information is format-converted according to the column conversion script, so as to obtain a dynamic column data source data structure instance; The first component index and the corresponding dynamic column variable are spliced, so as to obtain a column component name; The dynamic column data source data structure instance and the column component name are bound, so as to obtain a dynamic column field component of current iteration instantiation processing; The column data is generated by binding the column unit value in the dynamic column field component and the data source component with the same mapping name. The column generation condition parameter comprises a column type, a start condition and an end condition; 4. The method of dynamic generation and display of column data of claim 2, wherein, The number of columns is determined according to the column generation condition parameter, and the method comprises the following steps: The start condition and the end condition are subtracted, so as to obtain a selection interval; The selection interval is data-converted according to the column type, so as to obtain the number of columns. The attribute type of the dynamic column variable is one of a scene attribute and a local attribute; and the first business data table is determined by the following steps:
5. The method of dynamic generation and display of column data of claim 2, wherein, When the dynamic column variable is a scene attribute, at least one first business data table is selected from a third business data table under the scene attribute in a preset configuration interface.
6. The method of dynamic generation and display of column data of claim 1, wherein, The generating of the database execution script for querying the first business data table according to the field logic parameter comprises: When the field mapping logic indicates that grouping is needed, the data field parameter is processed by row-column conversion, and a database execution script is generated according to the row-column conversion processing result, the first business data table and the mapping field name; When the field mapping logic indicates that grouping is not needed, the data field parameter is mapped one by one with the mapping field name to generate a script statement, and the query result of the script statement is bound with the mapping field to generate a database execution script.
7. The method of dynamic generation and display of column data of claim 6, wherein, The processing of the data field parameter by row-column conversion comprises: determining column grouping information in the first business data table from the field mapping logic according to the data field parameter; obtaining column calculation logic defined in the data field parameter from the field mapping logic; generating a database query statement according to the column calculation logic and the column grouping information.
8. An apparatus for dynamic generation and display of column data, the apparatus comprising: The application is applied to a low-code platform. The device comprises: a first display module configured to display a dynamic column configuration interface and obtain a dynamic column attribute parameter configured in the dynamic column configuration interface; a first component generation module configured to generate a dynamic column field component according to the dynamic column attribute parameter; a second display module configured to display a data source configuration interface and obtain a dynamic column data parameter configured in the data source configuration interface, the dynamic column data parameter comprising a first business data table and at least one field logic parameter; each field logic parameter comprises a mapping field name, a data field parameter and a field mapping logic, the data field parameter being field information in the first business data table, and the mapping field name being used to represent the relationship between the field logic parameter and the dynamic column field component; a second component generation module configured to generate a database execution script for querying the first business data table according to the field logic parameter, and generate a data source component corresponding to the dynamic column field component according to the execution result of the database execution script and the mapping field name; an association module configured to generate column data according to the dynamic column field component and the corresponding data source component; a column data display module configured to add the column data to a second business data table and display the column data.
9. An electronic device, comprising: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method for dynamically generating and displaying column data according to any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium, the storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method for dynamically generating and displaying column data according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data visualization chart and page generation method and system, medium and terminal
CN110674227A
Report generation method and device, equipment and storage medium
CN112487773A