CN117194498A - Data aggregation method and device, electronic equipment and storage medium - Google Patents

Data aggregation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117194498A
CN117194498A CN202311238399.2A CN202311238399A CN117194498A CN 117194498 A CN117194498 A CN 117194498A CN 202311238399 A CN202311238399 A CN 202311238399A CN 117194498 A CN117194498 A CN 117194498A
Authority
CN
China
Prior art keywords
dimension
query
data
sub
interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311238399.2A
Other languages
Chinese (zh)
Inventor
殷文宝
赵辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lianren Healthcare Big Data Technology Co Ltd
Original Assignee
Lianren Healthcare Big Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lianren Healthcare Big Data Technology Co Ltd filed Critical Lianren Healthcare Big Data Technology Co Ltd
Priority to CN202311238399.2A priority Critical patent/CN117194498A/en
Publication of CN117194498A publication Critical patent/CN117194498A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data aggregation method, a data aggregation device, electronic equipment and a storage medium. The method comprises the steps of receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimension includes a temporal dimension and a spatial dimension; acquiring a multi-layer storage model, and classifying and splitting the query dimension interval based on a storage layer of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; wherein the sub-query dimension interval is associated with the storage layer; inquiring in a corresponding storage layer based on the index dimension and the sub-inquiry dimension interval to obtain a data inquiry result; and aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension. The invention can reduce the time loss of data aggregation and ensure the real-time performance of retrieval.

Description

