Data indicator generation method, device, electronic device and storage medium

By dividing the statistical intervals of data indicators into sub-intervals and cacheing combined data in high real-time and large data volume scenarios, the target indicators are directly generated, which solves the problem of large server computing burden and untimely indicator generation, and improves the data indicators Computational efficiency and real-time.

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

Patent Information

Application Number
CN202111489061.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2024-12-20
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

In the high real-time and large data volume scenarios, the process of obtaining data indicators through full calculations in the prior art leads to a large burden on server calculations and untimely indicator generation, which affects the real-timeness of data indicator generation and system stability.

Method used

By receiving indicator request information, divide the statistical interval into sub-interval, and cache the combined data corresponding to the sub-interval in a preset position, and generate target indicators based on the cached combined data to avoid full retrieval and calculation of the database.

Benefits of technology

It improves the computing efficiency of data metrics, reduces the computing load of the server, and improves the real-time nature of data metric generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116809B_ABST
    Figure CN114116809B_ABST
Patent Text Reader

Abstract

The present application provides a data indicator generation method, device, electronic device and storage medium, which relates to the field of data storage technology. By receiving indicator request information, the indicator request information is used to characterize the target indicator and the statistical interval corresponding to the target indicator; the statistical interval is divided into at least one sub-interval, each sub-interval corresponds to a group of combined data with different basic data amounts, wherein the combined data is composed of basic data, the basic data amount characterizes the number of basic data in the combined data, and the combined data corresponding to at least one sub-interval is cached in a preset position; the combined data corresponding to each sub-interval is obtained, and the target indicator is generated based on each combined data. Since there is no need to retrieve and calculate all the data in the database, the calculation efficiency of the data indicator is improved, the calculation load of the server is reduced, and the real-time performance of the data indicator generation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data storage, and in particular to a data indicator generation method, device, electronic device and storage medium. Background Art

[0002] Currently, the value of data is increasingly valued in various industries. By processing data and generating corresponding data indicators, rapid evaluation of various businesses can be achieved, thereby completing various tasks such as performance risk management.

[0003] In the prior art, the process of generating indicators through data is usually that the server retrieves the basic data in the database, performs full calculations according to specified rules, and then generates corresponding data indicators for application or service to call.

[0004] However, in high-real-time and large-data volume scenarios, the calculation scheme of obtaining data indicators through full calculation will lead to problems such as heavy server computing burden and untimely indicator generation, affecting the real-time generation of data indicators and system stability. Summary of the invention

[0005] The present application provides a data indicator generation method, device, electronic device and storage medium to solve the problems of heavy server computing burden and untimely indicator generation.

[0006] In a first aspect, the present application provides a method for generating a data indicator, comprising:

[0007] Receive indicator request information, where the indicator request information is used to characterize a target indicator and a statistical interval corresponding to the target indicator; divide the statistical interval into at least one sub-interval, where each sub-interval corresponds to a group of combined data with different basic data amounts, wherein the combined data is composed of basic data, and the basic data amount characterizes the number of basic data in the combined data, and the combined data corresponding to at least one sub-interval is cached in a preset position; obtain the combined data corresponding to each of the sub-intervals, and generate the target indicator based on each of the combined data.

[0008] In a possible implementation, the indicator request information includes a starting time point and an ending time point, and the sub-interval includes a combined interval, and the statistical interval is divided into at least one sub-interval, including: determining the time span information of the statistical interval according to the starting time point and the ending time point, and the time span information is used to characterize the number of first time periods and the number of second time periods contained in the statistical interval; determining at least one combined interval within the statistical interval according to the time span information, and the combined interval includes at least one first time period, or at least one second time period; wherein the first time period is annual, and the second time period is monthly.

[0009] In a possible implementation, the time span information of the statistical interval is determined according to the starting time point and the ending time point, including: obtaining a first number of first time periods between the starting time point and the ending time point, and if the first number is equal to 0, obtaining a second number of second time periods between the starting time point and the ending time point; if the first number is greater than 0, determining a remaining interval and obtaining the number of second time periods in the remaining interval, wherein the remaining interval is an interval between the starting time point and the ending time point excluding each of the first time periods.

[0010] In a possible implementation, determining at least one combined interval within the statistical interval according to the time span information includes: according to the time span information, if the statistical interval includes at least one first time period and at least one second time period, first determining the position of each of the first time periods within the statistical interval, and then determining the position of the second time period from the remaining interval; if the statistical interval only includes the first time period or the second time period, determining the position of each of the first time period or the second time period within the statistical interval.

[0011] In a possible implementation, the sub-interval also includes a non-combined interval. After determining the combined interval within the statistical interval, it also includes: obtaining combined interval positioning information, the combined interval positioning information represents the starting position and the ending position of the interval set composed of each of the combined intervals; determining the non-combined interval according to the starting time point, the ending time point and the combined interval positioning information; determining the non-combined interval according to the second interval length and the ending time point, the basic data volume of the combined data corresponding to the non-combined interval is less than the basic data volume of the combined data corresponding to the combined interval.

[0012] In a possible implementation, a non-combined interval is determined based on the length of the second interval and the termination time point, including: if the starting position of the interval set does not coincide with the starting time point, determining the period from the starting time point to the starting position of the interval set as the first non-combined interval; if the termination position of the interval set does not coincide with the termination time point, determining the period from the termination position of the interval set to the termination time point as the second non-combined interval; and determining the non-combined interval based on the first non-combined interval and / or the second non-combined interval.

[0013] In a possible implementation, generating the target indicator based on each of the combined data includes: obtaining indicator information, the indicator information is used to characterize the calculation logic for generating the target indicator based on the basic indicator; based on the time sequence corresponding to each of the combined data, the combined data corresponding to each sub-interval is processed in turn by a preset basic calculation rule to generate the basic indicator corresponding to each of the sub-intervals; and according to the indicator information, the basic indicator corresponding to each of the sub-intervals is calculated to generate the target indicator.

