WO2020259309A1 - Multi-dimension data query method and apparatus - Google Patents

Multi-dimension data query method and apparatus Download PDF

Info

Publication number
WO2020259309A1
WO2020259309A1 PCT/CN2020/095669 CN2020095669W WO2020259309A1 WO 2020259309 A1 WO2020259309 A1 WO 2020259309A1 CN 2020095669 W CN2020095669 W CN 2020095669W WO 2020259309 A1 WO2020259309 A1 WO 2020259309A1
Authority
WO
WIPO (PCT)
Prior art keywords
dimension
data
derived
atomic
fields
Prior art date
Application number
PCT/CN2020/095669
Other languages
French (fr)
Chinese (zh)
Inventor
曲乾坤
崔建梅
彭虎
李成
孙迁
Original Assignee
苏宁云计算有限公司
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 苏宁云计算有限公司 filed Critical 苏宁云计算有限公司
Priority to CA3156460A priority Critical patent/CA3156460A1/en
Publication of WO2020259309A1 publication Critical patent/WO2020259309A1/en

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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • 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/248Presentation of query results
    • 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

Definitions

  • the present invention relates to the technical field of big data analysis, in particular to a multi-dimensional data query method and device.
  • business logic model modeling based on OLAP engine is a very commonly used solution at present, that is, by implementing a "data cube" to model and aggregate data in the data warehouse according to different dimensional combinations, And when data analysts conduct actual business queries, they will summarize and aggregate the logical models to return results according to the queried indicators and dimension combinations, thereby achieving strong support for multi-dimensional analysis of business data.
  • the purpose of the present invention is to provide a multi-dimensional data query method and device, which can realize accurate query of approximate dimensional data while reducing the physical storage space of the data model.
  • one aspect of the present invention provides a multi-dimensional data query method, including:
  • the atomic dimension data including dimension code, dimension name, dimension value code and dimension value name;
  • the physical model stores detailed fact data and corresponding index fields and metric fields;
  • mapping and matching the physical model with the derived dimension data to construct a logical model, and the logical model stores the mapping relationship between the derived dimension data and corresponding indicator fields and metric fields;
  • the query instruction is obtained, and the derived dimension data corresponding to the mapping relationship and the statistical output of the index field and the measurement field are retrieved from the logical model.
  • the method before training the physical model based on the fact table in the data warehouse, the method further includes:
  • the configuration of the query authority for the atomic dimension data is performed.
  • the configuration rule of the query authority adopts a scheme in which the role and/or the job number correspond to the dimension value encoding of the set range.
  • performing dimension expansion for the atomic dimension data, and correspondingly generating multiple derivative dimension data related thereto includes:
  • the derived dimension data is composed of a derived field and dimension value codes in related atomic dimension data, and the derived field represents a business scenario.
  • the derived dimensional data includes derived dimensional data of a single business scenario and derived dimensional data of multiple business scenarios;
  • the derivative field in the derivative dimension data of the single business scenario is empty
  • the derivative fields in the derivative dimension data of the multiple business scenarios are not empty, and each of the derivative fields corresponds to each business scenario one-to-one.
  • the method of mapping and matching the physical model with the derived dimension data to construct a logical model includes:
  • the field composition including a dimension field, a metric field, and an index field;
  • the method of obtaining the query instruction and retrieving the derived dimension data and index field output corresponding to the mapping relationship from the logical model includes:
  • the role and/or job number information is parsed from the query instruction, and the derived dimension data of the corresponding mapping relationship and the statistical output of the indicator field and the measurement field are retrieved based on the corresponding control authority.
  • the multi-dimensional data query method provided by the present invention has the following beneficial effects:
  • atomic dimensional data is defined and created according to the dimension table in the data warehouse, and then the user determines the business model according to the required business definition and target query scenario, and retrieves it from the data warehouse based on the business model Relevant fact table training physical model, where detailed fact data and corresponding index fields and metric fields are stored in the physical model.
  • the present invention also needs to expand the atomic dimension data according to the definition of business scenarios. , Generate multiple derivative dimension data related to it, and then map and match the above physical model with the derivative dimension data to construct a logical model to obtain the mapping relationship between the derivative dimension data and the corresponding indicator fields and measurement fields. After the logical model is built, based on the user The query instructions retrieve the derived dimension data corresponding to the mapping relationship and the statistical output of the index field and the measurement field from the logical model, and push it to the report side for display to the user.
  • the use of the multi-dimensional data query method provided by the present invention can reduce the impact of dimensional explosion under the condition of achieving the same dimensional data query requirements.
  • the device includes an atomic dimension construction unit for building atomic dimension data based on a dimension table in a data warehouse,
  • the atomic dimension data includes dimension code, dimension name, dimension value code and dimension value name;
  • the physical model modeling unit is used to train the physical model based on the fact table in the data warehouse, and the physical model stores detailed fact data and corresponding index fields and measurement fields;
  • the dimension expansion unit is used to expand the dimension of the atomic dimension data, and correspondingly generate multiple derivative dimension data related to it;
  • a logical model modeling unit configured to map and match the physical model with the derived dimensional data to construct a logical model, and the logical model stores the mapping relationship between the derived dimensional data and corresponding indicator fields and metric fields;
  • the query output unit is used to obtain a query instruction, and retrieve the derived dimension data of the corresponding mapping relationship and the statistical output of the index field and the measurement field from the logic model.
  • the atomic dimension modeling unit and the physical model modeling unit further includes
  • the authority configuration unit is used to configure the query authority for the atomic dimension data according to the dimension code of the atomic dimension data.
  • the beneficial effects of the multi-dimensional data query device provided by the present invention are the same as the beneficial effects of the multi-dimensional data query method provided by the above technical solutions, and will not be repeated here.
  • a third aspect of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is run by a processor, the steps of the above-mentioned multi-dimensional data query method are executed.
  • the beneficial effects of the computer-readable storage medium provided by the present invention are the same as the beneficial effects of the multi-dimensional data query method provided by the above technical solutions, and will not be repeated here.
  • FIG. 1 is a schematic flowchart of a multi-dimensional data query method in Embodiment 1 of the present invention
  • Figure 2 is an example diagram of order indicator dimension construction in Embodiment 1 of the present invention.
  • this embodiment provides a multi-dimensional data query method, including: constructing atomic dimension data based on a dimension table in a data warehouse.
  • the atomic dimension data includes dimension codes, dimension names, dimension value codes, and dimension value names; based on data
  • the fact table in the warehouse trains the physical model.
  • the physical model stores detailed fact data and corresponding indicator fields and measurement fields; expands the dimension of the atomic dimension data, and generates multiple derivative dimension data related to it correspondingly; combines the physical model with Derived dimension data mapping and matching to construct a logical model.
  • the logical model stores the mapping relationship between the derived dimension data and the corresponding indicator field and measurement field; obtains query instructions, and retrieves the derived dimension data, indicator field and measurement of the corresponding mapping relationship from the logical model Field statistics output.
  • atomic dimensional data is defined and created according to the dimension table in the data warehouse, and then the user determines the business model according to the required business definition and target query scenario, and adjusts from the data warehouse based on the business model Take the relevant fact table to train the physical model.
  • the physical model stores detailed fact data and corresponding index fields and measurement fields.
  • this embodiment also needs to perform the atomic dimension data according to the definition of the business scenario.
  • Dimension expansion generate multiple derivative dimensional data related to it, and then match the above physical model with the derivative dimensional data to build a logical model, and obtain the mapping relationship between the derivative dimensional data and the corresponding indicator fields and measurement fields.
  • the logical model is built, Based on the user's query instruction, the derived dimension data of the corresponding mapping relationship and the statistical output of the index field and the measurement field are retrieved from the logical model, and then pushed to the report side and displayed to the user.
  • the method before training the physical model based on the fact table in the data warehouse in the above embodiment, the method further includes:
  • the configuration of the query authority for the atomic dimension data is performed.
  • the configuration rule of the query authority adopts a scheme in which the role and/or job number correspond to the dimension value encoding of the set range.
  • the above-mentioned dimension-based permission control adopts a role+work ID+dimension value encoding scheme, that is, the dimension value encoding range that can be viewed corresponding to each role+work ID in a certain dimension is pre-configured, where the role Can refer to position, type of work, etc.
  • the dimension expansion is performed for the atomic dimension data
  • the corresponding method for generating multiple derivative dimension data related thereto includes: the derivative dimension data is composed of the derivative field and the dimension value code in the related atomic dimension data, and the derivative field represents the business scenario .
  • the system when the derived dimension required in the construction of the logical model is "business scenario + atomic dimension", the system will form a new derived dimension code based on the corresponding field name + atomic dimension code in the physical model, such as based on "city "This atomic dimension” distinguishes “receiving city” and “shipping city” according to business scenarios, thereby generating different derived dimension codes.
  • the derived dimension data in the above embodiment includes the derived dimension data of a single business scenario and the derived dimension data of multiple business scenarios; the derived field in the derived dimension data of a single business scenario is empty; the derived dimensions of multiple business scenarios
  • the derived fields in the data are not empty, and each derived field corresponds to each business scenario one-to-one.
  • the derived dimensional data of a single business scenario such as "traffic visiting city”
  • the derived dimensional data can be regarded as equivalent to the atomic dimensional data, that is, the derived field is empty.
  • the derivative field in the derivative dimension data of the multi-business scenario of "delivery city” is not empty.
  • the dimension value code of the atomic dimension data of "city” is WD0001
  • the dimension value code of the derivative dimension data of "receiving city” is receivecity WD0001
  • the dimension code of the derived dimension data of "shipping city” is delivercity WD0001.
  • the derived dimension data generated based on the same atomic dimension data in the above embodiment completely inherits the dimension value code in the atomic dimension data, that is, the dimension code originates from the same physical table; it is generated based on the same atomic dimension data
  • the derived dimension data can be traced to the same atomic dimension data in blood relationship analysis, and can be designated as a common dimension between different indicators, which is convenient for cross-domain analysis.
  • the method for mapping and matching the physical model and the derived dimension data to construct a logical model in the foregoing embodiment includes:
  • the logic model includes derived dimension data A and derived dimension data B.
  • the permission control switch of derived dimension data A is selected in the training logic model, its permission configuration is the same as that of atomic dimension data.
  • the permission configuration is turned off, which is equivalent to not setting the permission configuration.
  • the method of obtaining query instructions, invoking derived dimension data corresponding to the mapping relationship and output of index fields from the logical model includes: parsing role and/or job number information from the query instructions, and invoking based on the corresponding control authority The derived dimension data corresponding to the mapping relationship and the statistical output of indicator fields and measurement fields.
  • the system will automatically follow the physical table when building the order logic model Generate three derived dimension data, namely receivecity WD0001, delivercity WD0001, and submitcity WD0001, and the original dimension data definition and dimension value data of these three derived dimension data inherit the city dimension, without the need for human repeated construction management;
  • delivercity_WD0001 retains all the authority configuration information of the "city” dimension and takes effect. Both "receiving city” and “order city” do not need to control data authority, and make corresponding measures during indicator construction Check the configuration;
  • the report can view three dimensions of payment amount indicator + receiving city/shipping city/order city, and the shipping city is subject to authority control, and the other two have no authority control.
  • this embodiment can solve the problem of excessive artificial approximate definition of dimensions through the multi-dimensional data query method, and automatically generate different derived dimension codes by using derived dimension data rules, which can inherit data and blood relationship information of the same atomic dimension; in addition, , By performing differentiated data authority control on derived dimension data, the problem of inheriting atomic dimension data and controlling authority of all derived dimension data in the same scope is avoided, and the control authority of derived dimension data can be decoupled and solidified to achieve Differentiated control of data permissions for derived dimensions according to different business scenarios.
  • This embodiment provides a multi-dimensional data query device, including an atomic dimension construction unit for building atomic dimension data based on a dimension table in a data warehouse, the atomic dimension data including dimension codes, dimension names, dimension value codes, and dimension value names ;
  • the physical model modeling unit is used to train the physical model based on the fact table in the data warehouse, and the physical model stores detailed fact data and corresponding index fields and measurement fields;
  • the dimension expansion unit is used to expand the dimension of the atomic dimension data, and correspondingly generate multiple derivative dimension data related thereto;
  • a logical model modeling unit configured to map and match the physical model with the derived dimensional data to construct a logical model, and the logical model stores the mapping relationship between the derived dimensional data and corresponding indicator fields and metric fields;
  • the query output unit is used to obtain a query instruction, and retrieve the derived dimension data corresponding to the mapping relationship and the statistical output of the index field and the measurement field from the logical model.
  • the atomic dimension modeling unit and the physical model modeling unit further includes
  • the authority configuration unit is used to configure the query authority for the atomic dimension data according to the dimension code of the atomic dimension data.
  • the beneficial effects of the multi-dimensional data query device provided by the embodiment of the present invention are the same as the beneficial effects of the multi-dimensional data query method provided in the first embodiment, and will not be repeated here.
  • This embodiment provides a computer-readable storage medium on which a computer program is stored, and when the computer program is run by a processor, the steps of the above-mentioned multi-dimensional data query method are executed.
  • the beneficial effects of the computer-readable storage medium provided in this embodiment are the same as the beneficial effects of the multi-dimensional data query method provided by the above technical solutions, and will not be repeated here.
  • the above-mentioned inventive method can be implemented by a program instructing relevant hardware.
  • the above-mentioned program can be stored in a computer-readable storage medium.
  • the storage medium may be: ROM/RAM, magnetic disk, optical disk, memory card, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed in the present invention are a multi-dimension data query method and apparatus, relating to the technical field of big data analysis, and capable of implementing precise queries of approximate dimension data whilst reducing the physical storage space of the data model. The method comprises: on the basis of a dimension table in a data warehouse, constructing atomic dimension data; on the basis of a fact table in the data warehouse, training a physical model, detailed fact data and corresponding indicator fields and metric fields being stored in the physical model; performing dimensional expansion on the atomic dimension data to correspondingly generate multiple derived dimension data relating to same; mapping the physical model and the derived dimension data to construct a logical model, the mapping relationship between the derived dimension data and the corresponding indicator fields and metric fields being stored in the logical model; acquiring a query command, and retrieving from the logical model the derived dimension data corresponding to the mapping relationship and the statistical output of the index fields and the metric fields. The apparatus applies the method in said solution.

