A data index storage method, system and device capable of arbitrarily extending dimensions

By adding data row extension dimensions to the data index storage table and using indicator IDs for storage and access, the problem of unfixed data table structure and difficult to unify the calculation logic in the existing technology is solved, and efficient data processing and storage access is achieved .

CN112765163BActive Publication Date: 2025-02-07WUHAN NIO ENERGY EQUIPMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011634617.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2025-02-07
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

The existing data metric storage method can easily lead to unfixed data table structure, cumbersome expansion, and difficult to unify the calculation logic, resulting in low data processing and storage access efficiency and high resource consumption.

Method used

Expand the dimension by adding data rows to the storage table of data metrics, and using the metric ID for data storage and access, ensuring free combination and expansion between dimensions.

Benefits of technology

The processing, storage and access process of data indicators is simplified, data processing and storage access efficiency is improved, computing costs are reduced, and the uniformity of indicators is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112765163B_ABST
    Figure CN112765163B_ABST
Patent Text Reader

Abstract

The present invention provides a data indicator storage method, system and device with arbitrarily expandable dimensions. The method includes: according to different business needs, obtaining corresponding data indicators by processing business data, and querying a data table to construct an indicator ID of the data indicator; calling the storage table of the data indicator based on the indicator ID, and expanding the data indicator dimension by adding data rows in the storage table of the data indicator to store the data indicator according to the corresponding fields. This solution realizes arbitrary dimensional expansion by adding data rows, and the dimensions can be freely combined, and each row of data can be interpreted by identifying different indicator IDs; for indicators under different dimensions of the same metric, the data indicators can be stored conveniently, expanded simply, and easily called, and the uniformity of the indicators can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data index storage, and in particular to a data index storage method, system and device capable of arbitrarily extending dimensions. Background Art

[0002] In the current big data context, various business scenarios will extract a large amount of business data into business data indicators; indicators are composed of metrics and dimensions. Metrics are "aggregated statistical values, that is, the results of aggregation operations, usually continuous values, such as order volume, etc., and dimensions are "the angle of observation of data, usually a set of discrete values, such as city, date, etc." Under the premise of the same metric, the combination of dimensions can be endless. In the existing data indicator storage method, the usual data indicator storage uses a two-dimensional table method, adding indicator fields to the columns and placing indicator values ​​in the corresponding positions; this storage method easily leads to a very unstable structure of the data table. Each time a new indicator is added, the table structure needs to be modified, which is very cumbersome when expanding. As the number of indicators increases, the field structure of the table will also expand infinitely. In addition, the calculation logic of these data indicators, regardless of difficulty, is very difficult to unify. When ensuring the uniformity of data indicators, more time and resources need to be spent on calculation, storage and access to facilitate use. For example Figure 1 As shown in the figure, taking the dimension date as the first example, the following columns are data indicators: indicator 1, indicator 2, indicator 3... indicator N, where N is an integer greater than or equal to 1, representing multiple different indicators. Different indicators on different dates have corresponding indicator values. Once a new indicator is added, the column of the table needs to be increased, that is, the field structure needs to be increased, which requires unlimited expansion and change. The table structure is not fixed, and the entire structure needs to be modified every time a new data indicator is added. In this way, the operation of converting data indicators into the storage form in the two-dimensional table (calculation of dimensions and metrics), writing data (storage), and reading data (retrieval, access) are relatively complex, the data processing efficiency and storage access efficiency are low, and the flexibility of arbitrary expansion is small. With the increase of data, especially in the face of data processing of big data and massive data, storage access is complex and the efficiency is reduced, and the computing resources and consumption spent on the storage access process will also increase (that is, the computing cost is high, the computer processing resources are consumed too much, and the time is too long).

[0003] Therefore, an improved data indicator storage method needs to be provided, which can facilitate the storage of data indicators, simplify the expansion, and easily call the indicators under the same metric in different dimensions, and ensure the uniformity of the indicators, thereby reducing the resource consumption of data processing and access storage, improving the processing, storage and access efficiency, and thus reducing computing costs and improving efficiency. Summary of the invention

[0004] In order to overcome the above defects, the present invention is proposed to solve or at least partially solve the technical problem of how to achieve free combination between dimensions and arbitrary dimensional expansion by adding data rows based on the relationship between data indicators of different dimensions with the same metric, so as to simplify the processing, storage and access process of data indicators with different calculation logics, thereby improving the overall data processing and storage access efficiency. The present invention provides a data indicator storage method, system and device with arbitrarily expandable dimensions to solve the above technical problems.

[0005] In a first aspect, a data index storage method capable of arbitrarily extending dimensions is provided, comprising:

[0006] According to different business needs, the corresponding data indicators are obtained by processing the business data, and the data table is queried to construct the indicator ID of the data indicator;

[0007] The storage table of the data indicator is called based on the indicator ID, and the data indicator dimension is expanded by adding data rows in the storage table of the data indicator to store the data indicator according to corresponding fields.

[0008] Among them, "according to different business needs, obtain corresponding data indicators by processing business data", specifically includes:

[0009] Split business data to determine key data information;

[0010] Determine a metric and one or more dimensions under the metric from the main data information through a pre-set logic to form a corresponding data indicator;

[0011] The preset logic is to find data information of a metric from the main data information, and to find data information of all dimensions under the metric from the main data information based on the metric.

[0012] Wherein, the storage table of the data indicator includes: a pre-set storage table having one or more fixed column field structures capable of storing data indicators;

[0013] The data table includes: a pre-set data table of one or more dimensions under the same metric that can be queried;

[0014] “Querying the data table to construct the indicator ID of the data indicator” specifically includes:

[0015] The obtained data indicator calls and queries one or more data tables according to its own metric and / or dimension;

[0016] According to the query result and the structure of the column fields of the storage table, an indicator ID corresponding to the data indicator is constructed.

[0017] The column fields of the storage table include at least: indicator ID, dimension code explanation, indicator value and indicator value unit;

[0018] The indicator ID includes: a combination of a parent indicator ID, a dimension combination code ID, and a dimension value code ID;

[0019] The parent indicator ID is the first digit of the indicator ID;

[0020] The combined meanings of different dimensions are determined by the dimension combination code ID and the dimension value code ID.

[0021] Among them, in the storage table of the data indicators, the most commonly used dimensions or dimensions are extracted as fixed column fields.

[0022] The dimension combination code ID includes: a binary sequence with the number of all dimensions required to be used by the parent index as the length, wherein 1 is filled in the corresponding position of the dimension that has been selected for use, and 0 is filled in the position of the remaining dimensions that have not been selected for use;

[0023] The dimension value coding ID includes: a digital sequence with the same number of digits as the dimension combination coding ID and one-to-one corresponding to the same parent index, and the selected dimension value is filled in the corresponding position of the selected dimension.

[0024] Among them, it also includes:

[0025] The data table includes one or more mapping tables;

[0026] Each of the mapping tables at least includes: a dimension ID, a dimension value, a parent index ID, and a mapping relationship formed by two or more pieces of information in the parent index;

[0027] The data table is queried to obtain the corresponding dimension ID, dimension value and parent indicator ID for constructing the indicator ID.

[0028] Wherein, querying the data table specifically includes:

[0029] Calling a mapping table related to the parent indicator ID and the dimension ID information to query to obtain the dimension combination code ID;

[0030] A mapping table related to the dimension ID and the dimension value is called to query to obtain the dimension value encoding ID.

[0031] Among them, “calling the storage table of the data indicator based on the indicator ID, and expanding the data indicator dimension by adding data rows in the storage table of the data indicator to store the data indicator according to corresponding fields” specifically includes:

[0032] Based on the constructed indicator ID, the storage table of the data indicator is called, and the indicator ID and the information of each column field of the storage table corresponding to the data indicator in the data indicator are stored one by one, so as to realize the storage of the data indicator by increasing the data rows of the data indicator.

[0033] Among them, it also includes:

[0034] According to the indicator ID of the data indicator, the data table and the storage table are called and queried to access the stored data.

[0035] According to the indicator ID of the data indicator, calling and querying the data table and the storage table to access the stored data specifically includes:

[0036] Based on the parent indicator ID, dimension combination code ID, and dimension value code ID in the indicator ID, the data table and the storage table related to the dimension and parent indicator of the data indicator are called and queried, and the corresponding data information is obtained.

[0037] In a second aspect, a data index storage system capable of arbitrarily extending dimensions is provided, including:

[0038] A construction unit, which is used to obtain corresponding data indicators by processing business data according to different business needs, and query the data table to construct the indicator ID of the data indicator;

[0039] An expansion unit is used to call the storage table of the data indicator based on the indicator ID, and expand the data indicator dimension by adding data rows in the storage table of the data indicator to store the data indicator according to corresponding fields.

[0040] The specific operations performed by the construction unit include:

[0041] Split business data to determine key data information;

[0042] Determine a metric and one or more dimensions under the metric from the main data information through a pre-set logic to form a corresponding data indicator;

[0043] The pre-set logic is to find data information of a metric from the main data information, and to find data information of all dimensions under the metric from the main data information based on the metric.

[0044] Wherein, the storage table of the data indicator includes: a pre-set storage table having one or more fixed column field structures capable of storing data indicators;

[0045] The data table includes: a pre-set data table of one or more dimensions under the same metric that can be queried;

[0046] “Querying the data table to construct the indicator ID of the data indicator” specifically includes:

[0047] The obtained data indicator calls and queries one or more data tables according to its own metric and / or dimension;

[0048] According to the query result and the structure of the column fields of the storage table, an indicator ID corresponding to the data indicator is constructed.

[0049] The column fields of the storage table include at least: indicator ID, dimension code explanation, indicator value and indicator value unit;

[0050] The indicator ID includes: a combination of a parent indicator ID, a dimension combination code ID, and a dimension value code ID;

[0051] The parent indicator ID is the first digit of the indicator ID;

[0052] The combined meanings of different dimensions are determined by the dimension combination code ID and the dimension value code ID.

[0053] Among them, in the storage table of the data indicators, the most commonly used dimensions or dimensions are extracted as fixed column fields.