Data aggregation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data aggregation method, a data aggregation device, an electronic device, and a storage medium.
Background
After the medical data are subjected to convergence treatment and subject mining, the subject index information is generally required to be extracted for subsequent index presentation, operation and maintenance monitoring, supervision and early warning and other functions.
Currently, an index query interface aggregates data in a few dimensions, and the query granularity and the statistical granularity are consistent. However, in practical use, if the query range is large and the query granularity is larger than the statistical granularity, the data aggregation is very time-consuming, and the real-time requirement of index retrieval cannot be met.
Disclosure of Invention
The invention provides a data aggregation method, a data aggregation device, electronic equipment and a storage medium, which are used for reducing the time loss of data aggregation and ensuring the real-time performance of index retrieval.
According to an aspect of the present invention, there is provided a data aggregation method including:
receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimension includes a temporal dimension and a spatial dimension;
acquiring a multi-layer storage model, and classifying and splitting the query dimension interval based on a storage layer of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; wherein the sub-query dimension interval is associated with the storage layer;
inquiring in a corresponding storage layer based on the index dimension and the sub-inquiry dimension interval to obtain a data inquiry result;
and aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension.
According to another aspect of the present invention, there is provided a data aggregation apparatus including:
the query request receiving module is used for receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimension includes a temporal dimension and a spatial dimension;
the query dimension interval splitting module is used for acquiring a multi-layer storage model, and classifying and splitting the query dimension interval based on a storage layer of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; wherein the sub-query dimension interval is associated with the storage layer;
the query module is used for querying in the corresponding storage layer based on the index dimension and the sub-query dimension interval to obtain a data query result;
and the data aggregation module is used for aggregating the data query results of each sub-query dimension interval to obtain the data aggregation results corresponding to the index dimension.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data aggregation method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a data aggregation method according to any one of the embodiments of the present invention.
According to the technical scheme, the data query request is received, and the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimension includes a time dimension and a space dimension; acquiring a multi-layer storage model, and classifying and splitting the query dimension intervals based on the storage layers of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; inquiring in the corresponding storage layer based on the index dimension and the sub-inquiry dimension interval to obtain a data inquiry result; and aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension. The time loss of data aggregation can be reduced, and the real-time performance of retrieval is ensured.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data aggregation method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a data aggregation method according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a data aggregation method according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a data aggregation method according to a fourth embodiment of the present invention;
FIG. 5 is a flowchart of a data aggregation method according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data aggregation device according to a sixth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to a seventh embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a data aggregation method according to a first embodiment of the present invention, where the method may be implemented by a data aggregation device, and the data aggregation device may be implemented in hardware and/or software, and the data aggregation device may be configured in an electronic device for data aggregation. As shown in fig. 1, the method includes:
s110, receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimensions include a temporal dimension and a spatial dimension.
The index dimension refers to the dimension of the index information to be queried, and by taking the index information of the medical staff as an example, the index dimension includes but is not limited to the dimensions of organization codes, organization names, organization levels, job level codes and the like, and is not limited herein. The query dimension interval refers to a range interval of the queried dimension, specifically, the query dimension includes a time dimension and a space dimension, and correspondingly, the query dimension interval includes a time dimension interval and a space dimension interval.
For example, assuming that the user wants to query a certain index information of B1 town, B2 town, and B3 street in S city a region and B region 2001.1.6-2022.1.6, the space dimension interval is S city a region and B1 town, B2 town, and B3 street in B region, and the time dimension interval is 2001.1.6-2022.1.6.
S120, acquiring a multi-layer storage model, and classifying and splitting the query dimension interval based on a storage layer of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; wherein the sub-query dimension interval is associated with the storage layer.
The multi-layer storage model is a storage model comprising a plurality of storage layers with different levels, and the statistical spans corresponding to the storage layers are different. Optionally, the multi-layer storage model includes a plurality of storage layers with different levels, wherein the statistical span of the data wide tables in the upper storage layer is the sum of the statistical spans of the corresponding data wide tables in the lower storage layer. Specifically, the levels of the storage layers in the multi-layer storage model are sequentially reduced from top to bottom, the statistical spans corresponding to the storage layers are sequentially reduced along with the levels, and each storage layer stores a data wide table corresponding to the statistical spans, that is, the higher the level of the storage layer is, the larger the statistical spans of the data wide tables stored in the storage layer are. Illustratively, taking a time dimension as an example, the storage layers of the multi-layer storage model are an annual storage layer, a monthly storage layer and a daily storage layer in sequence from top to bottom. The system comprises a year storage layer, a month storage layer, a date storage layer and a date storage layer, wherein the year storage layer is used for storing a data wide table with a statistical span of years, the month storage layer is used for storing a data wide table with a statistical span of months, and the date storage layer is used for storing a data wide table with a statistical span of days; the data width tables with statistical spans of years in the annual storage layer are correspondingly stored with 12 data width tables with statistical spans of months in the monthly storage layer, and the data width tables with statistical spans of days of 365 are correspondingly stored in the daily storage layer; in the case of leap years, 366 data broad tables each having a statistical span of days are stored in the date storage layer.
On the basis of the foregoing embodiment, optionally, the data width table includes a snapshot field and an association index value field, where the snapshot field is used to store snapshot information, and the association index value field is used to associate the data width tables with the same index dimension in the same storage layer.
The snapshot information refers to the snapshot information of the stock data before the statistical time of the current data wide table, that is, before the current data wide table is counted, the stock data of each index dimension is recorded as the snapshot information of the current data wide table and stored in the snapshot field of the data wide table.
And S130, inquiring in a corresponding storage layer based on the index dimension and the sub-inquiry dimension interval to obtain a data inquiry result.
In this embodiment, the storage layer where the data wide table to be queried is located may be determined according to the association relationship between the sub-query dimension interval and the storage layer, and then the data wide table to be queried may be queried in the corresponding storage layer according to the index dimension, so as to obtain the data query result corresponding to the index dimension.
And S140, aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension.
In this embodiment, data query results of all sub-query dimension intervals are grouped and aggregated according to index dimensions, so as to obtain data aggregation results of all index dimensions in a complete query dimension interval. The data aggregation result refers to data of a certain index dimension in the query dimension interval.
According to the technical scheme, through receiving a data query request, the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimension includes a time dimension and a space dimension; acquiring a multi-layer storage model, and classifying and splitting the query dimension intervals based on the storage layers of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; inquiring in the corresponding storage layer based on the index dimension and the sub-inquiry dimension interval to obtain a data inquiry result; and aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension. The time loss of data aggregation can be reduced, and the real-time performance of retrieval is ensured.
Example two
Fig. 2 is a flowchart of a data aggregation method according to a second embodiment of the present invention. The embodiments of the present invention may be combined with the various alternatives in the above embodiments. In this embodiment, optionally, the splitting the query dimension section by the storage layer based on the multi-layer storage model to obtain a plurality of sub-query dimension sections includes: classifying and splitting the query dimension interval from top to bottom based on the statistical span of each level of storage layer in the multi-layer storage model to obtain a plurality of sub-query dimension intervals with different levels; wherein the statistical spans include spatial spans and temporal spans. As shown in fig. 2, the method includes:
s210, receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimensions include a temporal dimension and a spatial dimension.
S220, acquiring a multi-layer storage model, and classifying and splitting the query dimension interval from top to bottom based on the statistical spans of all levels of storage layers in the multi-layer storage model to obtain a plurality of sub-query dimension intervals with different levels; wherein the statistical spans include spatial spans and temporal spans.
Taking a time dimension as an example, assuming that a query dimension interval is 2001.1.6-2022.1.6, the storage layers of the multi-layer storage model are an annual storage layer, a monthly storage layer and a daily storage layer, and checking the query dimension interval according to the storage layers to obtain sub-query dimension intervals which are 2002-2022, 2001.2-2001.12, 2001.1.6-2001.1.31 and 2022.1.1-2022.1.6 respectively, wherein the 2002-2022 corresponds to the annual storage layer, and the query can be performed in a data wide table with the annual storage layer statistics span according to index dimensions; 2001.2-2001.12 correspond to the month storage layer, and can be inquired in a data wide table with the month storage layer statistics span according to the index dimension; 2001.1.6-2001.1.31 and 2022.1.1-2022.1.6 are date storage layers, and can be searched in a data wide table with the statistical span of the date storage layers as a date according to the index dimension.
And S230, inquiring in the corresponding storage layer based on the index dimension and the sub-inquiry dimension interval to obtain a data inquiry result.
S240, aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension.
According to the technical scheme of the embodiment, the multi-layer storage model is obtained, the query dimension intervals are classified and split from top to bottom based on the statistical spans of all levels of storage layers in the multi-layer storage model, and a plurality of sub-query dimension intervals with different levels are obtained. The data query efficiency can be improved by querying in the corresponding storage layer according to the sub-query dimension interval.
Example III
Fig. 3 is a flowchart of a data aggregation method according to a third embodiment of the present invention. The embodiments of the present invention may be combined with the various alternatives in the above embodiments. In this embodiment, optionally, the querying in the corresponding storage layer based on the index dimension and the sub-query dimension interval to obtain a data query result includes: determining a target data wide table in the storage layer based on the sub-query dimension interval; and inquiring in the target data wide table based on the index dimension to obtain a data inquiring result of the target data wide table.
As shown in fig. 3, the method includes:
s310, receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimensions include a temporal dimension and a spatial dimension.
S320, acquiring a multi-layer storage model, and classifying and splitting the query dimension interval from top to bottom based on the statistical spans of all levels of storage layers in the multi-layer storage model to obtain a plurality of sub-query dimension intervals with different levels; wherein the statistical spans include spatial spans and temporal spans.
S330, determining a target data wide table in the storage layer based on the sub-query dimension interval; and inquiring in the target data wide table based on the index dimension to obtain a data inquiring result of the target data wide table.
The target data wide table refers to a data wide table in a sub-query dimension interval in each storage layer of the multi-layer storage model. In this embodiment, the storage layer where the data wide table to be queried is located may be determined according to the association relationship between the sub-query dimension interval and the storage layer, and then the target data wide table may be determined in the corresponding storage layer according to the sub-query dimension interval, and then the target data wide table is queried according to the index dimension, so as to obtain the data corresponding to the index dimension in each target data wide table, that is, the data query result of the target data wide table.
And S340, aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension.
According to the technical scheme of the embodiment, a target data wide table is determined in the storage layer based on the sub-query dimension interval; and inquiring in the target data wide table based on the index dimension to obtain a data inquiring result of the target data wide table. And determining a target data wide table in the corresponding storage layer through the sub-query dimension interval to query, so that the data query efficiency can be improved.
Example IV
Fig. 4 is a flowchart of a data aggregation method according to a fourth embodiment of the present invention. The embodiments of the present invention may be combined with the various alternatives in the above embodiments. In this embodiment, optionally, aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension includes: aggregating the data query results of each target data wide table in the same storage layer based on the association relation among the data wide tables to obtain the data query results of each sub-query dimension interval; and carrying out secondary aggregation on the data query results of each sub-query dimension interval to obtain data aggregation results corresponding to the index dimension.
As shown in fig. 4, the method includes:
s410, receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimensions include a temporal dimension and a spatial dimension.
S420, acquiring a multi-layer storage model, and classifying and splitting the query dimension interval from top to bottom based on the statistical spans of all levels of storage layers in the multi-layer storage model to obtain a plurality of sub-query dimension intervals with different levels; wherein the statistical spans include spatial spans and temporal spans.
S430, determining a target data wide table in the storage layer based on the sub-query dimension interval; and inquiring in the target data wide table based on the index dimension to obtain a data inquiring result of the target data wide table.
S440, aggregating the data query results of each target data wide table in the same storage layer based on the association relation among the data wide tables to obtain the data query results of each sub-query dimension interval; and carrying out secondary aggregation on the data query results of each sub-query dimension interval to obtain data aggregation results corresponding to the index dimension.
In this embodiment, the data query results of the target data wide tables in the same storage layer may be aggregated according to the association relationship between the data wide tables in the same storage layer, so as to obtain the data query results of the sub-query dimension interval; it can be understood that, because the target data wide table is determined according to the sub-query dimension interval, the data query result of the target data wide table in the same storage layer is the data query result of the sub-query dimension interval after being aggregated. Further, the data query results of all the sub-query dimension intervals are subjected to secondary aggregation to obtain index dimension data in the whole query dimension interval, namely, the data aggregation results corresponding to the index dimension.
According to the technical scheme of the embodiment, the data query results of all target data wide tables in the same storage layer are aggregated based on the association relation among the data wide tables, and the data query results of all sub-query dimension intervals are obtained; and carrying out secondary aggregation on the data query results of each sub-query dimension interval to obtain data aggregation results corresponding to the index dimension. The data query results of the target data broad tables are aggregated according to the association relation among the data broad tables, so that the data aggregation efficiency can be improved, the time loss of the data aggregation is reduced, and the real-time performance of the retrieval is ensured.
Example five
Fig. 5 is a flowchart of a data aggregation method according to a fifth embodiment of the present invention. The embodiments of the present invention may be combined with the various alternatives in the above embodiments. In this embodiment, optionally, the data aggregation result includes data increment information, and the method further includes: acquiring initial snapshot information of the query dimension interval; and determining the total data amount of the index dimension based on the initial snapshot information and the increment information. As shown in fig. 5, the method includes:
s510, receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimensions include a temporal dimension and a spatial dimension.
S520, acquiring a multi-layer storage model, and classifying and splitting the query dimension interval from top to bottom based on the statistical spans of all levels of storage layers in the multi-layer storage model to obtain a plurality of sub-query dimension intervals with different levels; wherein the statistical spans include spatial spans and temporal spans.
S530, determining a target data wide table in the storage layer based on the sub-query dimension interval; and inquiring in the target data wide table based on the index dimension to obtain a data inquiring result of the target data wide table.
S540, aggregating the data query results of each target data wide table in the same storage layer based on the association relation among the data wide tables to obtain the data query results of each sub-query dimension interval; and carrying out secondary aggregation on the data query results of each sub-query dimension interval to obtain data aggregation results corresponding to the index dimension.
S550, acquiring initial snapshot information of the query dimension interval; and determining the total data amount of the index dimension based on the initial snapshot information and the increment information.
The initial snapshot information refers to snapshot information of each index dimension at the beginning of a query dimension interval, and taking a time dimension as an example, assume that the time dimension interval is 2001.1.6-2023.1.6, and the initial snapshot information is 2001.1.6. The incremental information is the incremental information of each index dimension after the aggregation of the query results, and specifically, the incremental information comprises the data increment and the data decrement. In this embodiment, initial snapshot information of the query dimension interval is obtained, and the total data amount of each index dimension can be determined according to the initial snapshot information and the incremental information of each index dimension.
The calculation formula of the total amount of index dimension data is as follows:
count=count_snap+sum(increase)-sum(decrease)
wherein, count represents the total amount of data, count_snap represents the initial snapshot information, sum (increment) represents the data increment, sum (decrement) represents the data decrement; accordingly, sum (increment) -sum (increment) represents the net increment of data.
According to the technical scheme, after data aggregation, initial snapshot information of a query dimension interval is obtained; the total amount of data for the index dimension is determined based on the initial snapshot information and the delta information. The total data of the index dimension can be determined rapidly, and the statistical efficiency of the data is improved.
Example six
Fig. 6 is a schematic structural diagram of a data aggregation device according to a sixth embodiment of the present invention. As shown in fig. 6, the apparatus includes:
a query request receiving module 610, configured to receive a data query request, where the data query request includes at least one index dimension and a query dimension interval; wherein the query dimension includes a temporal dimension and a spatial dimension;
the query dimension interval splitting module 620 is configured to obtain a multi-layer storage model, and split the query dimension interval in a grading manner based on a storage layer of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; wherein the sub-query dimension interval is associated with the storage layer;
the query module 630 is configured to query in a corresponding storage layer based on the index dimension and the sub-query dimension interval, to obtain a data query result;
and the data aggregation module 640 is configured to aggregate the data query results in each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension.
In the technical scheme of the embodiment,
based on the foregoing embodiment, optionally, the multi-layer storage model includes a plurality of storage layers of different levels, where a statistical span of the data wide tables in an upper storage layer is a sum of statistical spans of corresponding data wide tables in a lower storage layer.
On the basis of the foregoing embodiment, optionally, the data width table includes a snapshot field and an association index value field, where the snapshot field is used to store snapshot information, and the association index value field is used to associate the data width tables with the same index dimension in the same storage layer.
On the basis of the above embodiment, optionally, the query dimension interval splitting module 620 is specifically configured to split the query dimension interval from top to bottom in a grading manner based on the statistical spans of all levels of storage layers in the multi-layer storage model, so as to obtain a plurality of sub-query dimension intervals with different levels; wherein the statistical spans include spatial spans and temporal spans.
On the basis of the above embodiment, optionally, the query module 630 is specifically configured to determine a target data wide table in the storage layer based on the sub-query dimension interval; and inquiring in the target data wide table based on the index dimension to obtain a data inquiring result of the target data wide table.
On the basis of the above embodiment, optionally, the data aggregation module 640 is specifically configured to aggregate the data query results of each target data wide table in the same storage layer based on the association relationship between the data wide tables, so as to obtain the data query result of each sub-query dimension interval; and carrying out secondary aggregation on the data query results of each sub-query dimension interval to obtain data aggregation results corresponding to the index dimension.
On the basis of the above embodiment, optionally, the data aggregation result includes data increment information, and the device includes a data total amount calculation module, configured to obtain initial snapshot information of the query dimension interval; and determining the total data amount of the index dimension based on the initial snapshot information and the increment information.
The data aggregation device provided by the embodiment of the invention can execute the data aggregation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example seven
Fig. 7 is a schematic structural diagram of an electronic device according to a seventh embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the data aggregation method.
In some embodiments, the data aggregation method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data aggregation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data aggregation method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
The computer program used to implement the data aggregation method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data aggregation apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
Example eight
An eighth embodiment of the present invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute a data aggregation method, the method including:
receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimension includes a time dimension and a space dimension; acquiring a multi-layer storage model, and classifying and splitting the query dimension intervals based on the storage layers of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; wherein the sub-query dimension interval is associated with the storage layer; inquiring in the corresponding storage layer based on the index dimension and the sub-inquiry dimension interval to obtain a data inquiry result; and aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of data aggregation, comprising:
receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimension includes a temporal dimension and a spatial dimension;
acquiring a multi-layer storage model, and classifying and splitting the query dimension interval based on a storage layer of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; wherein the sub-query dimension interval is associated with the storage layer;
inquiring in a corresponding storage layer based on the index dimension and the sub-inquiry dimension interval to obtain a data inquiry result;
and aggregating the data query results of each sub-query dimension interval to obtain a data aggregation result corresponding to the index dimension.
2. The method of claim 1, wherein the multi-tiered storage model includes a plurality of different levels of storage tiers, wherein the statistical span of the data-wide tables in an upper tier of storage is a sum of the statistical spans of the corresponding data-wide tables in a lower tier of storage.
3. The method of claim 2, wherein the data wide table includes a snapshot field for storing snapshot information and an association index value field for associating data wide tables of the same index dimension in the same storage tier.
4. The method of claim 2, wherein the splitting the query dimension interval based on the storage layer of the multi-layer storage model to obtain a plurality of sub-query dimension intervals comprises:
classifying and splitting the query dimension interval from top to bottom based on the statistical span of each level of storage layer in the multi-layer storage model to obtain a plurality of sub-query dimension intervals with different levels; wherein the statistical spans include spatial spans and temporal spans.
5. The method of claim 3, wherein the querying in the corresponding storage layer based on the index dimension and the sub-query dimension interval to obtain the data query result comprises:
the step of querying in the corresponding storage layer based on the index dimension and the sub-query dimension interval to obtain a data query result comprises the following steps:
determining a target data wide table in the storage layer based on the sub-query dimension interval;
and inquiring in the target data wide table based on the index dimension to obtain a data inquiring result of the target data wide table.
6. The method of claim 5, wherein aggregating the data query results for each sub-query dimension interval to obtain the data aggregate result corresponding to the index dimension, comprises:
aggregating the data query results of each target data wide table in the same storage layer based on the association relation among the data wide tables to obtain the data query results of each sub-query dimension interval;
and carrying out secondary aggregation on the data query results of each sub-query dimension interval to obtain data aggregation results corresponding to the index dimension.
7. The method of claim 5, wherein the data aggregation result comprises data delta information, the method further comprising:
acquiring initial snapshot information of the query dimension interval;
and determining the total data amount of the index dimension based on the initial snapshot information and the increment information.
8. A data aggregation apparatus, comprising:
the query request receiving module is used for receiving a data query request, wherein the data query request comprises at least one index dimension and a query dimension interval; wherein the query dimension includes a temporal dimension and a spatial dimension;
the query dimension interval splitting module is used for acquiring a multi-layer storage model, and classifying and splitting the query dimension interval based on a storage layer of the multi-layer storage model to obtain a plurality of sub-query dimension intervals; wherein the sub-query dimension interval is associated with the storage layer;
the query module is used for querying in the corresponding storage layer based on the index dimension and the sub-query dimension interval to obtain a data query result;
and the data aggregation module is used for aggregating the data query results of each sub-query dimension interval to obtain the data aggregation results corresponding to the index dimension.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data aggregation method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the data aggregation method of any one of claims 1-7.
CN202311238399.2A 2023-09-22 2023-09-22 Data aggregation method and device, electronic equipment and storage medium Pending CN117194498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311238399.2A CN117194498A (en) 2023-09-22 2023-09-22 Data aggregation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311238399.2A CN117194498A (en) 2023-09-22 2023-09-22 Data aggregation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117194498A true CN117194498A (en) 2023-12-08