Description

一种多维数据查询方法及装置Multidimensional data query method and device 技术领域Technical field
本发明涉及大数据分析技术领域,尤其涉及一种多维数据查询方法及装置。The present invention relates to the technical field of big data analysis, in particular to a multi-dimensional data query method and device.
背景技术Background technique
在多维数据分析处理中,基于OLAP引擎的业务逻辑模型建模是目前很常用的一种解决方案,即通过实现一个“数据立方体”对数据仓库中的数据按不同的维度组合进行建模聚合,并在数据分析师进行实际业务查询时,根据查询的指标和维度组合对逻辑模型进行汇总聚合返回结果,从而实现对业务数据多维分析的有力支撑。In multi-dimensional data analysis and processing, business logic model modeling based on OLAP engine is a very commonly used solution at present, that is, by implementing a "data cube" to model and aggregate data in the data warehouse according to different dimensional combinations, And when data analysts conduct actual business queries, they will summarize and aggregate the logical models to return results according to the queried indicators and dimension combinations, thereby achieving strong support for multi-dimensional analysis of business data.
然而,随着具体业务领域的细分发展,单一业务逻辑模型中维度数量过多、维值基数过大的场景越来越多,某类分析维度、特别是数据定义近似但业务定义有所差别的维度组在同一分析模型中出现的频率也越来越高。在保证实际多维分析的目标下,如果在维度定义上基于所有的业务场景做细分定义,会导致维度存在过度重复定义、占据过多物理存储空间、维度***的隐患,对维度的管理也会造成很大的挑战。However, with the development of specific business areas, there are more and more scenarios in a single business logic model with too many dimensions and too large dimensional value base. Certain types of analysis dimensions, especially data definitions, are similar but business definitions are different. The frequency of dimensional groups appearing in the same analysis model is also increasing. Under the goal of ensuring the actual multi-dimensional analysis, if the dimension definition is defined based on all business scenarios, it will lead to the hidden dangers of excessive repetition of the definition, occupying too much physical storage space, and dimension explosion. The management of the dimension will also Cause great challenges.
发明内容Summary of the invention
本发明的目的在于提供一种多维数据查询方法及装置,能够在减少数据模型物理存储空间的同时实现对近似维度数据的精确查询。The purpose of the present invention is to provide a multi-dimensional data query method and device, which can realize accurate query of approximate dimensional data while reducing the physical storage space of the data model.
为了实现上述目的,本发明的一方面提供一种多维数据查询方法,包括:In order to achieve the above objective, one aspect of the present invention provides a multi-dimensional data query method, including:
基于数据仓库中的维度表构建原子维度数据,所述原子维度数据包括维度编码、维度名称、维值编码和维值名称;Constructing atomic dimension data based on the dimension table in the data warehouse, the atomic dimension data including dimension code, dimension name, dimension value code and dimension value name;
基于数据仓库中的事实表训练物理模型,所述物理模型中存储有明细事实数据及对应的指标字段和度量字段;Training a physical model based on the fact table in the data warehouse, the physical model stores detailed fact data and corresponding index fields and metric fields;
针对所述原子维度数据进行维度拓展,对应生成与之相关的多个衍生维度数据;Perform dimension expansion for the atomic dimension data, and correspondingly generate multiple derivative dimension data related thereto;
将所述物理模型与所述衍生维度数据映射匹配构建逻辑模型,所述逻辑模型中存储有所述衍生维度数据与对应指标字段及度量字段的映射关系;Mapping and matching the physical model with the derived dimension data to construct a logical model, and the logical model stores the mapping relationship between the derived dimension data and corresponding indicator fields and metric fields;
获取查询指令,从所述逻辑模型中调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出。The query instruction is obtained, and the derived dimension data corresponding to the mapping relationship and the statistical output of the index field and the measurement field are retrieved from the logical model.
优选地,在基于数据仓库中的事实表训练物理模型之前还包括:Preferably, before training the physical model based on the fact table in the data warehouse, the method further includes:
根据原子维度数据的维度编码,对所述原子维度数据进行查询权限的配置。According to the dimension code of the atomic dimension data, the configuration of the query authority for the atomic dimension data is performed.
较佳地,所述查询权限的配置规则采用角色和/或工号对应设定范围维值编码的方案。Preferably, the configuration rule of the query authority adopts a scheme in which the role and/or the job number correspond to the dimension value encoding of the set range.
优选地,针对所述原子维度数据进行维度拓展,对应生成与之相关的多个衍生维度数据的方法包括:Preferably, performing dimension expansion for the atomic dimension data, and correspondingly generating multiple derivative dimension data related thereto includes:
所述衍生维度数据由衍生字段和相关原子维度数据中的维值编码组成,所述衍生字段代表业务场景。The derived dimension data is composed of a derived field and dimension value codes in related atomic dimension data, and the derived field represents a business scenario.
优选地,所述衍生维度数据包括单一业务场景的衍生维度数据和多元业务场景的衍生维度数据;Preferably, the derived dimensional data includes derived dimensional data of a single business scenario and derived dimensional data of multiple business scenarios;
所述单一业务场景的衍生维度数据中的衍生字段为空;The derivative field in the derivative dimension data of the single business scenario is empty;
所述多元业务场景的衍生维度数据中的衍生字段为非空,且各所述衍生字段与每种业务场景一一对应。The derivative fields in the derivative dimension data of the multiple business scenarios are not empty, and each of the derivative fields corresponds to each business scenario one-to-one.
优选地,将所述物理模型与所述衍生维度数据映射匹配构建逻辑模型的方法包括:Preferably, the method of mapping and matching the physical model with the derived dimension data to construct a logical model includes:
设置所述逻辑模型的字段构成,所述字段构成包括维度字段、度量字段和指标字段;Setting the field composition of the logical model, the field composition including a dimension field, a metric field, and an index field;
清洗所述物理模型的字段数据,仅保留与所述逻辑模型字段构成一致的字段数据;Clean the field data of the physical model, and only retain the field data that is consistent with the logical model field composition;
获取所述衍生维度数据与所述物理模型中度量字段及指标字段的映射关 系,构建所述逻辑模型。Obtain the mapping relationship between the derived dimension data and the measurement field and the index field in the physical model, and construct the logical model.
优选地,获取查询指令,从所述逻辑模型中调取对应映射关系的所述衍生维度数据及指标字段输出的方法包括:Preferably, the method of obtaining the query instruction and retrieving the derived dimension data and index field output corresponding to the mapping relationship from the logical model includes:
从查询指令中解析角色和/或工号信息,基于对应的控制权限调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出。The role and/or job number information is parsed from the query instruction, and the derived dimension data of the corresponding mapping relationship and the statistical output of the indicator field and the measurement field are retrieved based on the corresponding control authority.
与现有技术相比,本发明提供的多维数据查询方法具有以下有益效果:Compared with the prior art, the multi-dimensional data query method provided by the present invention has the following beneficial effects:
本发明提供的多维数据查询方法中,根据数据仓库中的维度表定义并创建原子维度数据,然后用户根据需要的业务定义及目标查询场景确定业务模型,并基于该业务模型从数据仓库中调取相关事实表训练物理模型,其中,该物理模型中存储有明细事实数据及对应的指标字段和度量字段,为了提升维度的丰富度,本发明还需根据业务场景的定义对原子维度数据进行维度拓展,生成与之相关的多个衍生维度数据,之后将上述物理模型与衍生维度数据映射匹配构建逻辑模型,得到衍生维度数据与对应指标字段及度量字段的映射关系,在逻辑模型建成之后,基于用户的查询指令从逻辑模型中调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出,推送给报表端展示给用户。In the multidimensional data query method provided by the present invention, atomic dimensional data is defined and created according to the dimension table in the data warehouse, and then the user determines the business model according to the required business definition and target query scenario, and retrieves it from the data warehouse based on the business model Relevant fact table training physical model, where detailed fact data and corresponding index fields and metric fields are stored in the physical model. In order to enhance the richness of dimensions, the present invention also needs to expand the atomic dimension data according to the definition of business scenarios. , Generate multiple derivative dimension data related to it, and then map and match the above physical model with the derivative dimension data to construct a logical model to obtain the mapping relationship between the derivative dimension data and the corresponding indicator fields and measurement fields. After the logical model is built, based on the user The query instructions retrieve the derived dimension data corresponding to the mapping relationship and the statistical output of the index field and the measurement field from the logical model, and push it to the report side for display to the user.
可见,相比较于现有技术中利用单一原子维度数据与物理模型构建逻辑模型而言,在实现相同维度数据查询需求的情况下,使用本发明提供的多维数据查询方法能够减少维度***带来的人为建设管理成本及硬件存储技术成本。It can be seen that compared with the use of single atomic dimension data and physical model to construct a logical model in the prior art, the use of the multi-dimensional data query method provided by the present invention can reduce the impact of dimensional explosion under the condition of achieving the same dimensional data query requirements. Man-made construction management costs and hardware storage technology costs.
本发明的另一方面提供一种多维数据查询装置,应用于上述技术方案提到的多维数据查询方法中,该装置包括原子维度构建单元,用于基于数据仓库中的维度表构建原子维度数据,所述原子维度数据包括维度编码、维度名称、维值编码和维值名称;Another aspect of the present invention provides a multi-dimensional data query device, which is applied to the multi-dimensional data query method mentioned in the above technical solution. The device includes an atomic dimension construction unit for building atomic dimension data based on a dimension table in a data warehouse, The atomic dimension data includes dimension code, dimension name, dimension value code and dimension value name;
物理模型建模单元,用于基于数据仓库中的事实表训练物理模型,所述物理模型中存储有明细事实数据及对应的指标字段和度量字段;The physical model modeling unit is used to train the physical model based on the fact table in the data warehouse, and the physical model stores detailed fact data and corresponding index fields and measurement fields;
维度拓展单元,用于针对所述原子维度数据进行维度拓展,对应生成与 之相关的多个衍生维度数据;The dimension expansion unit is used to expand the dimension of the atomic dimension data, and correspondingly generate multiple derivative dimension data related to it;
逻辑模型建模单元,用于将所述物理模型与所述衍生维度数据映射匹配构建逻辑模型,所述逻辑模型中存储有所述衍生维度数据与对应指标字段及度量字段的映射关系;A logical model modeling unit, configured to map and match the physical model with the derived dimensional data to construct a logical model, and the logical model stores the mapping relationship between the derived dimensional data and corresponding indicator fields and metric fields;
查询输出单元,用于获取查询指令,从所述逻辑模型中调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出。The query output unit is used to obtain a query instruction, and retrieve the derived dimension data of the corresponding mapping relationship and the statistical output of the index field and the measurement field from the logic model.
优选地,在原子维度建模单元和物理模型建模单元之间还包括Preferably, between the atomic dimension modeling unit and the physical model modeling unit further includes
权限配置单元,用于根据原子维度数据的维度编码,对所述原子维度数据进行查询权限的配置。The authority configuration unit is used to configure the query authority for the atomic dimension data according to the dimension code of the atomic dimension data.
与现有技术相比,本发明提供的多维数据查询装置的有益效果与上述技术方案提供的多维数据查询方法的有益效果相同,在此不做赘述。Compared with the prior art, the beneficial effects of the multi-dimensional data query device provided by the present invention are the same as the beneficial effects of the multi-dimensional data query method provided by the above technical solutions, and will not be repeated here.
本发明的第三方面提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器运行时执行上述多维数据查询方法的步骤。A third aspect of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is run by a processor, the steps of the above-mentioned multi-dimensional data query method are executed.
与现有技术相比,本发明提供的计算机可读存储介质的有益效果与上述技术方案提供的多维数据查询方法的有益效果相同,在此不做赘述。Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present invention are the same as the beneficial effects of the multi-dimensional data query method provided by the above technical solutions, and will not be repeated here.
附图说明Description of the drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本发明的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments and descriptions of the present invention are used to explain the present invention, and do not constitute an improper limitation of the present invention. In the attached picture:
图1为本发明实施例一中多维数据查询方法的流程示意图;FIG. 1 is a schematic flowchart of a multi-dimensional data query method in Embodiment 1 of the present invention;
图2为本发明实施例一中订单指标维度建设示例图。Figure 2 is an example diagram of order indicator dimension construction in Embodiment 1 of the present invention.
具体实施方式Detailed ways
为使本发明的上述目的、特征和优点能够更加明显易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。 显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其它实施例,均属于本发明保护的范围。In order to make the above objectives, features, and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
实施例一Example one
请参阅图1,本实施例提供一种多维数据查询方法,包括:基于数据仓库中的维度表构建原子维度数据,原子维度数据包括维度编码、维度名称、维值编码和维值名称;基于数据仓库中的事实表训练物理模型,物理模型中存储有明细事实数据及对应的指标字段和度量字段;针对原子维度数据进行维度拓展,对应生成与之相关的多个衍生维度数据;将物理模型与衍生维度数据映射匹配构建逻辑模型,逻辑模型中存储有衍生维度数据与对应指标字段及度量字段的映射关系;获取查询指令,从逻辑模型中调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出。Referring to Fig. 1, this embodiment provides a multi-dimensional data query method, including: constructing atomic dimension data based on a dimension table in a data warehouse. The atomic dimension data includes dimension codes, dimension names, dimension value codes, and dimension value names; based on data The fact table in the warehouse trains the physical model. The physical model stores detailed fact data and corresponding indicator fields and measurement fields; expands the dimension of the atomic dimension data, and generates multiple derivative dimension data related to it correspondingly; combines the physical model with Derived dimension data mapping and matching to construct a logical model. The logical model stores the mapping relationship between the derived dimension data and the corresponding indicator field and measurement field; obtains query instructions, and retrieves the derived dimension data, indicator field and measurement of the corresponding mapping relationship from the logical model Field statistics output.
本实施例提供的多维数据查询方法中,根据数据仓库中的维度表定义并创建原子维度数据,然后用户根据需要的业务定义及目标查询场景确定业务模型,并基于该业务模型从数据仓库中调取相关事实表训练物理模型,其中,该物理模型中存储有明细事实数据及对应的指标字段和度量字段,为了提升维度的丰富度,本实施例还需根据业务场景的定义对原子维度数据进行维度拓展,生成与之相关的多个衍生维度数据,之后将上述物理模型与衍生维度数据映射匹配构建逻辑模型,得到衍生维度数据与对应指标字段及度量字段的映射关系,在逻辑模型建成之后,基于用户的查询指令从逻辑模型中调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出,推送给报表端展示给用户。In the multidimensional data query method provided in this embodiment, atomic dimensional data is defined and created according to the dimension table in the data warehouse, and then the user determines the business model according to the required business definition and target query scenario, and adjusts from the data warehouse based on the business model Take the relevant fact table to train the physical model. The physical model stores detailed fact data and corresponding index fields and measurement fields. In order to enhance the richness of the dimensions, this embodiment also needs to perform the atomic dimension data according to the definition of the business scenario. Dimension expansion, generate multiple derivative dimensional data related to it, and then match the above physical model with the derivative dimensional data to build a logical model, and obtain the mapping relationship between the derivative dimensional data and the corresponding indicator fields and measurement fields. After the logical model is built, Based on the user's query instruction, the derived dimension data of the corresponding mapping relationship and the statistical output of the index field and the measurement field are retrieved from the logical model, and then pushed to the report side and displayed to the user.
可见,相比较于现有技术中利用单一原子维度数据与物理模型构建逻辑模型而言,在实现相同维度数据查询需求的情况下,使用本实施例提供的多维数据查询方法能够减少维度***带来的人为建设管理成本及硬件存储技术成本。It can be seen that, compared with the use of single atomic dimension data and physical models to construct logical models in the prior art, in the case of achieving the same dimension data query requirements, using the multi-dimensional data query method provided in this embodiment can reduce dimensional explosions. The cost of man-made construction management and hardware storage technology.
优选地,上述实施例中在基于数据仓库中的事实表训练物理模型之前还 包括:Preferably, before training the physical model based on the fact table in the data warehouse in the above embodiment, the method further includes:
根据原子维度数据的维度编码,对原子维度数据进行查询权限的配置。其中,查询权限的配置规则采用角色和/或工号对应设定范围维值编码的方案。示例性地,上述基于维度的权限控制采用角色+工号+维值编码的方案,即每个角色+工号在某一维度上对应的可以查看的维值编码范围是预先配置的,其中角色可以指职位、工种等。According to the dimension code of the atomic dimension data, the configuration of the query authority for the atomic dimension data is performed. Among them, the configuration rule of the query authority adopts a scheme in which the role and/or job number correspond to the dimension value encoding of the set range. Exemplarily, the above-mentioned dimension-based permission control adopts a role+work ID+dimension value encoding scheme, that is, the dimension value encoding range that can be viewed corresponding to each role+work ID in a certain dimension is pre-configured, where the role Can refer to position, type of work, etc.
上述实施例中针对原子维度数据进行维度拓展,对应生成与之相关的多个衍生维度数据的方法包括:衍生维度数据由衍生字段和相关原子维度数据中的维值编码组成,衍生字段代表业务场景。In the above embodiment, the dimension expansion is performed for the atomic dimension data, and the corresponding method for generating multiple derivative dimension data related thereto includes: the derivative dimension data is composed of the derivative field and the dimension value code in the related atomic dimension data, and the derivative field represents the business scenario .
具体实施时,当逻辑模型建设中需要的衍生维度为“业务场景+原子维度”时,则***会基于物理模型中对应的字段名+原子维度编码,组成新的衍生维度编码,如基于“城市”这个原子维度,根据业务场景需要区分“收货城市”、“发货城市”,从而生成不同的衍生维度编码。In specific implementation, when the derived dimension required in the construction of the logical model is "business scenario + atomic dimension", the system will form a new derived dimension code based on the corresponding field name + atomic dimension code in the physical model, such as based on "city "This atomic dimension" distinguishes "receiving city" and "shipping city" according to business scenarios, thereby generating different derived dimension codes.
可以理解的是,上述实施例中的衍生维度数据包括单一业务场景的衍生维度数据和多元业务场景的衍生维度数据;单一业务场景的衍生维度数据中的衍生字段为空;多元业务场景的衍生维度数据中的衍生字段为非空,且各衍生字段与每种业务场景一一对应。换句话说,对于如“流量访问城市”这种单一业务场景的衍生维度数据,可视作衍生维度数据等同于原子维度数据,也即衍生字段为空,对于如“收货城市”、“发货城市”这种多元业务场景的衍生维度数据中的衍生字段为非空,若“城市”的原子维度数据的维值编码为WD0001,则“收货城市”的衍生维度数据的维值编码为receivecity WD0001,“发货城市”的衍生维度数据的维值编码为delivercity WD0001。It is understandable that the derived dimension data in the above embodiment includes the derived dimension data of a single business scenario and the derived dimension data of multiple business scenarios; the derived field in the derived dimension data of a single business scenario is empty; the derived dimensions of multiple business scenarios The derived fields in the data are not empty, and each derived field corresponds to each business scenario one-to-one. In other words, for the derived dimensional data of a single business scenario such as "traffic visiting city", the derived dimensional data can be regarded as equivalent to the atomic dimensional data, that is, the derived field is empty. The derivative field in the derivative dimension data of the multi-business scenario of "delivery city" is not empty. If the dimension value code of the atomic dimension data of "city" is WD0001, then the dimension value code of the derivative dimension data of "receiving city" is receivecity WD0001, the dimension code of the derived dimension data of "shipping city" is delivercity WD0001.
需要说明的是,上述实施例中的基于同一个原子维度数据生成的衍生维度数据,完全继承原子维度数据中的维值编码,即维度编码源自同一张物理表;基于同一个原子维度数据生成的衍生维度数据,在血缘分析上可追溯至同一原子维度数据,且可以指定为不同指标间的公共维度,便于跨域分析使用。It should be noted that the derived dimension data generated based on the same atomic dimension data in the above embodiment completely inherits the dimension value code in the atomic dimension data, that is, the dimension code originates from the same physical table; it is generated based on the same atomic dimension data The derived dimension data can be traced to the same atomic dimension data in blood relationship analysis, and can be designated as a common dimension between different indicators, which is convenient for cross-domain analysis.
进一步地,上述实施例中的将所述物理模型与所述衍生维度数据映射匹配构建逻辑模型的方法包括:Further, the method for mapping and matching the physical model and the derived dimension data to construct a logical model in the foregoing embodiment includes:
设置逻辑模型的字段构成,字段构成包括维度字段、度量字段和指标字段;清洗物理模型的字段数据,仅保留与逻辑模型字段构成一致的字段数据;获取衍生维度数据与物理模型中度量字段及指标字段的映射关系,构建逻辑模型。Set the field composition of the logical model, including dimension fields, metric fields, and index fields; clean the field data of the physical model, and only keep the field data consistent with the logical model field composition; obtain the derived dimension data and the metric fields and indicators in the physical model The mapping relationship of the fields builds a logical model.
需要补充的是,对于同一个原子维度数据生成的衍生维度数据,在构建逻辑模型时该衍生维度数据虽然继承了原子维度数据的权限配置,但在训练逻辑模型时还可增加衍生维度数据的权限控制开关,例如逻辑模型中包括衍生维度数据A和衍生维度数据B,当在训练逻辑模型中选择打开衍生维度数据A的权限控制开关时,其权限配置与原子维度数据的权限配置相同,当在训练逻辑模型中未选择打开衍生维度数据B的权限控制开关时,其权限配置处于关闭状态即等同于未设置权限配置。可见,本实施例通过增设衍生维度数据的权限控制开关,能够进一步保证逻辑模型应用的灵活性。What needs to be added is that for the derived dimension data generated by the same atomic dimension data, although the derived dimension data inherits the permission configuration of the atomic dimension data when constructing the logical model, it can also increase the permission of the derived dimension data when training the logical model. Control switches. For example, the logic model includes derived dimension data A and derived dimension data B. When the permission control switch of derived dimension data A is selected in the training logic model, its permission configuration is the same as that of atomic dimension data. When the permission control switch of the derived dimension data B is not selected in the training logic model, the permission configuration is turned off, which is equivalent to not setting the permission configuration. It can be seen that this embodiment can further ensure the flexibility of logic model application by adding a permission control switch for derived dimension data.
上述实施例中,获取查询指令,从逻辑模型中调取对应映射关系的衍生维度数据及指标字段输出的方法包括:从查询指令中解析角色和/或工号信息,基于对应的控制权限调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出。In the above embodiment, the method of obtaining query instructions, invoking derived dimension data corresponding to the mapping relationship and output of index fields from the logical model includes: parsing role and/or job number information from the query instructions, and invoking based on the corresponding control authority The derived dimension data corresponding to the mapping relationship and the statistical output of indicator fields and measurement fields.
为了便于理解,请参阅图2,本实施例以订单相关数据分析举例说明:For ease of understanding, please refer to Figure 2. This embodiment uses order-related data analysis as an example:
根据数据仓库中的城市维度表,在维度管理***中定义“城市”维度,以WD0001作为该维度的唯一编码标识,维值存放形式例如“025—南京市”,并进行相应的权限配置工作;According to the city dimension table in the data warehouse, define the "city" dimension in the dimension management system, use WD0001 as the unique code identifier of the dimension, and store the dimension value in the form of "025—Nanjing City", and carry out the corresponding authority configuration work;
基于数据仓库中的订单明细表,建设订单过程的物理模型;Build a physical model of the order process based on the order schedule in the data warehouse;
由于订单明细表中包含“收货城市”“发货城市”“下单城市”三个与“城市”原子维度数据相关的分析维度字段,因此在建设订单逻辑模型时,***自动根据物理表中的字段名称,生成三个衍生维度数据,分别为receivecity WD0001、delivercity WD0001、submitcity WD0001,且这三个衍生 维度数据的原始维度数据定义与维值数据均继承城市维度,无需人为重复建设管理;Since the order detail table contains three analytical dimension fields related to the atomic dimension data of "city", "receiving city", "shipping city" and "order city", the system will automatically follow the physical table when building the order logic model Generate three derived dimension data, namely receivecity WD0001, delivercity WD0001, and submitcity WD0001, and the original dimension data definition and dimension value data of these three derived dimension data inherit the city dimension, without the need for human repeated construction management;
建设逻辑模型,同时建设指标(含维度信息);Build a logical model and at the same time build indicators (including dimension information);
根据业务需要,“发货城市”delivercity_WD0001保留“城市”维度所有的权限配置信息并生效、“收货城市”和“下单城市”均不需要做数据权限控制,在指标建设时做好相应的勾选配置;According to business needs, "delivery city" delivercity_WD0001 retains all the authority configuration information of the "city" dimension and takes effect. Both "receiving city" and "order city" do not need to control data authority, and make corresponding measures during indicator construction Check the configuration;
报表可以查看付款金额指标+收货城市/发货城市/下单城市三个维度,且发货城市做权限控制、另外两个无权限控制。The report can view three dimensions of payment amount indicator + receiving city/shipping city/order city, and the shipping city is subject to authority control, and the other two have no authority control.
通过上述实施过程可知,本实施例通过多维数据查询方法能够解决维度的过度人为近似定义的问题,利用衍生维度数据规则自动生成不同的衍生维度编码,可以继承同一原子维度的数据及血缘信息;此外,通过将衍生维度数据进行差异化的数据权限控制,避免了因继承原子维度数据而将衍生维度数据全部按照同样的范围控制权限的问题,也即可以解耦固化衍生维度数据的控制权限,实现根据不同的业务场景对衍生维度数据权限的差异化控制。Through the above implementation process, it can be seen that this embodiment can solve the problem of excessive artificial approximate definition of dimensions through the multi-dimensional data query method, and automatically generate different derived dimension codes by using derived dimension data rules, which can inherit data and blood relationship information of the same atomic dimension; in addition, , By performing differentiated data authority control on derived dimension data, the problem of inheriting atomic dimension data and controlling authority of all derived dimension data in the same scope is avoided, and the control authority of derived dimension data can be decoupled and solidified to achieve Differentiated control of data permissions for derived dimensions according to different business scenarios.
实施例二Example two
本实施例提供一种多维数据查询装置,包括原子维度构建单元,用于基于数据仓库中的维度表构建原子维度数据,所述原子维度数据包括维度编码、维度名称、维值编码和维值名称;This embodiment provides a multi-dimensional data query device, including an atomic dimension construction unit for building atomic dimension data based on a dimension table in a data warehouse, the atomic dimension data including dimension codes, dimension names, dimension value codes, and dimension value names ;
物理模型建模单元,用于基于数据仓库中的事实表训练物理模型,所述物理模型中存储有明细事实数据及对应的指标字段和度量字段;The physical model modeling unit is used to train the physical model based on the fact table in the data warehouse, and the physical model stores detailed fact data and corresponding index fields and measurement fields;
维度拓展单元,用于针对所述原子维度数据进行维度拓展,对应生成与之相关的多个衍生维度数据;The dimension expansion unit is used to expand the dimension of the atomic dimension data, and correspondingly generate multiple derivative dimension data related thereto;
逻辑模型建模单元,用于将所述物理模型与所述衍生维度数据映射匹配构建逻辑模型,所述逻辑模型中存储有所述衍生维度数据与对应指标字段及度量字段的映射关系;A logical model modeling unit, configured to map and match the physical model with the derived dimensional data to construct a logical model, and the logical model stores the mapping relationship between the derived dimensional data and corresponding indicator fields and metric fields;
查询输出单元,用于获取查询指令,从所述逻辑模型中调取对应映射关 系的衍生维度数据及指标字段和度量字段统计输出。The query output unit is used to obtain a query instruction, and retrieve the derived dimension data corresponding to the mapping relationship and the statistical output of the index field and the measurement field from the logical model.
优选地,在原子维度建模单元和物理模型建模单元之间还包括Preferably, between the atomic dimension modeling unit and the physical model modeling unit further includes
权限配置单元,用于根据原子维度数据的维度编码,对所述原子维度数据进行查询权限的配置。The authority configuration unit is used to configure the query authority for the atomic dimension data according to the dimension code of the atomic dimension data.
与现有技术相比,本发明实施例提供的多维数据查询装置的有益效果与上述实施例一提供的多维数据查询方法的有益效果相同,在此不做赘述。Compared with the prior art, the beneficial effects of the multi-dimensional data query device provided by the embodiment of the present invention are the same as the beneficial effects of the multi-dimensional data query method provided in the first embodiment, and will not be repeated here.
实施例三Example three
本实施例提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器运行时执行上述多维数据查询方法的步骤。This embodiment provides a computer-readable storage medium on which a computer program is stored, and when the computer program is run by a processor, the steps of the above-mentioned multi-dimensional data query method are executed.
与现有技术相比,本实施例提供的计算机可读存储介质的有益效果与上述技术方案提供的多维数据查询方法的有益效果相同,在此不做赘述。Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this embodiment are the same as the beneficial effects of the multi-dimensional data query method provided by the above technical solutions, and will not be repeated here.
本领域普通技术人员可以理解,实现上述发明方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,上述程序可以存储于计算机可读取存储介质中,该程序在执行时,包括上述实施例方法的各步骤,而的存储介质可以是:ROM/RAM、磁碟、光盘、存储卡等。Those of ordinary skill in the art can understand that all or part of the steps in the above-mentioned inventive method can be implemented by a program instructing relevant hardware. The above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it includes For each step of the method in the foregoing embodiment, the storage medium may be: ROM/RAM, magnetic disk, optical disk, memory card, etc.
以上,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, and they shall cover Within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (10)

  1. 一种多维数据查询方法,其特征在于,包括:A method for querying multi-dimensional data, characterized in that it comprises:
    基于数据仓库中的维度表构建原子维度数据,所述原子维度数据包括维度编码、维度名称、维值编码和维值名称;Constructing atomic dimension data based on the dimension table in the data warehouse, the atomic dimension data including dimension code, dimension name, dimension value code and dimension value name;
    基于数据仓库中的事实表训练物理模型,所述物理模型中存储有明细事实数据及对应的指标字段和度量字段;Training a physical model based on the fact table in the data warehouse, the physical model stores detailed fact data and corresponding index fields and metric fields;
    针对所述原子维度数据进行维度拓展,对应生成与之相关的多个衍生维度数据;Perform dimension expansion for the atomic dimension data, and correspondingly generate multiple derivative dimension data related thereto;
    将所述物理模型与所述衍生维度数据映射匹配构建逻辑模型,所述逻辑模型中存储有所述衍生维度数据与对应指标字段及度量字段的映射关系;Mapping and matching the physical model with the derived dimension data to construct a logical model, and the logical model stores the mapping relationship between the derived dimension data and corresponding indicator fields and metric fields;
    获取查询指令,从所述逻辑模型中调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出。The query instruction is obtained, and the derived dimension data corresponding to the mapping relationship and the statistical output of the index field and the measurement field are retrieved from the logical model.
  2. 根据权利要求1所述的多维数据查询方法,其特征在于,在基于数据仓库中的事实表训练物理模型之前还包括:The multi-dimensional data query method according to claim 1, wherein before training the physical model based on the fact table in the data warehouse, the method further comprises:
    根据原子维度数据的维度编码,对所述原子维度数据进行查询权限的配置。According to the dimension code of the atomic dimension data, the configuration of the query authority for the atomic dimension data is performed.
  3. 根据权利要求2所述的多维数据查询方法,其特征在于,所述查询权限的配置规则采用角色和/或工号对应设定范围维值编码的方案。The multi-dimensional data query method according to claim 2, characterized in that the configuration rule of the query authority adopts a scheme in which roles and/or job numbers correspond to a set range dimension value encoding.
  4. 根据权利要求1所述的多维数据查询方法,其特征在于,针对所述原子维度数据进行维度拓展,对应生成与之相关的多个衍生维度数据的方法包括:The multi-dimensional data query method according to claim 1, wherein the method of performing dimension expansion for the atomic dimension data and correspondingly generating multiple derivative dimension data related thereto comprises:
    所述衍生维度数据由衍生字段和相关原子维度数据中的维值编码组成,所述衍生字段代表业务场景。The derived dimension data is composed of a derived field and dimension value codes in related atomic dimension data, and the derived field represents a business scenario.
  5. 根据权利要求4所述的多维数据查询方法,其特征在于,所述衍生维 度数据包括单一业务场景的衍生维度数据和多元业务场景的衍生维度数据;The multi-dimensional data query method according to claim 4, wherein the derived dimensional data includes derived dimensional data of a single business scenario and derived dimensional data of multiple business scenarios;
    所述单一业务场景的衍生维度数据中的衍生字段为空;The derivative field in the derivative dimension data of the single business scenario is empty;
    所述多元业务场景的衍生维度数据中的衍生字段为非空,且各所述衍生字段与每种业务场景一一对应。The derivative fields in the derivative dimension data of the multiple business scenarios are not empty, and each of the derivative fields corresponds to each business scenario one-to-one.
  6. 根据权利要求1所述的多维数据查询方法,其特征在于,将所述物理模型与所述衍生维度数据映射匹配构建逻辑模型的方法包括:The multi-dimensional data query method according to claim 1, wherein the method of mapping and matching the physical model with the derived dimensional data to construct a logical model comprises:
    设置所述逻辑模型的字段构成,所述字段构成包括维度字段、度量字段和指标字段;Setting the field composition of the logical model, where the field composition includes dimension fields, metric fields, and index fields;
    清洗所述物理模型的字段数据,仅保留与所述逻辑模型字段构成一致的字段数据;Clean the field data of the physical model, and only retain the field data that is consistent with the logical model field composition;
    获取所述衍生维度数据与所述物理模型中度量字段及指标字段的映射关系,构建所述逻辑模型。Obtain the mapping relationship between the derived dimension data and the measurement field and the index field in the physical model, and construct the logical model.
  7. 根据权利要求2所述的多维数据查询方法,其特征在于,获取查询指令,从所述逻辑模型中调取对应映射关系的衍生维度数据及指标字段输出的方法包括:The multi-dimensional data query method according to claim 2, wherein the method of obtaining the query instruction and invoking the derived dimension data corresponding to the mapping relationship and the index field output method from the logical model comprises:
    从查询指令中解析角色和/或工号信息,基于对应的控制权限调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出。The role and/or job number information is parsed from the query instruction, and the derived dimension data of the corresponding mapping relationship and the statistical output of the indicator field and the measurement field are retrieved based on the corresponding control authority.
  8. 一种多维数据查询装置,其特征在于,包括:A multi-dimensional data query device is characterized by comprising:
    原子维度构建单元,用于基于数据仓库中的维度表构建原子维度数据,所述原子维度数据包括维度编码、维度名称、维值编码和维值名称;The atomic dimension construction unit is used to construct atomic dimension data based on the dimension table in the data warehouse, where the atomic dimension data includes dimension codes, dimension names, dimension value codes, and dimension value names;
    物理模型建模单元,用于基于数据仓库中的事实表训练物理模型,所述物理模型中存储有明细事实数据及对应的指标字段和度量字段;The physical model modeling unit is used to train the physical model based on the fact table in the data warehouse, and the physical model stores detailed fact data and corresponding index fields and measurement fields;
    维度拓展单元,用于针对所述原子维度数据进行维度拓展,对应生成与之相关的多个衍生维度数据;The dimension expansion unit is used to expand the dimension of the atomic dimension data, and correspondingly generate multiple derivative dimension data related thereto;
    逻辑模型建模单元,用于将所述物理模型与所述衍生维度数据映射匹配构建逻辑模型,所述逻辑模型中存储有所述衍生维度数据与对应指标字段及度量字段的映射关系;A logical model modeling unit, configured to map and match the physical model with the derived dimensional data to construct a logical model, and the logical model stores the mapping relationship between the derived dimensional data and corresponding indicator fields and metric fields;
    查询输出单元,用于获取查询指令,从所述逻辑模型中调取对应映射关系的衍生维度数据及指标字段和度量字段统计输出。The query output unit is used to obtain a query instruction, and retrieve the derived dimension data of the corresponding mapping relationship and the statistical output of the index field and the measurement field from the logic model.
  9. 根据权利要求8所述的多维数据查询装置,其特征在于,在原子维度建模单元和物理模型建模单元之间还包括The multi-dimensional data query device according to claim 8, wherein, between the atomic dimensional modeling unit and the physical model modeling unit further comprises
    权限配置单元,用于根据原子维度数据的维度编码,对所述原子维度数据进行查询权限的配置。The authority configuration unit is used to configure the query authority for the atomic dimension data according to the dimension code of the atomic dimension data.
  10. 一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,其特征在于,计算机程序被处理器运行时执行上述权利要求1至7任一项所述方法的步骤。A computer-readable storage medium with a computer program stored on the computer-readable storage medium, wherein the computer program executes the steps of the method according to any one of claims 1 to 7 when the computer program is run by a processor.