[0054] The dimension combination code ID includes: a binary sequence with the number of all dimensions required to be used by the parent index as the length, wherein 1 is filled in the corresponding position of the dimension that has been selected for use, and 0 is filled in the position of the remaining dimensions that have not been selected for use;

[0055] The dimension value coding ID includes: a digital sequence with the same number of digits as the dimension combination coding ID and one-to-one corresponding to the same parent index, and the selected dimension value is filled in the corresponding position of the selected dimension.

[0056] Among them, it also includes:

[0057] The data table includes one or more mapping tables;

[0058] Each of the mapping tables at least includes: a dimension ID, a dimension value, a parent index ID, and a mapping relationship formed by two or more pieces of information in the parent index;

[0059] The data table is queried to obtain the corresponding dimension ID, dimension value and parent indicator ID for constructing the indicator ID.

[0060] Wherein, querying the data table specifically includes:

[0061] Calling a mapping table related to the parent indicator ID and the dimension ID information to query to obtain the dimension combination code ID;

[0062] A mapping table related to dimension ID and dimension value is called to query to obtain the dimension value encoding ID.

[0063] The specific operations performed by the extension unit include:

[0064] Based on the constructed indicator ID, the storage table of the data indicator is called, and the indicator ID and the information of each column field of the storage table corresponding to the data indicator in the data indicator are stored one by one, so as to realize the storage of the data indicator by increasing the data rows of the data indicator.

[0065] Among them, it also includes:

[0066] The access unit is used to call and query the data table and the storage table according to the indicator ID of the data indicator to access the stored data.

[0067] The specific operations performed by the access unit include:

[0068] Based on the parent indicator ID, dimension combination code ID, and dimension value code ID in the indicator ID, the data table and the storage table related to the dimension and parent indicator of the data indicator are called and queried, and the corresponding data information is obtained.

[0069] According to a third aspect, a storage device is provided, in which a plurality of program codes are stored, wherein the program codes are suitable for being loaded and run by a processor to execute any of the aforementioned methods for storing data indicators with arbitrarily scalable dimensions.

[0070] In a fourth aspect, a control device is provided, comprising a processor and a storage device, wherein the storage device is suitable for storing multiple program codes, and the program codes are suitable for being loaded and run by the processor to execute any of the aforementioned data indicator storage methods with arbitrarily expandable dimensions.

[0071] Solution 1: A data index storage method capable of arbitrarily extending dimensions, characterized by comprising:

[0072] According to different business needs, the corresponding data indicators are obtained by processing the business data, and the data table is queried to construct the indicator ID of the data indicator;

[0073] The storage table of the data indicator is called based on the indicator ID, and the data indicator dimension is expanded by adding data rows in the storage table of the data indicator to store the data indicator according to corresponding fields.

[0074] Solution 2: The method according to Solution 1, wherein "according to different business needs, corresponding data indicators are obtained by processing business data", specifically including:

[0075] Split business data to determine key data information;

[0076] Determine a metric and one or more dimensions under the metric from the main data information through a pre-set logic to form a corresponding data indicator;

[0077] The preset logic is to find data information of a metric from the main data information, and to find data information of all dimensions under the metric from the main data information based on the metric.

[0078] Scheme 3. The method according to Scheme 1 or 2, wherein:

[0079] The storage table of the data index includes: a pre-set storage table having one or more fixed column field structures capable of storing data indexes;

[0080] The data table includes: a pre-set data table of one or more dimensions under the same metric that can be queried;

[0081] “Querying the data table to construct the indicator ID of the data indicator” specifically includes:

[0082] The obtained data indicator calls and queries one or more data tables according to its own metric and / or dimension;

[0083] According to the query result and the structure of the column fields of the storage table, an indicator ID corresponding to the data indicator is constructed.

[0084] Scheme 4. The method according to Scheme 3, wherein:

[0085] The column fields of the storage table include at least: indicator ID, dimension code explanation, indicator value and indicator value unit;

[0086] The indicator ID includes: a combination of a parent indicator ID, a dimension combination code ID, and a dimension value code ID;

[0087] The parent indicator ID is the first digit of the indicator ID;

[0088] The combined meanings of different dimensions are determined by the dimension combination code ID and the dimension value code ID.

[0089] Scheme 5. The method according to Scheme 4, wherein:

[0090] In the storage table of the data index, the most commonly used dimensions or dimensions are extracted as fixed column fields.

[0091] Scheme 6. The method according to Scheme 5, wherein:

[0092] The dimension combination code ID includes: a binary sequence with the number of all dimensions required to be used by the parent index as the length, wherein 1 is filled in the corresponding position of the dimension that has been selected for use, and 0 is filled in the position of the remaining dimensions that have not been selected for use;

[0093] The dimension value coding ID includes: a digital sequence with the same number of digits as the dimension combination coding ID and one-to-one corresponding to the same parent index, and the selected dimension value is filled in the corresponding position of the selected dimension.

[0094] Solution 7. The method according to Solution 6, further comprising:

[0095] The data table includes one or more mapping tables;

[0096] Each of the mapping tables at least includes: a dimension ID, a dimension value, a parent index ID, and a mapping relationship formed by two or more pieces of information in the parent index;

[0097] The data table is queried to obtain the corresponding dimension ID, dimension value and parent indicator ID for constructing the indicator ID.

[0098] Solution 8. The method according to Solution 7, wherein querying the data table further comprises:

[0099] Calling a mapping table related to the parent indicator ID and the dimension ID information to query to obtain the dimension combination code ID;

[0100] A mapping table related to dimension ID and dimension value is called to query to obtain the dimension value encoding ID.

[0101] Solution 9. The method according to Solution 1, wherein “calling the storage table of the data indicator based on the indicator ID, and expanding the data indicator dimension by adding data rows in the storage table of the data indicator to store the data indicator according to corresponding fields” specifically includes:

[0102] Based on the constructed indicator ID, the storage table of the data indicator is called, and the indicator ID and the information of each column field of the storage table corresponding to the data indicator in the data indicator are stored one by one, so as to realize the storage of the data indicator by increasing the data rows of the data indicator.

[0103] Solution 10. The method according to any one of Solutions 1 to 9, further comprising:

[0104] According to the indicator ID of the data indicator, the data table and the storage table are called and queried to access the stored data.

[0105] Solution 11. The method according to Solution 10, wherein, according to the indicator ID of the data indicator, calling and querying the data table and the storage table to access the stored data specifically includes:

[0106] Based on the parent indicator ID, dimension combination code ID, and dimension value code ID in the indicator ID, the data table and the storage table related to the dimension and parent indicator of the data indicator are called and queried, and the corresponding data information is obtained.

[0107] Solution 12: A data index storage system capable of arbitrarily extending dimensions, characterized by comprising:

[0108] A construction unit, which is used to obtain corresponding data indicators by processing business data according to different business needs, and query the data table to construct the indicator ID of the data indicator;

[0109] An expansion unit is used to call the storage table of the data indicator based on the indicator ID, and expand the data indicator dimension by adding data rows in the storage table of the data indicator to store the data indicator according to corresponding fields.

[0110] Solution 13. The system according to Solution 12, wherein the specific operations performed by the construction unit include:

[0111] Split business data to determine key data information;

[0112] Determine a metric and one or more dimensions under the metric from the main data information through a pre-set logic to form a corresponding data indicator;

[0113] The preset logic is to find data information of a metric from the main data information, and to find data information of all dimensions under the metric from the main data information based on the metric.

[0114] Option 14. A system according to Option 12 or 13, wherein:

[0115] The storage table of the data index includes: a pre-set storage table having one or more fixed column field structures capable of storing data indexes;

[0116] The data table includes: a pre-set data table of one or more dimensions under the same metric that can be queried;

[0117] “Querying the data table to construct the indicator ID of the data indicator” specifically includes:

[0118] The obtained data indicator calls and queries one or more data tables according to its own metric and / or dimension;

[0119] According to the query result and the structure of the column fields of the storage table, an indicator ID corresponding to the data indicator is constructed.

[0120] Solution 15. A system according to Solution 14, wherein:

[0121] The column fields of the storage table include at least: indicator ID, dimension code explanation, indicator value and indicator value unit;

[0122] The indicator ID includes: a combination of a parent indicator ID, a dimension combination code ID, and a dimension value code ID;

[0123] The parent indicator ID is the first digit of the indicator ID;

[0124] The combined meanings of different dimensions are determined by the dimension combination code ID and the dimension value code ID.

[0125] Solution 16. A system according to Solution 15, wherein:

[0126] In the storage table of the data index, the most commonly used dimensions or dimensions are extracted as fixed column fields.

[0127] Solution 17. A system according to Solution 16, wherein:

[0128] The dimension combination code ID includes: a binary sequence with the number of all dimensions required to be used by the parent index as the length, wherein 1 is filled in the corresponding position of the dimension that has been selected for use, and 0 is filled in the position of the remaining dimensions that have not been selected for use;

[0129] The dimension value coding ID includes: a digital sequence with the same number of digits as the dimension combination coding ID and one-to-one corresponding to the same parent index, and the selected dimension value is filled in the corresponding position of the selected dimension.

[0130] Solution 18. The system according to Solution 17, further comprising:

[0131] The data table includes one or more mapping tables;

[0132] Each of the mapping tables at least includes: a dimension ID, a dimension value, a parent index ID, and a mapping relationship formed by two or more pieces of information in the parent index;

[0133] The data table is queried to obtain the corresponding dimension ID, dimension value and parent indicator ID for constructing the indicator ID.

[0134] Solution 19. The system according to Solution 18, wherein querying the data table further comprises:

[0135] Calling a mapping table related to the parent indicator ID and the dimension ID information to query to obtain the dimension combination code ID;

[0136] A mapping table related to dimension ID and dimension value is called to query to obtain the dimension value encoding ID.

[0137] Solution 20. The system according to Solution 12, wherein the specific operations performed by the extension unit include:

[0138] Based on the constructed indicator ID, the storage table of the data indicator is called, and the indicator ID and the information of each column field of the storage table corresponding to the data indicator in the data indicator are stored one by one, so as to realize the storage of the data indicator by increasing the data rows of the data indicator.