[0014] In a possible implementation, the basic calculation rule includes at least one of the following: mean calculation, the mean calculation is used to perform weighted averaging on the average values ​​of the combined data corresponding to each of the sub-intervals based on a weight coefficient, wherein the weight coefficient is determined by the amount of basic data corresponding to each of the sub-intervals; variance calculation, the variance calculation is used to calculate the sum of the weighted average of the variance of the sub-interval and the weighted average of the deviation of the sub-interval mean based on the weight coefficient; the weight coefficient is determined by the amount of basic data corresponding to each of the sub-intervals; covariance calculation, wherein the combined data includes the first sub-data and the second sub-data; the covariance calculation is used to calculate the difference between the sum of the first parameter and the second parameter and the third parameter based on the weight coefficient; wherein the first parameter is used to calculate the weighted average of the covariance of the first sub-data and the second sub-data corresponding to each of the sub-intervals; the second parameter is used to calculate the weighted average of the mean product of the first sub-data and the second sub-data corresponding to each of the sub-intervals; the third parameter is used to calculate the quotient of the mean product of the first sub-data and the second sub-data corresponding to each of the sub-intervals and the sum of the basic data of each of the sub-intervals.

[0015] In a possible implementation, the method further includes: generating indicator information according to the configuration information uploaded by the user, wherein the indicator information is used to characterize the calculation logic for generating the target indicator based on the basic indicator.

[0016] In one possible implementation, after generating the target indicator, the method further includes: outputting the target indicator and dependency information corresponding to the target indicator, wherein the dependency information is used to characterize at least one of the following: data used to generate the target indicator, a basic indicator value used to generate the target indicator, and a calculation logic for generating the target indicator based on the basic indicator.

[0017] In a second aspect, the present application provides a data indicator generating device, comprising:

[0018] A receiving module, used to receive indicator request information, where the indicator request information is used to represent a target indicator and a statistical interval corresponding to the target indicator;

[0019] a partitioning module, configured to divide the statistical interval into at least one subinterval, each of the subintervals corresponding to a group of combined data with a different amount of basic data, wherein the combined data is composed of basic data, the amount of basic data represents the amount of basic data in the combined data, and the combined data corresponding to at least one subinterval is cached in a preset position;

[0020] The generating module is used to obtain the combined data corresponding to each of the sub-intervals, and generate the target indicator based on each of the combined data.

[0021] In a possible implementation, the indicator request information includes a starting time point and an ending time point, the sub-interval includes a combined interval, and the division module is specifically used to: determine the time span information of the statistical interval according to the starting time point and the ending time point, and the time span information is used to characterize the number of first time periods and the number of second time periods contained in the statistical interval; determine at least one combined interval within the statistical interval according to the time span information, and the combined interval includes at least one first time period, or at least one second time period; wherein the first time period is annual, and the second time period is monthly.

[0022] In a possible implementation, when the division module determines the time span information of the statistical interval based on the starting time point and the ending time point, it is specifically used to: obtain a first number of first time periods between the starting time point and the ending time point, and if the first number is equal to 0, obtain a second number of second time periods between the starting time point and the ending time point; if the first number is greater than 0, determine the remaining interval and obtain the number of second time periods in the remaining interval, wherein the remaining interval is the interval between the starting time point and the ending time point excluding each of the first time periods.

[0023] In a possible implementation, when the division module determines at least one combined interval within the statistical interval according to the time span information, it is specifically used to: according to the time span information, if the statistical interval includes at least one first time period and at least one second time period, first determine the position of each first time period within the statistical interval, and then determine the position of the second time period from the remaining interval; if the statistical interval only includes the first time period or the second time period, determine the position of each first time period or the second time period within the statistical interval.

[0024] In a possible implementation, the sub-interval also includes a non-combined interval. After determining the combined interval within the statistical interval, the partitioning module is further used to: obtain combined interval positioning information, the combined interval positioning information represents the starting position and the ending position of the interval set composed of each of the combined intervals; determine the non-combined interval according to the starting time point, the ending time point and the combined interval positioning information; determine the non-combined interval according to the second interval length and the ending time point, the basic data volume of the combined data corresponding to the non-combined interval is less than the basic data volume of the combined data corresponding to the combined interval.

[0025] In a possible implementation, when the division module determines the non-combined interval based on the second interval length and the termination time point, it is specifically used to: if the starting position of the interval set does not coincide with the starting time point, determine the period from the starting time point to the starting position of the interval set as the first non-combined interval; if the termination position of the interval set does not coincide with the termination time point, determine the period from the termination position of the interval set to the termination time point as the second non-combined interval; determine the non-combined interval based on the first non-combined interval and / or the second non-combined interval.

[0026] In a possible implementation, when the generation module generates the target indicator based on each of the combined data, it is specifically used to: obtain indicator information, where the indicator information is used to characterize the calculation logic for generating the target indicator based on the basic indicator; based on the time sequence corresponding to each of the combined data, the combined data corresponding to each sub-interval is processed in turn through a preset basic calculation rule to generate the basic indicator corresponding to each of the sub-intervals; and according to the indicator information, the basic indicator corresponding to each of the sub-intervals is calculated to generate the target indicator.

[0027] In a possible implementation, the basic calculation rule includes at least one of the following: mean calculation, the mean calculation is used to perform weighted averaging on the average values ​​of the combined data corresponding to each of the sub-intervals based on a weight coefficient, wherein the weight coefficient is determined by the amount of basic data corresponding to each of the sub-intervals; variance calculation, the variance calculation is used to calculate the sum of the weighted average of the variance of the sub-interval and the weighted average of the deviation of the sub-interval mean based on the weight coefficient; the weight coefficient is determined by the amount of basic data corresponding to each of the sub-intervals; covariance calculation, wherein the combined data includes the first sub-data and the second sub-data; the covariance calculation is used to calculate the difference between the sum of the first parameter and the second parameter and the third parameter based on the weight coefficient; wherein the first parameter is used to calculate the weighted average of the covariance of the first sub-data and the second sub-data corresponding to each of the sub-intervals; the second parameter is used to calculate the weighted average of the mean product of the first sub-data and the second sub-data corresponding to each of the sub-intervals; the third parameter is used to calculate the quotient of the mean product of the first sub-data and the second sub-data corresponding to each of the sub-intervals and the sum of the basic data of each of the sub-intervals.

[0028] In a possible implementation, the generation module is further used to: generate indicator information according to the configuration information uploaded by the user, and the indicator information is used to characterize the calculation logic of generating the target indicator based on the basic indicator.

[0029] In one possible implementation, after generating the target indicator, the generation module is further used to: output the target indicator and dependency information corresponding to the target indicator, wherein the dependency information is used to characterize at least one of the following: data used to generate the target indicator, a basic indicator value used to generate the target indicator, and a calculation logic for generating the target indicator based on the basic indicator.

