CN110704548B - System and method for screening efficient computing data for multidimensional databases - Google Patents

System and method for screening efficient computing data for multidimensional databases Download PDF

Info

Publication number
CN110704548B
CN110704548B CN201910939740.4A CN201910939740A CN110704548B CN 110704548 B CN110704548 B CN 110704548B CN 201910939740 A CN201910939740 A CN 201910939740A CN 110704548 B CN110704548 B CN 110704548B
Authority
CN
China
Prior art keywords
data unit
source data
target data
types
source
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.)
Active
Application number
CN201910939740.4A
Other languages
Chinese (zh)
Other versions
CN110704548A (en
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.)
Beijing Yuannian Technology Co ltd
Original Assignee
Beijing Yuannian 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 Beijing Yuannian Technology Co ltd filed Critical Beijing Yuannian Technology Co ltd
Priority to CN201910939740.4A priority Critical patent/CN110704548B/en
Publication of CN110704548A publication Critical patent/CN110704548A/en
Application granted granted Critical
Publication of CN110704548B publication Critical patent/CN110704548B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A system, method, computer device and storage medium for screening efficient computational data for a multidimensional database is provided. The system comprises: the mapping relation analysis module is used for analyzing a calculation rule which is prestored in the multidimensional database and is used for calculating the value of the target data unit according to one or more types of source data units so as to determine the type of the mapping relation from one type of source data units to one or more types of target data units; a target data unit determining module, configured to determine, when valid data is input to one or more types of source data units or the source data units are marked as having valid data, target data units associated with the one or more types of source data units based on the one or more types of source data units according to the type of the mapping relationship, and mark the determined associated target data units as target data units having valid calculation data; and the query module is used for screening out the target data unit with the effective calculation data mark from the data set when the data is queried.

Description