PCT/CN2020/095669 2019-06-28 2020-06-11 Multi-dimension data query method and apparatus WO2020259309A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA3156460A CA3156460A1 (en) 2019-06-28 2020-06-11 Method and apparatus for querying multi-dimensional data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910579643.9A CN110427434B (en) 2019-06-28 2019-06-28 Multidimensional data query method and device
CN201910579643.9 2019-06-28

Publications (1)

Publication Number Publication Date
WO2020259309A1 true WO2020259309A1 (en) 2020-12-30

Family

ID=68408844

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/095669 WO2020259309A1 (en) 2019-06-28 2020-06-11 Multi-dimension data query method and apparatus

Country Status (3)

Country Link
CN (1) CN110427434B (en)
CA (1) CA3156460A1 (en)
WO (1) WO2020259309A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076317A (en) * 2021-04-08 2021-07-06 深圳前海微众银行股份有限公司 Data processing method, device and equipment based on big data and readable storage medium
CN113138990A (en) * 2021-05-17 2021-07-20 青岛海信网络科技股份有限公司 Data blood margin construction and tracing method, device and equipment
US11436221B1 (en) 2021-04-14 2022-09-06 Oracle International Corporation Autonomous testing of logical model inconsistencies
CN117251473A (en) * 2023-11-20 2023-12-19 摩斯智联科技有限公司 Vehicle data query analysis method, system, device and storage medium
CN117648339A (en) * 2024-01-29 2024-03-05 杭州硕磐智能科技有限公司 Data exploration method and device, server and storage medium
CN117709804A (en) * 2024-02-05 2024-03-15 杭州研趣信息技术有限公司 Index calculation method, device, equipment and medium based on block matrix

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427434B (en) * 2019-06-28 2022-06-07 苏宁云计算有限公司 Multidimensional data query method and device
CN111680506A (en) * 2020-04-28 2020-09-18 北京三快在线科技有限公司 External key mapping method and device of database table, electronic equipment and storage medium
CN112085366A (en) * 2020-09-01 2020-12-15 远光软件股份有限公司 Device and method for performing mesoTaiization processing on enterprise organization index data
CN113760240B (en) * 2020-09-02 2024-06-14 北京沃东天骏信息技术有限公司 Method and device for generating data model
CN112307041A (en) * 2020-10-29 2021-02-02 山东浪潮通软信息科技有限公司 Index dimension modeling method and device and computer readable medium
CN112328705B (en) * 2020-11-03 2023-10-24 成都中科大旗软件股份有限公司 Task scheduling method supporting arbitrary configuration period
CN112364603B (en) * 2020-11-19 2023-10-03 中国平安财产保险股份有限公司 Index code generation method, device, equipment and storage medium
CN112418721A (en) * 2020-12-08 2021-02-26 中国建设银行股份有限公司 Index determination method and device
CN112948441B (en) * 2021-03-26 2023-09-29 浪潮通用软件有限公司 Multi-dimensional data collection method and equipment for financial data
CN116911642B (en) * 2023-09-12 2023-12-26 中国长江电力股份有限公司 Multi-dimensional multi-state oriented hydroelectric generating set equipment index calculation system and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170116306A1 (en) * 2015-10-23 2017-04-27 Numerify, Inc. Automated Definition of Data Warehouse Star Schemas
CN106776834A (en) * 2016-11-28 2017-05-31 中通服公众信息产业股份有限公司 A kind of data analysis based on index is from access method and system
CN106909556A (en) * 2015-12-23 2017-06-30 中国电信股份有限公司 The storage equalization methods and device of main memory cluster
CN107861998A (en) * 2017-10-19 2018-03-30 用友网络科技股份有限公司 Introduction method, device and the computer equipment of business datum
US20180336710A1 (en) * 2017-05-16 2018-11-22 Sap Se Data insights for visualizations based on dimensions
CN110427434A (en) * 2019-06-28 2019-11-08 苏宁云计算有限公司 A kind of multidimensional data query method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020029207A1 (en) * 2000-02-28 2002-03-07 Hyperroll, Inc. Data aggregation server for managing a multi-dimensional database and database management system having data aggregation server integrated therein
CN104252452B (en) * 2013-06-25 2019-03-15 腾讯科技(深圳)有限公司 The method and device of data management
US10169378B2 (en) * 2014-09-11 2019-01-01 Oracle International Corporation Automatic generation of logical database schemas from physical database tables and metadata
CN106997386B (en) * 2017-03-28 2019-12-27 上海跬智信息技术有限公司 OLAP pre-calculation model, automatic modeling method and automatic modeling system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170116306A1 (en) * 2015-10-23 2017-04-27 Numerify, Inc. Automated Definition of Data Warehouse Star Schemas
CN106909556A (en) * 2015-12-23 2017-06-30 中国电信股份有限公司 The storage equalization methods and device of main memory cluster
CN106776834A (en) * 2016-11-28 2017-05-31 中通服公众信息产业股份有限公司 A kind of data analysis based on index is from access method and system
US20180336710A1 (en) * 2017-05-16 2018-11-22 Sap Se Data insights for visualizations based on dimensions
CN107861998A (en) * 2017-10-19 2018-03-30 用友网络科技股份有限公司 Introduction method, device and the computer equipment of business datum
CN110427434A (en) * 2019-06-28 2019-11-08 苏宁云计算有限公司 A kind of multidimensional data query method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076317A (en) * 2021-04-08 2021-07-06 深圳前海微众银行股份有限公司 Data processing method, device and equipment based on big data and readable storage medium
US11436221B1 (en) 2021-04-14 2022-09-06 Oracle International Corporation Autonomous testing of logical model inconsistencies
WO2022220916A1 (en) * 2021-04-14 2022-10-20 Oracle International Corporation Autonomous testing of logical model inconsistencies
US11782916B2 (en) 2021-04-14 2023-10-10 Oracle International Corporation Autonomous testing of logical model inconsistencies
CN113138990A (en) * 2021-05-17 2021-07-20 青岛海信网络科技股份有限公司 Data blood margin construction and tracing method, device and equipment
CN117251473A (en) * 2023-11-20 2023-12-19 摩斯智联科技有限公司 Vehicle data query analysis method, system, device and storage medium
CN117251473B (en) * 2023-11-20 2024-03-15 摩斯智联科技有限公司 Vehicle data query analysis method, system, device and storage medium
CN117648339A (en) * 2024-01-29 2024-03-05 杭州硕磐智能科技有限公司 Data exploration method and device, server and storage medium
CN117648339B (en) * 2024-01-29 2024-05-14 杭州硕磐智能科技有限公司 Data exploration method and device, server and storage medium
CN117709804A (en) * 2024-02-05 2024-03-15 杭州研趣信息技术有限公司 Index calculation method, device, equipment and medium based on block matrix
CN117709804B (en) * 2024-02-05 2024-05-07 杭州研趣信息技术有限公司 Index calculation method, device, equipment and medium based on block matrix