[0030] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0031] The memory stores computer-executable instructions;

[0032] The processor executes the computer-executable instructions stored in the memory to implement the data indicator generation method as described in any one of the first aspects of the embodiments of the present application.

[0033] In a fourth aspect, the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the data indicator generation method as described in any one of the first aspects of the embodiments of the present application.

[0034] According to the fifth aspect of the embodiments of the present application, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the data indicator generation method as described in any one of the first aspects above.

[0035] The data indicator generation method, device, electronic device and storage medium provided by the present application receive indicator request information, the indicator request information is used to characterize the target indicator and the statistical interval corresponding to the target indicator; divide the statistical interval into at least one sub-interval, each of the sub-intervals corresponds to a group of combined data with different basic data amounts, wherein the combined data is composed of basic data, the basic data amount characterizes the number of basic data in the combined data, and the combined data corresponding to at least one sub-interval is cached in a preset position; obtain the combined data corresponding to each of the sub-intervals, and generate the target indicator based on each of the combined data. Since the combined data used in generating the target indicator is cached in advance in a preset position, when generating the target indicator, the target indicator can be directly calculated by obtaining the pre-cached combined data, without the need to retrieve and calculate all the data in the database, thereby improving the calculation efficiency of the data indicator, reducing the calculation load of the server, and improving the real-time performance of the data indicator generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0037] Figure 1 An application scenario diagram of the data indicator generation method provided in an embodiment of the present application;

[0038] Figure 2 A flowchart of a method for generating data indicators provided in one embodiment of the present application;

[0039] Figure 3 A schematic diagram of a sub-interval provided in an embodiment of the present application;

[0040] Figure 4 for Figure 2 A schematic diagram of implementation steps of step S102 in the illustrated embodiment;

[0041] Figure 5 A schematic diagram of a remaining interval provided in an embodiment of the present application;

[0042] Figure 6 A schematic diagram of a first non-combined interval and a second non-combined interval provided in an embodiment of the present application;

[0043] Figure 7A flowchart of a method for generating data indicators provided in another embodiment of the present application;

[0044] Figure 8 A schematic diagram of the structure of a data indicator generating device provided in one embodiment of the present application;

[0045] Fig. 9 A schematic diagram of an electronic device provided by an embodiment of the present application;

[0046] Fig.10 It is a block diagram of a terminal device shown in an exemplary embodiment of the present application.

[0047] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0048] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0049] The application scenarios of the embodiments of the present application are explained below:

[0050] Figure 1 This is an application scenario diagram of the data indicator generation method provided in the embodiment of the present application. The data indicator generation method provided in the embodiment of the present application can be applied to application scenarios such as high-frequency trading and risk management that have high real-time requirements for the generation of data indicators. More specifically, for example, Figure 1 As shown, the execution subject of the method provided in the embodiment of the present application can be a server, and the server is connected to the terminal device in communication. On the one hand, the server can read basic data, wherein the basic data is, for example, business data, transaction data, etc. More specifically, the basic data in the server can be a database stored locally in the server, or it can be stored in an external storage medium connected to the server. The server obtains the required basic data in real time through the communication connection, or caches the basic data locally in advance. On the other hand, after receiving the indicator request information sent by the terminal device, the server retrieves and calculates the business basic data, generates corresponding data indicators, and returns the data indicators to the terminal device or other services, completes the response to the indicator request, and realizes the task of providing the required data indicators to other applications or services.

[0051] In the prior art, the process of generating data indicators is usually that the server generates the corresponding data indicators by retrieving the basic data in the database and performing full calculations according to the specified rules. However, in application scenarios such as high-frequency trading and risk management that have high real-time requirements for the generation of data indicators, the server searches and calculates the huge database, which will take a long time. For example, the indicator request information sent by the terminal device side requests the generation of an average transaction price for the past five years. In this case, the server needs to retrieve and obtain the transaction data in the database within five years, and calculate the average value to obtain the data indicator. However, it is very time-consuming to retrieve data in the database, that is, it takes a lot of time to retrieve the transaction data for the past five years, which increases the time consumption of generating data indicators, reduces the real-time performance of the indicator generation process, and is difficult to meet the indicator usage requirements in application scenarios such as high-frequency trading and risk management.

[0052] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0053] Figure 2 A flowchart of a method for generating data indicators provided by an embodiment of the present application is as follows: Figure 2 As shown, the data indicator generation method provided in this embodiment includes the following steps:

[0054] Step S101: receiving indicator request information, where the indicator request information is used to represent a target indicator and a statistical interval corresponding to the target indicator.

[0055] Exemplarily, the execution subject of the method of this embodiment is a server, referring to Figure 1 In the application scenario diagram shown, the server communicates with the terminal device and receives the index request information sent by the terminal device. The index request information represents the target index and the statistical interval corresponding to the target index. Specifically, for example, the target index is the average transaction price, and the statistical interval is from February 1, 2015 to February 1, 2020. After receiving the index request information, the server will respond to the index request information, thereby generating the corresponding target index and sending it to the requester. Among them, the index request information can be information sent by the terminal device based on user instructions, or it can be information sent by an application or service running on the server or terminal device to the server to obtain the data indicators required by the application or service. With the different senders of the index request information, the specific implementation form of the index request information also changes. No specific restrictions are made here, and the specific implementation form of the index request information can be set according to specific needs.

[0056] Step S102, dividing the statistical interval into at least one sub-interval, each sub-interval corresponds to a group of combined data with different basic data amounts, wherein the combined data is composed of basic data, the basic data amount represents the number of basic data in the combined data, and the combined data corresponding to at least one sub-interval is cached in a preset position.

[0057] Exemplarily, the statistical interval represented by the indicator request information can be specifically implemented by at least a time point and an end time point. Specifically, the indicator request information includes a start time point and an end time point, and the start time point and the end time point are used to indicate the beginning and the end of the statistical interval, respectively. Further, after determining the statistical interval, the statistical interval is divided to indicate a sub-interval, and each sub-interval represents a time period. Figure 3 A schematic diagram of a sub-interval provided in an embodiment of the present application, such as Figure 3 As shown, after the statistical interval is divided, sub-interval A, sub-interval B and sub-interval C are generated. Among them, the statistical interval is from January 1, 2015 to February 5, 2016. After the statistical interval is divided, sub-interval A corresponds to January 1, 2015 to December 31, 2015 (shown as 20150101-20151231 in the figure); sub-interval B corresponds to January 1, 2016 to January 31, 2016 (shown as 20160101-20160131 in the figure); sub-interval C corresponds to February 1, 2016 to February 5, 2016 (shown as 20160201-20160205 in the figure).