System and method for screening efficient computing data for multidimensional databases
Technical Field
The present invention relates to the field of multidimensional databases, and more particularly to a system, a corresponding method, a computer device and a computer readable storage medium for screening efficient computational data for multidimensional databases.
Background
In the multidimensional database, a calculation rule script may be specified on cells whose values are the result values of calculations performed on the calculation rule script. In many cases, a valid calculation result value exists in only a small part of cells of the multidimensional database, and effective calculation data does not exist in other cells, so that the proportion of cells with valid calculation data in a data set of the multidimensional database is very small, and the calculation data in the multidimensional database usually has a sparse characteristic.
When a data query is performed in a multidimensional database by using a conventional method, if a query range includes cells in which a calculation rule script is specified, all the cells in the query range need to be read and calculated to obtain data values of the cells. This traditional approach of full enumeration and computation entails a significant waste of computing resources.
Accordingly, there is a need for an improved method for data querying or screening of multidimensional databases.
Disclosure of Invention
To solve the above technical problem, the present invention provides an improved system and method for screening effective calculation data.
According to an aspect of the present invention, there is provided a system for screening efficient calculation data for a multidimensional database, the multidimensional database comprising at least one dataset having a plurality of dimensions, the dataset comprising one or more types of source data units and one or more types of target data units associated with each type of source data unit, wherein the system comprises:
a mapping relation analysis module configured to analyze a calculation rule pre-stored in the multidimensional database for calculating a value of a target data unit according to one or more types of source data units to determine a type of a mapping relation from the one type of source data unit to the one or more types of target data units, wherein the source data unit is a data unit participating in calculation in the calculation rule, and the target data unit is a data unit to be filled in by a result of calculation of the source data unit according to the calculation rule;
a target data unit determining module, configured to, when valid data is input to one or more types of source data units or the one or more types of source data units are marked as having valid data, determine, based on the one or more types of source data units, a target data unit associated with the one or more types of source data units according to the type of the mapping relationship, and mark the determined associated target data unit as a target data unit having valid calculation data;
and the query module is configured for screening out the target data unit with the effective calculation data mark from the data set when the data is queried.
According to another aspect of the present invention, there is provided a method for screening efficient calculation data for a multidimensional database, the multidimensional database comprising at least one dataset having a plurality of dimensions, the dataset comprising one or more types of source data units and one or more types of target data units associated with each type of source data unit, wherein the method comprises:
analyzing a calculation rule pre-stored in the multidimensional database about calculating a value of a target data unit according to one or more types of source data units to determine a type of a mapping relationship from the one type of source data unit to the one or more types of target data units, wherein the source data unit is a data unit participating in calculation in the calculation rule, and the target data unit is a data unit to be filled in by the source data unit according to a result calculated by the calculation rule;
when effective data is input into one or more types of source data units or the one or more types of source data units are marked as having effective data, determining target data units related to the one or more types of source data units based on the one or more types of source data units according to the type of the mapping relation, and marking the determined related target data units as target data units having effective calculation data;
when data is queried, the target data unit with the effective calculation data mark is screened from the data set.
According to a further aspect of the present invention, there is provided a computer apparatus comprising a memory and a processor, the memory having stored thereon a computer program which, when executed by the processor, causes the method of screening valid calculation data for a multidimensional database described above to be performed.
According to a further aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, causes the above-described method for screening valid calculation data for a multidimensional database to be performed.
By using the technical scheme of the invention, the target data units with effective calculation data in the multidimensional database can be identified, only the target data units with the identification need to be screened when the data is inquired, and all the data units in the inquiry range do not need to be enumerated and calculated, thereby greatly saving calculation resources and improving the data inquiry efficiency.
Drawings
Non-limiting and non-exhaustive embodiments of the present invention are described, by way of example, with reference to the following drawings, in which:
FIG. 1 illustrates a schematic diagram of a system for screening efficient computational data for a multidimensional database, according to one embodiment of the present invention;
FIG. 2 illustrates a flow diagram of a method for screening efficient computational data for a multidimensional database, according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of an example application of a multidimensional database suitable for use with the present invention;
figures 4a-4c show schematic diagrams of another example of an application of a multidimensional database suitable for use with the present invention.
Fig. 5a and 5b show schematic diagrams of another application example of a multidimensional database suitable for use with the present invention.
Figures 6a-6c show schematic diagrams of another example of an application of a multidimensional database suitable for use with the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
FIG. 1 illustrates a system 100 for screening efficient computing data for a multidimensional database, according to one embodiment of the present invention.
The system 100 includes a mapping relationship analysis module 110, a target data unit determination module 120, and a query module 130. The multidimensional database includes at least one data set having a plurality of dimensions, the data set including one or more types of source data units and one or more types of target data units associated with each type of source data unit. The source data unit is a data unit participating in calculation in the calculation rule, and the target data unit is a data unit to be filled in by the source data unit according to a result of calculation of the calculation rule.
Specifically, the mapping relation analysis module 110 is configured to analyze calculation rules pre-stored in the multidimensional database regarding calculating values of target data units according to one or more types of source data units to determine types of mapping relations from the one type of source data units to the one or more types of target data units. The target data unit determining module 120 is configured to, when valid data is input to one or more types of source data units or the one or more types of source data units are marked as having valid data, determine a target data unit associated with the one or more types of source data units based on the one or more types of source data units according to the type of the mapping relationship, and mark the determined associated target data unit as a target data unit having valid calculation data. The query module 130 is configured to, when querying data, filter out target data units from the dataset for which there is a valid computed data tag.
For example, FIG. 3 shows a schematic diagram of one example of an application of a multidimensional database suitable for use with the present invention. The data set of the multidimensional database shown in FIG. 3 includes four dimensions, year 101, month 102, product 103, and subject 104. Specifically, the year 101 dimension is the title dimension, which is shown in fig. 3 as 2018 (other years are not shown, e.g., any other year statistically having relevant data may also be included). The month 102 dimension is shown in FIG. 3 to be 1 month to 5 months (other months not shown). The product 103 dimension includes members of three examples, respectively, such as a book, a pen, and an eraser. Subject 104 dimension also includes members of three examples, such as sales volume, unit price, and sales amount, respectively.
As known to those skilled in the art, the calculation rules may be pre-compiled and written into the multidimensional database by a user according to calculation needs to determine how to calculate the value of the target data unit according to one or more types of source data units. For example, in the application example shown in fig. 3, the calculation rule may be: the sales amount is the sales amount × the unit price, and indicates that the value of each sales unit is calculated by multiplying the value of the corresponding sales unit and the value of the unit price. For the calculation rule in the example shown in fig. 3, the units corresponding to [ sales amount ] and [ unit price ] are source data units, and the units corresponding to [ sales amount ] are destination data units. For example: the value of the unit [2018, 2 month, book, sales ] is the value of the unit [2018, 2 month, book, sales ] multiplied by the value of the unit [2018, 2 month, book, unit price ].
Thus, by analyzing the calculation rules using the mapping relationship analysis module 110, it is possible to analytically determine the source data units and the target data units, and determine the type of mapping relationship from one type of source data unit to one or more types of target data units. Alternatively, the system 100 may store the mapping relationship from one type of source data unit to one or more types of target data units determined by the mapping relationship analysis module 110. The type of mapping may include, but is not limited to, one-to-one or one-to-many.
In one embodiment, the mapping relationship analysis module 110 is further configured to determine the type of mapping relationship from one type of source data unit to one or more types of target data units by:
according to the calculation rule, calculating the relation of each dimension information of the source data unit as a function of each dimension information of the target data unit;
according to the relation simultaneous equation set of the function, effective data in a type of source data unit is used as corresponding known dimension information of the type of source data unit, and dimension information of a target data unit which is to be determined whether to be associated with the type of source data unit is set as an unknown number to be solved;
solving the equation set, and when each dimension information of the target data unit has a unique solution, determining that the mapping relation between the source data unit and the target data unit is one-to-one; when the dimension information of the target data unit has a plurality of solutions, determining that the mapping relation between the source data unit and the target data unit is one-to-many; and when the dimension information of the target data unit has the condition of no solution, determining that the mapping relation is all members in the dimension of the source data unit corresponding to the data set without the solution.
For example, assume that the calculation rule is:
L=f(R1,R2,...Rn);
wherein L represents a class of target data units, R1,R2,...RnRepresents a source data unit, where n is a positive integer.
According to the above calculation rule, it is obtained that the source data unit R is derived from each dimension information of the target data unit LiThe calculated relationship of each dimension information, i.e., the relationship g of each dimension information of the source data unit as a function of each dimension information about the target data unit. Wherein R isiRepresenting multiple classes of source data units R1,R2,...RnThe ith type source data unit of (1); with EL1,EL2,...ELmRepresenting m dimensions of the target data unit L, denoted ERi1,ERi2,...ERikRepresenting a source data unit RiK dimensions of (a).
Then, the i-th type source data unit RiK dimensions ERi1,ERi2,...ERikAs a known number, in m dimensions E of the target data unit LL1,EL2,...ELmFor the unknowns, a system of equations is established as follows:
Figure BDA0002222554680000051
by solving the above equation set, the slave source data unit R can be determinediThe type of mapping to the target data unit L. In other words, after solving the above equation, the source data unit R can be determinediWhat is affected is which target data units L. Specifically, when the system of equations has a unique solution, then the target number can be determinedData unit L and source data unit RiThe mapping relationship between the two is one-to-one; when the system of equations will solve a plurality of groups EL1,EL2,...ELmValue, i.e. when there are multiple solutions, the source data unit R can be determinediThe mapping relation between the target data unit L and the target data unit L is one-to-many; when each dimension information E of the target data unit LL1,EL2,...ELmWhen there is no solution, the mapping relationship may be determined to be the source data unit RiCorresponding to all members in the non-solution dimension in the dataset.
The meaning of "no solution dimension" is explained below in conjunction with fig. 5a and 5 b:
fig. 5a is a multi-dimensional data set representing selling price information, wherein the data unit [ product, selling price ] includes two-dimensional information, specifically, the product dimension includes three-dimensional members of book, pen, and eraser, and the selling price dimension includes unit price.
FIG. 5b is a multi-dimensional dataset representing sales information, wherein the data unit [ year, month, product, sales ] comprises four dimensional information, specifically, the year dimension shows 2018, the month dimension shows 1 month to 5 months, the product dimension comprises books, pens, erasers, the sales dimension comprises sales volume and sales amount; the calculation rule on fig. 5b is: sales amount is sales amount × unit price.
According to the calculation rule, the product and unit price in fig. 5a can be used as a type of source data unit, the sales in fig. 5b can be used as a type of target data unit, and according to the description in the aforementioned equation set section, in the case that the source data unit has only two-dimensional information of product and unit price, the corresponding solutions of the two dimensions of year and month in the multidimensional data set shown in fig. 5b cannot be solved, so that the two dimensions of year and month belong to the "no solution dimension", that is, each source cell in the source data unit product and unit price affects the sales of all the "year" dimensions and all the "month" dimensions of the corresponding product in fig. 5b, that is, the target cell.
After the mapping analysis module 110 analyzes and determines the type of the mapping from the source data unit to the target data unit, the corresponding mapping is saved. In addition, when saving data of a data set, only source data units in which data is filled by a user and target data units marked as having valid calculation data may be saved.
In one embodiment, the target data unit determination module 120 may be further configured to: when only one type of source data unit in the calculation rule is a variable, if the mapping relation between the source data unit and the target data unit is determined to be one-to-one, one target data unit associated with the source data unit is marked as a target data unit with valid calculation data according to the mapping relation.
For example, there are the following application examples of "book sales":
if a book publishing and issuing company is provided, the retail price of a certain type of books is fixed to be K-ary, and the retail price K can be considered as a fixed coefficient. Then, only the data of the retail quantity of the book per month can be considered when calculating the retail amount of the book per month. Based on this, the calculation rule that can be obtained is: the retail amount is K × retail amount, and only one type of source data unit in the calculation rule may be considered as a variable, that is, "retail amount". Further, with [ year, month, retail amount ] as the source data unit R and [ year, month, retail amount ] as the target data unit L, if it can be determined by solving with reference to the above equation system that the mapping relationship between the source data unit R and the target data unit L is one-to-one, when there is valid data in the source data unit R, for example, in [2018, 5, 300 booklet ], it can be determined that its associated target data unit is [2018, 5, month, retail amount ], and the target data unit [2018, 5, retail amount ] can be marked as a target data unit in which valid calculation data exists.
Further, when data filtering needs to be performed, valid calculation data of the target data unit, for example, the [2018, 5 month, (300 × K) element ] may be calculated.
In one embodiment, the target data unit determination module 120 may be further configured to: when only one type of source data unit in the calculation rule is a variable, if the mapping relation between the source data unit and the target data unit is determined to be one-to-many, marking a plurality of target data units associated with the source data unit as target data units with valid calculation data according to the mapping relation.
Reference is made to the application examples shown in fig. 6a to 6 c.
FIG. 6a is a multi-dimensional dataset representing travel standards, wherein the data unit [ department, travel standards ] includes two dimensional information, specifically, the department dimensions include the research and development department and the market department; the travel dimension includes travel standards corresponding to different departments, e.g., 180 units/time in the research and development department and 300 units/time in the market department.
Fig. 6b is a multi-dimensional data set representing departments to which a person belongs, wherein a data unit [ person, belonging department ] includes two-dimensional information, specifically, a person dimension includes zhangsan, lie four, wangwu, zhao six, and tian qi, and a belonging department dimension includes a belonging department corresponding to a person in the person dimension, which is a research and development department, a market department, a research and development department, and a market department, respectively.
Fig. 6c is a multi-dimensional data set representing travel cost situation, in which the data unit [ person, number of travel times, total amount of travel cost ] includes three-dimensional information, specifically, the person dimensions include zhang san, li si, wang wu, zhao xi and tian qi; the travel times dimension comprises travel times of corresponding personnel, which are respectively 1 time, 6 times, 1 time, 2 times and 5 times; the travel charge total dimension comprises travel charge total of corresponding personnel, which is respectively 180 yuan, 1800 yuan, 180 yuan, 360 yuan and 1500 yuan. From this, it can be seen that the calculation rule on the multidimensional dataset shown in FIG. 6c is: the total amount of travel cost for each person is equal to the number of times the person travels multiplied by the travel criteria of the department to which the person belongs.
According to the calculation rule, the data unit [ department, travel standard ] can be used as a kind of source data unit, and the total amount of travel cost in fig. 6c can be used as a kind of target data unit, and if the number of trips of each person per quarter (for example, 1, 6, 1, 2, and 5 shown in fig. 6 c) is known, only the kind of source data unit [ department, travel standard ] can affect the total amount of travel cost according to the calculation rule. For example, when the travel standard 601 of the research and development department in fig. 6a is modified, the total amount 620 of travel expenses of zhang san, 622 of travel expenses of wangwu, and 623 of travel expenses of zhao liu in fig. 6c are affected. When the travel standard 602 of the market department in fig. 6a is modified, the sum 621 of the travel costs of liqing and the sum 624 of the travel costs of pseudo-ginseng in fig. 6c are affected. As a result, the mapping relationship between the source data unit [ department, travel standard ] and the total amount of travel cost (target data unit) is one-to-many, that is, the number of target cells representing the total amount of travel cost associated with the modified source data in the source data unit [ department, travel standard ] in the multidimensional data set shown in fig. 6c is plural. The plurality of target unit grids (e.g., the total amount of travel expenses for zhang san, the total amount of travel expenses for wang wu 622, and the total amount of travel expenses for zhao xi 623) may be marked as having valid calculation data.
In one embodiment, the target data unit determination module 120 may be further configured to: when there are multiple types of source data units in the calculation rule, if it is determined that valid data can be calculated only when there is valid data in the multiple types of source data units at the same time, when the value of at least one type of source data unit in the multiple types of source data units is modified and valid data exists in the related other types of source data units at the same time, the related target data unit is marked as a target data unit in which valid calculation data exists according to the corresponding mapping relationship.
For example, referring to an application example of customer installment reimbursement in the sales field as shown in FIGS. 4a-4c, wherein the table shown in FIG. 4a can be taken as a first type of source data element, which can be expressed as [ salesman, month, sales ]; the table shown in fig. 4b can be used as a second type of source data cell, which can be expressed as [ customer, month, staging ratio ]; the table shown in fig. 4c may be used as a type of object data unit, which may be [ refund ]. The two types of source data units represented by fig. 4a and 4b include three dimension members, and correspondingly, the target data unit represented by fig. 4c also includes three dimension members.
In the application example shown in fig. 4a-4c, the associated target data unit can only be determined if there is valid data for both the first type of source data unit and the second type of source data unit. That is, only when valid data of sales and staging ratios of customers exist simultaneously, the corresponding refund amount of the customer can be calculated.
For example, referring to FIGS. 4a and 4b, salesperson A has a sales of 100 ten thousand dollars in month 1, and the proportion of installment refunds is 30% in month 1, 30% in month 2, and 40% in month 3. Then, using the calculation rule "the refund is equal to the sales amount × the staging ratio", referring to fig. 4c, the refund amount of each stage of the customer of the salesman a can be calculated as: 30 ten thousand yuan in month 1, 30 ten thousand yuan in month 2, and 40 ten thousand yuan in month 3. Similarly, sales of salesperson B in month 2 were 200 ten thousand dollars, and the proportion of installment refunds was 30% in month 2, 30% in month 4, and 40% in month 5. Then, using the calculation rule "the refund is the sales amount × the staging ratio", referring to fig. 4c, the refund amount of each stage of the customer of the salesman B can be calculated as: 60 ten thousand yuan in month 2, 60 ten thousand yuan in month 4, and 80 ten thousand yuan in month 5.
If only the sales are known and not the proportion of the periods and the month of the refund per period, when at least one of the source data units of the first type (fig. 4a) representing the sales is modified, the cells associated with the modified source data in the source data unit of the first type (fig. 4a) may be plural among the cells representing the refund in the target data unit (fig. 4 c). That is, the mapping relationship between the modified source data in the first type of source data unit (fig. 4a) and the cells representing the refund in the associated target data unit (fig. 4c) may be one-to-many. Similarly, if only the proportion of the installment and the month of the refund per period are known and the sales amount is not known, when at least one of the source data units of the second type (fig. 4b) representing the proportion of the installment is modified, the cell associated with the modified source data in the source data unit of the second type (fig. 4b) among the cells representing the refund in the target data unit (fig. 4c) may also be plural. That is, the mapping relationship between the modified source data in the second type of source data unit (fig. 4b) and the cells representing the refund in the associated destination data unit (fig. 4c) may be one-to-many.
In both cases where the mapping relationship between the source data and the associated target data unit is "one-to-many", the specific location of the cell in fig. 4c in which the refund amount should be filled cannot be determined by either source data alone. Therefore, it is required that the sales in fig. 4a and the staging ratio in fig. 4b are mutually limiting conditions, and when at least one of the sales and the staging ratios in fig. 4b is modified, the corresponding other has valid data at the same time, so that the cell to which the refund should be written can be determined in fig. 4c, that is, the technical effect of marking the associated target data unit as the target data unit with valid calculation data according to the corresponding mapping relationship can be achieved.
In one embodiment, the target data unit determination module 120 may be further configured to: when there are multiple types of source data units in the calculation rule, if it is determined that valid data exists in any one of the multiple types of source data units, valid data can be calculated by using the calculation rule, when the value of at least one type of source data unit in the multiple types of source data units is modified, the target data unit associated with the modified at least one type of source data unit is marked as a target data unit with valid calculation data according to the corresponding mapping relation.
For example, the calculation rule may be L ═ x + y + z, where L denotes the target data unit and x, y, z denote different classes of source data units, respectively. According to the calculation rule, when valid data exists in at least one type of the source data units x, y and z, valid data can be calculated. Further, for example, if any of the source data units x, y, z (e.g., source data unit x) is modified, the associated target data unit with the modified source data unit (e.g., source data unit x) may be marked as a target data unit for which valid computed data exists according to the corresponding mapping relationship.
FIG. 2 illustrates a method 200 for screening valid computing data for a multidimensional database, according to one embodiment of the present invention.
The multidimensional database includes at least one data set having a plurality of dimensions, the data set including one or more types of source data units and one or more types of target data units associated with each type of source data unit.
As shown in fig. 2, the method 200 for screening valid calculation data of a multidimensional database includes:
s210: analyzing a calculation rule pre-stored in the multidimensional database about calculating a value of a target data unit according to one or more types of source data units to determine a type of a mapping relationship from the one type of source data unit to the one or more types of target data units, wherein the source data unit is a data unit participating in calculation in the calculation rule, and the target data unit is a data unit to be filled in by the source data unit according to a result calculated by the calculation rule;
s220: when effective data is input into one or more types of source data units or the one or more types of source data units are marked as having effective data, determining target data units related to the one or more types of source data units based on the one or more types of source data units according to the type of the mapping relation, and marking the determined related target data units as target data units having effective calculation data;
s230: when data is queried, the target data unit with the effective calculation data mark is screened from the data set.
In one embodiment, the analyzing computation rules pre-stored in the multidimensional database regarding computing values of target data units from one or more types of source data units to determine the type of mapping relationship from the one type of source data unit to the one or more types of target data units includes:
according to the calculation rule, calculating the relation of each dimension information of the source data unit as a function of each dimension information of the target data unit;
according to the relation simultaneous equation set of the function, effective data in a type of source data unit is used as corresponding known dimension information of the type of source data unit, and dimension information of a target data unit which is to be determined whether to be associated with the type of source data unit is set as an unknown number to be solved;
solving the equation set, and when each dimension information of the target data unit has a unique solution, determining that the mapping relation between the source data unit and the target data unit is one-to-one; when the dimension information of the target data unit has a plurality of solutions, determining that the mapping relation between the source data unit and the target data unit is one-to-many; and when the dimension information of the target data unit has the condition of no solution, determining that the mapping relation is all members in the dimension of the source data unit corresponding to the data set without the solution.
In one embodiment, the determining, based on the one or more types of source data units according to the type of the mapping relationship, a target data unit associated with the one or more types of source data units and marking the determined associated target data unit as a target data unit with valid calculation data includes:
when only one type of source data unit in the calculation rule is a variable, if the mapping relation between the source data unit and the target data unit is determined to be one-to-one, marking one target data unit associated with the source data unit as a target data unit with valid calculation data according to the mapping relation; or,
when only one type of source data unit in the calculation rule is a variable, if the mapping relation between the source data unit and the target data unit is determined to be one-to-many, marking a plurality of target data units associated with the source data unit as target data units with valid calculation data according to the mapping relation.
In one embodiment, the determining, based on the one or more types of source data units according to the type of the mapping relationship, a target data unit associated with the one or more types of source data units and marking the determined associated target data unit as a target data unit with valid calculation data includes:
when there are multiple types of source data units in the calculation rule, if it is determined that valid data can be calculated only when there is valid data in the multiple types of source data units at the same time, when the value of at least one type of source data unit in the multiple types of source data units is modified and valid data exists in the related other types of source data units at the same time, marking the associated target data unit as a target data unit in which valid calculation data exists according to a corresponding mapping relation, or,
when there are multiple types of source data units in the calculation rule, if it is determined that valid data exists in any one of the multiple types of source data units, valid data can be calculated by using the calculation rule, when the value of at least one type of source data unit in the multiple types of source data units is modified, the target data unit associated with the modified at least one type of source data unit is marked as a target data unit with valid calculation data according to the corresponding mapping relation.
It should be understood that the specific features described herein above with respect to the system for screening valid calculation data for a multidimensional database may also be similarly applied in the method for screening valid calculation data for a multidimensional database, with similar extensions. For the sake of simplicity, it is not described in detail.
It should be understood that the various elements of the system for screening efficient computational data for multidimensional databases of the present invention may be implemented in whole or in part by software, hardware, firmware, or a combination thereof. The units may be embedded in a processor of the computer device in a hardware or firmware form or independent of the processor, or may be stored in a memory of the computer device in a software form for being called by the processor to execute operations of the units. Each of the units may be implemented as a separate component or module, or two or more units may be implemented as a single component or module.
It will be appreciated by those of ordinary skill in the art that the schematic diagram of the system for screening valid calculation data for a multidimensional database shown in fig. 1 is merely an illustrative block diagram of a portion of the structure associated with aspects of the present invention and is not intended to limit the computer device, processor or computer program embodying aspects of the present invention. A particular computer device, processor or computer program may include more or fewer components or modules than shown in the figures, or may combine or split certain components or modules, or may have a different arrangement of components or modules.
In one embodiment, a computer apparatus is provided that includes a memory and a processor, the memory having stored thereon computer instructions executable by the processor, the computer instructions, when executed by the processor, instruct the processor to perform the steps of the method of the present invention for screening valid calculation data for a multidimensional database. The computer device may broadly be a server, a terminal, or any other electronic device having the necessary computing and/or processing capabilities. In one embodiment, the computer device may include a processor, memory, network interface, communication interface, etc. connected by a system bus. The processor of the computer device may be used to provide the necessary computing, processing and/or control capabilities. The memory of the computer device may include non-volatile storage media and internal memory. An operating system, a computer program, and the like may be stored in or on the non-volatile storage medium. The internal memory may provide an environment for the operating system and the computer programs in the non-volatile storage medium to run. The network interface and the communication interface of the computer device may be used to connect and communicate with an external device through a network. The computer program, when executed by a processor, performs the steps of the method of the present invention for screening valid computing data for a multidimensional database.
The invention may be implemented as a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes the steps of the method of the invention to be performed. In one embodiment, the computer program is distributed across a plurality of computer devices or processors coupled by a network such that the computer program is stored, accessed, and executed by one or more computer devices or processors in a distributed fashion. A single method step/operation, or two or more method steps/operations, may be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps/operations may be performed by one or more computer devices or processors, and one or more other method steps/operations may be performed by one or more other computer devices or processors. One or more computer devices or processors may perform a single method step/operation, or perform two or more method steps/operations.
It will be understood by those of ordinary skill in the art that all or a part of the steps of the method for screening valid calculation data for a multi-dimensional database of the present invention may be directed to relevant hardware such as a computer device or a processor through a computer program, which may be stored in a non-transitory computer-readable storage medium, and the computer program when executed causes the steps of the method for screening valid calculation data for a multi-dimensional database of the present invention to be performed. Any reference herein to memory, storage, databases, or other media may include non-volatile and/or volatile memory, as appropriate. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (prom), electrically programmable ROM (eprom), electrically erasable programmable ROM (eeprom), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, hard disk, solid state disk, and the like. Examples of volatile memory include Random Access Memory (RAM), external cache memory, and the like.
The features of the above embodiments may be arbitrarily combined, and for the sake of brevity, all possible combinations of the features in the above embodiments are not described, but should be construed as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the features.
While the invention has been described in connection with the embodiments, it is to be understood by those skilled in the art that the foregoing description and drawings are merely illustrative and not restrictive of the broad invention, and that this invention not be limited to the disclosed embodiments. Various modifications and variations are possible without departing from the spirit of the invention.

