Table conversion method, computer readable storage medium and program product

By obtaining the data to be converted and the configuration information of the conversion of the table, the target table header data and the target data set are automatically generated, which solves the problem of low conversion efficiency of table data columns in the prior art, realizes automatic conversion, and reduces development costs.

CN120031006APending Publication Date: 2025-05-23ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510190980.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently convert data columns in tables into table headers, which makes it time-consuming and prone to errors in manual writing of table headers, which increases development costs.

Method used

By obtaining the data to be converted and the conversion configuration information of the target table, the target header data different from the original table header data is generated, and the target data set is generated based on the target header data, the original data set and the conversion configuration information are transformed to realize automatic conversion of the table.

Benefits of technology

Table conversion can be achieved without human intervention, saving development time, avoiding error risks caused by manual operations, and reducing development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120031006A_ABST
    Figure CN120031006A_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a table conversion method, a computer readable storage medium and a program product, the method comprising: obtaining to-be-converted data contained in a target table and conversion configuration information of the table, the to-be-converted data comprises original header data of the target table and an original data set corresponding to the original header data, and the original data set is composed of multiple pieces of original data; generating target header data different from the original header data according to the to-be-converted data and at least one original header data represented by the conversion configuration information; and generating a target data set corresponding to the target header data according to the target header data, the original data set and a corresponding relation between the multiple pieces of original data and the target header data, wherein the corresponding relation is represented by the conversion configuration information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of computer technology, and in particular, to a table conversion method, a computer-readable storage medium, and a program product. Background Art

[0002] Table is a very common display component in the front-end page, which is responsible for displaying various statistical data. The header corresponding to each data column in the table can be used to represent the data attributes in the data column. At the same time, in systems such as Business Intelligence (BI), there is usually a need to convert all the data in a specified data column into a header to highlight the key content of the table, which is obviously difficult to meet with the original table format.

[0003] In the related art, new table headers and corresponding table data can usually be manually written according to actual needs. However, as the amount of data in the above data columns that needs to be used as table headers increases, the time required for manpower development and data statistics will be greatly extended, and the possibility of errors in manual operations will also increase, further increasing the development cost of the related tables. Summary of the invention

[0004] In view of this, one or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of this specification, a table conversion method is proposed, the method comprising:

[0006] Acquire the data to be converted contained in the target table and the conversion configuration information of the table, wherein the data to be converted includes the original header data of the target table and its corresponding original data set, and the original data set is composed of a plurality of original data;

[0007] Generate target header data different from the original header data according to the data to be converted and at least one original header data represented by the conversion configuration information;

[0008] A target data set corresponding to the target header data is generated according to the target header data, the original data set, and a correspondence between the plurality of original data represented by the conversion configuration information and the target header data.

[0009] Optionally, the conversion configuration information includes expandable dimension information for representing a first type of original header data that needs to be expanded in the original header data, and non-expandable dimension information for representing a second type of original header data that does not need to be expanded in the original header data; the generating target header data different from the original header data according to the data to be converted and at least one original header data represented by the conversion configuration information includes:

[0010] Generate temporary header data according to the conversion configuration information, wherein the temporary header data includes the second type of original header data represented by the non-extended dimension information;

[0011] generating temporary data corresponding to at least one first-category original header data according to the scalable dimension information;

[0012] The temporary data is added to the temporary header data to generate the target header data.

[0013] Optionally, the generating of temporary data corresponding to at least one first-category original header data according to the scalable dimension information includes:

[0014] When there is one piece of the first type of original header data, the original data corresponding to the first type of original header data in the original data set is used as the temporary data;

[0015] In the case where there are multiple first-category original header data, a temporary combination is generated as the temporary data based on the extensible dimensional information, and the temporary combination is used to characterize the combination relationship between the original data corresponding to each first-category original header data in the original data set and the original data corresponding to the remaining first-category original header data.

[0016] Optionally, the conversion configuration information further includes metric dimension information for characterizing the third type of original header data storing actual numerical values ​​in the original header data; generating temporary header data according to the conversion configuration information includes:

[0017] Generate a header data replacement set according to the non-extended dimension information, the header data replacement set including the sequence number of the second type of original header data in the original header data; and replace the original header data not corresponding to the sequence number with a null value to generate the temporary header data; or

[0018] A header data replacement table is generated according to the extensible dimension information and the metric dimension information, wherein the keys in the header data replacement table correspond to the serial numbers of the first category original header data or the third category original header data in the original header data, and the values ​​in the header data replacement table all correspond to null values; and the original header data corresponding to the serial number is replaced by the values ​​of the header data replacement table to generate the temporary header data.

[0019] Optionally, the conversion configuration information includes expandable dimension information for characterizing a first type of original header data that needs to be expanded in the original header data, non-expandable dimension information for characterizing a second type of original header data that does not need to be expanded in the original header data, and metric dimension information for characterizing a third type of original header data storing actual numerical values ​​in the original header data; generating a target data set corresponding to the target header data according to the target header data, the original data set, and the correspondence between the multiple original data represented by the conversion configuration information and the target header data, includes:

[0020] Initialize the first mapping table and the second mapping table;

[0021] Traversing the data items in the original data set to obtain a first temporary mapping table corresponding to the first type of original header data and the third type of original header data, and a second temporary mapping table corresponding to the second type of original header data in each data item, and inserting the first temporary mapping table into the first mapping table, and inserting the second temporary mapping table into the second mapping table, wherein the key and value of the first temporary mapping table and the value of the second temporary mapping table are respectively matched with the plurality of original data having the corresponding relationship with the target header data, and the key of the second temporary mapping table is matched with the target header data;

[0022] New data items are generated according to the first mapping table and the second mapping table to form the target data set.

[0023] Optionally, the obtaining of a first temporary mapping table corresponding to the first type of original header data and the third type of original header data, and a second temporary mapping table corresponding to the second type of original header data in each data item includes:

[0024] Initialize the first temporary mapping table; determine the first original data corresponding to the first type of original header data in the traversed data item according to the scalable dimension information, and determine the third original data corresponding to the third type of original header data in the traversed data item according to the metric dimension information; insert the first original data and the third original data into the first temporary mapping table as a key-value pair;