[0058] Furthermore, each sub-interval corresponds to a set of combined data, the combined data is composed of basic data, and the number of basic data in the combined data corresponding to each sub-interval, that is, the amount of basic data, is different. Figure 3 In the illustrated embodiment, for example, the basic data corresponds to daily data, that is, one or a group of basic data is generated every day. More specifically, the basic data is, for example, daily transaction volume data, daily price average data, etc. Therefore, for different sub-intervals, since the time spans corresponding to them are different, the number of basic data included is also different, and the amount of basic data for generating the corresponding combined data is also different. For example, sub-interval A corresponds to a year, which includes 365 daily data (without considering leap years), that is, 365 groups of basic data, so the amount of basic data for the combined data corresponding to sub-interval A is 365. Correspondingly, sub-interval B corresponds to a month, which includes, for example, 31 daily data, that is, 31 groups of basic data, so the amount of basic data for the combined data corresponding to sub-interval B is 31. Sub-interval C is an interval less than a month, which includes 5 daily data, that is, 5 groups of basic data, so the amount of basic data for the combined data corresponding to sub-interval C is 5.

[0059] Furthermore, each basic data may include one or more detailed data. In one possible implementation, each basic data may include only one value representing the daily trading volume; in another possible implementation, each basic data includes multiple detailed data such as daily trading volume data, daily average trading price data, daily highest price data, and daily lowest price data. Of course, it can be understood that the basic data in this embodiment is data in units of daily degrees. In other possible implementations, the basic data may also be data in units of one hour, one minute, etc. Correspondingly, when the implementation form of the basic data is different, the basic data volume of the combined data also changes accordingly, and no further examples are given here.

[0060] The combined data corresponding to at least one sub-interval is cached in a preset location, for example, Figure 3 In the illustrated embodiment, the combined data corresponding to sub-interval A, i.e., the basic data from January 1, 2016 to January 31, 2016 (2016), is cached as a whole in a preset location of the server. When the server needs to use the data of the sub-interval, it can determine and obtain the data corresponding to the sub-interval A as a whole according to the identifier of the sub-interval A, such as the annual identifier (2016), and perform calculations. There is no need to retrieve the data of sub-interval A from the database in sequence, thereby avoiding the time-consuming process of searching the database. Similarly, the combined data corresponding to sub-interval B can also be cached as a whole in a preset location of the server, thereby avoiding the time-consuming process of searching the data corresponding to sub-interval B.

[0061] More specifically, in a possible implementation, the indicator request information includes a start time point and an end time point, and the sub-interval includes a combined interval and a non-combined interval, such as Figure 4 As shown, the specific implementation of step S102 includes:

[0062] Step S1021, determining time span information of the statistical interval according to the start time point and the end time point, where the time span information is used to represent the number of first time periods and the number of second time periods included in the statistical interval.

[0063] Exemplarily, the first time period is annual, and the second time period is monthly. The starting time point and the ending time point are information used to describe the time node, such as 20150101, 20151231, etc. The specific representation method can be set as needed. According to the starting time point and the ending time point, the number of the first time period and the number of the second time period included in the statistical interval can be determined. Among them, the first time period is, for example, annual, and the second time period is, for example, monthly. That is, through the starting time point and the ending time point, it can be determined that in the statistical interval, there are several complete years and several complete months, that is, time span information.

[0064] More specifically, exemplarily, the method for determining the time span information of a statistical interval includes: obtaining a first number of a first time period between a starting time point and an ending time point, and if the first number is equal to 0, obtaining a second number of a second time period between the starting time point and the ending time point; if the first number is greater than 0, determining a remaining interval, and obtaining the number of second time periods in the remaining interval, wherein the remaining interval is an interval between the starting time point and the ending time point excluding each first time period.

[0065] Exemplarily, when the first quantity of the first time period is equal to 0, that is, a complete year is not included in the statistical interval, at this time, the data of the second time period in the statistical interval is directly counted, that is, the number of complete months in the statistical interval, and then the first quantity and then the second quantity are determined.

[0066] When the first number of the first time period is greater than 0, that is, the statistical interval includes at least one complete year. At this time, the number of the first time periods in the statistical interval is counted first, that is, the number of complete years in the statistical interval, and then the number of the second time periods in the remaining interval is counted, that is, the number of complete months in the remaining interval. Figure 5 A schematic diagram of a remaining interval provided in an embodiment of the present application, such as Figure 5 As shown in the figure, after determining that the statistical interval includes at least one first time period (shown as interval A and interval B, corresponding to 2015 and 2016 respectively), the intervals in the statistical interval other than the first time period are determined as the remaining intervals. And in the remaining intervals, continue to count and determine the number and position of the second time period (monthly).

[0067] Step S1022: determining at least one combined interval within the statistical interval according to the time span information, wherein the combined interval includes at least one first time period or at least one second time period.

[0068] Exemplarily, according to the specific situation represented by the time span information, the combined interval corresponding to the first time period and the combined interval corresponding to the second time period in the statistical interval can be determined. Specifically, in a possible implementation, the implementation step of determining the combined interval includes: according to the time span information, if the statistical interval includes at least one first time period and at least one second time period, first determine the position of each first time period in the statistical interval, and then determine the position of the second time period from the remaining interval; if the statistical interval only includes the first time period or the second time period, then determine the position of each first time period or the second time period in the statistical interval.

[0069] Among them, reference Figure 5 In the illustrated embodiment, exemplarily, the combination interval corresponding to the first time period is combination interval a, and the combination interval corresponding to the second time period is combination interval b. Combination interval a corresponds to two consecutive first time periods (annual); combination interval b corresponds to several discontinuous second time periods (monthly).

[0070] In the steps of this embodiment, since the first time period and the second time period are intervals of fixed length, such as annual and monthly, the data corresponding to the first time period and the second time period can be located and cached by pre-retrieval. Afterwards, according to the specific statistical interval, a fast and flexible combination is achieved based on the first time period and the second time period, and the corresponding combination interval is generated, and then the corresponding combination data is obtained, thereby avoiding the time-consuming data retrieval process.