Family

ID=88984886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311238399.2A Pending CN117194498A (en) 2023-09-22 2023-09-22 Data aggregation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117194498A (en)

Similar Documents

Publication Publication Date Title
CN112818013B (en) Time sequence database query optimization method, device, equipment and storage medium
CN115344207A (en) Data processing method and device, electronic equipment and storage medium
CN115291806A (en) Processing method, processing device, electronic equipment and storage medium
CN115794744A (en) Log display method, device, equipment and storage medium
CN113407587B (en) Data processing method, device and equipment for online analysis processing engine
CN117194498A (en) Data aggregation method and device, electronic equipment and storage medium
CN115080607A (en) Method, device, equipment and storage medium for optimizing structured query statement
CN117131353B (en) Method and device for determining out-of-tolerance electric energy meter, electronic equipment and storage medium
CN113220230B (en) Data export method and device, electronic equipment and storage medium
CN116401269A (en) Data query method and device, electronic equipment and storage medium
CN116881253A (en) Data processing method, device, equipment and storage medium
CN117709902A (en) Material input method, device, equipment and medium based on BOM file
CN117609311A (en) Service degradation method, device, equipment and storage medium
CN117573491A (en) Positioning method, device, equipment and storage medium for performance bottleneck
CN117763060A (en) Data processing method, device, equipment and storage medium based on user behavior
CN117493342A (en) Commodity data updating method, commodity data updating device, electronic equipment and storage medium
CN117194363A (en) Data processing method, device, electronic equipment, storage medium and product
CN117171206A (en) Query method, query device, electronic equipment and storage medium
CN117350811A (en) Order processing method, order processing device, electronic equipment and storage medium
CN116915868A (en) Network monitoring task issuing method, device, equipment and storage medium
CN115392733A (en) Distribution network planning project engineering quantity investment estimation method, device, equipment and storage medium
CN115525659A (en) Data query method and device, electronic equipment and storage medium
CN117640521A (en) Transaction flow determination method, device, equipment and storage medium
CN115203246A (en) Linked list query method and device, electronic equipment and storage medium
CN115576948A (en) Data storage method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination