Multi-threaded dynamic report statistics method
Through the multi-threaded statistical algorithm engine, multi-dimensional grouping and combination conditions are configured in the browser to conduct concurrent database queries, solving the problem of slow response when single-threaded dynamic reports dealing with complex query conditions, and realizing fast query and precise statistics of dynamic reports.
Patent Information
- Application Number
- CN202111289843.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-02
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-11-02
AI Technical Summary
When single-threaded dynamic reports deal with complex query conditions and large amounts of data, they cause slow response or timeout, and cannot quickly obtain query results for dynamic reports.
The multi-threaded statistical algorithm engine is used to conduct concurrent query of the data in the database. By configuring multi-dimensional grouping and combination conditions in the browser, multiple execution threads are generated to match the combination conditions in the database, and dynamic report data are quickly obtained and output.
It realizes fast query and precise statistics of dynamic reports, improves data query efficiency, and avoids the problem of slow response or timeout.
Smart Images

Figure CN114003639B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to an industrial Internet of Things service field, and specifically relates to a multi-threaded dynamic report statistics method. Background Art
[0002] With the rise of enterprise information system integration, enterprises have a growing demand for data report statistics. Dynamic reports, as an important information carrier, play an important role in data statistics. Therefore, how to efficiently and quickly obtain query results of dynamic reports is the key to data report statistics.
[0003] At present, in the application scenarios of dynamic reports, single-threaded dynamic reports are usually used to query and count data. Because when a single-threaded program is executed, the program path is run continuously in a sorted order, and the single-threaded program will only continue to run when the previous data is queried. Therefore, it takes a long time for a single-threaded dynamic report to process data. In addition, the query conditions of dynamic reports are relatively complex and the amount of calculation is relatively large. Single-threaded dynamic reports cannot quickly and accurately query the required report data. Therefore, when the amount of data to be counted is too large, querying data in a single-threaded query mode will result in slow response or timeout, resulting in the inability to quickly query data to obtain the results of the dynamic report. Summary of the invention
[0004] The present disclosure is proposed in view of the above-mentioned state of the prior art, and its purpose is to provide a statistical method that can quickly obtain query results of dynamic reports.
[0005] To this end, the first aspect of the present disclosure provides a multi-threaded dynamic report statistics method, which is a statistical method that uses a multi-threaded statistical algorithm engine to query data in a database and output a dynamic report to perform statistics on the data. The statistical method includes: based on user needs, configuring a first grouping and a second grouping having multiple dimensions and related to report statistical conditions, and a third grouping having multiple dimensions and related to report statistical targets in a browser to define the dynamic report, sending the definition of the dynamic report to a report platform having a multi-threaded statistical algorithm engine, the report platform receiving the definition of the dynamic report to obtain configuration information of the dynamic report, the multi-threaded statistical algorithm engine obtains the first grouping, the second grouping, and the third grouping by reading the configuration information, cross-combining the first grouping, the second grouping, and the third grouping to obtain multiple combination conditions, obtaining a cell matrix having multiple cells based on the multiple combination conditions, the cells in the cell matrix corresponding to the combination conditions one by one, the multi-threaded statistical algorithm engine creating multiple execution threads based on the multiple combination conditions, uniformly scheduling the multiple execution threads to query the data matching the multiple combination conditions in the database and input the data into the cell matrix, and the report platform outputs the dynamic report based on the cell matrix and sends it to the browser.
[0006] In the statistical method involved in the present disclosure, firstly, the first grouping, the second grouping, and the calculation items are configured in the browser based on user needs to define the dynamic report; then the report platform obtains the configuration information of the dynamic report based on the definition of the dynamic report, the multi-threaded statistical algorithm engine obtains the first grouping, the second grouping, and the calculation items based on the above configuration information and cross-combines the above first grouping, the second grouping, and the calculation items to obtain multiple combination conditions, and obtains a cell matrix with multiple cells corresponding to the multiple combination conditions based on the above combination conditions; then the multi-threaded statistical algorithm engine creates an execution thread for each cell, uniformly schedules the execution threads of each cell to obtain data matching the multiple combination conditions and inputs the data into the cell matrix; finally, the report platform outputs the dynamic report based on the cell matrix and sends it to the browser. In this case, the multi-threaded statistical algorithm engine can obtain multiple combination conditions based on the report configuration information and then obtain cells one by one, and creates an execution thread for each cell, and concurrently retrieves the data matching each combination condition from the database using a multi-threaded query method, while accurately querying the required data, it can also quickly obtain the query results of the dynamic report.
[0007] In addition, in the statistical method involved in the present disclosure, optionally, defining the dynamic report also includes configuring the data range of the dynamic report, and the query method of the data range includes equal query, not equal query, empty query and not empty query. In this case, the user can directly define the required data range according to the configuration in the browser.
[0008] In addition, in the statistical method involved in the present disclosure, optionally, defining the dynamic report also includes configuring basic information of the dynamic report, and the basic information includes the report name, function, group, report description, and editor. In this case, by configuring the basic information of the dynamic report, various aspects of the dynamic report can be improved, reflecting the integrity of the dynamic report. In some examples, defining the dynamic report can also include configuring the dynamic report data range and basic information in the browser.
[0009] In addition, in the statistical method involved in the present disclosure, optionally, the browser sends the definition of the dynamic report to the report platform via the Hypertext Transfer Protocol or the Hypertext Transfer Protocol Secure. In this case, the data containing the definition of the dynamic report can be correctly sent to the report platform, while maintaining the integrity and security of the data.
[0010] In addition, in the statistical method involved in the present disclosure, optionally, the first group includes multiple levels of first sub-groups, and the subject of each level of the first sub-groups in the multiple levels of first sub-groups is any one of business type, competitor information, procurement intention, existing equipment status, project difficulties, business opportunity level, business opportunity status, and enterprise scale. In this case, the user can define a dynamic report including multiple levels of first sub-groups based on various requirements, thereby achieving configuration flexibility of the dynamic report.
[0011] In addition, in the statistical method involved in the present disclosure, optionally, the second grouping includes multiple levels of second sub-groupings, and the subject of each level of the second sub-groupings in the multiple levels of second sub-groupings is any one of province, city, district, follow-up person, and affiliated department. In this case, the user can define a dynamic report including multiple levels of second sub-groupings based on various requirements, thereby achieving configuration flexibility of the dynamic report.
[0012] In addition, in the statistical method involved in the present disclosure, optionally, the third grouping includes multiple levels of third sub-groupings, and the subject of each level of the third sub-groupings in the multiple levels of the third sub-groupings is any one of company name, follow-up person and expected sales amount. In this case, the data can be statistically analyzed in multiple ways according to the configured third groupings.
[0013] In addition, in the statistical method involved in the present disclosure, optionally, it also includes performing statistics on the third sub-groups at each level, and the calculation types of the third sub-groups at each level include summary, average, count deduplication, and count without deduplication. In this case, the user can select different or the same calculation types for the third sub-groups at each level based on statistical requirements to output dynamic reports of multiple statistical states.
[0014] In addition, in the statistical method involved in the present disclosure, optionally, it also includes formatting data, the multi-threaded statistical algorithm engine uniformly schedules the multiple execution threads to query the data in the database that matches the multiple combination conditions, and formats the data before inputting the data into the cell matrix. In this case, the output data format can be unified, and the user can clearly view the retrieved data.
[0015] In addition, in the statistical method involved in the present disclosure, the report platform optionally includes a data processing module and a data organization module, the multi-threaded statistical algorithm engine reads the configuration information by calling a function and processes the configuration information in the data processing module to obtain the multiple combination conditions, generates a language for interacting with the database based on the multiple combination conditions and sends it to the data organization module, the data organization module interacts with the underlying data storage in the database, and returns the query results to the data processing module, and the multi-threaded statistical algorithm engine inputs the data into the cell matrix. In this case, the configuration information of the dynamic report can be processed to obtain multiple combination conditions, and then the required data based on the configuration information can be multi-threaded to improve data query efficiency.
[0016] According to the multi-threaded dynamic report statistics method disclosed in the present invention, a multi-threaded dynamic report statistics method can be provided, which processes the configuration information of the dynamic report through a multi-threaded statistics algorithm engine and then can perform concurrent queries on the required data to quickly obtain the query results of the dynamic report. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present disclosure will now be explained in further detail by way of example only with reference to the accompanying drawings, in which:
[0018] Figure 1 is a data flow diagram illustrating the data flow involved in the examples of the present disclosure.
[0019] Figure 2 It is a schematic diagram showing the definition of a dynamic report involved in the example of the present disclosure.
[0020] Figure 3 The figure shows the output effect of the definition of the dynamic report involved in the example of the present disclosure.
[0021] Figure 4 is a schematic diagram showing the scope of configuration data involved in the example of the present disclosure.
[0022] Figure 5 is a module diagram showing a reporting platform involved in the examples of the present disclosure.
[0023] Figure 6 is a schematic diagram showing a statistical method involved in the examples of the present disclosure. DETAILED DESCRIPTION
[0024] Hereinafter, the preferred embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In the following description, the same symbols are assigned to the same components, and repeated descriptions are omitted. In addition, the accompanying drawings are only schematic diagrams, and the ratio of the dimensions of the components or the shapes of the components may be different from the actual ones.
[0025] It should be noted that the terms "including" and "having" and any variations thereof in the present disclosure, such as a process, method, system, product or device that includes or has a series of steps or units, are not necessarily limited to those steps or units clearly listed, but may include or have other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] In addition, the subheadings and the like involved in the following description of the present disclosure are not intended to limit the content or scope of the present disclosure, but are merely used as a reminder for reading. Such subheadings should neither be understood as being used to divide the content of the article, nor should the content under the subheading be limited to the scope of the subheading.
[0027] The present disclosure provides a multi-threaded dynamic report statistical method, which is a statistical method that uses a multi-threaded statistical algorithm engine to query data in a database and output dynamic reports to perform statistics on the data.
[0028] In some examples, the statistical method may include: configuring a first grouping and a second grouping having multiple dimensions and related to a report statistical condition, and a third grouping having multiple dimensions and related to a report statistical target in a browser based on user needs to define a dynamic report, and sending the definition of the dynamic report to a report platform having a multi-threaded statistical algorithm engine. In this case, the report platform can receive the definition of the dynamic report configured based on user needs.
[0029] In some examples, the report platform can receive a motion of a dynamic report to obtain configuration information of the dynamic report. In some examples, the multi-threaded statistical algorithm engine can obtain the first grouping, the second grouping, and the third grouping by reading the configuration information, and can cross-combine the first grouping, the second grouping, and the third grouping to obtain a plurality of combination conditions, and can obtain a cell matrix having a plurality of cells based on the plurality of combination conditions, wherein the cells in the cell matrix correspond to the combination conditions one by one. In this case, processing the configuration information based on the multi-threaded statistical algorithm engine can obtain a cell matrix having a plurality of cells.
[0030] In some examples, the multi-threaded statistical algorithm engine can create multiple execution threads based on multiple combination conditions, and can uniformly schedule multiple execution threads to query the data in the database that matches the multiple combination conditions and input the data into the cell matrix. In some examples, the reporting platform can output dynamic reports based on the cell matrix and send them to the browser. In this case, the multi-threaded statistical algorithm engine concurrently queries the data in the database based on the execution threads of multiple cells to output the results of the dynamic report, and can quickly obtain the query results of the dynamic report while accurately querying the required data.
[0031] The present embodiment relates to a multi-threaded dynamic report statistical method, which is a statistical method that uses a multi-threaded statistical algorithm engine to query data in a database and output dynamic reports to perform statistics on the data, and is sometimes referred to as a statistical method below. Through the statistical method involved in this embodiment, a matrix cell with multiple cells can be obtained, and then the multi-threaded statistical algorithm engine is used to concurrently query the data in the database to quickly obtain the query results of the dynamic report. Below, in conjunction with the accompanying drawings, the multi-threaded dynamic report statistical method involved in this embodiment is specifically described.
[0032] Figure 1 is a data flow diagram illustrating the data flow involved in the examples of the present disclosure.
[0033] like Figure 1 As shown, in some examples, the user 10 can define a dynamic report based on the browser 20, and then send the definition of the dynamic report to the report platform 30. In some examples, the report platform 30 can query the database 40 based on the statistical algorithm engine to obtain a report interface, and return the report interface to the user 10.
[0034] In some examples, the statistical algorithm engine can be used to query the data in the database 40 and output dynamic reports to perform statistics on the data. In some examples, the statistical algorithm engine can be a multi-threaded statistical algorithm engine. In this case, multiple query tasks can be executed simultaneously to quickly obtain query results for the required data.
[0035] In the statistical method involved in this embodiment, dynamic reports can be defined in the browser 20. Specifically, dynamic reports can be defined in the page of the browser 20. In some examples, dynamic reports can be defined based on user needs. For example, user needs can include financial conditions, sales conditions, expected sales conditions, business conditions, employee adjustments, etc. for each month, quarter, or year. When the user 10 needs to obtain a dynamic report under certain circumstances, the corresponding report information can be configured in the browser 20. In some examples, dynamic reports can also be defined based on a single dimension or multiple dimensions in dimensions such as scale, region, product, and quarter. In this case, the dynamic report required by the user 10 can be obtained through configuration.
[0036] In some examples, defining a dynamic report may include configuring a first group, a second group, and a third group of the dynamic report. In some examples, the first group may have multiple dimensions, the second group may have multiple dimensions, and the third group may also have multiple dimensions. In some examples, the first group may be related to a report statistical condition, and the second group may also be related to a report statistical condition. In some examples, the third group may be related to a report statistical target. In some examples, the first group and the second group may have multiple dimensions and be related to the report statistical condition, and the third group may have multiple dimensions and be related to the report statistical target. This embodiment implements the definition of a dynamic report by specifically configuring the first group, the second group, and the third group.
[0037] In some examples, the first group and the second group can be independent groups in the dynamic report, that is, the first group and the second group can be freely combined. For example, in some examples, the first group can be used as a row group of the dynamic report, and the second group can be used as a column group of the dynamic report. In some examples, the first group can include multiple levels of first sub-groups, for example, it can include a first-level first sub-group, a second-level first sub-group, a third-level first sub-group, and a fourth-level first sub-group. In some examples, the hierarchical structure of the multi-level first sub-groups can be progressive in sequence. Specifically, the second-level first sub-group can be a further subdivision of the first-level first sub-group, and other multi-level first sub-groups can also be deduced according to this rule.
[0038] Figure 2 It is a schematic diagram showing the definition of a dynamic report involved in the example of the present disclosure. Figure 3 The figure shows the output effect of the definition of the dynamic report involved in the example of the present disclosure.
[0039] In some examples, for example, a user requirement may be to obtain the distribution of business opportunities in each region. In some examples, the first group may include multiple levels of first subgroups, and the subject of each level of the first subgroups in the multiple levels of first subgroups may be any one of business type, competitor information, procurement intention, existing equipment status, project difficulties, business opportunity level, business opportunity status, and enterprise scale. In this case, the user 10 may define a dynamic report including multiple levels of first subgroups based on multiple requirements, thereby achieving configuration flexibility of the dynamic report.
[0040] like Figure 2 As shown, in some examples, if the first group includes a first-level first sub-group, a second-level first sub-group, and a third-level first sub-group, the first-level first sub-group may be a business opportunity level, the second-level first sub-group may be a business opportunity status, and the third-level first sub-group may be an enterprise scale. When forming a dynamic report, the dynamic report may be grouped by business opportunity level first, then grouped by business opportunity status in groups of different business opportunity levels, and then grouped by enterprise scale in groups of different business opportunity statuses. In this case, the hierarchical structure of the multi-level sub-groups can be achieved in a sequentially progressive effect.
[0041] like Figure 3 As shown, in some examples, the specific content of the first level first subgroup may include at least two categories A and B, the specific content of the second level first subgroup may include at least one category a, and the specific content of the third level first subgroup may include at least two categories x and y.
[0042] In some examples, the specific contents of the first subgroups at each level may be sorted, for example, the specific contents of the first subgroups at each level may be arranged in ascending or descending order. In this case, after the dynamic report is output, the user 10 can quickly browse the required data according to the sorting rules.
[0043] In some examples, as described above, the second grouping may be a column grouping of a dynamic report. In some examples, the second grouping may include multiple levels of second subgroupings like the first grouping, and the relationship between the second subgroupings at each level is the same as that of the first subgroupings at each level, which will not be described in detail here.
[0044] In some examples, the second group may include multiple levels of second sub-groups, and the subject of each level of the second sub-groups in the multiple levels of second sub-groups may be any one of provinces, cities, districts, follow-up persons, and affiliated departments. In this case, the user 10 may define a dynamic report including multiple levels of second sub-groups based on a variety of requirements, thereby achieving flexibility in configuring the dynamic report.
[0045] In some examples, if the second group includes a first-level second sub-group and a second-level second sub-group, the first-level second sub-group may be a province, city, and district, and the second-level second sub-group may be a subordinate department. And the specific contents included in the second sub-groups at each level may be arranged in ascending or descending order. In some examples, the dynamic report may include multiple groups of first-level second sub-groups, and may include multiple groups of second-level second sub-groups, for example, multiple groups of first-level second sub-groups may include multiple provinces, cities, and districts. Thus, target data of multiple regions can be counted based on the dynamic report. When forming a dynamic report, the dynamic report may be grouped according to provinces, cities, and districts first, and then grouped according to subordinate departments in the groups of different provinces, cities, and districts. In this case, the hierarchical structure of the multi-level sub-groups can be realized as a sequentially progressive effect, and after outputting the dynamic report, the user 10 can also quickly browse the required data according to the sorting rules.
[0046] In some examples, the subject of each level of the second subgrouping in the multi-level second subgrouping may also be any one of date-month, last follow-up time-year, creation time-year, discovery date-year, creation time-month, and last edited time-day.
[0047] In the statistical method involved in this embodiment, the third grouping may be a calculation item of a dynamic report. Figure 2 As shown, in some examples, the third grouping may include multiple levels of third sub-groupings, and the subject of each level of the third sub-groupings in the multiple levels of the third sub-groupings may be any one of company name, follow-up person, and expected sales amount. In some examples, the data involved in the dynamic report may be counted according to the subject of the calculation item. In this case, the data may be counted in a variety of ways according to the configured third grouping.
[0048] See also Figure 3 In some examples, the third grouping can be reflected in the dynamic report as an additional row grouping or column grouping. For example, after the report is formed by row grouping and column grouping, the first subgrouping or the second subgrouping can be grouped again according to the theme of the third grouping.
[0049] In some examples, the first-level third subgroup can be configured as the company name, the second-level third subgroup can be configured as the follow-up person, and the third-level third subgroup can be configured as the expected sales amount. In some examples, the statistics of the dynamic report can include statistics on the data of the third subgroups at all levels, and the calculation types of the third subgroups at all levels can include summary, average, count deduplication, and count without deduplication. In this case, the user 10 can select different or the same calculation types for the third subgroups at all levels based on statistical requirements to output dynamic reports of multiple statistical states.
[0050] Figure 4 is a schematic diagram showing the scope of configuration data involved in the example of the present disclosure.
[0051] In some examples, defining a dynamic report may further include configuring the data range of the dynamic report in the browser 20. In some examples, the subject of the data range may include at least one of the department, opportunity status, company name, follow-up person, province, city, district, department, opportunity name, currency, and enterprise size. In some examples, the query method of the data range may include equal query, not equal query, empty query, and not empty query. For example, the query method of a single data range may be configured as "the department queries the sales department with the query method of 'equal to'". In this case, the user 10 can directly define the required data range in the browser 20 according to the configuration.
[0052] In some examples, defining a dynamic report may further include configuring basic information of the dynamic report in the browser 20, and the basic information may include the report name, function, group, report description, and editor. In this case, by configuring the basic information of the dynamic report, various aspects of the dynamic report can be improved, reflecting the integrity of the dynamic report. In some examples, defining a dynamic report may further include configuring the data range and basic information of the dynamic report in the browser 20.
[0053] In some examples, the basic information may also include a viewer. When configuring the basic information of a dynamic report, the output dynamic report may be encrypted and limited by setting the viewer. In some examples, setting the viewer may facilitate viewing of the dynamic report.
[0054] In the statistical method involved in this embodiment, after the dynamic report is defined in the browser 20, the definition of the dynamic report can be sent to the report platform 30. In this case, the report platform 30 can receive the definition of the dynamic report and process it. In some examples, the report platform 30 can have a statistical algorithm engine. In some examples, the statistical algorithm engine can be a multi-threaded statistical algorithm engine. Thus, the report platform 30 can process the definition of the dynamic report based on the multi-threaded statistical algorithm.
[0055] Figure 5 is a module diagram showing a report platform 30 involved in the example of the present disclosure.
[0056] In some examples, the report platform 30 may include a data analysis module 31. In some examples, upon receiving the definition of a dynamic report, the data analysis module 31 may load and analyze the configuration information of the dynamic report according to a pre-configuration, and may also obtain a database 40 requested by the dynamic report.
[0057] In some examples, the browser 20 can send the definition of the dynamic report to the report platform 30 via the Hypertext Transfer Protocol (HTTP) or the Hypertext Transfer Protocol Secure (HTTPS). In this case, the data containing the definition of the dynamic report can be correctly sent to the report platform 30 while maintaining the integrity and security of the data.
[0058] In some examples, the definition of a dynamic report may include configuring a first group, a second group, and a third group of the dynamic report. In other examples, the definition of a dynamic report may include configuring a first group, a second group, a third group, a data range, and basic information of the dynamic report.
[0059] In the statistical method involved in this embodiment, the report platform 30 can receive the definition of the dynamic report to obtain the configuration information of the dynamic report. The module that receives the definition of the dynamic report can be the data analysis module 31. Specifically, in some examples, after receiving the definition of the dynamic report, the data analysis module 31 can load and analyze the definition of the dynamic report to obtain the configuration information of the dynamic report.
[0060] In the statistical method involved in this embodiment, the multi-threaded statistical algorithm engine can obtain the cell matrix by reading the configuration information.
[0061] In some examples, the reporting platform 30 may also include a data processing module 32 and a data organization module 33. In some examples, the multi-threaded statistical algorithm engine can read the configuration information by calling a function and process the configuration information in the data processing module 32 to obtain multiple combination conditions. In some examples, a language that interacts with the database 40 can be generated based on multiple combination conditions and sent to the data organization module 33. The data organization module 33 can interact with the underlying data storage in the database 40 and return the query results to the data processing module 32. In some examples, the multi-threaded statistical algorithm engine can input data into a cell matrix. In this case, the configuration information of the dynamic report can be processed to obtain multiple combination conditions, and then the required data based on the configuration information can be multi-threaded to improve data query efficiency.
[0062] In some examples, the multithreaded statistical algorithm engine can obtain the contents of the first group, the second group, and the third group by reading the configuration information. Then the multithreaded statistical algorithm engine processes the first group, the second group, and the third group in the data processing module 32 to obtain multiple combination conditions. In some examples, the multithreaded statistical algorithm engine can process the first group and the second group to obtain multiple combination conditions. In some examples, the multithreaded statistical algorithm engine can process the first group and the third group to obtain multiple combination conditions. In some examples, the multithreaded statistical algorithm engine can process the second group and the third group to obtain multiple combination conditions. For example, the combination condition can be: the business opportunity level in the first group, the follow-up person in the third group. The combination condition can also be the business opportunity level in the first group, the enterprise scale in the first group, the department and province, city and district in the second group, and the estimated sales amount in the third group. In this case, different combination conditions can be obtained based on different group combinations, and the content of the third group can be calculated based on the content of the first group and the second group, and the content (value) of the third group is used as the result corresponding to the combination condition.
[0063] In some examples, the specific behavior of processing multiple groups of the dynamic report can be to cross-combine the multiple groups. Specifically, at least one first sub-group in the first group can form a combination condition with at least one second sub-group in the second group and at least one third sub-group in the third group. Thus, multiple combination conditions can be obtained. In some examples, the multi-threaded statistical algorithm engine can also obtain multiple combination conditions by cross-combining the first group, the second group, the third group, and the data range in the data processing module 32.
[0064] In some examples, a cell matrix can be obtained based on multiple combination conditions. In some examples, a cell matrix obtained based on multiple combination conditions can have multiple cells. In some examples, the cells in the cell matrix and the combination conditions can correspond one to one. In this case, cells can be obtained one by one based on multiple combination conditions.
[0065] In addition, in this embodiment, in the data processing module 32, the multi-threaded statistical algorithm engine can create multiple execution threads based on multiple combination conditions, and under the condition that the cells in the cell matrix correspond to the combination conditions one by one, the multiple execution threads can also correspond to the multiple cells one by one. Thus, the multiple execution threads can execute query tasks for multiple cells.
[0066] In some examples, the multiple execution threads may be multiple query statements for querying corresponding data for multiple cells. In some examples, the query statements may interact with the database 40. Thus, based on multiple query statements, data can be accurately queried, and one query statement querying the data of one cell can reduce the condition granularity to a minimum.
[0067] In some examples, multiple execution statements may be sent to the data organization module 33. In some examples, the multi-threaded statistical algorithm engine may uniformly schedule the above-mentioned multiple execution threads to query data in the database 40 via the data organization module 33. Specifically, in some examples, one execution thread may correspond to a matching data in the database 40, and the multi-threaded statistical algorithm engine may uniformly schedule multiple execution threads to query the data in the database 40 that matches multiple combination conditions and input the data into the cell matrix. In this case, by adopting a multi-threaded query method, each execution thread can run independently without interfering with each other, thereby realizing unified processing of the execution threads, improving the efficiency of report query, and laying the foundation for quickly obtaining query results of dynamic reports.
[0068] In some examples, the statistical method involved in the present embodiment may also include formatting data. In some examples, the multi-threaded statistical algorithm engine can uniformly schedule multiple execution threads to query the data that matches multiple combination conditions in the database 40, and can format the data before inputting the data into the cell matrix. In this case, the data format of the output can be unified, and the user 10 can clearly consult the retrieved data. In some examples, the formatting of the data can be to convert binary data into decimal data. In some examples, the formatting of the data can be to output a variety of data in a unified format. In some examples, the multi-threaded statistical algorithm engine can first input the data into the cell matrix, and the reporting platform formats the retrieved data.
[0069] In addition, in the statistical method involved in the present embodiment, the output dynamic report is also sent to the browser 20. In some examples, the multi-threaded statistical algorithm engine can input the data obtained by the query into the cell matrix, and can process the data based on the configuration information of the dynamic report. For example, the data of the dynamic report can be aggregated. In some examples, the data of the first group and / or the second group can be aggregated. In some examples, the data of the first group and / or the second group can be aggregated, including the data of the first sub-group of the first level, the data of the first sub-group of the second level, the data of the first sub-group of the third level, the data of the second sub-group of the first level, and the data of the second sub-group of the second level. In some examples, it also includes totaling the data that has been aggregated. In this case, a complete report basis can be obtained in advance on the report platform 30 to output to the browser 20. In some examples, the data of the first group and / or the second group can also be averaged.
[0070] In some examples, the report platform 30 can process data based on the cell matrix and output a dynamic report, and the output dynamic report can be sent to the browser 20 via the hypertext transfer protocol or the hypertext transfer protocol secure. In this case, the dynamic report sent to the browser 20 can be used by the user 10 to intuitively obtain data queried according to the configuration conditions. In some examples, the dynamic report sent to the browser 20 can be directly presented in the browser 20 in a table form. In some examples, the output dynamic report can be downloaded locally. As a result, the user 10 can conveniently view the dynamic report at any time and any place.
[0071] Figure 6 is a flow chart showing a statistical method involved in examples of the present disclosure.
[0072] In some examples, the statistical method involved in the present disclosure may include the following steps: defining a dynamic report (S100), obtaining configuration information of the dynamic report (S200), a multi-threaded statistical algorithm engine obtaining multiple combination conditions based on the configuration information (S300), a multi-threaded statistical algorithm engine creating multiple execution threads and uniformly scheduling multiple execution threads to retrieve data matching the multiple combination conditions (S400), and sending the dynamic report to the browser 20 (S500).
[0073] In some examples, in step S100, a dynamic report may be defined. In some examples, the definition of the dynamic report may include configuring a first group, a second group, and a third group. In some examples, the first group and the second group may have multiple dimensions and be related to the report statistical conditions, and the third group may have multiple dimensions and be related to the report statistical target. In some examples, defining the dynamic report may also include configuring a data range, that is, defining the dynamic report by configuring the first group, the second group, the third group, and the data range. In other examples, basic information of configuring the dynamic report may also be included.
[0074] In addition, in some examples, after completing the definition of the dynamic report, the browser 20 can send the definition of the dynamic report to the report platform 30 having a multi-threaded statistical algorithm engine via HTTP / HTTPS.
[0075] In some examples, in step S200, configuration information of the dynamic report may be obtained. In some examples, the report platform 30 may load and parse the definition of the dynamic report to obtain the configuration information of the dynamic report.
[0076] In some examples, in step S300, the multi-threaded statistical algorithm engine can obtain multiple combination conditions based on the configuration information. In some examples, the multi-threaded statistical algorithm engine can obtain the first grouping, the second grouping, and the third grouping by reading the configuration information, and cross-combining the first grouping, the second grouping, and the third grouping can obtain multiple combination conditions. In some examples, the multi-threaded statistical algorithm engine can obtain a cell matrix with multiple cells based on the multiple combination conditions, wherein the cells in the cell matrix correspond to the combination conditions one by one.
[0077] In other examples, the multi-threaded statistical algorithm engine may obtain a plurality of combination conditions based on the first grouping, the second grouping, the third grouping, and the data range, and obtain a cell matrix having a plurality of cells based on the plurality of combination conditions.
[0078] In some examples, in step S400, the multi-threaded statistical algorithm engine may create multiple execution threads and uniformly schedule the multiple execution threads to retrieve data matching multiple combination conditions. In some examples, the multi-threaded statistical algorithm may create multiple execution threads based on multiple combination conditions, and uniformly schedule the multiple execution threads to query the data matching the multiple combination conditions in the database 40. In some examples, the multi-threaded statistical algorithm engine may input the queried data into a cell matrix.
[0079] In some examples, in step S500, the dynamic report can be sent to the browser 20. In some examples, the report platform 30 can perform, for example, aggregation processing on the data in the cell matrix to output a dynamic report, and can send the dynamic report to the browser 20 for display.
[0080] In some examples, the statistical method involved in the present disclosure may also include formatting of data, and the formatting of data may be in step S400. In some examples, the formatting of data may be before the multi-threaded statistical algorithm engine can input the queried data into the cell matrix. For example, after the corresponding data is retrieved, the data may be formatted first and then input into the cell matrix. In other examples, the formatting of data may be in step S500, for example, the data is formatted before outputting the dynamic report. In some examples, the statistical method involved in the present disclosure may not include formatting of data.
[0081] According to the present disclosure, the multi-threaded statistical algorithm engine can obtain multiple combination conditions based on the report configuration information and then obtain cells one by one, and create an execution thread for each cell, and use a multi-threaded query method to concurrently query the data matching each combination condition in the database 40, while accurately querying the required data, it can also quickly obtain the query results of the dynamic report.
[0082] Although the present disclosure is specifically described above in conjunction with the accompanying drawings and examples, it is to be understood that the above description does not limit the present disclosure in any form. Those skilled in the art may modify and change the present disclosure as needed without departing from the essential spirit and scope of the present disclosure, and these modifications and changes all fall within the scope of the present disclosure.
Claims
1. A multi-threaded dynamic report statistics method, characterized in that: The invention discloses a statistical method for querying data in a database and outputting a dynamic report using a multi-threaded statistical algorithm engine to perform statistics on the data. The statistical method comprises: configuring a first grouping and a second grouping having multiple dimensions and related to report statistical conditions, and a third grouping having multiple dimensions and related to report statistical targets in a browser based on user needs to define the dynamic report, sending the definition of the dynamic report to a report platform having a multi-threaded statistical algorithm engine, the report platform receiving the definition of the dynamic report to obtain configuration information of the dynamic report, the multi-threaded statistical algorithm engine obtaining the first grouping, the second grouping, and the third grouping by reading the configuration information, cross-combining the first grouping, the second grouping, and the third grouping to obtain multiple combination conditions, obtaining a cell matrix having multiple cells based on the multiple combination conditions, the cells in the cell matrix corresponding to the combination conditions one by one, the multi-threaded statistical algorithm engine creating multiple execution threads based on the multiple combination conditions, uniformly scheduling the multiple execution threads to query the data matching the multiple combination conditions in the database and inputting the data into the cell matrix, and the report platform outputting the dynamic report based on the cell matrix and sending it to the browser.
2. The dynamic report statistics method according to claim 1, characterized in that: Defining the dynamic report also includes configuring the data range of the dynamic report, and the query methods of the data range include equal query, not equal query, empty query and not empty query.
3. The dynamic report statistics method according to claim 1, characterized in that: Defining the dynamic report also includes configuring basic information of the dynamic report, where the basic information includes a report name, a function, a group, a report description, and an editor.
4. The dynamic report statistics method according to claim 1, characterized in that: The browser sends the definition of the dynamic report to the report platform via Hypertext Transfer Protocol or Hypertext Transfer Protocol Secure.
5. The dynamic report statistics method according to claim 1, characterized in that: The first group includes multiple levels of first sub-groups, and the subject of each level of the first sub-groups in the multiple levels of the first sub-groups is any one of business type, competitor information, procurement intention, existing equipment status, project difficulties, business opportunity level, business opportunity status and enterprise scale.
6. The dynamic report statistics method according to claim 1, characterized in that: The second grouping includes multiple levels of second sub-groupings, and the theme of each level of the second sub-groupings in the multiple levels of second sub-groupings is any one of province, city, district, follow-up person, and affiliated department.
7. The dynamic report statistics method according to claim 1, characterized in that: The third grouping includes multiple levels of third sub-groupings, and the subject of each level of the third sub-groupings in the multiple levels of the third sub-groupings is any one of a company name, a follow-up person, and an estimated sales amount.
8. The dynamic report statistics method according to claim 7, characterized in that: It also includes counting the third subgroups at each level, and the calculation types of the third subgroups at each level include summary, average, count deduplication, and count without deduplication.
9. The dynamic report statistics method according to claim 1, characterized in that: It also includes formatting data, the multi-threaded statistical algorithm engine uniformly schedules the multiple execution threads to query the data matching the multiple combination conditions in the database, and formats the data before inputting the data into the cell matrix.
10. The dynamic report statistics method according to claim 1, characterized in that: The reporting platform includes a data processing module and a data organization module. The multi-threaded statistical algorithm engine reads the configuration information by calling a function and processes the configuration information in the data processing module to obtain the multiple combination conditions, generates a language for interacting with the database based on the multiple combination conditions and sends it to the data organization module, the data organization module interacts with the underlying data storage in the database, and returns the query results to the data processing module, and the multi-threaded statistical algorithm engine inputs the data into the cell matrix.
