A data processing method, device, equipment and readable storage medium

By judging the derivative measurement and summary value of indicator data in data processing, and generating and executing query language, the problem of high cost and low universality required for indicator data calculation in the prior art is solved, and the secondary simplified process and data is realized Processing capability.

CN114860759BActive Publication Date: 2024-12-24CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210551747.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-18
Publication Date
2024-12-24
Estimated Expiration
2042-05-18

AI Technical Summary

Technical Problem

In the prior art, the derivative measurement calculation of indicator data requires professional developers to write complex SQL, resulting in high labor costs, high system costs and poor versatility, and the generated data cannot be secondary processing.

Method used

By obtaining the indicator data in the preset database, determine whether there are derivative measurements and summary values, select the corresponding calculation formula to generate a structured query language, perform the calculation and store the results in a temporary table, and finally write it into the result table through the sum function.

Benefits of technology

It simplifies the data processing process, reduces the data processing cost, improves the universality of data processing, and enables the generated data to be secondary processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860759B_ABST
    Figure CN114860759B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to the field of data processing technology, and discloses a data processing method, device, equipment and readable storage medium. The method includes obtaining indicator data in a preset database, and determining whether the indicator data has corresponding derivative metrics; if the indicator data has corresponding derivative metrics, further judging whether the indicator data has summary values, and obtaining a judgment result; selecting a corresponding derivative metric calculation formula based on the judgment result, and generating a structured query language for the selected derivative metric calculation formula; executing the structured query language, obtaining the calculated value of each derivative metric of the indicator data, and storing the calculated value in a temporary table; writing the calculated value in the temporary table into a preset result table through a sum function. The present application achieves the technical effect of simplifying the data processing process, reducing the data processing cost, improving the versatility of data processing, and enabling the generated data to be processed secondary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular, to a data processing method, apparatus, device, and readable storage medium. Background Art

[0002] As enterprises grow, they usually need to conduct combined analysis on a large amount of existing business data. A common method is to establish a business model based on the combination of business data and obtain a wide table model, and then define the required indicators. These indicators often need to be compared and calculated with their previous values ​​in the time dimension, which is the derived measurement of the indicator. The existing calculation methods for derived measurements are generally as follows:

[0003] (1) First, write the SQL (Structured Query Language) corresponding to the indicator data, then associate the indicator data at different times according to the time dimension, and then calculate according to the formula.

[0004] (2) Calculate directly based on existing indicator data.

[0005] (3) Use tools such as Kylin to obtain a model, and then write SQL based on this model to obtain the required derivative metrics.

[0006] However, when using the above methods, it is necessary to first calculate the derived metrics of the indicators, or use tools to build models and then write SQL. This means that when calculating derived metrics, professional SQL developers are required to write more complex SQL or use tools such as Kylin that rely on Hadoop, and the results cannot be landed for secondary processing; in addition, due to Kylin's dependence on Hadoop, the system cost will increase and it will be difficult to use universally. Summary of the invention

[0007] The embodiments of the present invention provide a data processing method, apparatus, device and readable storage medium, which solve the technical problems in the prior art that when calculating the derivative metrics of indicator data, professional developers are required to perform modeling and write a large amount of SQL, resulting in high labor costs, high system costs, poor versatility and the inability to perform secondary processing on the generated data.

[0008] In a first aspect, an embodiment of the present invention provides a data processing method, the data processing method comprising:

[0009] Obtain indicator data in a preset database, and determine whether the indicator data has corresponding derived metrics, wherein the derived metrics are the result of comparing the indicator data with its previous value in the time dimension, and one indicator data corresponds to multiple derived metrics;

[0010] If the indicator data has a corresponding derivative metric, further determine whether the indicator data has a summary value, and obtain a determination result, wherein the summary value refers to data calculated by the indicator data according to a preset calculation rule;

[0011] Selecting a corresponding derivative metric calculation formula based on the judgment result, and generating a structured query language using the selected derivative metric calculation formula;

[0012] Executing the structured query language to obtain a calculated value of each of the derived metrics of the indicator data, and storing the calculated value in a temporary table;

[0013] The calculated values ​​in the temporary table are written into the preset result table through the sum function.

[0014] In a second aspect, an embodiment of the present invention further provides a data processing device, the data processing device comprising:

[0015] A data acquisition unit, used to acquire indicator data in a preset database, and determine whether the indicator data has corresponding derived metrics, wherein the derived metrics are the result of comparing the indicator data with its previous value in the time dimension, and there are multiple derived metrics corresponding to one indicator data;