[0139] Solution 21. A system according to any one of Solution 12 to Solution 20, further comprising:

[0140] The access unit is used to call and query the data table and the storage table according to the indicator ID of the data indicator to access the stored data.

[0141] Solution 22. The system according to Solution 21, wherein the specific operations performed by the access unit include:

[0142] Based on the parent indicator ID, dimension combination code ID, and dimension value code ID in the indicator ID, the data table and the storage table related to the dimension and parent indicator of the data indicator are called and queried, and the corresponding data information is obtained.

[0143] Solution 23. A storage device storing a plurality of program codes, characterized in that the program codes are suitable for being loaded and run by a processor to execute a data indicator storage method with arbitrarily expandable dimensions as described in any one of Solutions 1 to 11.

[0144] Scheme 24, a control device, comprising a processor and a storage device, wherein the storage device is suitable for storing multiple program codes, and is characterized in that the program code is suitable for being loaded and run by the processor to execute a data indicator storage method with arbitrarily expandable dimensions as described in any one of Schemes 1 to 11.

[0145] The above one or more technical solutions of the present invention have at least one or more of the following beneficial effects:

[0146] The implementation mode of the present invention obtains corresponding data indicators by processing business data according to different business needs, and queries the data table to construct the indicator ID of the data indicator; based on the indicator ID, the storage table of the data indicator is called, and the data indicator dimension is expanded by adding data rows in the storage table of the data indicator to store the data indicator according to the corresponding fields. The improved data indicator storage method provided by this scheme expands the dimension arbitrarily by adding data rows, ensures that the dimensions can be freely combined, and each row of data can be interpreted by identifying different indicator IDs. It can quickly and easily process data indicators under different dimensions of the same metric regardless of the calculation logic, and is convenient to store, simple to expand, easy to call and ensure the uniformity of indicators, effectively avoiding the defects of complex storage access and excessive consumption of data processing resources caused by the unfixed structure of the data table in the storage method of data indicators, cumbersome expansion, and difficult to unify the calculation logic of data indicators. BRIEF DESCRIPTION OF THE DRAWINGS

[0147] The specific embodiments of the present invention are described below with reference to the accompanying drawings, in which:

[0148] Figure 1 The storage form of the existing data indicator data table;

[0149] Figure 2 It is a main flow chart of an embodiment of a data index storage method capable of arbitrarily extending dimensions according to the present invention;

[0150] Figure 3 A structural block diagram of an embodiment of a data index storage system capable of arbitrarily extending dimensions according to the present invention;

[0151] Figure 4 This is an example of a data indicator storage format according to the solution of the present invention. DETAILED DESCRIPTION

[0152] In order to facilitate the understanding of the invention, the present invention will be described in more comprehensive and detailed manner in conjunction with the accompanying drawings and embodiments below. However, those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0153] In the description of the present invention, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, and memories, and may also include software parts, such as program codes, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware, or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program codes, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, and the like. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B", and may include only A, only B, or A and B. The singular terms "one" and "the" may also include plural forms.

[0154] In the prior art, known data indicator storage solutions usually use a two-dimensional table to store data indicators, adding indicator fields of data indicators in the column direction and placing indicator values ​​at corresponding positions; the structure of the data table is very unstable, and the table structure needs to be modified each time a new indicator is added, which is very cumbersome to expand, and as the number of indicators increases, the field structure of the table will also expand infinitely, and the calculation logic of these data indicators, regardless of difficulty, is very difficult to unify, so it is necessary to calculate the indicator values ​​of the data indicators and store them to ensure the uniformity of the data indicators and reflect the relationship between data indicators of the same metric but different dimensions. In this way, data processing consumes time, too many resources, and storage access is complex, inefficient, and inconvenient to use.