Claims (10)

1. A system for screening efficient computational data for a multidimensional database, the multidimensional database comprising at least one dataset having a plurality of dimensions, the dataset comprising one or more classes of source data units and one or more classes of target data units associated with each class of source data units, the system comprising:
a mapping relation analysis module configured to analyze a calculation rule pre-stored in the multidimensional database for calculating a value of a target data unit according to one or more types of source data units to determine a type of a mapping relation from the one type of source data unit to the one or more types of target data units, wherein the source data unit is a data unit participating in calculation in the calculation rule, and the target data unit is a data unit to be filled in by a result of calculation of the source data unit according to the calculation rule;
a target data unit determining module, configured to, when valid data is input to one or more types of source data units or the one or more types of source data units are marked as having valid data, determine, based on the one or more types of source data units, a target data unit associated with the one or more types of source data units according to the type of the mapping relationship, and mark the determined associated target data unit as a target data unit having valid calculation data;
and the query module is configured for screening out the target data unit with the effective calculation data mark from the data set when the data is queried.
2. The system for screening valid calculation data according to claim 1, wherein said analyzing calculation rules prestored in said multidimensional database regarding calculating values of target data units according to one or more types of source data units to determine types of mapping relationships from one type of source data units to one or more types of target data units comprises:
according to the calculation rule, calculating the relation of each dimension information of the source data unit as a function of each dimension information of the target data unit;
according to the relation simultaneous equation set of the function, effective data in a type of source data unit is used as corresponding known dimension information of the type of source data unit, and dimension information of a target data unit which is to be determined whether to be associated with the type of source data unit is set as an unknown number to be solved;
solving the equation set, and when each dimension information of the target data unit has a unique solution, determining that the mapping relation between the source data unit and the target data unit is one-to-one; when the dimension information of the target data unit has a plurality of solutions, determining that the mapping relation between the source data unit and the target data unit is one-to-many; when the information of each dimension of the target data unit has a non-solution condition, determining that the mapping relationship is that each source cell of the source data unit corresponds to all members in the non-solution dimension in the data set, wherein the non-solution dimension is each dimension of the target data unit.
3. The system for screening effective calculation data according to claim 2, wherein said determining, based on the one or more types of source data units according to the type of the mapping relationship, a target data unit associated with the one or more types of source data units and marking the determined associated target data unit as a target data unit with effective calculation data comprises:
when only one type of source data unit in the calculation rule is a variable, if the mapping relation between the source data unit and the target data unit is determined to be one-to-one, marking one target data unit associated with the source data unit as a target data unit with valid calculation data according to the mapping relation; or,
when only one type of source data unit in the calculation rule is a variable, if the mapping relation between the source data unit and the target data unit is determined to be one-to-many, marking a plurality of target data units associated with the source data unit as target data units with valid calculation data according to the mapping relation.
4. The system for screening effective calculation data according to claim 2, wherein said determining, based on the one or more types of source data units according to the type of the mapping relationship, a target data unit associated with the one or more types of source data units and marking the determined associated target data unit as a target data unit with effective calculation data comprises:
when there are multiple types of source data units in the calculation rule, if it is determined that valid data can be calculated only when there is valid data in the multiple types of source data units at the same time, when the value of at least one type of source data unit in the multiple types of source data units is modified and valid data exists in the related other types of source data units at the same time, marking the associated target data unit as a target data unit in which valid calculation data exists according to a corresponding mapping relation, or,
when there are multiple types of source data units in the calculation rule, if it is determined that valid data exists in any one of the multiple types of source data units, valid data can be calculated by using the calculation rule, when the value of at least one type of source data unit in the multiple types of source data units is modified, the target data unit associated with the modified at least one type of source data unit is marked as a target data unit with valid calculation data according to a corresponding mapping relation.
5. A method of screening efficient computational data for a multidimensional database comprising at least one dataset having a plurality of dimensions, the dataset comprising one or more types of source data units and one or more types of target data units associated with each type of source data unit, the method comprising:
analyzing a calculation rule pre-stored in the multidimensional database about calculating a value of a target data unit according to one or more types of source data units to determine a type of a mapping relationship from the one type of source data unit to the one or more types of target data units, wherein the source data unit is a data unit participating in calculation in the calculation rule, and the target data unit is a data unit to be filled in by the source data unit according to a result calculated by the calculation rule;
when effective data is input into one or more types of source data units or the one or more types of source data units are marked as having effective data, determining target data units related to the one or more types of source data units based on the one or more types of source data units according to the type of the mapping relation, and marking the determined related target data units as target data units having effective calculation data;
when data is queried, the target data unit with the effective calculation data mark is screened from the data set.
6. The method of screening valid calculation data according to claim 5, wherein said analyzing calculation rules pre-stored in said multidimensional database regarding calculating values of target data units from one or more types of source data units to determine types of mapping relationships from one type of source data units to one or more types of target data units comprises:
according to the calculation rule, calculating the relation of each dimension information of the source data unit as a function of each dimension information of the target data unit;
according to the relation simultaneous equation set of the function, effective data in a type of source data unit is used as corresponding known dimension information of the type of source data unit, and dimension information of a target data unit which is to be determined whether to be associated with the type of source data unit is set as an unknown number to be solved;
solving the equation set, and when each dimension information of the target data unit has a unique solution, determining that the mapping relation between the source data unit and the target data unit is one-to-one; when the dimension information of the target data unit has a plurality of solutions, determining that the mapping relation between the source data unit and the target data unit is one-to-many; when the information of each dimension of the target data unit has a non-solution condition, determining that the mapping relationship is that each source cell of the source data unit corresponds to all members in the non-solution dimension in the data set, wherein the non-solution dimension is each dimension of the target data unit.
7. The method of claim 6, wherein the determining target data units associated with the one or more types of source data units based on the one or more types of source data units according to the type of the mapping relationship and marking the determined associated target data units as target data units with valid computing data comprises:
when only one type of source data unit in the calculation rule is a variable, if the mapping relation between the source data unit and the target data unit is determined to be one-to-one, marking one target data unit associated with the source data unit as a target data unit with valid calculation data according to the mapping relation; or,
when only one type of source data unit in the calculation rule is a variable, if the mapping relation between the source data unit and the target data unit is determined to be one-to-many, marking a plurality of target data units associated with the source data unit as target data units with valid calculation data according to the mapping relation.
8. The method of claim 6, wherein the determining target data units associated with the one or more types of source data units based on the one or more types of source data units according to the type of the mapping relationship and marking the determined associated target data units as target data units with valid computing data comprises:
when there are multiple types of source data units in the calculation rule, if it is determined that valid data can be calculated only when there is valid data in the multiple types of source data units at the same time, when the value of at least one type of source data unit in the multiple types of source data units is modified and valid data exists in the related other types of source data units at the same time, marking the associated target data unit as a target data unit in which valid calculation data exists according to a corresponding mapping relation, or,
when there are multiple types of source data units in the calculation rule, if it is determined that valid data exists in any one of the multiple types of source data units, valid data can be calculated by using the calculation rule, when the value of at least one type of source data unit in the multiple types of source data units is modified, the target data unit associated with the modified at least one type of source data unit is marked as a target data unit with valid calculation data according to a corresponding mapping relation.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method of any of claims 5 to 8 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 5 to 8.
CN201910939740.4A 2019-09-30 2019-09-30 System and method for screening efficient computing data for multidimensional databases Active CN110704548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910939740.4A CN110704548B (en) 2019-09-30 2019-09-30 System and method for screening efficient computing data for multidimensional databases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910939740.4A CN110704548B (en) 2019-09-30 2019-09-30 System and method for screening efficient computing data for multidimensional databases