[0025] Initialize the second temporary mapping table; traverse the second type of original header data according to the non-extended dimension information, so as to insert the traversed second type of original header data and its corresponding second original data into the second temporary mapping table as a key-value pair.

[0026] Optionally, determining first original data corresponding to first type of original header data in the traversed data item according to the extensible dimension information, and determining third original data corresponding to third type of original header data in the traversed data item according to the metric dimension information includes:

[0027] When there are multiple pieces of the first-type original header data, the original data corresponding to each piece of the first-type original header data in the traversed data items are sequentially concatenated to form the first original data;

[0028] In the case that there are multiple third-category original header data, the original data corresponding to each third-category original header data in the traversed data items are sequentially stored in the same data set to form the third original data.

[0029] Optionally, with respect to inserting the first temporary mapping table into the first mapping table and inserting the second temporary mapping table into the second mapping table, inserting any temporary mapping table into any corresponding mapping table includes: creating target original data for the second type of original header data in the traversed data item according to the non-extended dimension information; and inserting the target original data and any temporary mapping table into any mapping table as a key-value pair;

[0030] The generating new data items according to the first mapping table and the second mapping table to constitute the target data set includes: combining temporary mapping tables corresponding to the same keys in the first mapping table and the second mapping table into new data items to constitute the target data set.

[0031] According to a second aspect of one or more embodiments of the present specification, a computer program product is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0032] According to a third aspect of one or more embodiments of the present specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the method described in the first aspect when executed by a processor.

[0033] In the technical solution provided in this specification, the data to be converted contained in the target table and the conversion configuration information for the table can be obtained, wherein the data to be converted can include the original header data of the above target table and its corresponding original data set composed of multiple original data, and the above conversion configuration information can represent at least one original header data, and can also represent the correspondence between multiple original data and the above target header data. On this basis, through the above data to be converted and the above combination relationship, target header data different from the original header data can be generated, and the target data set corresponding to the above target header data is generated according to the above target header data, the above original data set and the above correspondence, wherein no human intervention is required during the conversion of the entire table, which effectively saves development time and avoids the risk of errors caused by manual operation, and reduces the development cost of the converted table as a whole. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 is a flowchart of a table conversion method provided by an exemplary embodiment;

[0036] Figure 2 It is a schematic diagram of a flow chart of generating target header data provided by an exemplary embodiment;

[0037] Figure 3 is a schematic diagram of a process for generating a target data set provided by an exemplary embodiment;

[0038] Figure 4 is a schematic structural diagram of an electronic device provided by an exemplary embodiment;

[0039] Figure 5 It is a structural schematic diagram of a table conversion device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0040] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are only examples of devices and methods consistent with some aspects of the present invention.

[0041] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0042] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0043] As mentioned above, the purpose of table conversion is to convert all data in the specified data column into a new table header to highlight the key content in the table. For example, the following Table 1 is converted into Table 2, that is, each enumerated data corresponding to the table header "Region" (i.e. Hong Kong, Macao) and each enumerated data corresponding to the "Car Series" (i.e. Type A, Type B) in Table 1 are placed in the table header for display.

[0044] In this specification, the process of converting the above enumeration data into a header can also be referred to as the expansion of the corresponding header. For Tables 1 and 2, it can be understood as expanding each enumeration data corresponding to the headers "Region" and "Car Series" in Table 1, thereby obtaining the four new headers "Hong Kong-Type A Car", "Hong Kong-Type B Car", "Macao-Type A Car" and "Macao-Type B Car" in Table 2.

[0045] Table 1

[0046] date area Car Series Sales Month-on-month 2024-01-01 Hongkong Type A 1,888 18.88% 2024-01-02 Macao Type A 1,234 -5.56% 2024-01-02 Hongkong Type B 999 12.34%

[0047] Table 2

[0048] date Hong Kong-Type A Hong Kong-B type car Macau-Type A Macau-Type B 2024-01-01 1,888,18.88% / / / 2024-01-02 / 999,12.34% 1,234,-5.56% /

[0049] For the convenience of subsequent introduction, this specification explains the terms involved in the tables based on Table 1 and Table 2 respectively:

[0050] Table header: refers to the information that describes each column in the table. As the first row of the table, the header provides context and meaning for the data in each column. Taking Table 1 as an example, "Date", "Region", "Car Series", "Sales Volume" and "Month-on-Month Change" are all table headers.

[0051] Header data: refers to the information describing the above header itself. Taking the header "Date" in Table 1 as an example, its header data can be equivalent to the name of the header itself, that is, the string "Date", or it can include code identifiers for background data processing that are not displayed in the table, as well as data type declarations in the data column corresponding to the header, etc., which are not limited in this specification. Specifically, for Table 1 that needs to be converted, its header data can be called original header data; for Table 2 obtained by converting Table 1, its header data can be called target header data. In addition, the above original header data can also be divided into the first category of original header data that needs to be expanded, the second category of original header data that does not need to be expanded, and the third category of original header data that stores actual numerical values ​​according to the expansion of the corresponding header. Considering that each category of original header data will be further described in detail below, this specification will not be described in detail here.

[0052] Data: refers to the information in each cell of a table except the header data. For example, "2024-01-01", "Hong Kong", "Type A" in Table 1, or "2024-01-02", "999,12.34%" in Table 2 can be regarded as independent data. Specifically, for Table 1 that needs to be converted, its data can be called original data; for Table 2 obtained by converting Table 1, its data can be called target data.

[0053] Data item: refers to a set of data corresponding to each table header in the table, corresponding to any row of the table except the first row. Taking Table 1 as an example, the set corresponding to the second row [2024-01-01, Hong Kong, Type A car, 1,888, 18.88%] can be regarded as a data item.

[0054] Dataset: refers to the set of all data items in a table. Taking Table 1 as an example, the second to fourth rows can be considered as a data set as a whole. Specifically, for Table 1 that needs to be converted, its data set can be called the original data set; for Table 2 obtained by converting Table 1, its data set can be called the target data set. Of course, since the above data items are essentially composed of data, the data set containing data items can also be considered to be composed of data.

[0055] Figure 1 The following is a flowchart of a table conversion method provided by an exemplary embodiment; the method may include the following steps:

[0056] Step S102, obtaining the data to be converted contained in the target table and the conversion configuration information of the table, wherein the data to be converted includes the original header data of the target table and its corresponding original data set, and the original data set is composed of a plurality of original data.

[0057] When the target table needs to be converted, the user can provide the data to be converted contained in the target table and the conversion configuration information for the target table. The original header data and the original data set contained in the data to be converted can be historical data specified by preset rules or temporary data written by the user in real time. As mentioned above, the original data set is composed of multiple data items, and the data items of the target table are composed of multiple original data, so the original data set can be regarded as composed of multiple original data.

[0058] The following introduces the data structure of the above original header data and the original data set in conjunction with Table 1. As shown in Table 1, the above original header data can display the data of each header in the form of an array, for example:

[0059] "metadata":[

[0060] {"code":"date","name":"date"},

[0061] {"code":"region","name":"Country / Region"},

[0062] {"code":"car_series","name":"Car series"},

[0063] {"code":"sales_volume","name":"sales volume"},

[0064] {"code":"MoM","name":"Month-on-month"} ]

[0066] Among them, metadata can be used as a collection to store the above-mentioned original header data, specifically including five copies of original header data. The code attribute of each original header data can represent the unique identifier of the corresponding header, and the name attribute can be used to represent the content displayed by the corresponding header in the target table.

[0067] Correspondingly, the above original data set can also display the data corresponding to each header in the form of an array, for example:

[0068] "dataset":[

[0069] [2024-01-01,"Hong Kong","Type A","1,888","18.88%"],

[0070] [2024-01-02,"Macau","Type A","1,234","-5.56%"],

[0071] [2024-01-02,"Hong Kong","Type B car","999","12.34%"] ]

[0073] Among them, dataset, as an original data set, includes the three data items in Table 1, and the original data in each data item corresponds to the original header data above in sequence. On the one hand, the content display form and data format corresponding to each original data can be defined by the data source providing the above original data set, or defined by adding additional fields to the above original header data, and this specification does not limit this. On the other hand, the content display form and data format corresponding to each original data can be freely set according to actual needs. For example, the original data corresponding to the original header data "date" in the above original data set can be based on a timestamp or a specific date as its content display form, and for example, a string format or a date format can be used as the data format of the data.

[0074] Step S104: generating target header data different from the original header data according to the data to be converted and at least one original header data represented by the conversion configuration information.

[0075] After obtaining the above-mentioned data to be converted and the above-mentioned conversion configuration information, the target header data corresponding to the converted target table can be generated according to the two. Among them, the above-mentioned conversion configuration information can specifically include the expandable dimension information used to characterize the above-mentioned first type of original header data, and the non-expanded dimension information used to characterize the above-mentioned second type of original header data. Among them, the above-mentioned first type of original header data refers to the original header data participating in the table transformation, such as the original header data corresponding to "region" and "car series" in Table 1, each of which will be expanded into new header data and used as part of the target header data, such as the target header data corresponding to "Hong Kong-Type A car", "Hong Kong-Type B car", "Macau-Type A car", and "Macau-Type B car" in Table 2; the above-mentioned second type of original header data refers to the original header data that does not participate in the table transformation, and the original data corresponding to these original header data does not need to be expanded, and the above original header data will be retained and used as part of the target header data, for example, the target header data corresponding to "date" in Table 2 is derived from the original header data corresponding to "date" in Table 1.

[0076] On this basis, two sources of the target header data in this specification can be determined, namely, the first type of original header data and the second type of original header data.

[0077] In one embodiment, temporary header data including the second type of original header data can be generated according to the conversion configuration information, and temporary data corresponding to at least one first type of original header data can be generated according to the scalable dimension information, and then the temporary data can be added to the temporary header data to generate the target header data. In this embodiment, by first independently generating temporary data and temporary header data, and then generating target header data based on the two, the complex task of generating target header data is split into two relatively simple subtasks, which effectively reduces the amount of calculation and improves the generation efficiency.

[0078] Among them, the specific content of the above-mentioned temporary data needs to be determined according to the number of the first-category original header data provided by the above-mentioned conversion configuration information. For example, when there is one of the above-mentioned first-category original header data, each original data corresponding to the first-category original header data in the above-mentioned original data set can be used as the above-mentioned temporary data, thereby improving the generation efficiency of temporary data; for example, when there are multiple of the above-mentioned first-category original header data, a temporary combination generated according to the above-mentioned extensible dimensional information can be used as the above-mentioned temporary data, and the above-mentioned temporary combination is used to characterize the above-mentioned combination relationship between the original data corresponding to each type of first-category original header data in the above-mentioned original data set and the original data corresponding to the remaining first-category original header data, thereby ensuring the integrity of the temporary data. Still taking Table 1 as an example, assuming that the two original header data corresponding to the names "region" and "car series" both belong to the first category of original header data, the former corresponds to two enumeration items in the original data set, namely "Hong Kong" and "Macao", and the latter corresponds to two enumeration items in the original data set, namely "Type A car" and "Type B car", so there are (2*2=)4 combination relationships between the two, namely "Hong Kong and Type A car", "Hong Kong and Type B car", "Macao and Type A car", "Macao and Type B car", of course, in order to facilitate the distinction between the enumeration items corresponding to different first category original header data in the combination relationship, the above temporary combination can add preset separators such as "-", "|" and the like between the enumeration items, so as to obtain target header data similar to "Hong Kong-Type A car", "Hong Kong-Type B car", "Macao-Type A car", "Macao-Type B car" in Table 2.

[0079] Of course, by adding the expected data type of each header data in the above conversion configuration information, error detection of the above original data set can also be achieved to avoid the abnormal situation that the data type that does not conform to the above conversion configuration information is adopted by the original data corresponding to the corresponding original header data.

[0080] In addition, in this specification, there are also multiple different ways to obtain the temporary header data.