[0016] A data judgment unit, configured to further judge whether the indicator data has a summary value if the indicator data has a corresponding derivative metric, and obtain a judgment result, wherein the summary value refers to data calculated by the indicator data according to a preset calculation rule;

[0017] A data calculation unit, configured to select a corresponding derivative metric calculation formula based on the judgment result, and generate a structured query language from the selected derivative metric calculation formula;

[0018] A program execution unit, configured to execute the structured query language, obtain a calculated value of each of the derived metrics of the indicator data, and store the calculated value in a temporary table;

[0019] A result table generating unit is used to write the calculated values ​​in the temporary table into a preset result table through a sum function.

[0020] In a third aspect, an embodiment of the present invention further provides a data processing device, the data processing device comprising:

[0021] one or more processors;

[0022] A storage device for storing one or more programs;

[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement any data processing method as described in the first aspect of the embodiment of the present invention.

[0024] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any data processing method as described in the first aspect of the embodiment of the present invention.

[0025] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements any data processing method as described in the first aspect of the embodiment of the present invention.

[0026] The embodiment of the present invention discloses a data processing method, device, equipment and readable storage medium, the method includes obtaining indicator data in a preset database, and determining whether the indicator data has corresponding derivative metrics; if the indicator data has corresponding derivative metrics, further judging whether the indicator data has summary values, and obtaining a judgment result; selecting a corresponding derivative metric calculation formula based on the judgment result, and generating a structured query language for the selected derivative metric calculation formula; executing the structured query language to obtain the calculated value of each derivative metric of the indicator data, and storing the calculated value in a temporary table; writing the calculated value in the temporary table into a preset result table through a sum function. The present application solves the technical problems in the prior art that when calculating the derivative metrics of the indicator data, professional developers need to perform modeling and write a large amount of SQL, resulting in high labor costs, high system costs, poor versatility, and the inability to perform secondary processing of the generated data, thereby achieving the technical effect of simplifying the data processing process, reducing the data processing cost, improving the versatility of data processing, and enabling the generated data to be processed secondary. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is a flow chart of a data processing method provided by an embodiment of the present invention;

[0028] Figure 2 is a flow chart of another data processing method provided by an embodiment of the present invention;

[0029] Figure 3 is a flow chart of another data processing method provided by an embodiment of the present invention;

[0030] Figure 4 is a flow chart of another data processing method provided by an embodiment of the present invention;

[0031] Figure 5 is a flow chart of another data processing method provided by an embodiment of the present invention;

[0032] Figure 6 is a structural diagram of a data processing device provided by an embodiment of the present invention;

[0033] Figure 7 It is a structural schematic diagram of a data processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0035] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present invention are used to distinguish different objects, rather than to limit a specific order. The following embodiments of the present invention can be implemented separately, or in combination with each other, and the embodiments of the present invention do not impose specific limitations on this.

[0036] Figure 1 It is a flow chart of a data processing method provided by an embodiment of the present invention. The data processing method can be applied to all business scenarios that require data processing, such as scenarios where an enterprise performs combined analysis on a large amount of existing business data. The data processing method can be executed by a data processing device, which can be implemented in hardware and / or software and can generally be integrated into a server. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.

[0037] like Figure 1 As shown, the data processing method specifically includes the following steps:

[0038] S101, obtaining indicator data in a preset database, and determining whether the indicator data has corresponding derived metrics, wherein the derived metrics are the result of comparing the indicator data with its previous value in the time dimension, and one indicator data corresponds to multiple derived metrics.

[0039] Optionally, the preset database includes one of the following: a massively parallel processing system (mpp), a data warehouse analysis system (hive), a column-based database management system (clickhouse), and a relational database management system (mysql).

[0040] Specifically, the preset database includes but is not limited to a massively parallel processing system (MPP), a data warehouse analysis system (HIVE), a column-based database management system (Clickhouse), a relational database management system (MySQL), etc. The indicator data is data obtained by processing business data. For example, when the business data is financial data, the indicator data may be annual net profit calculated based on financial data, etc. After obtaining the indicator data, the corresponding settings in the preset database may be queried to determine whether there is a corresponding derivative metric for the indicator data. The derivative metric is the result of comparing the indicator data with its previous value in the time dimension. For example, when the indicator data is annual net profit, the derivative metric may be the growth value of the annual net profit this year compared with the previous year, or the growth value of the annual net profit this year compared with the average annual net profit of the previous three years. Obviously, one indicator data may correspond to multiple derivative metrics.