[0071] Furthermore, the sub-interval also includes a non-combined interval, and after step S1022, further includes:

[0072] Step S1023, obtaining combined interval positioning information, where the combined interval positioning information represents the starting position and the ending position of the interval set composed of each combined interval;

[0073] Step S1024, determining a non-combined interval according to the start time point, the end time point and the combined interval positioning information, wherein the basic data volume of the combined data corresponding to the non-combined interval is smaller than the basic data volume of the combined data corresponding to the combined interval.

[0074] Exemplarily, the non-combined interval is a sub-interval corresponding to the combined data composed entirely of basic data, more specifically, for example, the daily data from January 3 to January 18 (i.e., data that is less than a full month). After determining the combined interval, the non-combined interval can be determined by obtaining the position of the combined interval in the statistical interval, i.e., the combined interval positioning information, in combination with the start time point and the end time point of the statistical interval.

[0075] Specifically, if the starting position of the interval set does not coincide with the starting time point, the starting time point to the starting position of the interval set is determined as the first non-combined interval; if the ending position of the interval set does not coincide with the ending time point, the ending position of the interval set to the ending time point is determined as the second non-combined interval; the non-combined interval is determined based on the first non-combined interval and / or the second non-combined interval.

[0076] Figure 6 A schematic diagram of a first non-combined interval and a second non-combined interval provided in an embodiment of the present application, such as Figure 6 The first non-combined interval and the second non-combined interval are distributed on both sides of the combined interval. According to the starting time point and the ending time point of the statistical interval and the combined interval positioning information, the first non-combined interval and the second non-combined interval can be determined, and then the non-combined interval can be determined.

[0077] In the steps of this embodiment, by determining the combined interval and the non-combined interval, the basic data used for the subsequent generation of the target index is divided into the combined data corresponding to the combined interval and the combined data corresponding to the non-combined interval. Since the combined data corresponding to the combined interval is pre-cached in the database, there is no need to perform real-time search, thereby improving the real-time performance of the data index calculation. In combination with the combined data corresponding to the non-combined interval, the basic data acquisition process of any statistical interval can be realized without caching different specific statistical intervals (for example, within 3 days, within 3 months, within half a year, within 2 years, etc.), which is more flexible and saves database space.

[0078] Step S103, obtaining the combined data corresponding to each sub-interval, and generating a target indicator based on each combined data.

[0079] Exemplarily, after determining the combined data of each sub-interval, the combined data is processed based on the preset index calculation rules to obtain the target index. The index calculation rules may be pre-configured in the server by the user based on the needs. According to the index calculation rules, the combined data of each sub-interval is processed in blocks, and then the processing results corresponding to each sub-interval are combined and calculated to generate the target instruction. In the process of generating the target, the server cannot simply process the combined data corresponding to each sub-interval as a group of data because the combined data corresponding to each sub-interval may be in a separated state (if the data of all sub-intervals are merged into a group of data, a data copy process is required, which leads to an increase in time consumption). In this embodiment, based on the index calculation rules, the combined data corresponding to each sub-interval is processed separately, and then the processing results of each sub-interval are merged to obtain the target index, thereby solving the above problem and improving the calculation efficiency of the data.

[0080] In this embodiment, by receiving the indicator request information, the indicator request information is used to characterize the target indicator and the statistical interval corresponding to the target indicator; the statistical interval is divided into at least one sub-interval, each sub-interval corresponds to a group of combined data with different basic data amounts, wherein the combined data is composed of basic data, the basic data amount characterizes the number of basic data in the combined data, and the combined data corresponding to at least one sub-interval is cached in a preset position; the combined data corresponding to each sub-interval is obtained, and the target indicator is generated based on each combined data. Since the combined data used in generating the target indicator is cached in advance in the preset position, when generating the target indicator, the target indicator can be directly calculated by obtaining the pre-cached combined data, without the need to retrieve and calculate all the data in the database, thereby improving the calculation efficiency of the data indicator, reducing the calculation load of the server, and improving the real-time performance of the data indicator generation.

[0081] Figure 7 A flowchart of a data indicator generation method provided in another embodiment of the present application is as follows: Figure 7 As shown, the data indicator generation method provided in this embodiment is Figure 2 On the basis of the data indicator generation method provided in the illustrated embodiment, step S103 is further refined, and a step of displaying the target indicator and the dependency information of the target indicator is added. The data indicator generation method provided in this embodiment includes the following steps:

[0082] Step S201: receiving indicator request information, where the indicator request information is used to characterize a target indicator and a statistical interval corresponding to the target indicator.

[0083] Step S202, dividing the statistical interval into at least one sub-interval, each sub-interval corresponds to a group of combined data with different basic data amounts, wherein the combined data is composed of basic data, the basic data amount represents the number of basic data in the combined data, and the combined data corresponding to at least one sub-interval is cached in a preset position.

[0084] Step S203: Obtain indicator information, where the indicator information is used to characterize the calculation logic for generating the target indicator based on the basic indicator.

[0085] Exemplarily, the indicator information is information used to characterize the calculation logic for generating the target indicator based on the basic indicator, wherein the basic indicator is the result obtained by processing the basic data based on the basic calculation rules. Exemplarily, the basic data is the daily transaction price, and the basic calculation rule is the mean calculation, then the basic indicator is the daily average transaction price. More specifically, the basic calculation rule is the basic information provided by the server, and the user can set a customized calculation logic based on the basic calculation rule, that is, define the indicator information, so as to generate the target indicator. Exemplarily, before obtaining the indicator information, it also includes the step of generating the indicator information based on the configuration information uploaded by the user, and the indicator information is used to characterize the calculation logic for generating the target indicator based on the basic indicator.

[0086] Step S204, based on the time sequence corresponding to each combination of data, the combination of data corresponding to each sub-interval is processed in sequence by a preset basic calculation rule to generate a basic indicator corresponding to each sub-interval.

[0087] Furthermore, after obtaining the combined data corresponding to each sub-interval through the above steps, the combined data corresponding to each sub-interval are calculated according to the basic calculation rules to generate the basic indicators corresponding to each sub-interval. For example, the basic data is daily trading volume, the basic calculation rule is average calculation, sub-interval A corresponds to "2019", and sub-interval B corresponds to "January-March 2020", then the combined data corresponding to each sub-interval are processed to generate the basic indicator corresponding to sub-interval A as the average daily trading volume in 2019; the basic indicator corresponding to sub-interval B is the average daily trading volume from January to March 2020.