[0081] In one embodiment, a header data replacement set can be generated according to the non-extended dimension information, and the header data replacement set includes the serial number of the second type of original header data in the original header data, and the original header data that does not correspond to the serial number can be replaced by a null value to generate the temporary header data. Taking Table 1 as an example, assuming that the original header data corresponding to the name "date" are all the second type of original header data and the serial number is calculated from 0, then the header data replacement set can be [0], or assuming that the original header data corresponding to the names "date", "car series", and "sales volume" are all the second type of original header data and the serial number is calculated from 0, then the header data replacement set can be [0, 2, 3]. Obviously, the elements in the header data replacement set correspond to the serial numbers of the second type of original header data in all the original header data in sequence. Then the original header data corresponding to the serial number not included in the header data replacement set must not be the second type of original header data, so the original header data replaced by the null value must also be the first type of original header data or the third type of original header data described below.

[0082] In another embodiment, the conversion configuration information further includes metric dimension information for characterizing the third type of original header data storing actual numerical values ​​in the original header data, wherein the third type of original header data refers to the original header data participating in the table transformation, and is different from the first type of original header data. The third type of original header data is characterized in that the corresponding original data is an actual numerical value without enumeration meaning, such as the original header data corresponding to the names "sales volume" and "month-on-month" in Table 1. These original header data are replaced by the target header data after the table conversion. On this basis, a header data replacement table can be generated according to the extensible dimensional information and the metric dimension information, wherein the key in the header data replacement table corresponds to the serial number of the first type of original header data or the third type of original header data in all the original header data, and the values ​​in the header data replacement table all correspond to null values; and, the original header data corresponding to the serial number is replaced by the value of the header data replacement table to generate the temporary header data. Different from the previous embodiment in which the serial number of the second type of original header data in the above original header data is determined to reversely exclude the other types of original header data, this embodiment directly determines the serial numbers of the other types of original header data, i.e., the first type of original header data and the third type of original header data in all the original header data, so as to specifically replace the value of the original header data whose corresponding key is equivalent to the above serial number with a null value to eliminate the first type of original header data and the third type of original header data in the temporary header data.

[0083] The above two methods for generating temporary header data can be determined in real time according to actual conditions. For example, when the total number of the first category original header data and the third category original header data provided in the conversion configuration information is much smaller than the second category original header data, the header data replacement table can be quickly generated by the method of the second embodiment; conversely, when the total number of the second category original header data provided in the conversion configuration information is much smaller than the first category original header data and the third category original header data, the header data replacement set can be quickly generated by the method of the first embodiment.

[0084] Below is a combination of Tables 1, 2 and Figure 2 An embodiment shown in FIG. 1 is used to specifically introduce the process of generating target header data. Figure 2 As shown, the process of generating target header data includes the following steps:

[0085] Step S202: acquiring the data to be converted including the original header data and its corresponding original data set and conversion configuration information.

[0086] In one embodiment, it is assumed that the original header data of Table 1, namely the metadata, the corresponding original data set, namely the dataset, and the following conversion configuration information input by the user have been obtained:

[0087] {

[0088] "expandDimension":["region","car_series"],

[0089] "noExpandDimension":["date"],

[0090] "measurements":["sales_volume","MoM"]

[0091] }

[0092] Among them, expandDimension is the expandable dimension information, and its corresponding values ​​"region", "car_series" are the code attributes of the first type of original header data that need to be expanded. noExpandDimension is the non-expandable dimension information, and its corresponding value "date" is the code attribute of the second type of original header data that does not need to be expanded. measurements is the measurement dimension information, and its corresponding values ​​"sales_volume" and "MoM" are the code attributes of the third type of original header data that store actual values.

[0093] Step S204 , traversing the first type of original header data and the third type of original header data corresponding to the conversion configuration information to generate a header data replacement table.

[0094] In one embodiment, the first type of original header data and the third type of original header data in the conversion configuration information may be traversed, and each item may be pushed into the created and initialized header data replacement table to generate the following header data replacement table.