[0041] Exemplarily, taking the preset database as a MySQL database as an example, it is possible to confirm whether the current indicator information has corresponding derivative metrics by querying the relevant settings of the indicator data in the MySQL database.

[0042] S102: If the indicator data has a corresponding derivative metric, it is further determined whether the indicator data has a summary value, and a determination result is obtained, wherein the summary value refers to data calculated by the indicator data according to a preset calculation rule.

[0043] Specifically, the summary value refers to the data obtained by calculating the indicator data stored in the preset database according to the preset calculation rules. For example, if the indicator data is the annual net profit value, the summary value can be the annual net profit value of the past three years, or the annual net profit value of the past five years. The preset calculation rules are calculation rules for obtaining different summary values ​​by calculating the indicator data.

[0044] S103: Select a corresponding derivative metric calculation formula based on the judgment result, and generate a structured query language using the selected derivative metric calculation formula.

[0045] Specifically, the judgment result includes whether the indicator data has a summary value or not. When the indicator data has a summary value, it is necessary to select a calculation formula that can generate the indicator processing value (i.e., derived measurement) for a certain time period; when the indicator data does not have a summary value, it is necessary to select a formula for the indicator processing process of the corresponding time in the calculation formula, and then automatically parse the selected derived measurement calculation formula to obtain the structured query language SQL. By automatically generating the structured query language SQL from the selected formula for execution, the problem in the prior art that developers need to directly write and execute SQL, but cannot directly operate on business personnel, makes the data processing process simpler and saves labor costs.

[0046] S104, executing structured query language to obtain the calculated value of each derived metric of the indicator data, and storing the calculated value in a temporary table.

[0047] Specifically, after generating structured query language SQL from the selected derivative metric calculation formula, the structured query language SQL is executed to obtain the calculated value of the derived metric of the indicator data. Since there may be multiple derived metrics for one indicator data, each derived metric needs to be calculated separately, and the execution result of the structured query language SQL is stored in a temporary table.

[0048] S105, writing the calculated values ​​in the temporary table into the preset result table through the sum function.

[0049] Specifically, after obtaining the temporary table, the derived metrics in the temporary table are aggregated through the sum function and written into the preset result table that has been established. It should be noted that after the preset result table is generated, the user can directly query the data in the preset result table as needed without writing complex SQL, which not only improves the query efficiency, but also supports querying in different preset databases, and the queried data can be processed again as needed, which improves the flexibility of using the preset database.

[0050] The present application solves the technical problems in the prior art of calculating the derivative measures of indicator data, which require professional developers to perform modeling and write a large amount of SQL, resulting in high labor costs, high system costs, poor versatility and the inability to perform secondary processing of the generated data. The application achieves the technical effect of simplifying the data processing process, reducing the data processing cost, improving the versatility of data processing and enabling the generated data to be processed secondary.

[0051] On the basis of the above technical solutions, Figure 2 is a flow chart of another data processing method provided by an embodiment of the present invention. Figure 2 As shown, S103 specifically includes:

[0052] S201, if the judgment result is that the indicator data has a summary value, select to generate a derivative metric of the indicator data within a first preset time period, wherein the first preset time period is a preset time length interval.

[0053] S202: If the result of the judgment is that the indicator data does not have a summary value, select to generate a derivative metric of the indicator data within a second preset time period in the preset calculation formula, wherein the second preset time period is the length of time included in the preset calculation formula.

[0054] Exemplarily, the formula definition of derived metrics supports users to add two functions: "interval sum" and "date difference", where "interval sum" is the first preset time period mentioned above, and "date difference" is the second preset time period mentioned above; when processing derived metrics containing such formulas, the formulas cannot be simply concatenated, and such derived metrics need to be processed separately.

[0055] S203: Generate a structured query language based on the calculation formula of the selected derivative metric.

[0056] Specifically, for indicator data with summary values, i.e., derived metrics with intervals and formulas, a calculation SQL for the current indicator (without derived metrics) needs to be generated, and the calculation is performed by summing the values ​​of the date intervals in the formula; for indicator data without summary values, i.e., other derived metrics, it is necessary to generate indicator processing SQL for dates corresponding to different dates in the formula, and connect the result sets formed by the processing SQL for the corresponding dates through the date field, and then splice the formula into the SQL. After obtaining the corresponding SQL, execute these processing SQLs and store the results in a temporary table.