[0088] Specifically, the basic calculation rule is a rule for calculating an indicator based on multiple sub-intervals, and its application target is multiple sub-intervals (of course, it can be compatible with the case of a single sub-interval). The basic calculation rule is introduced in detail below.

[0089] Exemplarily, the basic calculation rule includes at least one of the following:

[0090] Mean calculation is used to perform weighted average on the average values ​​of the combined data corresponding to each sub-interval based on a weight coefficient, wherein the weight coefficient is determined by the amount of basic data corresponding to each sub-interval.

[0091] The specific expression of mean value calculation is shown in formula (1):

[0092]

[0093] in, is the basic indicator corresponding to the mean calculation; m is the number of sub-intervals; N j is the basic data volume of the sub-interval; is the arithmetic mean of each subinterval.

[0094] Variance calculation, which is used to calculate the sum of the weighted average of the variance of the sub-interval and the weighted average of the deviation of the sub-interval mean based on the weight coefficient; the weight coefficient is determined by the amount of basic data corresponding to each sub-interval.

[0095] The specific expression of variance calculation is shown in formula (2):

[0096]

[0097] Among them, s 2 is the basic indicator corresponding to the variance calculation, s j 2 is the sample variance of each subinterval; is the arithmetic mean of each subinterval; N j is the basic data volume of the sub-interval; m is the number of sub-intervals.

[0098] Covariance calculation, wherein the combined data includes the first sub-data and the second sub-data; the covariance calculation is used to calculate the sum of the first parameter, the second parameter, and the difference with the third parameter based on the weight coefficient; wherein the first parameter is used to calculate the weighted average of the covariance of the first sub-data and the second sub-data corresponding to each sub-interval; the second parameter is used to calculate the weighted average of the mean product of the first sub-data and the second sub-data corresponding to each sub-interval; the third parameter is used to calculate the quotient of the mean product of the first sub-data and the second sub-data corresponding to each sub-interval and the sum of the basic data volume of each sub-interval.

[0099] The specific expression of covariance calculation is shown in formula (3):

[0100]

[0101] Among them, cov(x,y) is the basic indicator corresponding to the covariance calculation, x is the first sub-data, y is the second sub-data, and cov j (x,y) is the sample covariance of x and y in each subinterval, is the arithmetic mean of x in each subinterval; is the arithmetic mean of y in each subinterval; N j is the basic data volume of the sub-interval; m is the number of sub-intervals. Among them, the first parameter refers to The second parameter is The third parameter is

[0102] In the steps of this embodiment, based on the formulas listed above, the purpose of generating the basic index corresponding to each sub-interval can be achieved, and the specific process will not be repeated here one by one.

[0103] Step S205: Calculate the basic index corresponding to each sub-interval according to the index information to generate a target index.

[0104] Furthermore, after the basic indicators are generated, the corresponding target indicators can be generated by combining the basic indicators. For example, the target indicator is the ratio of the mean to the variance. The generation rule of the target indicator can be determined by the calculation logic of generating the target indicator based on the basic indicators represented by the indicator information, which will not be repeated here.

[0105] Step S206: output the target indicator and the dependency information corresponding to the target indicator.

[0106] Exemplarily, dependency information is information used to characterize the basis for generating the target indicator. For example, the dependency information is used to characterize at least one of the following: data used to generate the target indicator, basic indicator value used to generate the target indicator, and calculation logic for generating the target indicator based on the basic indicator.

[0107] In one possible implementation, after the target indicator is determined, the target indicator and the corresponding dependency information of the target are returned to the terminal device that sent the indicator request. The terminal device can not only display the target indicator based on the target indicator and the corresponding dependency information, but also display the data used to generate the target indicator, the basic indicator values, and the calculation logic for generating the target indicator based on the basic indicators in the form of a tree diagram based on the dependency information, thereby allowing the user to verify the generation basis of the target indicator and improve the credibility and reliability of the target indicator.

[0108] In this embodiment, the implementation method of step S201-step S202 is the same as that of the present application. Figure 2 The implementation methods of step S101 and step S102 in the illustrated embodiment are the same and will not be described in detail here.

[0109] Figure 8 A schematic diagram of the structure of a data indicator generating device provided in one embodiment of the present application is shown in FIG. Figure 8 As shown, the data indicator generating device 3 provided in this embodiment includes:

[0110] A receiving module 31 is used to receive indicator request information, where the indicator request information is used to represent the target indicator and the statistical interval corresponding to the target indicator;

[0111] A division module 32 is used to divide the statistical interval into at least one sub-interval, each sub-interval corresponds to a group of combined data with different basic data amounts, wherein the combined data is composed of basic data, the basic data amount represents the amount of basic data in the combined data, and the combined data corresponding to at least one sub-interval is cached in a preset position;

[0112] The generating module 33 is used to obtain the combined data corresponding to each sub-interval and generate the target indicator based on each combined data.

[0113] In a possible implementation, the indicator request information includes a starting time point and an ending time point, the sub-interval includes a combined interval, and the division module 32 is specifically used to: determine the time span information of the statistical interval according to the starting time point and the ending time point, and the time span information is used to characterize the number of first time periods and the number of second time periods contained in the statistical interval; determine at least one combined interval within the statistical interval according to the time span information, and the combined interval includes at least one first time period, or at least one second time period; wherein the first time period is annual and the second time period is monthly.

[0114] In one possible implementation, when the division module 32 determines the time span information of the statistical interval based on the starting time point and the ending time point, it is specifically used to: obtain a first number of the first time period between the starting time point and the ending time point, and if the first number is equal to 0, obtain a second number of the second time period between the starting time point and the ending time point; if the first number is greater than 0, determine the remaining interval and obtain the number of second time periods in the remaining interval, wherein the remaining interval is the interval between the starting time point and the ending time point excluding the first time periods.

[0115] In a possible implementation, when the division module 32 determines at least one combined interval within the statistical interval based on the time span information, it is specifically used to: based on the time span information, if the statistical interval includes at least one first time period and at least one second time period, first determine the position of each first time period within the statistical interval, and then determine the position of the second time period from the remaining interval; if the statistical interval only includes the first time period or the second time period, then determine the position of each first time period or the second time period within the statistical interval.