[0095] metaReplaceMap: {

[0096] 1:[],

[0097] 2:[],

[0098]

[0099] Among them, the keys in the header data replacement table metaReplaceMap correspond to the serial numbers (index) of the above-mentioned first type of original header data or the above-mentioned third type of original header data in the above-mentioned original header data, namely 1, 2, 3, 4, and the corresponding values ​​are all replaced with null values.

[0100] Step S206: Replace the original header data according to the header data replacement table to generate temporary header data.

[0101] In one embodiment, the sequence number of the above header data replacement table can be used to determine that the second to fifth elements in the original header data are replaced with null values, so that the original header data after replacement is as follows:

[0102]

[0103] Among them, only the second type of original header data is retained, and the original header data can be used as temporary header data at this time.

[0104] Step S208: Generate temporary data corresponding to at least one first-category original header data according to the extensible dimension information in the conversion configuration information.

[0105] In one embodiment, since there are two of the above-mentioned first-category original header data, a temporary combination possiblePairs can be generated as the above-mentioned temporary data according to the above-mentioned extensible dimension information, and the temporary combination can be used to characterize the combination relationship between the original data corresponding to each of the first-category original header data in the original data set and the original data corresponding to the remaining first-category original header data. Specifically, the original data corresponding to each of the above-mentioned first-category original header data in the original data set can be identified as an enumeration item array, and the original data corresponding to the first-category original header data with two code attributes of "region" and "car_series" can be identified as a two-dimensional array composed of enumeration items enums, that is, [{"Hong Kong", "Macau"}, {"Type A car", "Type B car"}] By recursively calling the above enums, the final full enumeration data can be obtained, that is, the above-mentioned combination relationship ["Hong Kong", "Type A car"], ["Hong Kong", "Type B car"], ["Macau", "Type A car"], ["Macau", "Type B car"].

[0106] Step S210 , adding temporary data to temporary header data to generate target header data.

[0107] In one embodiment, each combination relationship can be concatenated in the temporary data to generate code attributes and name attributes similar to the second type of original header data. Of course, since the temporary data does not carry name mapping relationships with specific enumeration items such as "Hong Kong" and "Type B car", the above code attribute and name attribute can directly take the same value. The final target header data newMetadata is obtained:

[0108]

[0109] The corresponding table is as follows:

[0110] Table 3

[0111] date Hong Kong-Type A Hong Kong-B type car Macau-Type A Macau-Type B

[0112] Step S106 : generating a target data set corresponding to the target header data according to the target header data, the original data set, and the correspondence between the plurality of original data represented by the conversion configuration information and the target header data.

[0113] After obtaining the target header data, the target data set corresponding to the target header data can be further generated. Since the data set itself changes in the specific data structure before and after the conversion, that is, the correspondence between each original data and the actual corresponding target header data has changed, the target data set corresponding to the above target header data can be generated based on the target header data and the original data set by utilizing the correspondence between multiple original data represented by the conversion configuration information and the target header data.

[0114] It should be noted that the characterization process of the conversion configuration information for the correspondence between the above-mentioned multiple original data and the target header data is indirect and segmented, that is, the conversion configuration information first characterizes the comparison relationship between the multiple original data and the original header data. For example, the data in any data item in Table 1, the original header data type to which it belongs can be determined according to the serial number of the data in any of the above-mentioned data items and the type of definition of the original header data with different serial numbers in the conversion configuration information. Then, the correspondence between the above-mentioned multiple original data and the original header data is changed to the correspondence between the multiple original data and the target header data by relying on the target header data and the original data set.

[0115] In this specification, multiple mapping tables can be introduced to quickly construct the above target data set.

[0116] In one embodiment, the first mapping table and the second mapping table may be initialized first, and the data items in the original data set may be traversed to obtain the first temporary mapping table corresponding to the first type of original header data and the third type of original header data in each data item, and the second temporary mapping table corresponding to the second type of original header data, and the first temporary mapping table may be inserted into the first mapping table and the second temporary mapping table may be inserted into the second mapping table during the traversal process, and then new data items may be generated according to the first mapping table and the second mapping table to form the target data set. The key and value of the first temporary mapping table and the value of the second temporary mapping table may be matched with the plurality of original data having the corresponding relationship with the target header data, and the key of the second temporary mapping table may be matched with the target header data.

[0117] In the previous embodiment, there are substantial differences between the acquisition process of the first temporary mapping table and the acquisition process of the second temporary mapping table. Specifically:

[0118] For the first temporary mapping table, it can be initialized first, and then the first original data corresponding to the first type of original header data in the traversed data item is determined according to the above-mentioned extensible dimension information, and the third original data corresponding to the third type of original header data in the traversed data item is determined according to the above-mentioned measurement dimension information. Finally, the first original data and the third original data are inserted into the above-mentioned first temporary mapping table as key-value pairs. Taking the data item corresponding to the second row in Table 1 as an example, assuming that the two original header data corresponding to the names "region" and "car series" both belong to the first type of original header data, and the two original header data corresponding to the names "sales volume" and "month-on-month" both belong to the third type of original header data, Then when traversing to this data item, the serial number of the first original data in Table 1 in this data item is consistent with the serial number of the first type of original header data in all original header data, so the first original data "Hong Kong" and "Type A car" in this data item are obtained. Similarly, since the serial number of the third original data in Table 1 in this data item is consistent with the serial number of the third type of original header data in all original header data, the third original data "1,888" and "18.88%" in this data item are obtained. Finally, key-value pairs corresponding to the first original data "Hong Kong" and "Type A car" and the third original data "1,888" and "18.88%" can be formed to be inserted into the first temporary mapping table.

[0119] It is worth mentioning that the first original data and the third original data each have different optimized expressions when the number is in the majority. For example, when there are multiple first-type original header data, the original data corresponding to each first-type original header data in the data item to be traversed can be sequentially processed with characters to form the above-mentioned first original data; when there are multiple third-type original header data, the original data corresponding to each third-type original header data in the data item to be traversed can be sequentially stored in the same data set to form the above-mentioned third original data. For example, the first original data "Hong Kong" and "Type A car" can directly obtain the name attribute "Hong Kong-Type A car" of the target header data in Table 2 through the splicing process of characters such as "-", so as to quickly establish an association with the target header data later; for another example, the third original data "1,888", "18.88%" are sequentially stored in the same array to obtain ["1,888", "18.88%"], which also corresponds to the data "1,888,18.88%" in the target data set in Table 2, so as to quickly establish an association with the target header data later. In summary, based on the above optimized representation, the key-value pairs corresponding to the first original data and the third original data in the above data items can be presented in the form of, for example, {"Hong Kong-Type A car": ["1,888", "18.88%"]}. Similarly, traversing the other two data items in Table 1 can obtain, for example, {"Macau-Type B car": ["1,234", "-5.56%"]} and {"Hong Kong-Type B car": ["999", "12.34%"]}.

[0120] For the second temporary mapping table, it can be initialized first, and then the second category original header data can be traversed according to the non-extended dimension information, so as to insert the traversed second category original header data and the corresponding second original data as key-value pairs into the second temporary mapping table. Still taking the data item corresponding to the second row in Table 1 as an example, assuming that the original header data corresponding to the name "Date" belongs to the second category original header data, then its key-value pair can be {"date": "2024-01-01"}. If there are multiple second category original header data for the same data item, the key-value pair insertion method of the second category original header data corresponding to the above "Date" can be executed, and the two are independent of each other and have no correlation relationship, which avoids data interference with each other and improves data accuracy.

[0121] During the traversal process of each data item, whether it is inserting the first temporary mapping table into the first mapping table or inserting the second temporary mapping table into the second mapping table, the way of inserting the mapping table is consistent, that is, when inserting any temporary mapping table into any corresponding mapping table, the target original data for the second type of original header data in the traversed data item can be created according to the non-extended dimension information, and the target original data and any of the above temporary mapping tables can be inserted into any of the above mapping tables as a key-value pair.

[0122] Taking the insertion of the second temporary mapping table into the second mapping table as an example, assuming that the traversed data item is the data item corresponding to the second row in Table 1, then the target original data for the second type of original header data in the traversed data item created according to the non-extended dimension information is: the original data "2024-01-01" whose serial number is consistent with the original header data named "date", and inserting it into the second mapping table together with the second temporary mapping table {"date":"2024-01-01"} as a key-value pair to obtain {"2024-01-01":{"date":"2024-01-01"}}. If the remaining two data items in Table 1 are traversed, the following second mapping table can be obtained in theory:

[0123] {

[0124] "2024-01-01": {"date": "2024-01-01"},

[0125] "2024-01-02": {"date": "2024-01-02"},

[0126] "2024-01-02": {"date": "2024-01-02"}

[0127] }

[0128] Among them, since the keys and values ​​corresponding to the above two data items "2024-01-02":{"date":"2024-01-02"} are consistent, they are actually no longer written repeatedly in the second mapping table. In short, the final second mapping table can be presented as:

[0129] {

[0130] "2024-01-01": {"date": "2024-01-01"},

[0131] "2024-01-02": {"date": "2024-01-02"}

[0132] }

[0133] In addition, when there are multiple pieces of the second-category original header data, they can also be spliced ​​in the same way as the first-category original header data, which is not limited in this specification.

[0134] In summary, for the first mapping table and the second mapping table into which the corresponding key-value pairs are inserted, their keys are determined based on the second type of original header data. In other words, based on the first temporary mapping table and the second temporary mapping table corresponding to the same keys in the first mapping table and the second mapping table respectively, the two can be quickly and accurately combined into new data items required in the target data set.

[0135] Of course, those skilled in the art will understand that if the conversion configuration information does not represent any second-category original header data, then the processing of the second-category original header data in the above steps can be ignored, and the corresponding first temporary mapping table can be directly used as the new data item required in the target data set.

[0136] Below Figure 2 Based on the corresponding embodiment, combined with Tables 1, 2 and Figure 3 An embodiment shown in FIG. 1 is used to specifically introduce the process of generating target header data. Figure 3 As shown in Figure 1, the process of generating the target dataset includes the following steps:

[0137] Step S302: Create a first mapping table and a second mapping table.

[0138] In one embodiment, a first mapping table flexMap and a second mapping table staticMap with empty contents may be created.

[0139] Step S304, start traversing each data item of the original data set.

[0140] In one embodiment, it is assumed that the original data set is:

[0141] [2024-01-01,"Hong Kong","Zeekr X","1,888","18.88%"],

[0142] [2024-01-02,"Macao","Zeekr X","1,234","-5.56%"],

[0143] [2024-01-02,"Hong Kong","Zeekr Y","999","12.34%"] ]