Publications (2)

Publication Number Publication Date
CN110704548A CN110704548A (en) 2020-01-17
CN110704548B true CN110704548B (en) 2021-12-10

Family

ID=69198130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910939740.4A Active CN110704548B (en) 2019-09-30 2019-09-30 System and method for screening efficient computing data for multidimensional databases

Country Status (1)

Country Link
CN (1) CN110704548B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114625733A (en) * 2022-02-11 2022-06-14 北京元年科技股份有限公司 Sandbox data query method, device and equipment in multidimensional database

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6750864B1 (en) * 1999-11-15 2004-06-15 Polyvista, Inc. Programs and methods for the display, analysis and manipulation of multi-dimensional data implemented on a computer
CN101241506A (en) * 2008-03-17 2008-08-13 张建中 Many dimensions search method and device and system
CN102141992A (en) * 2010-01-28 2011-08-03 广州市西美信息科技有限公司 Method for storing and querying multidimensional database
CN105677840A (en) * 2016-01-06 2016-06-15 东北大学 Data query method based on multi-dimensional increasing data model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968482A (en) * 2012-11-21 2013-03-13 深圳市捷顺科技实业股份有限公司 Data query method and data query device
CN109597834B (en) * 2018-10-22 2024-05-07 平安科技(深圳)有限公司 Massive data storage method, device, medium and equipment based on redis

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6750864B1 (en) * 1999-11-15 2004-06-15 Polyvista, Inc. Programs and methods for the display, analysis and manipulation of multi-dimensional data implemented on a computer
CN101241506A (en) * 2008-03-17 2008-08-13 张建中 Many dimensions search method and device and system
CN102141992A (en) * 2010-01-28 2011-08-03 广州市西美信息科技有限公司 Method for storing and querying multidimensional database
CN105677840A (en) * 2016-01-06 2016-06-15 东北大学 Data query method based on multi-dimensional increasing data model