[0116] In a possible implementation, the sub-interval also includes a non-combined interval. After determining the combined interval within the statistical interval, the division module 32 is further used to: obtain combined interval positioning information, the combined interval positioning information represents the starting position and the ending position of the interval set composed of each combined interval; determine the non-combined interval according to the starting time point, the ending time point and the combined interval positioning information; determine the non-combined interval according to the second interval length and the ending time point, and the basic data volume of the combined data corresponding to the non-combined interval is less than the basic data volume of the combined data corresponding to the combined interval.

[0117] In a possible implementation, when the division module 32 determines the non-combined interval according to the second interval length and the end time point, it is specifically used to: if the starting position of the interval set does not coincide with the starting time point, then determine the period from the starting time point to the starting position of the interval set as the first non-combined interval; if the ending position of the interval set does not coincide with the ending time point, then determine the period from the ending position of the interval set to the ending time point as the second non-combined interval; determine the non-combined interval according to the first non-combined interval and / or the second non-combined interval.

[0118] In one possible implementation, when the generation module 33 generates the target indicator based on each combination of data, it is specifically used to: obtain indicator information, where the indicator information is used to characterize the calculation logic for generating the target indicator based on the basic indicator; based on the time sequence corresponding to each combination of data, the combination data corresponding to each sub-interval is processed in turn through preset basic calculation rules to generate the basic indicator corresponding to each sub-interval; and according to the indicator information, the basic indicator corresponding to each sub-interval is calculated to generate the target indicator.

[0119] In a possible implementation, the basic calculation rules include at least one of the following: mean calculation, which is used to perform weighted averaging of the average values ​​of the combined data corresponding to each sub-interval based on a weight coefficient, wherein the weight coefficient is determined by the amount of basic data corresponding to each sub-interval; variance calculation, which is used to calculate the sum of the weighted average of the variance of the sub-interval and the weighted average of the deviation of the sub-interval mean based on the weight coefficient; the weight coefficient is determined by the amount of basic data corresponding to each sub-interval; covariance calculation, wherein the combined data includes the first sub-data and the second sub-data; the covariance calculation is used to calculate the difference between the sum of the first parameter and the second parameter and the third parameter based on the weight coefficient; wherein the first parameter is used to calculate the weighted average of the covariance of the first sub-data and the second sub-data corresponding to each sub-interval; the second parameter is used to calculate the weighted average of the mean product of the first sub-data and the second sub-data corresponding to each sub-interval; and the third parameter is used to calculate the quotient of the mean product of the first sub-data and the second sub-data corresponding to each sub-interval and the sum of the basic data of each sub-interval.

[0120] In a possible implementation, the generating module 33 is further used to generate indicator information according to the configuration information uploaded by the user, where the indicator information is used to characterize the calculation logic of generating the target indicator based on the basic indicator.

[0121] In one possible implementation, after generating the target indicator, the generation module 33 is also used to: output the target indicator and dependency information corresponding to the target indicator, where the dependency information is used to characterize at least one of the following: data used to generate the target indicator, basic indicator value used to generate the target indicator, and calculation logic for generating the target indicator based on the basic indicator.

[0122] The receiving module 31, the dividing module 32 and the generating module 33 are connected in sequence. The data indicator generating device provided in this embodiment can be executed as follows Figure 2-Figure 7 The technical solutions of any of the method embodiments shown have similar implementation principles and technical effects, which will not be described in detail here.

[0123] Fig. 9 A schematic diagram of an electronic device provided by an embodiment of the present application, such as Fig. 9 As shown, the electronic device 4 provided in this embodiment includes: a processor 41, and a memory 42 communicatively connected to the processor 41.

[0124] Wherein, the memory 42 stores computer-executable instructions;

[0125] The processor 41 executes the computer execution instructions stored in the memory 42 to implement the present application. Figure 2-Figure 7 The data indicator generation method provided in any one of the corresponding embodiments.

[0126] The memory 42 and the processor 41 are connected via a bus 43 .

[0127] For related instructions, please refer to Figure 2-Figure 7 The relevant descriptions and effects corresponding to the steps in the corresponding embodiments can be understood, and no further elaboration is made here.

[0128] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the present application. Figure 2-Figure 7 The data indicator generation method provided in any one of the corresponding embodiments.

[0129] Among them, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0130] One embodiment of the present application provides a computer program product, including a computer program, which implements the present application when executed by a processor. Figure 2-Figure 7 The data indicator generation method provided in any one of the corresponding embodiments.

[0131] Fig.10 It is a block diagram of a terminal device shown in an exemplary embodiment of the present application. The terminal device 800 can be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0132] The terminal device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0133] The processing component 802 generally controls the overall operation of the terminal device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0134] The memory 804 is configured to store various types of data to support operations on the terminal device 800. Examples of such data include instructions for any application or method operating on the terminal device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0135] The power supply component 806 provides power to various components of the terminal device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the terminal device 800.

[0136] The multimedia component 808 includes a screen that provides an output interface between the terminal device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the terminal device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0137] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the terminal device 800 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0138] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0139] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the terminal device 800. For example, the sensor assembly 814 can detect the open / closed state of the terminal device 800, the relative positioning of the components, such as the display and keypad of the terminal device 800, and the sensor assembly 814 can also detect the position change of the terminal device 800 or a component of the terminal device 800, the presence or absence of contact between the user and the terminal device 800, the orientation or acceleration / deceleration of the terminal device 800, and the temperature change of the terminal device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0140] The communication component 816 is configured to facilitate wired or wireless communication between the terminal device 800 and other devices. The terminal device 800 can access a wireless network based on a communication standard, such as WiFi, 3G, 4G, 5G or other standard communication networks, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0141] In an exemplary embodiment, the terminal device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned embodiments of the present invention. Figure 2-Figure 7 The method provided in any one of the corresponding embodiments.

[0142] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of a terminal device 800 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0143] The embodiment of the present application also provides a non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the terminal device, the terminal device 800 can execute the above-mentioned present application Figure 2-Figure 7 The method provided in any one of the corresponding embodiments.