Also Published As

Publication number Publication date
CA3156460A1 (en) 2020-12-30
CN110427434A (en) 2019-11-08
CN110427434B (en) 2022-06-07

Similar Documents

Publication Publication Date Title
WO2020259309A1 (en) Multi-dimension data query method and apparatus
US11093631B2 (en) Data access authority management method, apparatus, terminal device and storage medium
CN102004752B (en) Cube data warehousing flexibly
US10839012B2 (en) Adaptable adjacency structure for querying graph data
US20150317360A1 (en) Query language to traverse a path in a graph
CN103093000A (en) Database query modeling system and database query modeling method
CN104732311A (en) Enterprise data management system based on unified data models
CN104063361A (en) Report design method and system
CN108334554A (en) A kind of novel OLAP precomputations model and construction method
US20140181151A1 (en) Query of multiple unjoined views
WO2020096823A1 (en) Static data masking
CN109086476A (en) It is a kind of for the data processing method of layout design, PLM plug-in unit and calculate equipment
CN108182204A (en) The processing method and processing device of data query based on house prosperity transaction multi-dimensional data
HongJu et al. Some key problems of data management in army data engineering based on big data
CN104866603A (en) Calling method of metadata and metadata managing system
US20180357328A1 (en) Functional equivalence of tuples and edges in graph databases
CN114282071A (en) Request processing method, device and equipment based on graph database and storage medium
US10776371B2 (en) Extended path finding operations on graph data
CN111488531B (en) Information recommendation method, device and medium based on collaborative filtering algorithm
US11841841B2 (en) Stand in tables
CN114124977B (en) Cross-tenant data sharing method and device and electronic equipment
EP3486799A1 (en) Reporting and data governance management
US20160063378A1 (en) Interval disaggregate
EP3458979B1 (en) Reconciling foreign key references and table security policies
US20220230091A1 (en) Segment-specific model training and inference

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20833202

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3156460

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20833202

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20833202

Country of ref document: EP

Kind code of ref document: A1