CN107194280B - Model establishing method and device - Google Patents

Model establishing method and device Download PDF

Info

Publication number
CN107194280B
CN107194280B CN201710377436.6A CN201710377436A CN107194280B CN 107194280 B CN107194280 B CN 107194280B CN 201710377436 A CN201710377436 A CN 201710377436A CN 107194280 B CN107194280 B CN 107194280B
Authority
CN
China
Prior art keywords
dimension table
dimension
establishing
fact
data
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.)
Expired - Fee Related
Application number
CN201710377436.6A
Other languages
Chinese (zh)
Other versions
CN107194280A (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 Xingxuan Technology Co Ltd
Original Assignee
Beijing Xingxuan 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 Xingxuan Technology Co Ltd filed Critical Beijing Xingxuan Technology Co Ltd
Priority to CN201710377436.6A priority Critical patent/CN107194280B/en
Publication of CN107194280A publication Critical patent/CN107194280A/en
Application granted granted Critical
Publication of CN107194280B publication Critical patent/CN107194280B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Automation & Control Theory (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a model establishing method and device, and relates to the technical field of computer application. The model establishing method comprises the following steps: determining a dimension table record corresponding to the role; establishing a data view according to the dimension table record; associating the roles and the data views to build a data access model. In the technical scheme provided by the invention, the data view of the role is established according to the record of the dimension table corresponding to the role, so that the data view can be automatically established by utilizing the mapping relation between the main key of the dimension table and the external key of the fact table, thereby being capable of adapting to complex service scenes.

Description

Model establishing method and device
Technical Field
The invention relates to the technical field of computer application, in particular to a model building method and a model building device.
Background
When multiple users share one database and have modification rights to the database, extremely serious potential safety hazards inevitably exist, and if control measures are not properly taken, each user can freely access or even deliberately destroy data after successfully entering a database server. Therefore, ensuring the security and reliability of data shared by multiple users is a serious challenge.
Therefore, it is necessary to introduce a data Access Control technology, and a more mature technology in the field of data Access Control, for example, a Role-Based Access Control (RBAC) technology. In the RBAC technique, permissions are associated with roles, and users gain the permissions of the appropriate roles by becoming members of those roles. The existing data access control technology is usually further extension and extension of the RBAC technology, namely, management of data authority is added on the basis of functional authority, centralized processing of the data authority and the functional authority is realized, a role and a data domain are mapped, and a role-specific access authority is given. In the aspect of data authority management, an effective authority management mode is, for example, a View-Based Access Control (VBAC) technology, where a private data View (data Access window) is logically allocated to each role, and an Access behavior of a user is limited to data rows and data columns to which Access is allowed, so that the user cannot directly interact with an actual data table, and the problem of secure Access of a multi-user shared database is effectively solved.
However, VBAC technology generally requires manual understanding and maintaining of correspondence between roles and data views, and then creates data views manually, thereby resulting in problems of high development cost, difficulty in adapting to complex business scenarios, and the like.
Disclosure of Invention
The embodiment of the invention provides a model establishing method and a model establishing device, which are used for solving the technical problems in the prior art.
In a first aspect, an embodiment of the present invention provides a model building method.
Specifically, the method comprises the following steps:
determining a dimension table record corresponding to the role;
establishing a data view according to the dimension table record;
associating the roles and the data views to build a data access model.
Because the data view of the role is established according to the dimension table record corresponding to the role, the data view can be automatically established by utilizing the mapping relation between the main key of the dimension table and the external key of the fact table, thereby being capable of adapting to complex service scenes.
With reference to the first aspect, in some implementations of the present invention, determining the dimension table record corresponding to the role includes:
determining a dimension table record corresponding to the role according to the first mapping relation table;
the first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
Because the mapping relation between the role and the dimension table record is directly constructed, the dimension table record corresponding to the role can be efficiently and conveniently found out.
With reference to the first aspect, in some implementations of the invention, creating the data view according to the dimension table record includes:
searching a fact table containing the dimension table record;
and establishing a data view for the fact table according to the dimension table record.
With reference to the first aspect, in some implementations of the invention, finding the fact table containing the dimension table record includes:
searching a fact table containing the dimension table records according to a second mapping relation table;
the second mapping relation table is used for storing mapping relations between the dimension table and the fact table.
In the invention, the fact table containing the record of the specific dimension table is searched through the mapping relation between the dimension table and the fact table, so that all the fact tables do not need to be traversed one by one, and the searching efficiency is improved.
With reference to the first aspect, in some implementations of the invention, building a data view of the fact table from the dimension table records includes:
generating a view establishing statement by combining the view establishing statement template, the table name of the fact table and the dimension table record;
and establishing a data view according to the view establishing statement.
In the invention, the view establishment statement is generated by combining the view establishment statement template and the required parameters, so that the data view can be established more intelligently.
In a second aspect, the embodiment of the present invention provides a model building apparatus.
Specifically, the apparatus comprises:
the determining module is used for determining the dimension table record corresponding to the role;
the data view establishing module is used for establishing a data view according to the dimension table record;
and the data access model building module is used for associating the roles with the data view so as to build a data access model.
Because the data view of the role is established according to the dimension table record corresponding to the role, the data view can be automatically established by utilizing the mapping relation between the main key of the dimension table and the external key of the fact table, thereby being capable of adapting to complex service scenes.
With reference to the second aspect, in some implementations of the present invention, the determining module is configured to perform the following processing to determine the dimension table record corresponding to the role: determining a dimension table record corresponding to the role according to the first mapping relation table;
the first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
Because the mapping relation between the role and the dimension table record is directly constructed, the dimension table record corresponding to the role can be efficiently and conveniently found out.
With reference to the second aspect, in some implementations of the invention, the data view establishing module includes:
the searching unit is used for searching a fact table containing the dimension table record;
and the establishing unit is used for establishing a data view for the fact table according to the dimension table record.
With reference to the second aspect, in some implementations of the present invention, the lookup unit is configured to perform the following processing to realize lookup of a fact table containing the dimension table record: searching a fact table containing the dimension table records according to a second mapping relation table;
the second mapping relation table is used for storing mapping relations between the dimension table and the fact table.
In the invention, the fact table containing the record of the specific dimension table is searched through the mapping relation between the dimension table and the fact table, so that all the fact tables do not need to be traversed one by one, and the searching efficiency is improved.
With reference to the second aspect, in some implementations of the invention, the establishing unit includes:
the generating component is used for generating the view establishing statement by combining the view establishing statement template, the table name of the fact table and the dimension table record;
and the establishing component is used for establishing a data view according to the view establishing statement.
In the invention, the view establishment statement is generated by combining the view establishment statement template and the required parameters, so that the data view can be established more intelligently.
These and other aspects of the invention will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the description below are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a model building method according to method embodiment 1 of the present invention;
FIG. 2 is a schematic diagram of a database model;
fig. 3 is a flowchart of a model building method according to method embodiment 2 of the present invention;
fig. 4 is a flowchart of a model building method according to method embodiment 3 of the present invention;
fig. 5 is a flow chart of a model building method according to method embodiment 4 of the present invention;
fig. 6 is a flowchart of a model building method according to method embodiment 5 of the present invention;
FIG. 7 is a schematic diagram of data access control according to method embodiment 6 of the present invention;
fig. 8 is a schematic structural view of a model building apparatus according to embodiment 1 of the present invention;
FIG. 9 illustrates one embodiment of the data view creation module 12 shown in FIG. 8;
fig. 10 illustrates an embodiment of the setup unit 122 illustrated in fig. 9.
Detailed Description
Various aspects of the invention are described in detail below with reference to the figures and the detailed description. Well-known processes, program modules, elements and their interconnections, links, communications or operations, among others, are not shown or described in detail herein in various embodiments of the invention.
Also, the described features, architectures, or functions may be combined in any manner in one or more embodiments.
Furthermore, it should be understood by those skilled in the art that the following embodiments are illustrative only and are not intended to limit the scope of the present invention. Those of skill would further appreciate that the program modules, elements, or steps of the various embodiments described herein and illustrated in the figures may be combined and designed in a wide variety of different configurations.
Technical terms not specifically described in the present specification should be construed in the broadest sense in the art unless otherwise specifically indicated.
In some of the flows described in the present specification and claims and in the above figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, with the order of the operations being indicated as 101, 102, etc. merely to distinguish between the various operations, and the order of the operations by themselves does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
[ METHOD EMBODIMENT 1 ]
Fig. 1 is a flowchart of a model building method according to method embodiment 1 of the present invention. Referring to fig. 1, in the present embodiment, the method includes:
s11: and determining the dimension table record corresponding to the role.
S12: and establishing a data view according to the dimension table record.
S13: associating the roles and the data views to build a data access model.
The present invention is directed to a star structured database model. As shown in FIG. 2, the database model includes fact tables and dimension tables.
The fact tables are primarily characterized by containing numerical information (facts) that can be aggregated to provide to relevant entities as historical data, and each fact table contains an index composed of multiple parts that contains a primary key of a relevance dimension table as a foreign key.
A dimension table may be viewed as a window used to analyze data, the dimension table containing properties of fact records in a fact table, some properties providing descriptive information, some properties specifying how to aggregate fact table data to provide useful information to an analyst, the dimension table containing a hierarchy that helps aggregate the data. For example, a dimension table containing product information typically contains a hierarchy of categories that subdivide the product into food, beverages, etc., and each category is subdivided a number of times until a lowest level is reached. Each dimension table contains fact properties that are independent of other dimension tables, e.g., a customer dimension table contains data about customers.
Because the data view of the role is established according to the dimension table record corresponding to the role, the data view can be automatically established by utilizing the mapping relation between the main key of the dimension table and the external key of the fact table, thereby being capable of adapting to complex service scenes.
[ METHOD EMBODIMENT 2 ]
Fig. 3 is a flowchart of a model building method according to method embodiment 2 of the present invention. Referring to fig. 3, in the present embodiment, the method includes:
s21: and acquiring a first mapping relation table.
The first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
S22: and determining the dimension table record corresponding to the role according to the first mapping relation table.
S23: and establishing a data view according to the dimension table record.
S24: associating the roles and the data views to build a data access model.
Because the mapping relation between the role and the dimension table record is directly constructed, the dimension table record corresponding to the role can be efficiently and conveniently found out.
[ METHOD EMBODIMENT 3 ]
Fig. 4 is a flowchart of a model building method according to method embodiment 3 of the present invention. Referring to fig. 4, in the present embodiment, the method includes:
s31: and acquiring a first mapping relation table.
The first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
S32: and determining the dimension table record corresponding to the role according to the first mapping relation table.
S33: and searching a fact table containing the dimension table record.
S34: and establishing a data view for the fact table according to the dimension table record.
S35: associating the roles and the data views to build a data access model.
[ METHOD EMBODIMENT 4 ]
Fig. 5 is a flowchart of a model building method according to method embodiment 4 of the present invention. Referring to fig. 5, in the present embodiment, the method includes:
s41: and acquiring a first mapping relation table.
The first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
S42: and determining the dimension table record corresponding to the role according to the first mapping relation table.
S43: and acquiring a second mapping relation table.
The second mapping relation table is used for storing mapping relations between the dimension table and the fact table.
S44: and searching a fact table containing the dimension table record according to the second mapping relation table.
S45: and establishing a data view for the fact table according to the dimension table record.
S46: associating the roles and the data views to build a data access model.
In the invention, the fact table containing the record of the specific dimension table is searched through the mapping relation between the dimension table and the fact table, so that all the fact tables do not need to be traversed one by one, and the searching efficiency is improved.
[ METHOD EMBODIMENT 5 ]
Fig. 6 is a flowchart of a model building method according to method embodiment 5 of the present invention. Referring to fig. 6, in the present embodiment, the method includes:
s51: and acquiring a first mapping relation table.
The first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
S52: and determining the dimension table record corresponding to the role according to the first mapping relation table.
S53: and acquiring a second mapping relation table.
The second mapping relation table is used for storing mapping relations between the dimension table and the fact table.
S54: and searching a fact table containing the dimension table record according to the second mapping relation table.
S55: and acquiring a view building statement template.
S56: and generating the view establishing statement by combining the view establishing statement template, the table name of the fact table and the dimension table record.
S57: and establishing a data view according to the view establishing statement.
S58: associating the roles and the data views to build a data access model.
In the invention, the view establishment statement is generated by combining the view establishment statement template and the required parameters, so that the data view can be established more intelligently.
[ METHOD EMBODIMENT 6 ]
Fig. 7 is a schematic diagram of data access control according to method embodiment 6 of the present invention. As shown in fig. 7, in the present embodiment, a role is bound to a data view based on the mapping relationship between the role and the dimension table record. The access control of data is achieved by authorizing roles for users.
The following describes a specific implementation process for binding roles and data views with examples:
step 1, determining a dimension table record corresponding to the role.
Specifically, in the present embodiment, step 1 may be implemented by:
step 1.1, reading a first mapping relation table for storing mapping relations between roles and records of a dimension table from a database, wherein a specific example of the first mapping relation table is as follows:
serial number Character Dimension meter Dimension table record
1 Character 1 Geographical dimension meter 100
2 Character 1 Geographical dimension meter 101
3 Character 1 Geographical dimension meter 122
TABLE 1
Optionally, in the first mapping relation table, the dimension table record is characterized by a dimension table primary key, for example, a region dimension table record is characterized by a city ID (identity identifier).
And step 1.2, determining the dimension table record corresponding to the role through the first mapping relation table.
And 2, searching a fact table containing the dimension table record determined in the step 1.
Specifically, in the present embodiment, step 2 may be implemented by:
and 2.1, reading a second mapping relation table for storing the mapping relation between the dimension table and the fact table from the database. Specific examples of the second mapping relationship table are as follows:
serial number Dimension meter Fact table Dimension meter main key
1 Geographical dimension meter Fact Table 1 City ID
2 Time dimension meter Fact Table 1 Date
3 Dimension meter for products Fact Table 1 Product ID
4 Geographical dimension meter Fact Table 2 City ID
5 Dimension meter for products Fact Table 2 Product ID
6 Time dimension meter Fact Table 3 Date
7 Department dimension table Fact Table 3 Department ID
TABLE 2
And 2.2, searching a fact table containing the dimension table record determined in the step 1 through the second mapping relation table.
It is assumed that the dimension table determined in step 1 has a region dimension table record with a record number of 100. As can be seen from table 2, the fact tables corresponding to the region dimension table include: fact table 1 and fact table 2. And traversing the foreign key fields associated with the region dimension table in the fact table 1 and the fact table 2 respectively to check whether the fact table records contain the determined dimension table records.
And step 3: and automatically establishing a data view for the fact table searched in the step 2 according to the records of the dimension table determined in the step 1.
Specifically, in the present embodiment, step 3 may be implemented by:
and 3.1, acquiring a view building statement template.
Taking hive (a data warehouse tool) as an example, the view building statement template constructed based on the grammar rules thereof is, for example: CREATE VIEW% _ view AS SELECT FROM% WHERE%.
And 3.2, combining the view establishment statement template, the table name of the fact table and the dimension table record to generate a view establishment statement.
And 3.3, establishing a data view according to the view establishing statement.
In this embodiment, a data view with intersecting dimensions may be established, for example, a data view with intersecting time dimensions and region dimensions is established on an order fact table, and the view establishment statement is, for example:
CREATE VIEW order_view AS SELECT*FROM order WHERE order.date>20170101and order.city_id in(100,101)。
and 4, step 4: and (4) associating the data view established in the step (3) with the role to establish a data access model.
[ PRODUCT EMBODIMENT 1 ]
Fig. 8 is a schematic structural diagram of a modeling apparatus according to embodiment 1 of the present invention. Referring to fig. 8, in the present embodiment, the model building apparatus 1 includes: the determining module 11, the data view establishing module 12 and the data access model establishing module 13 specifically:
the determining module 11 is configured to determine a dimension table record corresponding to the role.
The data view establishing module 12 is used for establishing a data view according to the dimension table record determined by the determining module 11.
The data access model building module 13 is configured to associate the roles with the data views built by the data view building module 12 to build a data access model.
Because the data view of the role is established according to the dimension table record corresponding to the role, the data view can be automatically established by utilizing the mapping relation between the main key of the dimension table and the external key of the fact table, thereby being capable of adapting to complex service scenes.
[ PRODUCT EMBODIMENT 2 ]
This embodiment has the same configuration as that of product embodiment 1. The difference is that in the present embodiment, the determining module 11 specifically determines the dimension table record corresponding to the role by: and determining the dimension table record corresponding to the role according to the first mapping relation table.
The first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
Because the mapping relation between the role and the dimension table record is directly constructed, the dimension table record corresponding to the role can be efficiently and conveniently found out.
[ PRODUCT EMBODIMENT 3 ]
The model building apparatus provided in this embodiment includes all the contents in product embodiment 1 or product embodiment 2, and is not described herein again. As shown in fig. 9, in the present embodiment, the data view creation module 12 includes: the finding unit 121 and the establishing unit 122 specifically:
the lookup unit 121 is used to lookup the fact table containing the dimension table records.
The creating unit 122 is configured to create a data view for the fact table found by the searching unit 121 according to the dimension table record.
[ PRODUCT EMBODIMENT 4 ]
This embodiment has the same configuration as that of product embodiment 3. The difference is that in the present embodiment, the lookup unit 121 specifically looks up the fact table containing the dimension table record by the following method: and searching the fact table containing the dimension table record according to the second mapping relation table.
The second mapping relation table is used for storing mapping relations between the dimension table and the fact table.
In the invention, the fact table containing the record of the specific dimension table is searched through the mapping relation between the dimension table and the fact table, so that all the fact tables do not need to be traversed one by one, and the searching efficiency is improved.
[ PRODUCT EMBODIMENT 5 ]
The model building apparatus provided in this embodiment includes all the contents in product embodiment 3, and is not described herein again. As shown in fig. 10, in the present embodiment, the establishing unit 122 includes: an acquisition component 1221, a generation component 1222, and a creation component 1223, specifically:
the retrieval component 1221 is used to retrieve the view building statement template.
The generating component 1222 is configured to generate the view building statement in combination with the view building statement template acquired by the acquiring component 1221, the table name of the fact table, and the dimension table record.
The building component 1223 is operative to build a data view from the view building statements generated by the generating component 1222.
In the invention, the view establishment statement is generated by combining the view establishment statement template and the required parameters, so that the data view can be established more intelligently.
The embodiment of the invention also provides terminal equipment, which comprises a memory and a processor; wherein the content of the first and second substances,
the memory is configured to store one or more computer instructions that, when executed by the processor, are capable of performing the method of any one of method embodiments 1-6.
Furthermore, embodiments of the present invention also provide a computer storage medium for storing one or more computer instructions, wherein the one or more computer instructions, when executed, enable implementation of the method according to any one of method embodiment 1 to method embodiment 6.
Those skilled in the art will clearly understand that the present invention may be implemented entirely in software, or by a combination of software and a hardware platform. Based on such understanding, all or part of the technical solutions of the present invention contributing to the background may be embodied in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, a smart phone, a network device, etc.) to execute the method according to each embodiment or some parts of the embodiments of the present invention.
As used herein, the term "software" or the like refers to any type of computer code or set of computer-executable instructions in a general sense that is executed to program a computer or other processor to perform various aspects of the present inventive concepts as discussed above. Furthermore, it should be noted that according to one aspect of the embodiment, one or more computer programs implementing the method of the present invention when executed do not need to be on one computer or processor, but may be distributed in modules in multiple computers or processors to execute various aspects of the present invention.
Computer-executable instructions may take many forms, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. In particular, the operations performed by the program modules may be combined or separated as desired in various embodiments.
Also, technical solutions of the present invention may be embodied as a method, and at least one example of the method has been provided. The actions may be performed in any suitable order and may be presented as part of the method. Thus, embodiments may be configured such that acts may be performed in an order different than illustrated, which may include performing some acts simultaneously (although in the illustrated embodiments, the acts are sequential).
The definitions given and used herein should be understood with reference to dictionaries, definitions in documents incorporated by reference, and/or their ordinary meanings.
In the claims, as well as in the specification above, all transitional phrases such as "comprising," "having," "containing," "carrying," "having," "involving," "consisting essentially of …," and the like are to be understood to be open-ended, i.e., to include but not limited to.
The terms and expressions used in the specification of the present invention have been set forth for illustrative purposes only and are not meant to be limiting. It will be appreciated by those skilled in the art that changes could be made to the details of the above-described embodiments without departing from the underlying principles thereof. The scope of the invention is, therefore, indicated by the appended claims, in which all terms are intended to be interpreted in their broadest reasonable sense unless otherwise indicated.
The invention discloses A1 and a model establishing method, which comprises the following steps:
determining a dimension table record corresponding to the role;
establishing a data view according to the dimension table record;
associating the roles and the data views to build a data access model.
A2, the method as in a1, wherein the determining the dimension table record corresponding to the role includes:
determining a dimension table record corresponding to the role according to the first mapping relation table;
the first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
In the method of A3, as in a1 or a2, creating a data view from the dimension table record comprises:
searching a fact table containing the dimension table record;
and establishing a data view for the fact table according to the dimension table record.
A4, the method as in A3, wherein the searching the fact table containing the dimension table record comprises:
searching a fact table containing the dimension table records according to a second mapping relation table;
the second mapping relation table is used for storing mapping relations between the dimension table and the fact table.
A5, the method as in A3, wherein the creating a data view of the fact table from the dimension table record comprises:
generating a view establishing statement by combining the view establishing statement template, the table name of the fact table and the dimension table record;
and establishing a data view according to the view establishing statement.
The invention also discloses B6 and a model building device, which comprises:
the determining module is used for determining the dimension table record corresponding to the role;
the data view establishing module is used for establishing a data view according to the dimension table record;
and the data access model building module is used for associating the roles with the data view so as to build a data access model.
B7, the apparatus according to B6, wherein the determining module is configured to perform the following processing to determine the dimension table record corresponding to the role: determining a dimension table record corresponding to the role according to the first mapping relation table;
the first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
B8, the apparatus as described in B6 or B7, the data view establishment module comprising:
the searching unit is used for searching a fact table containing the dimension table record;
and the establishing unit is used for establishing a data view for the fact table according to the dimension table record.
B9, the apparatus as described in B8, the searching unit is configured to perform the following processing to search the fact table containing the dimension table record: searching a fact table containing the dimension table records according to a second mapping relation table;
the second mapping relation table is used for storing mapping relations between the dimension table and the fact table.
B10, the device as described in B8, the establishing unit includes:
the generating component is used for generating the view establishing statement by combining the view establishing statement template, the table name of the fact table and the dimension table record;
and the establishing component is used for establishing a data view according to the view establishing statement.
The invention also discloses C11, a terminal device, comprising a memory and a processor; wherein the content of the first and second substances,
the memory is to store one or more computer instructions that, when executed by the processor, are capable of implementing the method as any one of A1-A5.
The invention also discloses D12, a computer storage medium for storing one or more computer instructions, wherein the one or more computer instructions, when executed, are capable of implementing the method of any one of A1-A5.

Claims (6)

1. A method of modeling, the method comprising:
determining a dimension table record corresponding to the role, wherein the first mapping relation table is used for storing the mapping relation between the role and the dimension table record;
inquiring a fact table recorded by a dimension table according to the dimension table record corresponding to the role, and establishing a data view for the fact table recorded by the dimension table;
associating the roles with the data views, and binding the roles with the data views to establish a data access model;
establishing a data view according to the dimension table record comprises:
searching a fact table containing the dimension table record;
establishing a data view for the fact table according to the dimension table record;
looking up a fact table containing the dimension table record includes:
searching a fact table containing the dimension table records according to a second mapping relation table;
the second mapping relation table is used for storing mapping relations between the dimension table and the fact table;
establishing a data view for the fact table according to the dimension table record comprises:
generating a view establishing statement by combining the view establishing statement template, the table name of the fact table and the dimension table record;
and establishing a data view according to the view establishing statement, wherein the data view is a data view with crossed dimensions.
2. The method of claim 1, wherein determining the dimension table record corresponding to the role comprises:
determining a dimension table record corresponding to the role according to the first mapping relation table;
the first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
3. A modeling apparatus, the apparatus comprising:
the determining module is used for determining the dimension table record corresponding to the role;
the data view establishing module is used for inquiring the fact table recorded by the dimension table according to the dimension table record corresponding to the role and establishing a data view for the fact table recorded by the dimension table;
the data access model establishing module is used for associating the role and the data view and binding the role and the data view to establish a data access model;
the data view building module comprises:
the searching unit is used for searching a fact table containing the dimension table record;
the establishing unit is used for establishing a data view for the fact table according to the dimension table record;
the searching unit is used for performing the following processing to realize the searching of the fact table containing the dimension table record: searching a fact table containing the dimension table records according to a second mapping relation table;
the second mapping relation table is used for storing mapping relations between the dimension table and the fact table;
the establishing unit includes:
the generating component is used for generating the view establishing statement by combining the view establishing statement template, the table name of the fact table and the dimension table record;
and the establishing component is used for establishing a data view according to the view establishing statement, wherein the data view is a data view with crossed dimensions.
4. The apparatus of claim 3,
the determining module is used for executing the following processing to determine the dimension table record corresponding to the role: determining a dimension table record corresponding to the role according to the first mapping relation table;
the first mapping relation table is used for storing mapping relations between roles and records of the dimension table.
5. A terminal device comprising a memory and a processor; wherein the content of the first and second substances,
the memory is to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, are capable of implementing the method of any of claims 1-2.
6. A computer storage medium storing one or more computer instructions which, when executed, are capable of implementing the method of any one of claims 1-2.
CN201710377436.6A 2017-05-25 2017-05-25 Model establishing method and device Expired - Fee Related CN107194280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710377436.6A CN107194280B (en) 2017-05-25 2017-05-25 Model establishing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710377436.6A CN107194280B (en) 2017-05-25 2017-05-25 Model establishing method and device

Publications (2)

Publication Number Publication Date
CN107194280A CN107194280A (en) 2017-09-22
CN107194280B true CN107194280B (en) 2021-02-02

Family

ID=59874903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710377436.6A Expired - Fee Related CN107194280B (en) 2017-05-25 2017-05-25 Model establishing method and device

Country Status (1)

Country Link
CN (1) CN107194280B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228762B (en) * 2017-12-25 2021-06-25 石化盈科信息技术有限责任公司 Method and system for configuring master database universal templates
CN111309710B (en) * 2020-02-21 2021-01-26 北京京东尚科信息技术有限公司 Data multiplexing method and device
CN113704821A (en) * 2021-08-27 2021-11-26 中国工商银行股份有限公司 View creation method and device and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140164033A1 (en) * 2012-12-11 2014-06-12 Axslogic Pte Ltd Business management system with predefined alerts
CN103984755A (en) * 2014-05-28 2014-08-13 中国地质大学(北京) Multidimensional model based oil and gas resource data key system implementation method and system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Pentaho商业智能技术在中药饮片企业的应用研究;崔有文;《中国优秀硕士论文库》;20151215(第12期);第22页,表4-2 *
商业智能关键技术的研究与实现;惠瑜;《中国优秀硕士论文库》;20090415(第4期);第67-68页 *
网上评教及联机分析系统的设计与实现;蔡榆榕;《中国优秀硕士论文库》;20050915(第5期);第19-21、38-40页 *
蔡榆榕.网上评教及联机分析系统的设计与实现.《中国优秀硕士论文库》.2005,(第5期), *

Also Published As

Publication number Publication date
CN107194280A (en) 2017-09-22

Similar Documents

Publication Publication Date Title
CN105335409B (en) A kind of determination method, equipment and the network server of target user
Crainic et al. Progressive hedging‐based metaheuristics for stochastic network design
US9430354B2 (en) Aggregation of metrics for tracking electronic computing resources based on user class hierarchy
US9460117B2 (en) Image searching
CN106371984B (en) A kind of data monitoring method, equipment and system
US8615516B2 (en) Grouping similar values for a specific attribute type of an entity to determine relevance and best values
US8412712B2 (en) Grouping methods for best-value determination from values for an attribute type of specific entity
US20070073691A1 (en) Server side filtering and sorting with field level security
US9875277B1 (en) Joining database tables
CN111104521B (en) Anti-fraud detection method and detection system based on graph analysis
CN107292463A (en) A kind of method and system that the project evaluation is carried out to application program
CN107194280B (en) Model establishing method and device
US11238402B2 (en) Information operation
CN105022815A (en) Information interception method and device
CN104077723A (en) Social network recommending system and social network recommending method
CN108776678A (en) Index creation method and device based on mobile terminal NoSQL databases
CN105404974A (en) Data capitalization method and apparatus and management platform
CN109408643B (en) Fund similarity calculation method, system, computer equipment and storage medium
CN107391650A (en) A kind of structuring method for splitting of document, apparatus and system
CN104572932A (en) Method and device for determining interest label
CN109857748B (en) Contract data processing method and device and electronic equipment
Dutta et al. Aggregation of heterogeneously related information with extended geometric Bonferroni mean and its application in group decision making
Ergenç Bostanoǧlu et al. Minimizing information loss in shared data: Hiding frequent patterns with multiple sensitive support thresholds
Shabana et al. A study on Big data advancement and Big data analytics
CN111026705B (en) Building engineering file management method, system and terminal equipment

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Building N3, building 12, No. 27, Jiancai Chengzhong Road, Haidian District, Beijing 100086

Applicant after: Beijing Xingxuan Technology Co.,Ltd.

Address before: 100085 Beijing, Haidian District on the road to the information on the ground floor of the 1 to the 3 floor of the 2 floor, room 11, 202

Applicant before: Beijing Xiaodu Information Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210202