[0155] The present invention improves upon these deficiencies and provides a solution for storing data indicators with arbitrarily scalable dimensions. Figure 4 An example of the storage format in the storage table of the solution of the present invention is shown as follows: the fields of the storage table will not be infinitely extended, such as the column fields date, indicator name, and indicator value; each new data indicator is added in the form of a whole data row, and each parent indicator corresponds to the field indicator name. For example, under parent indicator 1 (for example, based on the metric, metric 1), a new data indicator of sub-indicator 1 or sub-indicator 2 that aggregates one or more dimensions under the parent indicator 1 is added in the form of a data row, and the corresponding indicator value 100 is added, that is, the data indicator values ​​of the sub-indicators of various dimensional combinations under the metric 1 are expanded, and the data indicator values ​​are inserted in a row manner, which is convenient for access and storage, and can be arbitrarily increased without changing the column fields and affecting the structure of the table, such as Figure 4The storage table can always maintain three column fields. Similarly, under the parent indicator 2 (measurement 2), a new data indicator is added, that is, the data row of the data indicator value of the dimension combination of sub-indicator 1 of the parent indicator 2 is added to the storage table, and the data indicators with various dimensions and dimension combinations corresponding to each measurement are increased by rows, and the data indicators with various dimensions and dimension combinations corresponding to each measurement are expanded vertically. Here, in the data indicator storage table, each row of data represents a set of specific dimension value data indicator values ​​(specific data indicator content) of a data indicator under an actual dimension combination (measurement 1 + dimensions 2 and 3). The actual dimension combination itself (measurement 1 + dimensions 2 and 3) is uniformly stored in a field in the form of a string separated by symbols (such as Figure 4 The value corresponding to the actual dimension combination is stored in another field in the same form (such as Figure 4 For example, if dimension 2 has two values, a and b, and dimension 3 has one value, c, there will be two rows of data indicator values, one row for a+b and one row for b+c.

[0156] The following are some definitions and explanations of terms involved in this invention:

[0157] Indicator: A parameter for measuring a goal, an index, specification, standard, etc. that is expected to be achieved, which describes the overall quantitative characteristics. It is generally expressed in data and consists of metrics and dimensions.

[0158] Dimension: The angle from which data is viewed, usually a set of discrete values, such as city, date, etc.

[0159] Metric: The aggregated statistical value, that is, the result of the aggregation operation, is usually a continuous value, such as order quantity, order completion quantity, etc.

[0160] Data indicators: data consisting of metrics and dimensions.

[0161] Indicator ID: Uniquely identifies each row of data indicators in a fixed data storage table. It is composed of the parent indicator ID, the ID representing the time and date, the dimension combination code ID, and the dimension value code ID. The first parent indicator ID in the indicator ID reflects the parent-child hierarchical relationship between data indicators, and the combined meaning of different dimensions is reflected through the dimension combination code ID and the dimension value code ID.

[0162] Storage table structure column fields: indicator ID, parent indicator ID, parent indicator name, time date, dimension combination code ID, dimension value code ID, dimension code explanation, indicator value, indicator value unit, etc.

[0163] Parent indicator: The original indicator that is not aggregated by any dimension and can be continuously expanded.

[0164] Sub-indicator: An indicator that is combined according to different dimensions under the same measurement as its parent indicator.

[0165] Dimension combination code (ID): Take the number of all dimensions used by the parent indicator as the length of the binary sequence, fill 1 in the corresponding position of the selected dimension, and fill 0 in the remaining unused dimensions.

[0166] Dimension value code (ID): A numeric sequence with the same number of digits as the "Dimension combination code", which fills the selected dimension value in the corresponding position of the selected dimension.

[0167] Dimension code explanation: Explain the dimension code in a dictionary form to improve understanding, with the dimension as the keyword, i.e., the key, and the dimension value as the value. See Table 1(a) and Table 1(b). The dimension code or dimension code ID is composed of the dimension combination code ID and the dimension value code. Explaining the dimension code means explaining the dimension combination code ID and the dimension value code ID in the dimension code ID. The explanation content can come from various mapping tables with dimension IDs and dimension values.

[0168] Auto-increment ID: This is the row count ID commonly used in data storage (data table, database storage). The ID increases by 1 for each additional row to indicate that each row of data is not repeated.

[0169] An implementation of the present invention is an arbitrarily expandable data indicator storage method. Specifically, a parent-child indicator system is established to reflect the data indicator relationship of different dimensions (including dimension combinations) of the same metric. Under this system, the parent indicator is the original data indicator that has not been aggregated by any dimension, which can be continuously expanded. The child indicator is the data indicator that is combined according to different dimensions under the same metric as its parent indicator. According to this system, business data can be processed to obtain its data indicators and construct its indicator ID according to the needs of different actual business scenarios. Furthermore, when the data indicator storage table has a fixed table structure, the dimensions of the data indicators can be arbitrarily expanded as the business data changes, and the dimensions can be freely combined and dynamically stored without changing the storage structure itself, thereby achieving simple, fast and efficient data processing and storage access.

[0170] In this example, according to different actual business needs, business data can be processed to obtain data indicators, and then the data information of the data indicators (dimensions, metrics) can be used to query the pre-set data table (mapping table) corresponding to the business, and the corresponding data information can be found from the data table to encode the indicator ID of the data indicator, that is, to construct the indicator ID of the data indicator. For example, in the business scenario requirements of electric vehicle charging, after processing the business data, "the number of completed one-click charging orders for Shanghai-battery exchange stations-cash payment is 300 on June 10, 2020" and "the number of completed one-click charging orders for Beijing-charging piles-cash payment is 100 on June 10, 2020" are obtained, two data indicators A and B under the same metric ("order completion") and different dimensions ("Shanghai", "Beijing", etc.). Specifically, the business data of electric vehicle charging is processed to obtain the above-mentioned "one-click charging order completion" data indicator A, and the indicator ID of the corresponding data indicator A is constructed by calling the query table (such as each associated mapping table). Then, based on the indicator ID, the storage table of the data indicator is called, and the data indicator is stored according to the corresponding fields by longitudinally expanding the data indicator dimension and adding data rows, so as to keep the fixed table storage structure unchanged while adding data indicators. It is also possible to access and use the stored data indicators and their data when needed. For example, based on the indicator ID, the data indicator A of the "one-key power-on order completion quantity" is added to the corresponding data indicator storage table for storage by longitudinally expanding the dimension and adding data rows, and the corresponding fields (columns). Specifically, the indicator ID of the data indicator A includes, for example, different dimension combination coding IDs, dimension value coding IDs and / or auto-increment IDs. The corresponding data indicator storage table can be called by using different dimension combination coding IDs, dimension value coding IDs and auto-increment IDs to longitudinally / vertically expand the dimension of the data indicator and add data rows, and store the various parts of the data indicator in the corresponding fields, that is, a row of data indicator values ​​is inserted into the corresponding row position of the storage table without modifying the structure of the column field of the storage table.

[0171] Similarly, after processing the second piece of business data, the data indicator B "one-click power-up order completion quantity" is obtained, and the indicator ID is determined by the same process and the corresponding data table is called to store the additional data rows.

[0172] In this way, data indicators of various dimensional combinations under the same metric "one-click power-on order completion volume" can be infinitely combined and expanded, without the need to modify the storage table structure of the data indicator every time a new data indicator is added, and as the number of data indicators increases, the field structure of the table does not have to be infinitely expanded. In addition, the entire data processing, storage, and access are more convenient, the overall efficiency is improved, and the efficiency is increased when using the stored data in subsequent accesses, avoiding excessive consumption of computing access resources in the case of large data volumes.

[0173] Combine the following Figure 2 The main flow chart of an embodiment of the data indicator storage method with arbitrarily expandable dimensions of the present invention is shown, and the implementation method of the present invention is specifically described.

[0174] Step S210, according to different business needs, obtain corresponding data indicators by processing business data, and query the data table to construct the indicator ID of the data indicator;

[0175] In one implementation, there will be corresponding business data according to different business scenarios or business-related needs, customer needs, etc. Often, the business data contains relevant data information of various data indicators that need to be stored, recorded, added, deleted, modified, or read out for use. Therefore, it is usually necessary to process the business data, and then, after processing the business data, obtain the corresponding data indicators, such as determining the required metrics and dimensions from the data information after the business data is processed through a pre-set logic, forming data indicators, and then storing them.

[0176] Specifically, the business data is split (divided into text, numbers, grammar, etc.) to determine the main data information; a metric and one or more dimensions under the metric are determined from the main data information through a pre-set logic to form corresponding data indicators; wherein the pre-set logic can be to find data information of a metric from the main data information, and to find data information of all dimensions under the metric from the main data information based on the metric.

[0177] For example, in the electric vehicle charging business, after processing the business data, the data information of the "one-click charging order completion volume" measurement is obtained, and the data information corresponding to the five dimensions of city, district, resource type, sub-resource type, and payment method are obtained, forming a data indicator of multiple dimensional combinations under this measurement.

[0178] For example, after processing the business data related to electric vehicle charging, we found the data information belonging to the measurement such as "one-click charging order completion volume", "one-click charging order volume", etc.; suppose that under the measurement "one-click charging order completion volume", we found the data information belonging to the dimension such as "Shanghai", "Beijing" and other city information, and "June 10, 2020" and other date information; further, we determined several dimensions under the measurement "one-click charging order completion volume", and combined the data information of the measurement and dimension to form the corresponding data indicators. For example, we can obtain two data indicators of different dimensions for the same measurement "one-click charging order completion volume": "The number of one-click charging orders completed in Shanghai-battery swap station-cash payment on June 10, 2020 is 300", "The number of one-click charging orders completed in Beijing-charging pile-cash payment on June 10, 2020 is 100".

[0179] In one embodiment, the queried data table may be a pre-set data table of one or more dimensions under the same metric that can be queried according to different business needs. Furthermore, a storage table having a structure of one or more fixed column fields for storing data indicators may be pre-set according to different business needs, that is, the column fields of the storage table do not change, and there is a storage table structure with fixed column fields corresponding to a certain type of business. Furthermore, the data indicator obtained can call and query one or more of the data tables based on its own metric and / or dimension; and construct an indicator ID corresponding to the data indicator based on the query results and the structure of the column fields of the storage table.

[0180] Specifically, these data tables include mapping tables, such as dimension ID mapping table, dimension-dimension value mapping table, parent index ID mapping table, parent index-dimension selection mapping table, parent index-dimension combination mapping table and other dimension mapping tables, etc., see Table 1(a) to Table 1(e). The fill values ​​in these tables are examples used to illustrate the implementation of the scheme and are not without practical significance. They only represent the association relationship between the example values ​​of the tables and do not constitute any limitation to the present invention.

[0181] Specifically, a pre-built storage table of data indicators with a fixed table structure for storing data indicators may include one to multiple column fields. Preferably, the column fields include, but are not limited to: indicator ID, parent indicator ID, parent indicator name, time date, dimension combination code ID, dimension value code ID, dimension code explanation, indicator value, indicator value unit, etc. Among them, the indicator ID uniquely identifies each row of data indicators. The indicator ID includes: parent indicator ID, dimension combination code ID, dimension value code ID, etc., and these IDs are spliced ​​together to form the indicator ID.

[0182] Among them, the parent indicator ID is the first digit of the indicator ID. The parent indicator corresponding to the parent indicator ID indicates that the data indicator is not aggregated by any dimension and can continuously expand the dimension; the data indicator combined according to different dimensions under the same metric as the parent indicator is the child indicator; the parent-child hierarchical relationship between the stored data indicators is determined by the parent indicator ID; the combined meaning of different dimensions is determined by the dimension combination code ID and the dimension value code ID. Specifically, the first parent indicator ID in the indicator ID can reflect the parent-child hierarchical relationship between the data indicators. For example, if the first digit of the indicator ID is 1, that is, the parent indicator ID is 1, all indicators with an ID of 1 are child indicators under the parent indicator; the indicator ID can also reflect the combined meaning of different dimensions through the dimension combination code ID and the dimension value code ID; and the dimension code explanation uses a dictionary to explain the dimension code to improve understanding, with the dimension as the key and the dimension value as the value.

[0183] Further, the data table is queried to obtain the dimension code ID and parent indicator ID of the corresponding construction indicator ID. For example, if data indicator A is "the number of one-key charging orders completed in Shanghai-battery swap station-cash payment on June 10, 2020 is 300", according to its measurement of "one-key charging order completion", the specific data information of the dimension "June 10, 2020", "Shanghai", "battery swap station", "cash payment", etc., the data table (mapping table) is called for query, "June 10, 2020" date dimension, "Shanghai" city dimension, etc.

[0184] For example, the dimension ID mapping table (mapping table) of an embodiment of the scheme of the present invention shown in Table 1(a) reflects which dimensions it has. For example, in this table, assuming the measurement of "one-click power-up order completion volume", there are three dimensions of data indicators, the dimension ID of each dimension, the corresponding dimension name, the dimension value ID, and the corresponding dimension value name.

[0185] Table 1(a)

[0186] Dimension ID Dimension name 1 Payment Methods 3 Resource Type 5 City

[0187] For example, Table 1(b) shows a dimension-dimension value mapping table (mapping table) according to an embodiment of the solution of the present invention, which reflects which dimension values ​​correspond to each dimension. Here, it can also be used as a dimension coding explanation to improve understanding. The dimension coding explanation can include explaining the dimension combination coding in a dictionary form, with the dimension as the key and the dimension value as the value. In this way, in the formation of the dimension coding ID, the dimension ID and the dimension value ID are required.

[0188] Take data indicator A as an example: by calling this table 1(b), you can find the dimension value ID, dimension name, dimension ID corresponding to the dimension value names such as "Shanghai", "Battery Swap Station", "Cash Payment" according to the data information of the dimension of the data indicator, and obtain the corresponding dimension ID, dimension value ID, etc., so as to form the data indicator value, especially the indicator ID (the data row inserted into the storage table, the encoding result representing the data indicator A, including its indicator ID, etc.).

[0189] Table 1(b)

[0190] Dimension ID Dimension value ID Dimension value name 5 1 Shanghai 5 2 Beijing 3 1 Charging Cart 3 2 Battery swap station 3 3 Charging Station 1 1 Cash Payment 1 2 Service package payment

[0191] For another example, for a parent index, the measurement of data index A can correspond to the parent index, as shown in Table 1(c), according to a parent index ID mapping table in one embodiment of the solution of the present invention, the parent-child hierarchical relationship of the data index can be determined according to the parent index ID. For example, the parent index ID of data index A can be determined to be 1.

[0192] Furthermore, for example, in Table 1(c), the parent indicator ID mapping table shows that the parent indicator ID is 1, and its parent indicator name is "one-click power-up order completion quantity".

[0193] Table 1(c)

[0194] Parent indicator ID Parent index name 1 One-click power-up order completion volume

[0195] Among the multiple pre-constructed mapping tables, the parent index may also be as shown in Table 1(d), which is a parent index-dimension selection mapping table (mapping table) according to an embodiment of the solution of the present invention, reflecting which dimensions are selected by the parent index and the position ID corresponding to the dimension in the dimension combination ID.

[0196] Table 1(d)

[0197] like:

[0198] Parent indicator ID Location ID Dimension value ID 1 1 5 1 2 3 1 3 1

[0199] Similarly, Table 1(e) is a mapping table of parent index-dimension combinations according to an embodiment of the solution of the present invention, which reflects the dimension combinations actually used by the parent index. The combination of two dimensions with dimension IDs 1 and 5 corresponds to the measurement with parent index ID 1.

[0200] Table 1(e)

[0201] Parent indicator ID Dimension combination (ID) 1 1,5

[0202] In this way, the data indicator can call and query the corresponding data tables according to the field structure of the storage table to construct the indicator ID corresponding to the data indicator. For example, the final indicator storage table 1(f) can be constructed according to the above table, including the indicator ID, fixed dimension field time date, dimension code explanation, indicator value, indicator value unit, etc.

[0203] Table 1(f)

[0204]

[0205] Specifically, in the storage table, the dimensions of commonly used data indicators can also be refined as fixed column fields, and other dimensions of uncommon data indicators can be reflected through dimension coding IDs. The dimension coding ID includes the column field dimension combination coding ID and the dimension value coding ID. The data table is queried to obtain the dimension coding ID and the parent indicator ID of the corresponding construction indicator ID.

[0206] In one embodiment, the encoding rules of the dimension coding ID, for example: the dimension combination coding ID includes a binary sequence with the number of all dimensions used by the parent indicator as the length, filling 1 in the corresponding position of the selected dimension, and filling 0 in the remaining unused dimensions; the dimension value coding ID includes a digital sequence with the same number of bits as the dimension combination coding ID under the same parent indicator, filling the selected dimension value in the corresponding position of the selected dimension; the dimension combination coding ID and the dimension value coding ID are spliced ​​into the dimension coding ID.

[0207] Among them, querying the data table may include: querying the dimension combination coding ID to call the dimension ID mapping table and the dimension-dimension value mapping table; querying the dimension ID to call the dimension-dimension value mapping table; querying the indicator ID to call the parent indicator ID mapping table, the parent indicator-dimension selection mapping table, the parent indicator-dimension combination mapping table, the dimension ID mapping table, the dimension-dimension value mapping table and other dimension mapping tables.

[0208] Furthermore, after querying the data table, the dimension code ID and parent indicator ID are obtained according to the encoding rules, and the indicator ID can be constructed according to the rules of the column fields of the storage table, that is, the indicator ID of the new data indicator is obtained, such as the indicator ID of data indicator A.

[0209] Thus, according to the obtained data indicators, the data tables (such as various mapping tables) related to the dimensions and / or metrics in the pre-set data indicators are queried to obtain the indicator IDs of multiple dimensions under one metric of the returned corresponding data indicator. The indicator ID is formed by concatenating the aforementioned multiple IDs.

[0210] In an example, as shown in Table 1(g), it is assumed that the parent indicator 1 "One-click power-on order quantity" contains 3 extended dimensions, and the initial "dimension combination code" is "0_0_0". If the "2020-Shanghai-Service package payment one-click power-on order quantity" is calculated, the 5th and 1st dimensions are selected, and their positions in the dimension combination ID are 1 and 3 respectively. Then the dimension combination code is marked with 1 at the corresponding position of the selected dimension, and marked with 0 if it is not selected, that is, "1_0_1"; Shanghai 1, service package payment 2, so the dimension value code is "1_0_2", and the final spliced ​​"indicator ID" is composed of the parent indicator ID, dimension combination code, and dimension value code in order, and each part is connected with -, that is, "1-1_0_1-1_0_2".

[0211] Table 1(g)

[0212]

[0213]

[0214] Among them, the above example indicators correspond to all the above related tables: parent indicator ID mapping table, dimension ID mapping table, dimension-dimension value mapping table, parent indicator-dimension selection mapping table, parent indicator-dimension combination mapping table, that is, Tables 1(a) to 1(e), so as to obtain the final data indicator storage table such as Table 1(f)

[0215] In another embodiment, an example of an indicator ID column field is shown in Table 2. Table 2 is a storage table of data indicators according to another embodiment of the solution of the present invention. Among them, the construction of the indicator ID is mainly the encoding form of the dimension. Therefore, in the storage of data indicators, the design and construction of the encoding of the dimension is related to the efficiency of storage access. In this example, the time date is added to the indicator ID.

[0216] Table 2

[0217]

[0218] In the example of Table 2, also in terms of indicator dimensions, it is still possible to extract one or more of the most commonly used dimensions as fixed data columns of the dimensions of the data indicator, such as the time and date shown in Table 2. In addition to the time and date, it can generally be extracted separately according to different business scenarios or different business data situations under different needs. The remaining uncommon dimensions, i.e., the dimensions in the data indicators that have not been refined into fixed data columns, can be included in the dimension combination code ID and the dimension value code ID. The stored data indicators can be indexed according to the dimension code ID, and the corresponding uncommon dimensions can be found through the dimension code ID for interpretation. The dimension code ID includes the dimension combination code ID and the dimension value code ID.

[0219] Furthermore, usually due to different business scenarios and requirements, the corresponding processed business data is different, and the actually obtained data indicators are different. Therefore, the parent indicators in the indicator ID of the determined data indicators are different, and the lengths of the corresponding dimension IDs are also different.

[0220] In conjunction with a specific example in Table 2, regarding the data indicator of "one-click charging order completion volume", it is assumed that a total of 5 extended dimensions are included. Specifically, the initial "dimension combination code" is "0_0_0_0_0", and after processing the business data of the electric vehicle charging business, the data indicator of the one-click charging order completion volume is obtained, and its dimension code ID needs to be calculated. For example: calculate the dimension combination code ID, dimension value code ID, and dimension code ID of the new data indicator A of "Shanghai-battery swap station-cash payment one-click charging order volume". Combined with Table 1 (b), "Shanghai" is in "Dimension 5-City", "Battery swap station" is in "Dimension 3-Resource type", and "Cash payment" is in "Dimension 1-Payment method", so the dimension combination code ID selects the 1st, 3rd, and 5th dimensions. According to the value rule that the used dimension is 1 and the unused dimension is 0, the dimension combination code ID is "1_0_1_0_1". Furthermore, in combination with Table 1(b), the "dimensional value" of "Shanghai" is 1, the "dimensional value" of "battery swap station" is 2, the "dimensional value" of "cash payment" is 1, and the unused dimension value is 0, that is, the dimension value coding ID is "1_0_2_0_1". The final spliced ​​dimension coding ID is the dimension combination coding ID combined with the dimension value coding ID, such as the large combination directly connected front and back: "1_0_1_0_1-1_0_2_0_1". Furthermore, the indicator ID of data indicator A is constructed, as shown in the first row of Table 2. Similarly, the indicator ID of data indicator B is constructed, as shown in the second row of Table 2.

[0221] Step S220: calling the storage table of the data indicator based on the indicator ID, and expanding the data indicator dimension by adding data rows in the storage table of the data indicator to store the data indicator according to corresponding fields.

[0222] Specifically, based on the indicator ID, the data indicator storage table is called, and the indicator ID and the parent indicator ID in the indicator ID, the ID representing the time and date, the dimension combination code ID, the dimension value code ID, and the corresponding parent indicator name and dimension code explanation in the data table queried according to the indicator ID, as well as the indicator value and indicator value unit specified in the data indicator are stored one by one according to the column fields of the storage table, and only the dimensions are expanded vertically and the data rows of the data indicators are increased.

[0223] In one embodiment, the dimension of the data indicator includes an indicator ID, a parent indicator ID, a parent indicator name, a time date, a dimension combination code ID, a dimension value code ID, a dimension code explanation, an indicator value, and an indicator value unit. The first parent indicator ID of the indicator ID reflects the same measurement. When the indicator ID is determined for a new data indicator, such as the data indicators A and B in the above example, they are data indicators of different dimensions of the same measurement "one-key power-on order completion volume", that is, data indicators A and B call each data table according to their own measurement and dimension, and after querying the data table, they construct their corresponding indicator IDs. The first indicator ID of both is 1, which belongs to the sub-indicator (different dimension) under the same parent indicator (the same measurement). Then, according to the indicator ID, the storage table of the corresponding data indicator is called. If the two are the same measurement, the storage table is also a sub-indicator under the same parent indicator, that is, the dimension is directly expanded and the data row is added. For example: by vertically expanding the indicator dimension (self-incrementing ID can increase the call of each uncommon dimension) and adding data rows, the new data indicator is stored in the data indicator storage table corresponding to each column field, and the data indicator is added but the table structure of the storage table is not changed, and only one row of data is added.

[0224] Furthermore, the indicator ID is designed and constructed to identify the indicator value of each row of stored data. One way is to simplify the storage method of identifying data indicators to interpret them through the components of the indicator ID. The components of the indicator ID include the parent indicator ID, the ID representing the time and date, the dimension combination code ID, and the dimension value code ID. Then, it is directly interpreted through the parent indicator, time and date, and dimension combination (combination of dimension and dimension value); another way is to interpret it through a data column field of the indicator ID.

[0225] Step S230: According to the indicator ID of the data indicator, the data table and the storage table are called and queried to access the stored data.

[0226] Among them, based on the parent indicator ID, dimension combination code ID, and dimension value code ID in the indicator ID, the data table and the storage table related to the dimension and parent indicator of the data indicator are called and queried, and the corresponding data information is obtained.

[0227] In one embodiment, the dimension ID mapping table and the dimension-dimension value mapping table can be called by querying the dimension combination code ID; the dimension-dimension value mapping table can be called by querying the dimension value code ID; the dimension-dimension value mapping table can be called by querying the dimension ID; the parent indicator ID mapping table, the parent indicator-dimension selection mapping table, the parent indicator-dimension combination mapping table, the dimension ID mapping table, the dimension-dimension value mapping table and other dimension tables can be called by querying the indicator ID; similarly, in the storage table, the parent indicator ID, the ID represented by the time and date, the dimension combination code ID, and the dimension value code ID can be obtained according to the indicator ID, and then the corresponding mapping tables such as Table 1(a) to Table 1(e) can be queried.

[0228] Thus, fast access to stored data indicators is also achieved, and the data indicators can be used conveniently.

[0229] In the example shown in Table 2, the parent indicator name of the first row of data is "one-click charging order completion volume", the time date is "June 10, 2020", the dimension combination code ID is "1_0_1_0_1", the dimension value code ID is "1_0_2_0_1", the indicator value is 300, and the indicator value unit is . By calling the dimension-dimension value mapping table 1 (b) and related tables, the meaning of the first row of data is "the completion volume of one-click charging orders paid by cash in Shanghai-battery swap station-on June 10, 2020 is 30 0"; correspondingly, the parent indicator name of the second row of data is "the number of one-click charging orders completed", the time date is "June 10, 2020", the dimension combination code ID is "1_0_1_0_1", the dimension value code ID is "2_0_3_0_1", the indicator value is 100, and the indicator value unit is, by calling the dimension-dimension value mapping table 1(b) and related tables, the meaning of the first row of data is "the number of one-click charging orders completed by cash payment in Beijing-charging piles on June 10, 2020 is 100".

[0230] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effects of the present invention, different steps do not have to be performed in such an order. They can be performed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present invention.

[0231] Next, combine Figure 3 The structural block diagram of an embodiment of the data index storage system of the present invention with arbitrary scalable dimensions is shown to further illustrate the implementation of the present invention. The system corresponds to the aforementioned method. The system at least includes:

[0232] A construction unit 310, which is used to obtain corresponding data indicators by processing business data according to different business needs, and query the data table to construct the indicator ID of the data indicator;

[0233] In one implementation, there will be corresponding business data according to different business scenarios or business-related needs, customer needs, etc. Often, the business data contains relevant data information of various data indicators that need to be stored, recorded, added, deleted, modified, or read out for use. Therefore, it is usually necessary to process the business data, and then, after processing the business data, obtain the corresponding data indicators, such as determining the required metrics and dimensions from the data information after the business data is processed through a pre-set logic, forming data indicators, and then storing them.

[0234] Specifically, the business data is split (divided into text, numbers, grammar, etc.) to determine the main data information; a metric and one or more dimensions under the metric are determined from the main data information through a pre-set logic to form corresponding data indicators; wherein the pre-set logic can be to find data information of a metric from the main data information, and to find data information of all dimensions under the metric from the main data information based on the metric.

[0235] For example, in the electric vehicle charging business, after processing the business data, the data information of the "one-click charging order completion volume" measurement is obtained, and the data information corresponding to the five dimensions of city, district, resource type, sub-resource type, and payment method are obtained, forming a data indicator of multiple dimensional combinations under this measurement.

[0236] For example, after processing the business data related to electric vehicle charging, we found the data information belonging to the measurement such as "one-click charging order completion volume", "one-click charging order volume", etc.; suppose that under the measurement "one-click charging order completion volume", we found the data information belonging to the dimension such as "Shanghai", "Beijing" and other city information, and "June 10, 2020" and other date information; further, we determined several dimensions under the measurement "one-click charging order completion volume", and combined the data information of the measurement and dimension to form the corresponding data indicators. For example, we can obtain two data indicators of different dimensions for the same measurement "one-click charging order completion volume": "The number of one-click charging orders completed in Shanghai-battery swap station-cash payment on June 10, 2020 is 300", "The number of one-click charging orders completed in Beijing-charging pile-cash payment on June 10, 2020 is 100".

[0237] In one embodiment, the queried data table may be a pre-set data table of one or more dimensions under the same metric that can be queried according to different business needs. Furthermore, a storage table having a structure of one or more fixed column fields for storing data indicators may be pre-set according to different business needs, that is, the column fields of the storage table do not change, and there is a storage table structure with fixed column fields corresponding to a certain type of business. Furthermore, the data indicator obtained can call and query one or more of the data tables based on its own metric and / or dimension; and construct an indicator ID corresponding to the data indicator based on the query results and the structure of the column fields of the storage table.

[0238] Specifically, these data tables include mapping tables, such as dimension ID mapping table, dimension-dimension value mapping table, parent index ID mapping table, parent index-dimension selection mapping table, parent index-dimension combination mapping table and other dimension mapping tables, etc., see Table 1(a) to Table 1(e). The fill values ​​in these tables are examples used to illustrate the implementation of the scheme and are not without practical significance. They only represent the association relationship between the example values ​​of the tables and do not constitute any limitation to the present invention.

[0239] Specifically, a pre-built storage table of data indicators with a fixed table structure for storing data indicators may include one to multiple column fields. Preferably, the column fields include, but are not limited to: indicator ID, parent indicator ID, parent indicator name, time date, dimension combination code ID, dimension value code ID, dimension code explanation, indicator value, indicator value unit, etc. Among them, the indicator ID uniquely identifies each row of data indicators. The indicator ID includes: parent indicator ID, dimension combination code ID, dimension value code ID, etc., and these IDs are spliced ​​together to form the indicator ID.

[0240] Among them, the parent indicator ID is the first digit of the indicator ID. The parent indicator corresponding to the parent indicator ID indicates that the data indicator is not aggregated by any dimension and can continuously expand the dimension; the data indicator combined according to different dimensions under the same metric as the parent indicator is the child indicator; the parent-child hierarchical relationship between the stored data indicators is determined by the parent indicator ID; the combined meaning of different dimensions is determined by the dimension combination code ID and the dimension value code ID. Specifically, the first parent indicator ID in the indicator ID can reflect the parent-child hierarchical relationship between the data indicators. For example, if the first digit of the indicator ID is 1, that is, the parent indicator ID is 1, all indicators with an ID of 1 are child indicators under the parent indicator; the indicator ID can also reflect the combined meaning of different dimensions through the dimension combination code ID and the dimension value code ID; and the dimension code explanation uses a dictionary to explain the dimension code to improve understanding, with the dimension as the key and the dimension value as the value.

[0241] Further, the data table is queried to obtain the dimension code ID and parent indicator ID of the corresponding construction indicator ID. For example, if data indicator A is "the number of one-key charging orders completed in Shanghai-battery swap station-cash payment on June 10, 2020 is 300", according to its measurement of "one-key charging order completion", the specific data information of the dimension "June 10, 2020", "Shanghai", "battery swap station", "cash payment", etc., the data table (mapping table) is called for query, "June 10, 2020" date dimension, "Shanghai" city dimension, etc.

[0242] For example, the dimension ID mapping table (mapping table) of an embodiment of the scheme of the present invention shown in Table 1(a) reflects which dimensions it has. For example, in this table, assuming the measurement of "one-click power-up order completion volume", there are three dimensions of data indicators, the dimension ID of each dimension, the corresponding dimension name, the dimension value ID, and the corresponding dimension value name.

[0243] Table 1(a)

[0244] Dimension ID Dimension name 1 Payment Methods 3 Resource Type 5 City

[0245] For example, Table 1(b) shows a dimension-dimension value mapping table (mapping table) according to an embodiment of the solution of the present invention, which reflects which dimension values ​​correspond to each dimension. Here, it can also be used as a dimension coding explanation to improve understanding. The dimension coding explanation can include explaining the dimension combination coding in a dictionary form, with the dimension as the key and the dimension value as the value. In this way, in the formation of the dimension coding ID, the dimension ID and the dimension value ID are required.

[0246] Take data indicator A as an example: by calling this table 1(b), you can find the dimension value ID, dimension name, dimension ID corresponding to the dimension value names such as "Shanghai", "Battery Swap Station", "Cash Payment" according to the data information of the dimension of the data indicator, and obtain the corresponding dimension ID, dimension value ID, etc., so as to form the data indicator value, especially the indicator ID (the data row inserted into the storage table, the encoding result representing the data indicator A, including its indicator ID, etc.).

[0247] Table 1(b)

[0248] Dimension ID Dimension value ID Dimension value name 5 1 Shanghai 5 2 Beijing 3 1 Charging Cart 3 2 Battery swap station 3 3 Charging Station 1 1 Cash Payment 1 2 Service package payment

[0249] For another example, for a parent index, the measurement of data index A can correspond to the parent index, as shown in Table 1(c), according to a parent index ID mapping table in one embodiment of the solution of the present invention, the parent-child hierarchical relationship of the data index can be determined according to the parent index ID. For example, the parent index ID of data index A can be determined to be 1.

[0250] Furthermore, for example, in Table 1(c), the parent indicator ID mapping table shows that the parent indicator ID is 1, and its parent indicator name is "one-click power-up order completion quantity".

[0251] Table 1(c)

[0252] Parent indicator ID Parent index name 1 One-click power-up order completion volume

[0253] Among the multiple pre-constructed mapping tables, the parent index may also be as shown in Table 1(d), which is a parent index-dimension selection mapping table (mapping table) according to an embodiment of the solution of the present invention, reflecting which dimensions are selected by the parent index and the position ID corresponding to the dimension in the dimension combination ID.

[0254] Table 1(d)

[0255] like:

[0256] Parent indicator ID Location ID Dimension value ID 1 1 5 1 2 3 1 3 1

[0257] Similarly, Table 1(e) is a mapping table of parent index-dimension combinations according to an embodiment of the solution of the present invention, which reflects the dimension combinations actually used by the parent index. The combination of two dimensions with dimension IDs 1 and 5 corresponds to the measurement with parent index ID 1.

[0258] Table 1(e)

[0259] Parent indicator ID Dimension combination (ID) 1 1,5

[0260] In this way, the data indicator can call and query the corresponding data tables according to the field structure of the storage table to construct the indicator ID corresponding to the data indicator. For example, the final indicator storage table 1(f) can be constructed according to the above table, including the indicator ID, fixed dimension field time date, dimension code explanation, indicator value, indicator value unit, etc.

[0261] Table 1(f)

[0262]

[0263] Specifically, in the storage table, the dimensions of commonly used data indicators can also be refined as fixed column fields, and other dimensions of uncommon data indicators can be reflected through dimension coding IDs. The dimension coding ID includes the column field dimension combination coding ID and the dimension value coding ID. The data table is queried to obtain the dimension coding ID and the parent indicator ID of the corresponding construction indicator ID.

[0264] In one embodiment, the encoding rules of the dimension coding ID, for example: the dimension combination coding ID includes a binary sequence with the number of all dimensions used by the parent indicator as the length, filling 1 in the corresponding position of the selected dimension, and filling 0 in the remaining unused dimensions; the dimension value coding ID includes a digital sequence with the same number of bits as the dimension combination coding ID under the same parent indicator, filling the selected dimension value in the corresponding position of the selected dimension; the dimension combination coding ID and the dimension value coding ID are spliced ​​into the dimension coding ID.

[0265] Among them, querying the data table may include: querying the dimension combination coding ID to call the dimension ID mapping table and the dimension-dimension value mapping table; querying the dimension ID to call the dimension-dimension value mapping table; querying the indicator ID to call the parent indicator ID mapping table, the parent indicator-dimension selection mapping table, the parent indicator-dimension combination mapping table, the dimension ID mapping table, the dimension-dimension value mapping table and other dimension mapping tables.

[0266] Furthermore, after querying the data table, the dimension code ID and parent indicator ID are obtained according to the encoding rules, and the indicator ID can be constructed according to the rules of the column fields of the storage table, that is, the indicator ID of the new data indicator is obtained, such as the indicator ID of data indicator A.

[0267] Thus, according to the obtained data indicators, the data tables (such as various mapping tables) related to the dimensions and / or metrics in the pre-set data indicators are queried to obtain the indicator IDs of multiple dimensions under one metric of the returned corresponding data indicator. The indicator ID is formed by concatenating the aforementioned multiple IDs.

[0268] In an example, as shown in Table 1(g), it is assumed that the parent indicator 1 "One-click power-on order quantity" contains 3 extended dimensions, and the initial "dimension combination code" is "0_0_0". If the "2020-Shanghai-Service package payment one-click power-on order quantity" is calculated, the 5th and 1st dimensions are selected, and their positions in the dimension combination ID are 1 and 3 respectively. Then the dimension combination code is marked with 1 at the corresponding position of the selected dimension, and marked with 0 if it is not selected, that is, "1_0_1"; Shanghai 1, service package payment 2, so the dimension value code is "1_0_2", and the final spliced ​​"indicator ID" is composed of the parent indicator ID, dimension combination code, and dimension value code in order, and each part is connected with -, that is, "1-1_0_1-1_0_2".

[0269] Table 1(g)

[0270]

[0271]

[0272] Among them, the above example indicators correspond to all the above related tables: parent indicator ID mapping table, dimension ID mapping table, dimension-dimension value mapping table, parent indicator-dimension selection mapping table, parent indicator-dimension combination mapping table, that is, Tables 1(a) to 1(e), so as to obtain the final data indicator storage table such as Table 1(f)

[0273] In another embodiment, an example of an indicator ID column field is shown in Table 2. Table 2 is a storage table of data indicators according to another embodiment of the solution of the present invention. Among them, the construction of the indicator ID is mainly the encoding form of the dimension. Therefore, in the storage of data indicators, the design and construction of the encoding of the dimension is related to the efficiency of storage access. In this example, the time date is added to the indicator ID.

[0274] Table 2

[0275]

[0276] In the example of Table 2, also in terms of indicator dimensions, it is still possible to extract one or more of the most commonly used dimensions as fixed data columns of the dimensions of the data indicator, such as the time and date shown in Table 2. In addition to the time and date, it can generally be extracted separately according to different business scenarios or different business data situations under different needs. The remaining uncommon dimensions, i.e., the dimensions in the data indicators that have not been refined into fixed data columns, can be included in the dimension combination code ID and the dimension value code ID. The stored data indicators can be indexed according to the dimension code ID, and the corresponding uncommon dimensions can be found through the dimension code ID for interpretation. The dimension code ID includes the dimension combination code ID and the dimension value code ID.

[0277] Furthermore, usually due to different business scenarios and requirements, the corresponding processed business data is different, and the actually obtained data indicators are different. Therefore, the parent indicators in the indicator ID of the determined data indicators are different, and the lengths of the corresponding dimension IDs are also different.

[0278] In conjunction with a specific example in Table 2, regarding the data indicator of "one-click charging order completion volume", it is assumed that a total of 5 extended dimensions are included. Specifically, the initial "dimension combination code" is "0_0_0_0_0", and after processing the business data of the electric vehicle charging business, the data indicator of the one-click charging order completion volume is obtained, and its dimension code ID needs to be calculated. For example: calculate the dimension combination code ID, dimension value code ID, and dimension code ID of the new data indicator A of "Shanghai-battery swap station-cash payment one-click charging order volume". Combined with Table 1 (b), "Shanghai" is in "Dimension 5-City", "Battery swap station" is in "Dimension 3-Resource type", and "Cash payment" is in "Dimension 1-Payment method", so the dimension combination code ID selects the 1st, 3rd, and 5th dimensions. According to the value rule that the used dimension is 1 and the unused dimension is 0, the dimension combination code ID is "1_0_1_0_1". Furthermore, in combination with Table 1(b), the "dimensional value" of "Shanghai" is 1, the "dimensional value" of "battery swap station" is 2, the "dimensional value" of "cash payment" is 1, and the unused dimension value is 0, that is, the dimension value coding ID is "1_0_2_0_1". The final spliced ​​dimension coding ID is the dimension combination coding ID combined with the dimension value coding ID, such as the large combination directly connected front and back: "1_0_1_0_1-1_0_2_0_1". Furthermore, the indicator ID of data indicator A is constructed, as shown in the first row of Table 2. Similarly, the indicator ID of data indicator B is constructed, as shown in the second row of Table 2.

[0279] The expansion unit 320 is used to call the storage table of the data indicator based on the indicator ID, and expand the data indicator dimension by adding data rows in the storage table of the data indicator to store the data indicator according to corresponding fields.

[0280] Specifically, based on the indicator ID, the data indicator storage table is called, and the indicator ID and the parent indicator ID in the indicator ID, the ID representing the time and date, the dimension combination code ID, the dimension value code ID, and the corresponding parent indicator name and dimension code explanation in the data table queried according to the indicator ID, as well as the indicator value and indicator value unit specified in the data indicator are stored one by one according to the column fields of the storage table, and only the dimensions are expanded vertically and the data rows of the data indicators are increased.

[0281] In one embodiment, the dimension of the data indicator includes an indicator ID, a parent indicator ID, a parent indicator name, a time date, a dimension combination code ID, a dimension value code ID, a dimension code explanation, an indicator value, and an indicator value unit. The first parent indicator ID of the indicator ID reflects the same measurement. When the indicator ID is determined for a new data indicator, such as the data indicators A and B in the above example, they are data indicators of different dimensions of the same measurement "one-key power-on order completion volume", that is, data indicators A and B call each data table according to their own measurement and dimension, and after querying the data table, they construct their corresponding indicator IDs. The first indicator ID of both is 1, which belongs to the sub-indicator (different dimension) under the same parent indicator (the same measurement). Then, according to the indicator ID, the storage table of the corresponding data indicator is called. If the two are the same measurement, the storage table is also a sub-indicator under the same parent indicator, that is, the dimension is directly expanded and the data row is added. For example: by vertically expanding the indicator dimension (self-incrementing ID can increase the call of each uncommon dimension) and adding data rows, the new data indicator is stored in the data indicator storage table corresponding to each column field, and the data indicator is added but the table structure of the storage table is not changed, and only one row of data is added.

[0282] Furthermore, the indicator ID is designed and constructed to identify the indicator value of each row of stored data. One way is to simplify the storage method of identifying data indicators to interpret them through the components of the indicator ID. The components of the indicator ID include the parent indicator ID, the ID representing the time and date, the dimension combination code ID, and the dimension value code ID. Then, it is directly interpreted through the parent indicator, time and date, and dimension combination (combination of dimension and dimension value); another way is to interpret it through a data column field of the indicator ID.

[0283] The access unit 330 is used to call and query the data table and the storage table to access the stored data according to the indicator ID of the data indicator.

[0284] Among them, based on the parent indicator ID, dimension combination code ID, and dimension value code ID in the indicator ID, the data table and the storage table related to the dimension and parent indicator of the data indicator are called and queried, and the corresponding data information is obtained.

[0285] In one embodiment, the dimension ID mapping table and the dimension-dimension value mapping table can be called by querying the dimension combination code ID; the dimension-dimension value mapping table can be called by querying the dimension value code ID; the dimension-dimension value mapping table can be called by querying the dimension ID; the parent indicator ID mapping table, the parent indicator-dimension selection mapping table, the parent indicator-dimension combination mapping table, the dimension ID mapping table, the dimension-dimension value mapping table and other dimension tables can be called by querying the indicator ID; similarly, in the storage table, the parent indicator ID, the ID represented by the time and date, the dimension combination code ID, and the dimension value code ID can be obtained according to the indicator ID, and then the corresponding mapping tables such as Table 1(a) to Table 1(e) can be queried.

[0286] Thus, fast access to stored data indicators is also achieved, and the data indicators can be used conveniently.

[0287] In the example shown in Table 2, the parent indicator name of the first row of data is "one-click charging order completion volume", the time date is "June 10, 2020", the dimension combination code ID is "1_0_1_0_1", the dimension value code ID is "1_0_2_0_1", the indicator value is 300, and the indicator value unit is . By calling the dimension-dimension value mapping table 1 (b) and related tables, the meaning of the first row of data is "the completion volume of one-click charging orders paid by cash in Shanghai-battery swap station-on June 10, 2020 is 30 0"; correspondingly, the parent indicator name of the second row of data is "the number of one-click charging orders completed", the time date is "June 10, 2020", the dimension combination code ID is "1_0_1_0_1", the dimension value code ID is "2_0_3_0_1", the indicator value is 100, and the indicator value unit is, by calling the dimension-dimension value mapping table 1(b) and related tables, the meaning of the first row of data is "the number of one-click charging orders completed by cash payment in Beijing-charging piles on June 10, 2020 is 100".

[0288] Since the data indicators under different dimensions of the same metric are treated as completely different data indicators, data storage, access and data maintenance are very difficult and complicated. In particular, the previous two-dimensional table storage method for data indicators is to add data indicator fields to the columns and place indicator values ​​at the corresponding positions. The structure of the data table is not fixed, and each time a new data indicator is added, the structure of the entire data table needs to be modified. It is very cumbersome to expand the dimension, and as the number of data indicators increases, the field structure of the data table is also infinitely expanded. Query storage is becoming more and more complicated and inefficient, increasing resource consumption. Therefore, the present invention improves and designs a parent-child indicator system for the relationship between data indicators of different dimensions of the same metric, and stores data according to the system structure, especially in the form of storing data indicators by vertically / vertically expanding the dimension. Under the condition of a fixed table structure, data rows can be added to realize arbitrary dimension expansion, and the dimensions can be freely and arbitrarily combined. Each row of data can be interpreted by a different indicator ID, i.e., a unique identifier, thereby simplifying storage and access, improving data storage access efficiency, avoiding excessive complexity in management, and reducing the difficulty of maintaining data. Moreover, the technical solution of the present invention is designed through an extremely lightweight data indicator storage concept, which does not require a complicated implementation method. It only needs to select any structured database for practice. After the data indicators are stored by the method of the present invention, the user can simply and conveniently query and use the data indicators through the indicator ID.

[0289] Furthermore, in an embodiment of a storage device of the present invention, the storage device stores a plurality of program codes, and the program codes are suitable for being loaded and run by a processor to execute any of the above-mentioned data indicator storage methods with arbitrarily expandable dimensions.

[0290] Further, in an embodiment of a control device of the present invention, the control device includes a processor and a storage device, the storage device is suitable for storing multiple program codes, and the program codes are suitable for being loaded and run by the processor to execute any of the above-mentioned data indicator storage methods with arbitrarily expandable dimensions.

[0291] The technical solution of the present invention firstly has corresponding business data according to different business scenarios or business-related needs, customer needs, etc., and determines the required metrics and dimensions from the data information after the business data is processed through a pre-set logic to form a data indicator, and then stores it, and constructs the indicator ID of the data indicator by querying the data table. Then, based on the indicator ID, call the data indicator storage table, and store the indicator ID and the parent indicator ID, the ID represented by the time date, the dimension combination code ID, the dimension value code ID, and the corresponding parent indicator name, dimension code explanation, and the indicator value and indicator value unit in the data table queried according to the indicator ID in one-to-one correspondence according to the column fields of the storage table, and only vertically expand the dimension and increase the data row of the data indicator. Finally, based on the parent indicator ID, the dimension combination code ID, and the dimension value code ID in the indicator ID, call and query the data table and the storage table related to the dimension and parent indicator of the data indicator, and obtain the corresponding data information. The improved data indicator storage method provided by this solution can expand the dimensions arbitrarily by adding data rows, ensuring that the dimensions can be freely combined, and each row of data can be interpreted by identifying different indicator IDs. No matter what calculation logic is used for data indicators under different dimensions of the same metric, it can be processed quickly and easily, and it is easy to store, simple to expand, easy to call, and ensures the uniformity of indicators.

[0292] It is understood by those skilled in the art that the present invention implements all or part of the processes in the method of the above embodiment, and can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of each of the above method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0293] Further, it should be understood that since the setting of each module is only for illustrating the functional units of the system of the present invention, the physical devices corresponding to these modules can be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only schematic.

[0294] Those skilled in the art will appreciate that the modules in the system may be adaptively split or merged. Such splitting or merging of specific modules will not cause the technical solution to deviate from the principle of the present invention, and therefore, the technical solutions after splitting or merging will fall within the protection scope of the present invention.

Claims

1. A data index storage method capable of arbitrarily extending dimensions, characterized in that: include: According to different business needs, obtain corresponding data indicators by processing business data, and query the data table to construct the indicator ID of the data indicator; Calling a storage table of a data indicator based on the indicator ID, and expanding a dimension of the data indicator by adding a data row in the storage table of the data indicator, so as to store the data indicator according to corresponding fields; The querying of the data table to construct the indicator ID of the data indicator comprises: constructing the indicator ID corresponding to the data indicator according to the query result and the structure of the column field of the storage table; The column fields of the storage table include at least: indicator ID, dimension code explanation, indicator value and indicator value unit; The indicator ID includes: a concatenation of a parent indicator ID, a dimension combination code ID, and a dimension value code ID; The parent indicator ID is the first digit of the indicator ID; The combined meanings of different dimensions are determined by the dimension combination code ID and the dimension value code ID.

2. The method according to claim 1, wherein: "According to different business needs, obtain corresponding data indicators by processing business data", specifically including: Split business data to determine key data information; Determine a metric and one or more dimensions under the metric from the main data information through a pre-set logic to form a corresponding data indicator; The preset logic is to find data information of a metric from the main data information, and to find data information of all dimensions under the metric from the main data information based on the metric.

3. The method according to claim 1, wherein: The storage table of the data index includes: a pre-set storage table having one or more fixed column field structures capable of storing data indexes; The data table includes: a pre-set data table of one or more dimensions under the same metric that can be queried; "Querying the data table to construct the indicator ID of the data indicator" also includes: The data indicator obtained calls and queries one or more of the data tables based on its own metrics and / or dimensions.

4. The method according to claim 3, wherein: In the storage table of the data index, the most commonly used dimensions or dimensions are extracted as fixed column fields.

5. The method according to claim 4, wherein: The dimension combination code ID includes: a binary sequence with the number of all dimensions required to be used by the parent index as the length, wherein 1 is filled in the corresponding position of the dimension that has been selected for use, and 0 is filled in the position of the remaining dimensions that have not been selected for use; The dimension value coding ID includes: a digital sequence with the same number of digits as the dimension combination coding ID and one-to-one corresponding to the same parent index, and the selected dimension value is filled in the corresponding position of the selected dimension.

6. The method according to claim 5, wherein: Also includes: The data table includes one or more mapping tables; Each of the mapping tables at least includes: a dimension ID, a dimension value, a parent index ID, and a mapping relationship formed by two or more pieces of information in the parent index; The data table is queried to obtain the corresponding dimension ID, dimension value and parent indicator ID for constructing the indicator ID.

7. The method according to claim 6, wherein: Querying the data table specifically includes: Calling a mapping table related to the parent indicator ID and the dimension ID information to query to obtain the dimension combination code ID; A mapping table related to the dimension ID and the dimension value is called to query to obtain the dimension value encoding ID.

8. The method according to claim 1, wherein: "Calling the storage table of the data indicator based on the indicator ID, expanding the data indicator dimension by adding data rows in the storage table of the data indicator, so as to store the data indicator according to corresponding fields", specifically includes: Based on the constructed indicator ID, the storage table of the data indicator is called, and the indicator ID and the information of each column field of the storage table corresponding to the data indicator in the data indicator are stored one by one, so as to realize the storage of the data indicator by increasing the data rows of the data indicator.

9. The method according to any one of claims 1 to 8, wherein: Also includes: According to the indicator ID of the data indicator, the data table and the storage table are called and queried to access the stored data.

10. The method according to claim 9, wherein: According to the indicator ID of the data indicator, calling and querying the data table and the storage table to access the stored data specifically includes: Based on the parent indicator ID, dimension combination code ID, and dimension value code ID in the indicator ID, the data table and the storage table related to the dimension and parent indicator of the data indicator are called and queried, and the corresponding data information is obtained.

11. A data index storage system capable of arbitrarily expanding dimensions, characterized in that: include: A construction unit, which is used to obtain corresponding data indicators by processing business data according to different business needs, and query the data table to construct the indicator ID of the data indicator; An expansion unit, which is used to call the storage table of the data indicator based on the indicator ID, and expand the data indicator dimension by adding data rows in the storage table of the data indicator, so as to store the data indicator according to corresponding fields; The querying of the data table to construct the indicator ID of the data indicator comprises: constructing the indicator ID corresponding to the data indicator according to the query result and the structure of the column field of the storage table; The column fields of the storage table include at least: indicator ID, dimension code explanation, indicator value and indicator value unit; The indicator ID includes: a concatenation of a parent indicator ID, a dimension combination code ID, and a dimension value code ID; The parent indicator ID is the first digit of the indicator ID; The combined meanings of different dimensions are determined by the dimension combination code ID and the dimension value code ID.

12. The system according to claim 11, wherein: The specific operations performed by the building block include: Split business data to determine key data information; Determine a metric and one or more dimensions under the metric from the main data information through a pre-set logic to form a corresponding data indicator; The preset logic is to find data information of a metric from the main data information, and to find data information of all dimensions under the metric from the main data information based on the metric.

13. The system according to claim 11, wherein: The storage table of the data index includes: a pre-set storage table having one or more fixed column field structures capable of storing data indexes; The data table includes: a pre-set data table of one or more dimensions under the same metric that can be queried; "Querying the data table to construct the indicator ID of the data indicator" also includes: The data indicator obtained calls and queries one or more of the data tables based on its own metrics and / or dimensions.

14. The system according to claim 13, wherein: In the storage table of the data index, the most commonly used dimensions or dimensions are extracted as fixed column fields.

15. The system of claim 14, wherein: The dimension combination code ID includes: a binary sequence with the number of all dimensions required to be used by the parent index as the length, wherein 1 is filled in the corresponding position of the dimension that has been selected for use, and 0 is filled in the position of the remaining dimensions that have not been selected for use; The dimension value coding ID includes: a digital sequence with the same number of digits as the dimension combination coding ID and one-to-one corresponding to the same parent index, and the selected dimension value is filled in the corresponding position of the selected dimension.

16. The system of claim 15, wherein: Also includes: The data table includes one or more mapping tables; Each of the mapping tables at least includes: a dimension ID, a dimension value, a parent index ID, and a mapping relationship formed by two or more pieces of information in the parent index; The data table is queried to obtain the corresponding dimension ID, dimension value and parent indicator ID for constructing the indicator ID.

17. The system of claim 16, wherein: Querying the data table specifically includes: Calling a mapping table related to the parent indicator ID and the dimension ID information to query to obtain the dimension combination code ID; A mapping table related to the dimension ID and the dimension value is called to query to obtain the dimension value encoding ID.

18. The system of claim 11, wherein: The specific operations performed by the extension unit include: Based on the constructed indicator ID, the storage table of the data indicator is called, and the indicator ID and the information of each column field of the storage table corresponding to the data indicator in the data indicator are stored one by one, so as to realize the storage of the data indicator by increasing the data rows of the data indicator.

19. A system according to any one of claims 11 to 18, wherein: Also includes: The access unit is used to call and query the data table and the storage table according to the indicator ID of the data indicator to access the stored data.

20. The system of claim 19, wherein: The specific operations performed by the access unit include: Based on the parent indicator ID, dimension combination code ID, and dimension value code ID in the indicator ID, the data table and the storage table related to the dimension and parent indicator of the data indicator are called and queried, and the corresponding data information is obtained.

21. A storage device storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute a data indicator storage method with arbitrarily expandable dimensions as described in any one of claims 1 to 10.

22. A control device, comprising a processor and a storage device, wherein the storage device is suitable for storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by the processor to execute a data indicator storage method with arbitrarily expandable dimensions as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method and device for updating database, and method and device for searching database

    CN107015987A