[0145] Then each array contained in the above original data set can be regarded as a data item.

[0146] Step S306: Initialize the first temporary mapping table, determine the first original data corresponding to the first type of original header data in the traversed data items according to the extensible dimension information, and determine the third original data corresponding to the third type of original header data in the traversed data items according to the metric dimension information. Then, insert the first original data and the third original data as key-value pairs into the first temporary mapping table, and insert the first temporary mapping table into the first mapping table.

[0147] In one embodiment, the first temporary mapping table flexTmpMap can be created and initialized separately during each traversal. According to the serial number corresponding to the first type of original header data among all the original header data, the corresponding value can be determined from the first data item above, and through character concatenation, "Hong Kong - Zeekr X" can be obtained. And so on. During the traversal of the second data item, "Macau - Zeekr X" can be determined. During the traversal of the third data item, "Hong Kong - Zeekr Y" can be determined. These concatenated values can be used as the keys in each key-value pair in the first temporary mapping table flexTmpMap respectively, and according to the original data set, the value corresponding to each key in the key-value pair can be determined. If the first temporary mapping tables for each traversal are named flexTmpMap1 to 3 respectively, then

[0148] It can be obtained that the first temporary mapping table presents as follows during the loop of different data items:

[0149] flexTmpMap1:

[0150] {"Hong Kong - Zeekr X": ["1,888", "18.88%"]}

[0151] flexTmpMap2:

[0152] {"Macau - Zeekr X": ["1,234", "-5.56%"]}

[0153] flexTmpMap3:

[0154] {"Hong Kong - Zeekr Y": value: ["999", "12.34%"]}

[0155] Then, in the first loop, the target original data for the second type of original header data in the traversed data items can be created according to the non-extensible dimension information, and the target original data and the first temporary mapping table are inserted into the first mapping table as key-value pairs, and then the first mapping table flexMap is obtained: {

[0156] 2024-01-01: {"Hong Kong-Zeekr X": ["1,888", "18.88%"]}

[0157] }

[0158] Similarly, the first mapping table flexMap obtained the second time is:

[0159] 2024-01-01: {"Hong Kong-Zeekr X": ["1,888", "18.88%"]},

[0160] 2024-01-02: {“Macao-Zeekr X”: [“1,234”, “-5.56%”]}

[0161] }

[0162] And get the final flexMap after the last loop: {

[0163] 2024-01-01: {"Hong Kong-Zeekr X": ["1,888", "18.88%"]},

[0164] 2024-01-02: {"Macao-Zeekr X":["1,234","-5.56%"],

[0165] "Hong Kong-Zeekr Y": ["999", "12.34%"]}

[0166] }

[0167] Step S308, initialize the second temporary mapping table, and traverse the second type of original header data according to the non-extended dimension information to insert the traversed second type of original header data and its corresponding second original data as key-value pairs into the second temporary mapping table.

[0168] In one embodiment, a second temporary mapping table staticTmpMap may be created and initialized during each traversal process, and the corresponding value may be determined from the first data item according to the corresponding serial number of the second type of original header data in all the original header data to obtain "date". Similarly, in the traversal process for the second and third data items, "date" may also be determined. These values ​​may be used as the keys in each key-value pair in the second temporary mapping table staticTmpMap, and the value corresponding to each key in the key-value pair may be determined according to the original data set. If the first temporary mapping table of each traversal is named staticTmpMap1 to 3, the second temporary mapping table may be presented as follows during the loop process for different data items:

[0169] staticTmpMap1:

[0170] {"date":2024-01-01}

[0171] staticTmpMap2:

[0172] {"date":2024-01-02}

[0173] staticTmpMap3:

[0174] {"date":2024-01-02}

[0175] Then, in the first loop, the target original data for the second type of original header data in the traversed data item can be created according to the non-extended dimension information, and the target original data and the second temporary mapping table are inserted into the second mapping table as a key-value pair, thereby obtaining the second mapping table staticMap: {

[0176] 2024-01-01: {"dete": 2024-01-01}

[0177] }

[0178] Similarly, the first mapping table flexMap obtained the second time is:

[0179] 2024-01-01: {"dete": 2024-01-01}

[0180] 2024-01-02: {"dete": 2024-01-02}

[0181] }

[0182] And after the last loop, the final first mapping table flexMap is obtained:

[0183] 2024-01-01: {"dete": 2024-01-01}

[0184] 2024-01-02: {"dete": 2024-01-02}

[0185] }

[0186] Among them, since the key-value pairs corresponding to the second data item and the third data item are completely consistent, the result remains unchanged after being inserted into the first mapping table, so the first mapping table flexMap obtained by the second and last cycles is consistent.

[0187] Step S310, determine whether the traversal is completed.

[0188] In one embodiment, it can be determined whether all data items in the current original data set have been traversed. If not, step S304 is executed, otherwise, step S312 is executed.

[0189] Step S312: Generate new data items according to the first mapping table and the second mapping table to form a target data set.

[0190] In one embodiment, a new data item may be formed based on combining a first temporary mapping table and a second temporary mapping table corresponding to the same key in the first mapping table and the second mapping table respectively:

[0191]

[0192] Then form the target data set:

[0193]

[0194] [24-01-02,null,["1,234","-5.56%"],["999","12.34%"],null], ]

[0196] Among them, data that does not have corresponding header data can be set to a null value by default, and this manual does not limit this.

[0197] Those skilled in the art will appreciate that the scenarios of the above embodiments are all based on the process of converting Table 1 into Table 2, that is, expanding the corresponding table header. In addition, the process of converting Table 2 into Table 1, that is, shrinking the corresponding table header, can also be achieved by imitating the reverse operation of the above process. This will not be elaborated in this specification.

[0198] Figure 4 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 4 At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and may also include hardware required for other functions. One or more embodiments of this specification may be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0199] Corresponding to the above-mentioned embodiment of the table conversion method, this specification also provides an embodiment of a table conversion device.

[0200] Please refer to Figure 5 ; The device comprises:

[0201] The data acquisition unit 502 is used to acquire the data to be converted contained in the target table and the conversion configuration information of the table, wherein the data to be converted includes the original header data of the target table and its corresponding original data set, and the original data set is composed of a plurality of original data;

[0202] A header data generating unit 504 generates target header data different from the original header data according to the data to be converted and at least one original header data represented by the conversion configuration information;

[0203] The data set generating unit 506 is configured to generate a target data set corresponding to the target header data according to the target header data, the original data set, and the correspondence between the plurality of original data represented by the conversion configuration information and the target header data.

[0204] Optionally, the conversion configuration information includes extensible dimension information for characterizing a first type of original header data that needs to be extended in the original header data, and non-extended dimension information for characterizing a second type of original header data that does not need to be extended in the original header data; the header data generating unit 504 is specifically used to:

[0205] Generate temporary header data according to the conversion configuration information, wherein the temporary header data includes the second type of original header data represented by the non-extended dimension information;

[0206] generating temporary data corresponding to at least one first-category original header data according to the scalable dimension information;

[0207] The temporary data is added to the temporary header data to generate the target header data.

[0208] Optionally, the header data generating unit 504 is specifically configured to:

[0209] In the case that there is one piece of the first type of original header data, the original data corresponding to the first type of original header data in the original data set is used as the temporary data;

[0210] In the case where there are multiple first-category original header data, a temporary combination is generated as the temporary data based on the extensible dimensional information, and the temporary combination is used to characterize the combination relationship between the original data corresponding to each first-category original header data in the original data set and the original data corresponding to the remaining first-category original header data.

[0211] Optionally, the conversion configuration information further includes metric dimension information for characterizing the third type of original header data storing actual numerical values ​​in the original header data; the header data generating unit 504 is specifically configured to:

[0212] Generate a header data replacement set according to the non-extended dimension information, the header data replacement set including the sequence number of the second type of original header data in the original header data; and replace the original header data not corresponding to the sequence number with a null value to generate the temporary header data; or

[0213] A header data replacement table is generated according to the extensible dimension information and the metric dimension information, wherein the keys in the header data replacement table correspond to the serial numbers of the first category original header data or the third category original header data in the original header data, and the values ​​in the header data replacement table all correspond to null values; and the original header data corresponding to the serial number is replaced by the values ​​of the header data replacement table to generate the temporary header data.

[0214] Optionally, the conversion configuration information includes expandable dimension information for characterizing a first type of original header data that needs to be expanded in the original header data, non-expanded dimension information for characterizing a second type of original header data that does not need to be expanded in the original header data, and metric dimension information for characterizing a third type of original header data storing actual numerical values ​​in the original header data; the data set generation unit 506 is specifically used to:

[0215] Initialize the first mapping table and the second mapping table;

[0216] Traversing the data items in the original data set to obtain a first temporary mapping table corresponding to the first type of original header data and the third type of original header data, and a second temporary mapping table corresponding to the second type of original header data in each data item, and inserting the first temporary mapping table into the first mapping table, and inserting the second temporary mapping table into the second mapping table, wherein the key and value of the first temporary mapping table and the value of the second temporary mapping table are respectively matched with the plurality of original data having the corresponding relationship with the target header data, and the key of the second temporary mapping table is matched with the target header data;

[0217] New data items are generated according to the first mapping table and the second mapping table to form the target data set.

[0218] Optionally, the data set generating unit 506 is specifically configured to:

[0219] Initialize the first temporary mapping table; determine the first original data corresponding to the first type of original header data in the traversed data item according to the scalable dimension information, and determine the third original data corresponding to the third type of original header data in the traversed data item according to the metric dimension information; insert the first original data and the third original data into the first temporary mapping table as a key-value pair;

[0220] Initialize the second temporary mapping table; traverse the second type of original header data according to the non-extended dimension information, so as to insert the traversed second type of original header data and its corresponding second original data into the second temporary mapping table as a key-value pair.

[0221] Optionally, the data set generating unit 506 is specifically configured to:

[0222] When there are multiple pieces of the first-type original header data, the original data corresponding to each piece of the first-type original header data in the traversed data items are sequentially concatenated to form the first original data;

[0223] In the case that there are multiple third-category original header data, the original data corresponding to each third-category original header data in the traversed data items are sequentially stored in the same data set to form the third original data.