[0057] On the basis of the above technical solutions, Figure 3 is a flow chart of another data processing method provided by an embodiment of the present invention, such as Figure 3 As shown, before S101, the data processing method further includes:

[0058] S301, receiving business data uploaded by business personnel, and storing the business data in a preset database.

[0059] S302, receiving a preset date dimension table, and storing the date dimension table in a preset database, wherein the date dimension table is a data table preset according to a time dimension.

[0060] S303, receiving processing information of the indicator data, and storing the processing information in a preset database, wherein the business data is processed based on the processing information to obtain the indicator data.

[0061] Specifically, business personnel store the data to be processed into a processing library (such as mpp, hive, clickhouse, mysql, etc.), that is, store the business data into a preset database, and then import the date dimension table into the preset database, and finally directly define or import the processing information of the indicator data into the preset database through a visual interface.

[0062] On the basis of the above technical solutions, Figure 4 is a flow chart of another data processing method provided by an embodiment of the present invention, such as Figure 4As shown, before determining whether the indicator data has corresponding derivative metrics in step S101, the data processing method further includes:

[0063] S401, receiving preset configuration information of derived metrics from business personnel.

[0064] Specifically, since different indicator data have different derived metrics, it is necessary to pre-set the relevant configuration information about the derived metrics in the preset database, such as the index information, name, type, etc. of the derived metrics. It should be noted that after configuring the preset configuration information of the derived metrics, one or more derived metrics can be added according to the needs of the business personnel.

[0065] On the basis of the above technical solutions, S401 specifically includes:

[0066] Receive the field definition information of the derived metric uploaded by the business personnel, where the field definition information is used for index management of the derived metric.

[0067] Specifically, due to the need to manage various data assets in the preset database, such as data tables, data fields and other types of data assets, when a new derived metric is added, the field of the derived metric and the corresponding information need to be recorded in the preset database, that is, the business personnel need to upload the field definition information of the derived metric to the preset database.

[0068] The basic definition information of the derived metric uploaded by the business personnel is received, wherein the basic definition information at least includes the name, type, and calculation formula of the derived metric.

[0069] Specifically, the basic definition information of the derived metric includes the Chinese name, English name, classification and corresponding calculation formula of the derived metric. Exemplarily, according to different calculation formulas, the types of derived metrics can include growth rate type, summary value type, comparison type, previous value type, etc.

[0070] On the basis of the above technical solutions, Figure 5 is a flow chart of another data processing method provided by an embodiment of the present invention, such as Figure 5 As shown, the data processing method also includes:

[0071] S501: If new indicator data is added to the preset database, the calculated values ​​of the derivative metrics of the newly added indicator data are directly added to the temporary table, and the newly added calculated values ​​in the temporary table are written into the preset result table.

[0072] Specifically, when new indicator data is added to the preset database, the information of the derived metrics can be updated by incremental processing, wherein the SQL for incremental processing is basically the same as the full initialization (i.e., the process of calculating the derived metrics of the indicator data in the above steps S101-S105 and finally storing them in the preset result table). Only the date filtering needs to be added, i.e., only the data of the newly added indicator data on the day of the filtering is required.

[0073] Figure 6 is a structural diagram of a data processing device provided by an embodiment of the present invention, such as Figure 6 As shown, the data processing device includes:

[0074] The data acquisition unit 61 is used to acquire the indicator data in the preset database and determine whether there is a corresponding derived metric for the indicator data, wherein the derived metric is the result of comparing the indicator data with its previous value in the time dimension, and there are multiple derived metrics corresponding to one indicator data;

[0075] The data judgment unit 62 is used to further judge whether the indicator data has a summary value if the indicator data has a corresponding derivative metric, and obtain a judgment result, wherein the summary value refers to the data calculated by the indicator data according to a preset calculation rule;

[0076] A data calculation unit 63, configured to select a corresponding derivative metric calculation formula based on the judgment result, and generate a structured query language from the selected derivative metric calculation formula;

[0077] A program execution unit 64 is used to execute a structured query language to obtain a calculated value of each derived metric of the indicator data, and store the calculated value in a temporary table;

[0078] The result table generating unit 65 is used to write the calculated values ​​in the temporary table into the preset result table through the sum function.

[0079] Optionally, the data calculation unit 63 is specifically used for:

[0080] If the judgment result is that the indicator data has a summary value, then selecting to generate a derivative metric of the indicator data within a first preset time period, wherein the first preset time period is a preset time length interval;

[0081] If the result of the judgment is that the indicator data does not have a summary value, then selecting to generate a derivative metric of the indicator data within a second preset time period in the preset calculation formula, wherein the second preset time period is the length of time included in the preset calculation formula;

[0082] Generates structured query language based on the calculation formula of the selected derived metric.

[0083] Optionally, before the data acquisition unit 61 acquires the indicator data in the preset database and determines whether the indicator data has a corresponding derivative metric, the data processing device further includes:

[0084] A data receiving unit, used to receive business data uploaded by business personnel and store the business data in a preset database;

[0085] A date dimension table receiving unit, used for receiving a preset date dimension table and storing the date dimension table in a preset database, wherein the date dimension table is a data table preset according to a time dimension;

[0086] The processing information receiving unit is used to receive the processing information of the indicator data and store the processing information in a preset database, wherein the business data is processed based on the processing information to obtain the indicator data.

[0087] Optionally, before the data acquisition unit 61 determines whether the indicator data has corresponding derivative metrics, the data processing device further includes:

[0088] The derived metric configuration unit is used to receive preset configuration information of the derived metric from the business personnel.

[0089] Optionally, the derived metric configuration unit is specifically used to:

[0090] Receive the field definition information of the derived metric uploaded by the business personnel, where the field definition information is used for index management of the derived metric;

[0091] The basic definition information of the derived metric uploaded by the business personnel is received, wherein the basic definition information at least includes the name, type, and calculation formula of the derived metric.

[0092] Optionally, the data processing device further includes:

[0093] A new data processing unit is added, which is used to directly add the calculated values ​​of the derivative metrics of the newly added indicator data to the temporary table if the indicator data is newly added to the preset database, and write the newly added calculated values ​​in the temporary table into the preset result table.

[0094] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0095] The data processing device provided in the embodiment of the present invention has the same technical features as the data processing method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0096] Figure 7is a structural diagram of a data processing device provided by an embodiment of the present invention, such as Figure 7 As shown, the data processing device includes a processor 71, a memory 72, an input device 73 and an output device 74; the number of processors 71 in the data processing device can be one or more. Figure 7 A processor 71 is taken as an example; the processor 71, the memory 72, the input device 73 and the output device 74 in the data processing device can be connected by a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0097] The memory 72 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the data processing method in the embodiment of the present invention (for example, the data acquisition unit 61, the data judgment unit 62, the data calculation unit 63, the program execution unit 64 and the result table generation unit 65 in the data processing device). The processor 71 executes various functional applications and data processing of the data processing device by running the software programs, instructions and modules stored in the memory 72, that is, implements the above-mentioned data processing method.

[0098] The memory 72 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 72 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 72 may further include a memory remotely arranged relative to the processor 71, and these remote memories may be connected to the data processing device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0099] The input device 73 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the data processing device. The output device 74 may include a display device such as a display screen.

[0100] An embodiment of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a data processing method when executed by a computer processor.

[0101] Specifically, the data processing method includes:

[0102] Obtain indicator data from a preset database, and determine whether the indicator data has corresponding derived metrics, wherein the derived metrics are the result of comparing the indicator data with its previous value in the time dimension, and one indicator data may correspond to multiple derived metrics;

[0103] If the indicator data has a corresponding derivative metric, it is further determined whether the indicator data has a summary value, and a determination result is obtained, wherein the summary value refers to the data obtained by calculating the indicator data according to a preset calculation rule;

[0104] Selecting a corresponding derivative metric calculation formula based on the judgment result, and generating a structured query language for the selected derivative metric calculation formula;

[0105] Execute the structured query language to obtain the calculated value of each derived metric of the indicator data and store the calculated value in a temporary table;

[0106] Write the calculated values ​​in the temporary table into the preset result table through the sum function.

[0107] Of course, the computer executable instructions of a storage medium including computer executable instructions provided by an embodiment of the present invention are not limited to the operations of the method described above, but can also execute related operations in the data processing method provided by any embodiment of the present invention.

[0108] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk or an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0109] It is worth noting that in the embodiment of the above-mentioned data processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0110] An embodiment of the present invention further provides a computer program product, which includes computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to execute the data processing method provided by any embodiment of the present invention.