[0144] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0145] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0146] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for generating data indicators, characterized in that: The method comprises: Receive indicator request information, where the indicator request information is used to represent a target indicator and a statistical interval corresponding to the target indicator; Divide the statistical interval into at least one subinterval, each of the subintervals corresponds to a group of combined data with different basic data amounts, wherein the combined data is composed of basic data, the basic data amount represents the amount of basic data in the combined data, and the combined data corresponding to at least one subinterval is cached in a preset position; Acquire the combined data corresponding to each of the sub-intervals, and generate the target indicator based on each of the combined data; The indicator request information includes a start time point and an end time point, the sub-interval includes a combined interval, and the statistical interval is divided into at least one sub-interval, including: Determine, according to the starting time point and the ending time point, time span information of the statistical interval, wherein the time span information is used to represent the number of first time periods and the number of second time periods included in the statistical interval; Determine, according to the time span information, at least one combined interval within the statistical interval, wherein the combined interval includes at least one first time period, or at least one second time period; Wherein, the first time period is annual, and the second time period is monthly; The generating the target indicator based on each of the combined data includes: Acquire indicator information, where the indicator information is used to characterize the calculation logic for generating the target indicator based on the basic indicator; Based on the time sequence corresponding to each of the combined data, the combined data corresponding to each of the sub-intervals are processed in sequence by a preset basic calculation rule to generate a basic indicator corresponding to each of the sub-intervals; According to the indicator information, the basic indicator corresponding to each of the sub-intervals is calculated to generate a target indicator.

2. The method according to claim 1, characterized in that Determining the time span information of the statistical interval according to the starting time point and the ending time point includes: Obtain a first number of a first time period between the start time point and the end time point, and if the first number is equal to 0, obtain a second number of a second time period between the start time point and the end time point; If the first number is greater than 0, a remaining interval is determined, and the number of second time periods in the remaining interval is obtained, wherein the remaining interval is an interval between the start time point and the end time point excluding each of the first time periods.

3. The method according to claim 1, characterized in that: Determining at least one combination interval within the statistical interval according to the time span information includes: According to the time span information, if the statistical interval includes at least one first time period and at least one second time period, first determine the position of each of the first time periods in the statistical interval, and then determine the position of the second time period from the remaining interval; If the statistical interval only includes the first time period or the second time period, the position of each of the first time period or the second time period in the statistical interval is determined.

4. The method according to claim 1, characterized in that: The sub-interval also includes a non-combined interval, and after determining the combined interval within the statistical interval, further includes: Acquire combined interval positioning information, where the combined interval positioning information represents the starting position and the ending position of the interval set formed by each of the combined intervals; Determine a non-combined interval according to the starting time point, the ending time point and the combined interval positioning information; The basic data volume of the combined data corresponding to the non-combined interval is smaller than the basic data volume of the combined data corresponding to the combined interval.

5. The method according to claim 4, characterized in that Determining a non-combined interval according to the starting time point, the ending time point and the combined interval positioning information includes: If the starting position of the interval set does not coincide with the starting time point, the starting time point to the starting position of the interval set is determined as a first non-combined interval; if the ending position of the interval set does not coincide with the ending time point, the ending position of the interval set to the ending time point is determined as a second non-combined interval; The non-combined interval is determined according to the first non-combined interval and / or the second non-combined interval.

6. The method according to claim 1, characterized in that The basic calculation rules include at least one of the following: Mean calculation, the mean calculation is used to perform weighted averaging on the average values ​​of the combined data corresponding to each of the sub-intervals based on a weight coefficient, wherein the weight coefficient is determined by the amount of basic data corresponding to each of the sub-intervals; Variance calculation, the variance calculation is used to calculate the sum of the weighted average of the sub-interval variance and the weighted average of the sub-interval mean deviation based on the weight coefficient; the weight coefficient is determined by the amount of basic data corresponding to each of the sub-intervals; Covariance calculation, wherein the combined data includes the first sub-data and the second sub-data; the covariance calculation is used to calculate the sum of the first parameter, the second parameter, and the difference with the third parameter based on the weight coefficient; wherein the first parameter is used to calculate the weighted average of the covariances of the first sub-data and the second sub-data corresponding to each of the sub-intervals; the second parameter is used to calculate the weighted average of the mean product of the first sub-data and the second sub-data corresponding to each of the sub-intervals; the third parameter is used to calculate the quotient of the mean product of the first sub-data and the second sub-data corresponding to each of the sub-intervals and the sum of the basic data amounts of each of the sub-intervals.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Indicator information is generated according to the configuration information uploaded by the user, and the indicator information is used to characterize the calculation logic for generating the target indicator based on the basic indicator.

8. The method according to any one of claims 1 to 6, characterized in that: After generating the target indicator, the method further includes: Output the target indicator and dependency information corresponding to the target indicator, where the dependency information is used to represent at least one of the following: The data used to generate the target indicator, the basic indicator value used to generate the target indicator, and the calculation logic for generating the target indicator based on the basic indicator.

9. A data indicator generating device, characterized in that: include: A receiving module, used to receive indicator request information, where the indicator request information is used to represent a target indicator and a statistical interval corresponding to the target indicator; a partitioning module, configured to divide the statistical interval into at least one subinterval, each of the subintervals corresponding to a group of combined data with a different amount of basic data, wherein the combined data is composed of basic data, the amount of basic data represents the amount of basic data in the combined data, and the combined data corresponding to at least one subinterval is cached in a preset position; A generating module, used for acquiring the combined data corresponding to each of the sub-intervals, and generating the target indicator based on each of the combined data; The indicator request information includes a start time point and an end time point, the sub-interval includes a combined interval, and the division module is specifically used to: Determine, according to the starting time point and the ending time point, time span information of the statistical interval, wherein the time span information is used to represent the number of first time periods and the number of second time periods included in the statistical interval; Determine, according to the time span information, at least one combined interval within the statistical interval, wherein the combined interval includes at least one first time period, or at least one second time period; Wherein, the first time period is annual, and the second time period is monthly; The generation module is specifically used for: Acquire indicator information, where the indicator information is used to characterize the calculation logic for generating the target indicator based on the basic indicator; Based on the time sequence corresponding to each of the combined data, the combined data corresponding to each of the sub-intervals are processed in sequence by a preset basic calculation rule to generate a basic indicator corresponding to each of the sub-intervals; According to the indicator information, the basic indicator corresponding to each of the sub-intervals is calculated to generate a target indicator.

10. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the data indicator generation method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, which, when executed by a processor, implements the data indicator generation method according to any one of claims 1 to 8.