[0224] Optionally, with respect to inserting the first temporary mapping table into the first mapping table and inserting the second temporary mapping table into the second mapping table, inserting any temporary mapping table into a unit of any corresponding mapping table is specifically used to: create target original data for the second type of original header data in the traversed data item according to the non-extended dimension information; and insert the target original data and any temporary mapping table into any mapping table as a key-value pair;

[0225] The data set generating unit 506 is specifically used for:

[0226] A new data item is combined based on temporary mapping tables corresponding to the same key in the first mapping table and the second mapping table to form the target data set.

[0227] Based on the same concept as the above method, this specification also provides an electronic device, including: a processor; a memory for storing processor executable instructions; wherein the processor implements the steps of the method described in any of the above embodiments by running the executable instructions.

[0228] Based on the same concept as the above method, this specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0229] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instruction, which implements the steps of the method described in any of the above embodiments when executed by a processor.

[0230] Although the present invention includes many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of the specific embodiments of specific inventions. Certain features described in multiple embodiments of the present invention may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claimed as such, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.

[0231] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that these operations be performed in the particular order shown or performed sequentially, or requiring that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged into multiple software products.

[0232] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.

[0233] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A table conversion method, characterized in that: The method comprises: Acquire the data to be converted contained in the target table and the conversion configuration information of the table, wherein the data to be converted includes the original header data of the target table and its corresponding original data set, and the original data set is composed of a plurality of original data; Generate target header data different from the original header data according to the data to be converted and at least one original header data represented by the conversion configuration information; A target data set corresponding to the target header data is generated according to the target header data, the original data set, and a correspondence between the plurality of original data represented by the conversion configuration information and the target header data.

2. The method according to claim 1, characterized in that The conversion configuration information includes expandable dimension information for representing a first type of original header data that needs to be expanded in the original header data, and non-expandable dimension information for representing a second type of original header data that does not need to be expanded in the original header data; generating target header data different from the original header data according to the data to be converted and at least one original header data represented by the conversion configuration information includes: Generate temporary header data according to the conversion configuration information, wherein the temporary header data includes the second type of original header data represented by the non-extended dimension information; generating temporary data corresponding to at least one first-category original header data according to the scalable dimension information; The temporary data is added to the temporary header data to generate the target header data.

3. The method according to claim 2, characterized in that The step of generating temporary data corresponding to at least one first-category original header data according to the scalable dimension information includes: In the case that there is one piece of the first type of original header data, the original data corresponding to the first type of original header data in the original data set is used as the temporary data; In the case where there are multiple first-category original header data, a temporary combination is generated as the temporary data based on the extensible dimensional information, and the temporary combination is used to characterize the combination relationship between the original data corresponding to each first-category original header data in the original data set and the original data corresponding to the remaining first-category original header data.

4. The method according to claim 2, characterized in that: The conversion configuration information further includes metric dimension information for characterizing the third type of original header data storing actual values ​​in the original header data; generating temporary header data according to the conversion configuration information includes: Generate a header data replacement set according to the non-extended dimension information, the header data replacement set including the sequence number of the second type of original header data in the original header data; and replace the original header data not corresponding to the sequence number with a null value to generate the temporary header data; or A header data replacement table is generated according to the extensible dimension information and the metric dimension information, wherein the keys in the header data replacement table correspond to the serial numbers of the first category original header data or the third category original header data in the original header data, and the values ​​in the header data replacement table all correspond to null values; and the original header data corresponding to the serial number is replaced by the values ​​of the header data replacement table to generate the temporary header data.

5. The method according to claim 1, characterized in that The conversion configuration information includes expandable dimension information for representing a first type of original header data that needs to be expanded in the original header data, non-expanded dimension information for representing a second type of original header data that does not need to be expanded in the original header data, and metric dimension information for representing a third type of original header data storing actual numerical values ​​in the original header data; the first corresponding to the target header data is generated according to the target header data, the original data set, and the correspondence between the multiple original data represented by the conversion configuration information and the target header data, including: Initialize the first mapping table and the second mapping table; Traversing the data items in the original data set to obtain a first temporary mapping table corresponding to the first type of original header data and the third type of original header data, and a second temporary mapping table corresponding to the second type of original header data in each data item, and inserting the first temporary mapping table into the first mapping table, and inserting the second temporary mapping table into the second mapping table, wherein the key and value of the first temporary mapping table and the value of the second temporary mapping table are respectively matched with the plurality of original data having the corresponding relationship with the target header data, and the key of the second temporary mapping table is matched with the target header data; New data items are generated according to the first mapping table and the second mapping table to form the target data set.

6. The method according to claim 5, characterized in that The obtaining of a first temporary mapping table corresponding to the first type of original header data and the third type of original header data in each data item, and a second temporary mapping table corresponding to the second type of original header data, comprises: Initialize the first temporary mapping table; determine the first original data corresponding to the first type of original header data in the traversed data item according to the scalable dimension information, and determine the third original data corresponding to the third type of original header data in the traversed data item according to the metric dimension information; insert the first original data and the third original data into the first temporary mapping table as a key-value pair; Initialize the second temporary mapping table; traverse the second type of original header data according to the non-extended dimension information, so as to insert the traversed second type of original header data and its corresponding second original data into the second temporary mapping table as a key-value pair.

7. The method according to claim 6, characterized in that The determining, according to the scalable dimension information, first original data corresponding to the first type of original header data in the traversed data item, and determining, according to the metric dimension information, third original data corresponding to the third type of original header data in the traversed data item, includes: When there are multiple pieces of the first-type original header data, the original data corresponding to each piece of the first-type original header data in the traversed data items are sequentially concatenated to form the first original data; In the case that there are multiple third-category original header data, the original data corresponding to each third-category original header data in the traversed data items are sequentially stored in the same data set to form the third original data.

8. The method according to claim 5, characterized in that With respect to inserting the first temporary mapping table into the first mapping table and inserting the second temporary mapping table into the second mapping table, inserting any temporary mapping table into any corresponding mapping table includes: creating target original data for the second type of original header data in the traversed data item according to the non-extended dimension information; and inserting the target original data and any temporary mapping table into any mapping table as a key-value pair; The generating new data items according to the first mapping table and the second mapping table to constitute the target data set includes: combining temporary mapping tables corresponding to the same keys in the first mapping table and the second mapping table into new data items to constitute the target data set.

9. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.