[0111] Of course, the computer program product provided in the embodiments of the present application, whose computer executable instructions are not limited to the method operations described above, can also execute related operations in the method provided in any embodiment of the present invention.

[0112] In the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0113] Finally, it should be noted that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A data processing method, characterized in that: The data processing method comprises: Obtain indicator data in a preset database, and determine whether the indicator data has corresponding derived metrics, wherein the derived metrics are the result of comparing the indicator data with its previous value in the time dimension, and one indicator data corresponds to multiple derived metrics; If the indicator data has a corresponding derivative metric, further determine whether the indicator data has a summary value, and obtain a determination result, wherein the summary value refers to data calculated by the indicator data according to a preset calculation rule; Selecting a corresponding derivative metric calculation formula based on the judgment result, and generating a structured query language using the selected derivative metric calculation formula; Executing the structured query language to obtain a calculated value of each of the derived metrics of the indicator data, and storing the calculated value in a temporary table; Write the calculated values ​​in the temporary table into the preset result table through the sum function; The step of selecting a corresponding derivative metric calculation formula based on the judgment result and generating a structured query language from the selected derivative metric calculation formula includes: If the judgment result is that the indicator data has a summary value, then selecting to generate the derived metric of the indicator data within a first preset time period, wherein the first preset time period is a preset time length interval; If the judgment result is that the indicator data does not have a summary value, selecting to generate the derived metric of the indicator data within a second preset time period in the preset calculation formula, wherein the second preset time period is the length of time included in the preset calculation formula; A structured query language is generated based on the selected calculation formula of the derived metric.

2. The data processing method according to claim 1, characterized in that: Before obtaining the indicator data in the preset database and determining whether the indicator data has corresponding derivative metrics, the data processing method further includes: Receiving business data uploaded by business personnel, and storing the business data in the preset database; Receiving a preset date dimension table, and storing the date dimension table in the preset database, wherein the date dimension table is a data table preset according to a time dimension; Processing information of the indicator data is received, and the processing information is stored in the preset database, wherein the business data is processed based on the processing information to obtain the indicator data.

3. The data processing method according to claim 1, characterized in that: Before determining whether the indicator data has a corresponding derivative metric, the data processing method further includes: Receive preset configuration information of the derived metric from a business person.

4. The data processing method according to claim 3, characterized in that: The receiving of preset configuration information of the derived metric by the business personnel includes: receiving field definition information of the derived metric uploaded by a business person, wherein the field definition information is used for index management of the derived metric; The basic definition information of the derived metric uploaded by the business personnel is received, wherein the basic definition information at least includes the name, type, and calculation formula of the derived metric.

5. The data processing method according to claim 1, characterized in that: The data processing method further includes: if the indicator data is newly added to the preset database, directly adding the calculated value of the derivative metric of the newly added indicator data to the temporary table, and writing the newly added calculated value in the temporary table into the preset result table.

6. The data processing method according to claim 1, characterized in that: The preset database includes one of the following: a large-scale parallel processing system, a data warehouse analysis system, a column database management system, and a relational database management system.

7. A data processing device, characterized in that: The data processing device comprises: A data acquisition unit, used to acquire indicator data in a preset database, and determine whether the indicator data has corresponding derived metrics, wherein the derived metrics are the result of comparing the indicator data with its previous value in the time dimension, and there are multiple derived metrics corresponding to one indicator data; A data judgment unit, configured to further judge whether the indicator data has a summary value if the indicator data has a corresponding derivative metric, and obtain a judgment result, wherein the summary value refers to data calculated by the indicator data according to a preset calculation rule; A data calculation unit, configured to select a corresponding derivative metric calculation formula based on the judgment result, and generate a structured query language from the selected derivative metric calculation formula; A program execution unit, configured to execute the structured query language, obtain a calculated value of each of the derived metrics of the indicator data, and store the calculated value in a temporary table; A result table generating unit, used for writing the calculated values ​​in the temporary table into a preset result table through a sum function; The data calculation unit is specifically used for: If the judgment result is that the indicator data has a summary value, then selecting to generate the derived metric of the indicator data within a first preset time period, wherein the first preset time period is a preset time length interval; If the judgment result is that the indicator data does not have a summary value, selecting to generate the derived metric of the indicator data within a second preset time period in the preset calculation formula, wherein the second preset time period is the length of time included in the preset calculation formula; A structured query language is generated based on the selected calculation formula of the derived metric.

8. A data processing device, characterized in that: The data processing device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the data processing method according to any one of claims 1 to 6.