Method and device for generating header of data table and electronic equipment
By obtaining and processing the header structure data of the data table, dynamically generate the header of the data table, solving the problems of flexibility and low efficiency in the existing technology, and achieving flexible and efficient header generation.
Patent Information
- Application Number
- CN202411526313.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art has low flexibility and efficiency in generating headers of data tables, and it is impossible to dynamically generate multi-layer headers without modifying the code.
By obtaining the data set of header structure, calling the script programming language to process the data, obtaining the set of header indicators, and logically processing based on the configuration information to generate the header reference results of the data table.
It realizes more flexible and efficient generation of data table headers, ensuring the flexibility of generating data tables.
Smart Images

Figure CN119474091A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device and electronic device for generating a header of a data table. Background Art
[0002] In the related technology, the RuoYi framework and Bootstrap Table components can be used to implement dynamic columns and combined headers to generate complex tables. However, the above method requires specifying the number of occupied rows and columns in the code, and the total set of fields is fixed. It is impossible to fully realize the dynamic generation of flexible and transformable multi-layer headers directly through the indicator data of each level of headers without modifying any code. Summary of the invention
[0003] The present disclosure provides a method, device, electronic device, computer-readable storage medium and computer program product for generating a header of a data table, so as to at least solve the problem of low flexibility and efficiency in the process of generating a header of a data table in the related art.
[0004] The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a method for generating a header of a data table is provided, the method comprising: obtaining a header structure data set, wherein the header structure data set includes header indicators of each level of at least one data table; calling a script programming language to process the header structure data set to obtain header structure data of each of the data tables; obtaining a header indicator set of the data table according to the header structure data of the data table, wherein the header indicator set includes header indicators of different levels of the data table; performing logical processing on the header indicator set according to configuration information of the header indicators to obtain a header reference result of the data table.
[0006] According to a second aspect of an embodiment of the present disclosure, a device for generating a header of a data table is provided, the device comprising: a first acquisition module, configured to acquire a set of header structure data, wherein the set of header structure data includes header indicators of each level of at least one data table; a processing module, configured to call a script programming language to process the set of header structure data, and obtain header structure data of each of the data tables; a second acquisition module, configured to acquire a set of header indicators of the data table according to the header structure data of the data table, wherein the set of header indicators includes header indicators of different levels of the data table; a processing module, configured to perform logical processing on the set of header indicators according to configuration information of the header indicators, and obtain a header reference result of the data table.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the method for generating a header of a data table as described in the first aspect.
[0008] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the method for generating a header of a data table as described in the first aspect.
[0009] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method for generating a header of a data table as described in the first aspect is implemented.
[0010] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects: by obtaining a header structure data set, wherein the header structure data set includes header indicators of each level of at least one data table, calling a script programming language to process the header structure data set to obtain header structure data of each data table, and according to the header structure data of the data table, obtaining a header indicator set of the data table, wherein the header indicator set includes header indicators of different levels of the data table, and according to the configuration information of the header indicators, performing logical processing on the header indicator set to obtain a header reference result of the data table. Therefore, the present disclosure performs logical processing on the header indicator set according to the configuration information of the header indicators to obtain a header reference result of the data table, and can generate the header of the data table more flexibly and efficiently, thereby ensuring the flexibility of generating the data table.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0013] Figure 1 It is a flowchart of a method for generating a header of a data table according to the first embodiment of the present disclosure.
[0014] Figure 2 It is a flowchart of a method for generating a header of a data table according to the second embodiment of the present disclosure.
[0015] Figure 3 It is a block diagram of a data table header generating device according to the first embodiment of the present disclosure.
[0016] Figure 4 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0017] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0018] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0019] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.
[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of the present disclosure are in compliance with the relevant provisions of relevant laws and regulations. In the embodiments of the present disclosure, certain software, components, models, and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present disclosure, but it does not mean that the applicant has or will necessarily use the solution.
[0021] Figure 1 It is a flowchart of a method for generating a header of a data table according to the first embodiment of the present disclosure.
[0022] like Figure 1 As shown, the method for generating a header of a data table in the first embodiment of the present disclosure includes the following steps:
[0023] S101, obtaining a table header structure data set, wherein the table header structure data set includes table header indicators of each level of at least one data table.
[0024] In the disclosed embodiment, the requirement information of the data table structure may be obtained, and the header structure of the data table in the SQL database may be set according to the requirement information to obtain a header structure data set.
[0025] Optionally, you can set the level of the header indicator and the column number corresponding to the header indicator.
[0026] Among them, the first-level header indicators are the header indicators in the first row of the data table, the second-level header indicators are the header indicators in the second row of the data table... and so on.
[0027] In the embodiment of the present disclosure, after the header structure of the data table in the SQL database is set according to the demand information, the header structure data set can be obtained from the SQL database.
[0028] S102, calling a script programming language to process the table header structure data set to obtain the table header structure data of each data table.
[0029] In an embodiment of the present disclosure, identification information of a data table is obtained by calling a script programming language, and header indicators and associated information of header indicators associated with the same identification information are obtained from a header structure data set, and header indicators and associated information of header indicators associated with the same identification information are determined to be header structure data of the data table identified by the same identification information.
[0030] The identification information of the data table may be the name of the data table.
[0031] Optionally, the script programming language may be JavaScript; optionally, the script programming language may also be Java.
[0032] S103, acquiring a header indicator set of the data table according to the header structure data of the data table, wherein the header indicator set includes header indicators of different levels of the data table.
[0033] In the embodiment of the present disclosure, after the header structure data of the data table is acquired, the header structure data of the data table may be summarized to obtain a header indicator set of the data table.
[0034] S104, performing logical processing on the header indicator set according to the configuration information of the header indicator to obtain a header reference result of the data table.
[0035] It should be noted that the configuration information of the header indicator includes but is not limited to the number of levels of the header indicator, the level identifier of the header indicator, the name of the header indicator, the sequence number of the header indicator (row number and column number) and the parameter value of the header indicator.
[0036] In the embodiments of the present disclosure, the header indicators in the header indicator set can be traversed level by level according to the hierarchical identifiers of the header indicators. For the i-th level header indicator currently traversed, the i-th level header indicator and the i+1-th level header indicator belonging to the i-th level header indicator are merged to generate header local information including the i-th level header indicator and the i+1-th level header indicator, where i is a natural number greater than or equal to 1. In response to the completion of the traversal of the header indicators in the header indicator set, the header local information is fused according to the hierarchical relationship of the header indicators to obtain a header reference result of the data table.
[0037] In the embodiment of the present disclosure, after the header reference result of the data table is obtained, it can be presented in a variety of display methods.
[0038] Optionally, the data table data in the SQL database table can be called through the packaging data interface, and the table header reference result of the calling script programming language is presented in multiple forms, wherein the data interface structure is consistent with the data table structure.
[0039] For example, JavaScript may be called to present the data table header reference result in the form of a page view; Java may be called to present the data table header reference result in the form of a report.
[0040] In summary, according to the method for generating a header of a data table provided by an embodiment of the present disclosure, a header structure data set is obtained, wherein the header structure data set includes header indicators of each level of at least one data table, a script programming language is called to process the header structure data set to obtain header structure data of each data table, and a header indicator set of the data table is obtained according to the header structure data of the data table, wherein the header indicator set includes header indicators of different levels of the data table, and according to the configuration information of the header indicators, the header indicator set is logically processed to obtain a header reference result of the data table. Therefore, the present disclosure performs logical processing on the header indicator set according to the configuration information of the header indicators to obtain a header reference result of the data table, so that the header of the data table can be generated more flexibly and efficiently, thereby ensuring the flexibility of generating the data table.
[0041] Figure 2 It is a flowchart of a method for generating a header of a data table according to the second embodiment of the present disclosure.
[0042] like Figure 2 As shown, the method for generating a header of a data table in the second embodiment of the present disclosure includes the following steps:
[0043] S201, obtaining a table header structure data set, wherein the table header structure data set includes table header indicators of each level of at least one data table.
[0044] S202, calling a script programming language to process the table header structure data set to obtain the table header structure data of each data table.
[0045] S203, acquiring a header indicator set of the data table according to the header structure data of the data table, wherein the header indicator set includes header indicators of different levels of the data table.
[0046] For the relevant contents of step S201 to step S203, please refer to the above embodiment and will not be repeated here.
[0047] As a possible implementation method, based on the above implementation, the above specific process of performing logical processing on the header indicator set according to the configuration information of the header indicator in step S104 to obtain the header reference result of the data table includes steps S204 to S206:
[0048] S204: traverse the header indicators in the header indicator set level by level according to the level identifiers of the header indicators.
[0049] For example, if the header indicators include three levels, the header indicators in the header indicator set can be traversed level by level according to the first level, the second level and the third level according to the level identifier of the header indicator.
[0050] S205, for the i-th level header indicator currently traversed, merge the cells of the i-th level header indicator and the i+1-th level header indicator belonging to the i-th level header indicator, and generate header local information including the i-th level header indicator and the i+1-th level header indicator, where i is a natural number greater than or equal to 1.
[0051] In an embodiment of the present disclosure, for the i-th level header indicator currently traversed, the row and column information that needs to be merged for the i-th level header indicator is determined, and the row and column information is determined to merge cells of the i+1-th level header indicator to generate local header information including the i-th level header indicator and the i+1-th level header indicator.
[0052] Optionally, determine a first total number of i-level header indicators and a second total number of header indicators, determine the number of columns that need to be merged for the i-level header indicators based on the first total number of i-level header indicators and the second total number of header indicators, and determine the column information that needs to be merged for the i-level header indicators based on the starting column number and the number of columns corresponding to the i-level header indicators.
[0053] It should be noted that after obtaining the first total number of header indicators at the i-th level and the second total number of header indicators, the following formula can be used to determine the number of columns that need to be merged for the header indicators at the i-th level:
[0054] The number of columns that need to be merged for the i-th level header index = (the first total number / the second total number) * 100
[0055] In the embodiment of the present disclosure, the column information that needs to be merged for the i-th level header indicator can be determined according to the starting column sequence number and the number of columns corresponding to the i-th level header indicator.
[0056] Optionally, after obtaining the starting column sequence number and the number of columns corresponding to the i-th level header indicator, the ending column sequence number corresponding to the i-th level header indicator can be determined based on the starting sequence number and the number of columns, that is, the ending column sequence number is the starting sequence number + the number of columns - 1, and the column information between the starting sequence number and the ending sequence number is used as the column information that needs to be merged for the i-th level header indicator.
[0057] Optionally, determine at least one (i+1)-level header indicator belonging to the (i)-level header indicator, identify the indicator names of the (i+1)-level header indicator and the (i+1)-level header indicator, and in response to the indicator name of the (i+1)-level header indicator being consistent with the (i)-level header indicator, determine that the row number corresponding to the (i+1)-level header indicator is the row information that needs to be merged.
[0058] S206 , in response to the completion of the traversal of the header indicators in the header indicator set, the header local information is merged according to the hierarchical relationship of the header indicators to obtain a header reference result of the data table.
[0059] In the disclosed embodiment, according to the hierarchical relationship of the header indicators, the local header information of the first-level header indicators can be obtained, the local header information of the first-level header indicators can be recursively merged to obtain the header information of the first-level header indicators, and the header information of each first-level header indicator can be spliced to obtain the header reference result of the data table.
[0060] In summary, according to the method for generating a header of a data table provided by an embodiment of the present disclosure, a header structure data set is obtained, wherein the header structure data set includes header indicators of each level of at least one data table, a script programming language is called to process the header structure data set, and header structure data of each data table is obtained; according to the header structure data of the data table, a header indicator set of the data table is obtained, wherein the header indicator set includes header indicators of different levels of the data table; according to the level identifier of the header indicator, the header indicators in the header indicator set are traversed level by level; for the i-th level header indicator currently traversed, the i-th level header indicator and the i+1-th level header indicator belonging to the i-th level header indicator are merged to generate a header structure data set including the i-th level header indicator and the i+1-th level header indicator. The local information of the target header, wherein i is a natural number greater than or equal to 1, in response to the end of the traversal of the header indicators in the header indicator set, the local information of the header is merged according to the hierarchical relationship of the header indicators to obtain the header reference result of the data table. Therefore, the present invention can pre-define the table structure in the database through the demand information of the table structure of the data table to obtain the header structure data set, and perform logical processing on the header indicator set according to the configuration information of the header indicator to obtain the header reference result of the data table. When the table structure of the subsequent data table changes, it is only necessary to redefine the table structure in the database without modifying the script programming language, thereby realizing the reuse of the script programming language, that is, the header of the data table can be generated, thereby improving the flexibility and efficiency of generating the header of the data table.
[0061] Figure 3 It is a block diagram of a data table header generating device according to the first embodiment of the present disclosure.
[0062] like Figure 3 As shown, the data table header generating device 300 of the embodiment of the present disclosure includes: a first acquisition module 301 , a processing module 302 , a second acquisition module 303 and a processing module 304 .
[0063] The first acquisition module 301 is configured to acquire a table header structure data set, wherein the table header structure data set includes table header indicators of each level of at least one data table;
[0064] The processing module 302 is configured to call a script programming language to process the table header structure data set to obtain the table header structure data of each data table;
[0065] A second acquisition module 303 is configured to acquire a header indicator set of the data table according to the header structure data of the data table, wherein the header indicator set includes header indicators of different levels of the data table;
[0066] The processing module 304 is configured to perform logic processing on the header indicator set according to the configuration information of the header indicator to obtain a header reference result of the data table.
[0067] In one embodiment of the present disclosure, the processing module 304 is further configured to: traverse the header indicators in the header indicator set level by level according to the hierarchical identification of the header indicators; for the i-th level header indicator currently traversed, merge the cells of the i-th level header indicator and the i+1-th level header indicator belonging to the i-th level header indicator to generate header local information including the i-th level header indicator and the i+1-th level header indicator, where i is a natural number greater than or equal to 1; in response to the completion of the traversal of the header indicators in the header indicator set, fuse the header local information according to the hierarchical relationship of the header indicators to obtain a header reference result of the data table.
[0068] In one embodiment of the present disclosure, the processing module 304 is further configured to: determine the row and column information that needs to be merged for the i-th level header indicator currently traversed; determine the row and column information to merge cells of the i+1-th level header indicator to generate local header information including the i-th level header indicator and the i+1-th level header indicator.
[0069] In one embodiment of the present disclosure, the processing module 304 is also configured to: determine a first total number of the i-th level header indicators and a second total number of header indicators; determine the number of columns that need to be merged for the i-th level header indicators based on the first total number of the i-th level header indicators and the second total number of header indicators; determine the column information that needs to be merged for the i-th level header indicators based on the starting column number corresponding to the i-th level header indicators and the number of columns.
[0070] In one embodiment of the present disclosure, the processing module 304 is further configured to: determine at least one (i+1)-level header indicator belonging to the (i+1)-level header indicator; identify the indicator names of the (i+1)-level header indicator and the (i+1)-level header indicator; in response to the indicator name of the (i+1)-level header indicator being consistent with the (i)-level header indicator, determine that the row number corresponding to the (i+1)-level header indicator is the row information that needs to be merged.
[0071] In one embodiment of the present disclosure, the processing module 304 is also configured to: obtain the local header information of the first-level header indicators according to the hierarchical relationship of the header indicators; recursively merge the local header information of the first-level header indicators to obtain the header information of the first-level header indicators; splice the header information of each first-level header indicator to obtain the header reference result of the data table.
[0072] In one embodiment of the present disclosure, the processing module 302 is also configured to: obtain identification information of the data table; obtain, from the header structure data set, header indicators associated with the same identification information and associated information of the header indicators; determine that the header indicators associated with the same identification information and associated information of the header indicators are the header structure data of the data table identified by the same identification information.
[0073] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0074] In summary, the data table header generation device provided by the embodiment of the present disclosure obtains a header structure data set, wherein the header structure data set includes header indicators of each level of at least one data table, calls a script programming language to process the header structure data set, obtains header structure data of each data table, and obtains a header indicator set of the data table according to the header structure data of the data table, wherein the header indicator set includes header indicators of different levels of the data table, and performs logical processing on the header indicator set according to the configuration information of the header indicators to obtain a header reference result of the data table. Therefore, the present disclosure performs logical processing on the header indicator set according to the configuration information of the header indicators to obtain a header reference result of the data table, so that the header of the data table can be generated more flexibly and efficiently.
[0075] Figure 4 It is a block diagram of an electronic device according to an exemplary embodiment.
[0076] like Figure 4 As shown, the electronic device 400 includes:
[0077] The memory 410 and the processor 420, a bus 430 connecting different components (including the memory 410 and the processor 420), the memory 410 stores a computer program, and when the processor 420 executes the program, the method for generating a header of a data table described in the embodiment of the present disclosure is implemented.
[0078] Bus 430 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0079] The electronic device 400 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 400, including volatile and non-volatile media, removable and non-removable media.
[0080] The memory 410 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 440 and / or cache memory 450. The electronic device 400 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 460 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 430 via one or more data medium interfaces. The memory 410 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0081] A program / utility 480 having a set (at least one) of program modules 470 may be stored, for example, in the memory 410, such program modules 470 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 470 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0082] The electronic device 400 may also communicate with one or more external devices 490 (e.g., keyboard, pointing device, display 491, etc.), one or more devices that enable a user to interact with the electronic device 400, and / or any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 492. Furthermore, the electronic device 400 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 493. Figure 4As shown, the network adapter 493 communicates with other modules of the electronic device 400 via the bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0083] The processor 420 executes various functional applications and data processing by running the programs stored in the memory 410 .
[0084] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the method for generating a header of a data table in the embodiment of the present disclosure, and will not be repeated here.
[0085] In summary, the electronic device provided by the embodiment of the present disclosure can execute the method for generating a header of a data table as described above, by obtaining a header structure data set, wherein the header structure data set includes header indicators of each level of at least one data table, calling a script programming language to process the header structure data set, and obtaining the header structure data of each data table, and obtaining a header indicator set of the data table according to the header structure data of the data table, wherein the header indicator set includes header indicators of different levels of the data table, and performing logical processing on the header indicator set according to the configuration information of the header indicators to obtain a header reference result of the data table. Therefore, the present disclosure performs logical processing on the header indicator set according to the configuration information of the header indicators to obtain a header reference result of the data table, and can generate the header of the data table more flexibly and efficiently.
[0086] In order to implement the above embodiments, the present disclosure also proposes a computer-readable storage medium.
[0087] When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can implement the table header generation method of the data table as described above. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0088] In order to implement the above embodiments, the present disclosure further provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the method for generating a header of a data table as described above is implemented.
[0089] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0090] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for generating a header of a data table, characterized in that: include: Acquire a table header structure data set, wherein the table header structure data set includes table header indicators of each level of at least one data table; Calling a script programming language to process the table header structure data set to obtain the table header structure data of each data table; According to the header structure data of the data table, a header indicator set of the data table is acquired, wherein the header indicator set includes header indicators of different levels of the data table; According to the configuration information of the table header indicator, the table header indicator set is logically processed to obtain a table header reference result of the data table.
2. The method according to claim 1, characterized in that: The step of performing logical processing on the header indicator set according to the configuration information of the header indicator to obtain a header reference result of the data table includes: According to the level identifier of the header indicator, the header indicators in the header indicator set are traversed level by level; For the i-th level header indicator currently traversed, merge the i-th level header indicator and the i+1-th level header indicator subordinate to the i-th level header indicator to generate the header local information including the i-th level header indicator and the i+1-th level header indicator, where i is a natural number greater than or equal to 1; In response to the completion of the traversal of the header indicators in the header indicator set, the header local information is fused according to the hierarchical relationship of the header indicators to obtain a header reference result of the data table.
3. The method according to claim 2, characterized in that The step of merging cells of the i-th level header indicator and the i+1-th level header indicator subordinate to the i-th level header indicator to generate local header information between the i-th level header indicator and the i+1-th level header indicator includes: For the i-th level header indicator currently traversed, determine the row and column information that needs to be merged for the i-th level header indicator; Determine the row and column information to merge cells of the i+1th level header indicator to generate local header information including the i-th level header indicator and the i+1th level header indicator.
4. The method according to claim 3, characterized in that Determine the column information that needs to be merged for the i-th level header indicator, including: Determine a first total number of the i-th level header indicators and a second total number of the header indicators; Determining the number of columns of the i-th level header indicators that need to be merged according to the first total number of the i-th level header indicators and the second total number of the header indicators; According to the starting column sequence number corresponding to the i-th level header indicator and the number of columns, the column information that needs to be merged for the i-th level header indicator is determined.
5. The method according to claim 4, characterized in that Determine the row information that needs to be merged for the i-th level header indicator, including: Determine at least one (i+1)th level header indicator subordinate to the (i)th level header indicator; Identify the indicator names of the i-th level header indicator and the i+1-th level header indicator; In response to the fact that the indicator name of the i+1th level header indicator is consistent with the indicator name of the i-th level header indicator, it is determined that the row number corresponding to the i+1th level header indicator is the row information that needs to be merged.
6. The method according to any one of claims 2 to 5, characterized in that: The fusing the local information of the header according to the hierarchical relationship of the header indicators to obtain the header reference result of the data table includes: According to the hierarchical relationship of the header indicators, obtaining the header local information belonging to the first-level header indicators; Recursively merge the header local information belonging to the first-level header indicator to obtain the header information belonging to the first-level header indicator; The header information of each of the first-level header indicators is concatenated to obtain a header reference result of the data table.
7. The method according to any one of claims 1 to 5, characterized in that The processing of the header structure data set to obtain header structure data of at least one data table includes: Obtaining identification information of the data table; Acquire, from the header structure data set, header indicators associated with the same identification information and associated information of the header indicators; The header indicator associated with the same identification information and the associated information of the header indicator are determined to be the header structure data of the data table identified by the same identification information.
8. The method according to any one of claims 1 to 5, characterized in that The header reference result of the data table is presented in the form of a page view, or the header reference result of the data table is presented in the form of a report.
9. A data table header generation device, characterized in that: The device comprises: A first acquisition module is configured to acquire a table header structure data set, wherein the table header structure data set includes table header indicators of each level of at least one data table; A processing module is configured to call a script programming language to process the table header structure data set to obtain the table header structure data of each data table; A second acquisition module is configured to acquire a header indicator set of the data table according to the header structure data of the data table, wherein the header indicator set includes header indicators of different levels of the data table; The processing module is configured to perform logical processing on the header indicator set according to the configuration information of the header indicator to obtain the header reference result of the data table.
10. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for generating a header of a data table according to any one of claims 1 to 8.
11. A computer-readable storage medium, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for generating a header of a data table according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for generating a header of a data table according to any one of claims 1 to 8 is implemented.