Also Published As

Publication number Publication date
CN110704548A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
US11238065B1 (en) Systems and methods for generating and implementing knowledge graphs for knowledge representation and analysis
CN109858740B (en) Enterprise risk assessment method and device, computer equipment and storage medium
US10318551B2 (en) Reporting and summarizing metrics in sparse relationships on an OLTP database
JP6846356B2 (en) Systems and methods for automatically inferring the cube schema used in a multidimensional database environment from tabular data
CN112000747B (en) Data multidimensional analysis method, device and system
WO2011044286A2 (en) Data analysis expressions
CN114386727A (en) Risk identification method, device, equipment and storage medium
WO2020015112A1 (en) Product function recommendation method, terminal device and computer-readable storage medium
CN105678323A (en) Image-based-on method and system for analysis of users
US11182436B2 (en) Predicting locations based on transaction records
CN110704548B (en) System and method for screening efficient computing data for multidimensional databases
US10824803B2 (en) System and method for logical identification of differences between spreadsheets
CN110443264A (en) A kind of method and apparatus of cluster
CN115730019A (en) Cloud product data processing method and device, electronic equipment and readable storage medium
CN111971702A (en) Multi-dimensional data organization for efficient analysis
CN110674165A (en) Method and device for adjusting sampling rate, storage medium and terminal equipment
CN113901046A (en) Virtual dimension table construction method and device
CN107203506A (en) A kind of report form generation method and device
CN114463033A (en) Data screening method and device, electronic equipment and storage medium
CN107665451A (en) A kind of method and device that product push is carried out based on client characteristics data
Gentleman et al. Package ‘genefilter’
CN110516184A (en) A kind of simulation trial method counting UV quantity
CN113779161B (en) Method and device for generating calculation script, computer equipment and storage medium
US20240070116A1 (en) Flow model computation system with disconnected graphs
CN115292297B (en) Method and system for constructing data quality monitoring rule of data warehouse

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
GR01 Patent grant
GR01 Patent grant