WO2015043329A1 - 数据访问方法、系统及数据仓库 - Google Patents

数据访问方法、系统及数据仓库 Download PDF

Info

Publication number
WO2015043329A1
WO2015043329A1 PCT/CN2014/084482 CN2014084482W WO2015043329A1 WO 2015043329 A1 WO2015043329 A1 WO 2015043329A1 CN 2014084482 W CN2014084482 W CN 2014084482W WO 2015043329 A1 WO2015043329 A1 WO 2015043329A1
Authority
WO
WIPO (PCT)
Prior art keywords
access
user
data
token
identity authentication
Prior art date
Application number
PCT/CN2014/084482
Other languages
English (en)
French (fr)
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 华为技术有限公司
Publication of WO2015043329A1 publication Critical patent/WO2015043329A1/zh

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • 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
    • 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

Definitions

  • the present invention relates to the field of file management, and in particular, to a data access method, system, and data warehouse.
  • the file system can be used to manage file storage.
  • Common file systems include lmux file system, Windows file system, and so on. They all have access rights management methods for different users or groups, which can include reading file content, modifying file content, and executable permissions.
  • a file generally belongs to only one user and group. It is difficult to make different users have different rights to the same file.
  • the existing Hadoop Distributed File System (English: Hadoop Distributed File System, abbreviated: HDFS), different users only operate on file systems with user access rights, it is difficult to implement complex cross-user access control, such as user 1 It has only the access right to the file 1 created by the user 1 itself, and does not have the access right of the file 2 created by the user 2, and the user 1 can only operate on the file 1 and cannot operate on the file 2.
  • HDFS Hadoop Distributed File System
  • a data access method including: receiving an access request event submitted by a first user, where the access request event carries the first use a plurality of data sets to be accessed by the user, the plurality of data sets being created by a plurality of users; determining access rights of the first user to the plurality of data sets;
  • the obtaining the identity authentication authority corresponding to each user identifier includes:
  • the method includes:
  • the parallel computing system searches for the file storage path information of the currently accessed data set according to the correspondence between the identity authentication authority of each user identifier and the file storage path information corresponding to each data set.
  • the identity authentication authority is used as an access token.
  • the parallel computing system uses the access token to access the data set corresponding to the file storage path information.
  • the identity authentication right includes a super token
  • the obtaining the identity authentication authority corresponding to each user identifier further includes: Obtaining the super token, the super token allows access to a data set of all users.
  • the method further includes:
  • the parallel computing system uses the super token as an access token during initialization; the parallel computing system uses the access token to access the data set corresponding to the file storage path information.
  • a second aspect of the present invention provides a data warehouse, including: a receiving unit, configured to receive an access request event submitted by a first user, where the access request event carries the first user specified a plurality of data sets to be accessed, the plurality of data sets being created by a plurality of users;
  • a determining unit configured to be connected to the receiving unit, configured to determine access rights of the first user to the plurality of data sets
  • the determining unit is further configured to: if the first user has access rights for accessing each data set, determine a plurality of user identifiers corresponding to the multiple data sets;
  • An obtaining unit configured to be connected to the determining unit, configured to acquire file storage path information corresponding to each data set,
  • the obtaining unit is further configured to obtain, according to the multiple user identifiers, an identity authentication authority corresponding to each user identifier;
  • a sending unit configured to send a parallel access task to the parallel computing system, where the parallel access task carries the identity authentication authority and the file storage path information.
  • the acquiring unit is further configured to obtain the identity authentication authority of each user identifier, and establish an identity authentication authority of each user identifier with each of the Correspondence between file storage path information corresponding to the data set;
  • the identity authentication authority includes The acquiring unit is further configured to acquire a super token, and the super token allows access to a data set of all users.
  • a data access system comprising: a data warehouse, a data warehouse adopting any one of the embodiments of the present invention; and a parallel computing system.
  • the parallel computing system includes: a processing unit, configured to: according to the identity authentication authority of each user identifier and each of the data during initialization Collecting a correspondence between the file storage path information corresponding to the file, searching the identity authentication authority corresponding to the file storage path information of the currently accessed data set, and using the identity authentication authority as an access token;
  • an access unit configured to connect to the processing unit, to access the data set corresponding to the file storage path information by using the access token.
  • the processing unit is further configured to use the super token as an access token during initialization.
  • the data warehouse may obtain the user identifier and file corresponding to each data set if the first user has the access right of each data set to be accessed.
  • the storage path information and the identity authentication authority are sent together, and the identity authentication authority and the file storage path information are sent to the parallel computing system, so that the parallel computing system can use the identity authentication authority to access the data set corresponding to the file storage path information, thereby realizing cross-user access.
  • a user can access a collection of data for multiple users.
  • FIG. 1a is a flow chart showing a data access method according to Embodiment 1 of the present invention.
  • FIG. 1b is a schematic diagram of a scenario of a data access method according to Embodiment 1 of the present invention.
  • FIG. 2 is a flow chart showing a data access method according to Embodiment 2 of the present invention.
  • FIG. 3 is a flowchart showing a data access method according to Embodiment 3 of the present invention.
  • FIG. 4 is a block diagram showing the structure of a data warehouse according to Embodiment 4 of the present invention.
  • FIG. 5 is a block diagram showing the structure of a data access system according to Embodiment 5 of the present invention.
  • FIG. 6 is a block diagram showing the structure of a data access device according to Embodiment 6 of the present invention. detailed description
  • Figure la shows a flow chart of a data access method according to a first embodiment of the present invention. As shown in FIG. la, the data access method includes:
  • Step 100 Receive an access request event submitted by a first user, where the access request event carries multiple data sets to be accessed specified by the first user, where the multiple data sets are created by multiple users. Built.
  • data warehouses such as Hive can be based on parallel computing (English: MapReduce, abbreviations:
  • the user data set can be saved in the data warehouse, and the data set can be implemented in the form of a user data table, and the user data set may belong to different users.
  • the user may need to cross-access each other's data sets.
  • the first user may need to associate the second user's user data table with his own user data table, and the second user may be in addition to the first user.
  • the user data table created by the first user includes the customer name and the order number
  • the user data table created by the second user includes the order number and the customer contact number
  • the user data table of the first user and the user data of the second user has an association.
  • the underlying file system can be a distributed file system (English: Distributed File System, abbreviated: HDFS). If the user data of the second user needs to be accessed, the first user may send an access request event to the Hive, so as to notify the data warehouse of the plurality of data tables to be accessed designated by the first user.
  • HDFS Distributed File System
  • FIG. 1b shows a schematic diagram of a scenario of a data access method according to the first embodiment of the present invention.
  • Hive data warehouse
  • user 1 creates user data table 1
  • user 2 creates user data table. 2.
  • the user data table 1 and the user data table 2 may have an association relationship.
  • User 1 first user
  • the user 1 can submit the access request event to the Hive, and the access request event can carry the user data table 1 and the user data table 2 to be accessed designated by the user 1.
  • Step 110 Determine access rights of the first user to the multiple data sets.
  • the identity authentication authority of each user can be pre-configured to determine the permissions that each user is allowed to access.
  • the data warehouse can include the permission configuration information module for the user to access the user data table, and the permission configuration information.
  • a user can be pre-configured in the module Permissions to access which user data tables. For example: User 1 allows access to users 1, 2, 3, and User Data Table 1 belongs to User 1, and User Data Table 2 belongs to User 2.
  • the user 2 can find that the user 2 is the user that the user 1 is allowed to access, and the user data table 2 belongs to the user 2, indicating that the access request event is legal and can be performed. Subsequent visits. If the user 1 allows access to the user 3 and the user 4 in the rights management information, the access request event cannot pass the validity check, indicating that the access request event is invalid and cannot continue to perform the access.
  • Step 120 Determine, if the first user has access rights to access each data set, multiple user identifiers corresponding to the multiple data sets;
  • Step 130 Obtain file storage path information corresponding to each data set.
  • the data warehouse may automatically save the information of the user data table, and the information may include a user identifier for creating the user data table, file storage path information of the user data table, and the like.
  • the data warehouse may determine the plurality of data sets, such as user data tables of the plurality of users, according to the plurality of data sets to be accessed designated by the first user in the access request event, and read information of the user data table, and determine each to be accessed. User ID and file storage path information corresponding to the data set.
  • Step 140 Obtain identity authentication rights corresponding to each user identifier according to the multiple user identifiers.
  • the data warehouse may obtain the identity authentication authority corresponding to the multiple user identifiers from the rights configuration information module, and the identity authentication authority may include multiple user identifier corresponding tokens.
  • the identity authentication authority of the user 2 is token2
  • the user data table allowed by the user 2 is the user data table 2
  • the file storage path information saved by the user data table 2 in the HDFS is the file storage path information. 2.
  • Step 150 Send a parallel access task to the parallel computing system, where the parallel access task carries the identity authentication authority and the file storage path information.
  • the parallel access task carries the identity authentication authority and the file storage path information.
  • the Hive Data Warehouse
  • token 2 identity authentication authority
  • file storage path information to the MR (MapReduce) system
  • the MR system can use the token. 2 Access User Data Table 2.
  • the data warehouse may obtain the user identifier corresponding to each data set if the first user has the access permission of each data set to be accessed.
  • the file storage path information and the identity authentication authority are sent to the MR system together with the identity authentication authority and the file storage path information, so that the MR system can use the identity authentication authority to access the data set corresponding to the file storage path information in the HDFS, thereby realizing the cross-user.
  • Access a collection of data that a user can access multiple users.
  • FIG. 2 is a flow chart showing a data access method according to a second embodiment of the present invention.
  • the steps in Fig. 2 having the same reference numerals as those of Fig. la have the same functions, and a detailed description of these steps will be omitted for the sake of brevity.
  • the step 140 may include:
  • Step 200 Obtain an identity authentication permission of each user identifier.
  • Step 210 Establish a correspondence between the identity authentication authority of each user identifier and the file storage path information corresponding to each data set.
  • the correspondence relationship may also be included in the parallel access task sent by the data warehouse to the parallel computing system.
  • the Hive can search for the rights configuration information module, obtain the identity authentication authority of the user 2, that is, the token 2, and establish the file storage path information of the token 2 and the user data table 2.
  • the token 2 the file storage path information 2 and the corresponding relationship are sent to the MR system through the MR task.
  • step 150 it may include:
  • Step 220 The parallel computing system is in the process of initializing, according to each user identifier Corresponding relationship between the identity authentication authority and the file storage path information corresponding to each data set, searching for the identity authentication authority corresponding to the file storage path information of the currently accessed data set, and using the identity authentication authority as an access token ;
  • Step 230 The parallel computing system uses the access token to access the data set corresponding to the file storage path information.
  • the MR system can use the token 1 as an access token to access the user of the user 1 in the HDFS (file system) according to the file storage path information 1.
  • Data sheet 1 When the user 1 needs to access the user data table 2 of the user 2, the MR system can replace the token 1 with the token 2 as an access token, and use the token 2 to access the user data table 2 in the HDFS according to the file storage path information 2.
  • the data warehouse may obtain the user identifier corresponding to each data set if the first user has the access permission of each data set to be accessed.
  • the file storage path information and the identity authentication authority are sent to the MR system together with the identity authentication authority and the file storage path information, so that the MR system can determine the access token according to the identity authentication authority and the file storage path information, and access the HDFS by using the access token.
  • the data collection corresponding to the file storage path information implements cross-user access, and a user can access data sets of multiple users.
  • FIG. 3 is a flow chart showing a data access method according to Embodiment 3 of the present invention.
  • the reference numerals in Fig. 3 have the same functions as those in Figs. la and 2, and a detailed description of these steps will be omitted for the sake of brevity.
  • the step 140 may further include:
  • Step 300 Acquire a super token, and the super token allows access to a data set of all users.
  • a super can be set in advance to access a data set of all users of the file system.
  • the level token, and the super token is stored in the rights configuration information module of the user access table of the data warehouse. After the data warehouse receives the access request event, the super token can be obtained from the rights configuration information module.
  • step 150 it may include:
  • Step 310 The parallel computing system uses the super token as an access token during initialization.
  • Step 320 The parallel computing system uses the access token to access the data set corresponding to the file storage path information.
  • the MR system can use token 1 as an access token to access user data table 1 of user 1 in HDFS according to file storage path information 1.
  • the super token is token 3
  • the MR system can acquire token 3 during initialization and replace token 1 with token 3 as an access token.
  • the token 3 is used to access the user data table 2 in the HDFS according to the file storage path information 2.
  • the data warehouse may obtain the user identifier corresponding to each data set if the first user has the access permission of each data set to be accessed. And storing the path information and the super token, and sending the super token and the file storage path information to the MR system, so that the MR system can use the super token to access the file storage path in the HDFS according to the file storage path information of the data set to be accessed.
  • the data set corresponding to the information realizes cross-user access, and a user can access data sets of multiple users.
  • the data warehouse 400 can include:
  • the receiving unit 420 is configured to receive an access request event submitted by the first user, where the access request event carries multiple data sets to be accessed specified by the first user, where the multiple data sets are created by multiple users.
  • the determining unit 440 is connected to the receiving unit 420 and configured to determine access rights of the first user to the plurality of data sets.
  • the determining unit 440 is further configured to: if the first user has access rights to access each data set, determine a plurality of user identifiers corresponding to the multiple data sets;
  • the obtaining unit 460 is connected to the determining unit 440, and is configured to obtain file storage path information corresponding to each of the data sets.
  • the obtaining unit 460 is further configured to obtain the identity authentication authority corresponding to each user identifier according to the multiple user identifiers.
  • the data warehouse 400 can access the file system based on a parallel computing (English: MapReduce, abbreviation: MR) system.
  • the user data set can be saved in the data warehouse, and the data set can be implemented in the form of a user data table, and the user data set may belong to different users.
  • the user may need to cross-access each other's data sets.
  • the first user may need to associate the second user's user data table with his own user data table, and the second user may be in addition to the first user.
  • Other users than others.
  • the user data table created by the first user in the data warehouse 400 includes a customer name and an order number
  • the user data table created by the second user includes an order number and a customer contact number
  • the user data table and the second user of the first user has an association relationship. If you want to query the contact number of customer A, you can get the related query by querying the user data table of the first user and the user data table of the second user.
  • the underlying file system can be a distributed file system (English: Distributed File System, abbreviated: HDFS. If a cross-user access is required, that is, the first user accesses the user data table of the second user, the first user can send the data to the data warehouse 400.
  • the receiving unit 420 receives the access request event, thereby obtaining a data set to be accessed designated by the first user.
  • Hive data warehouse 400
  • user 1 creates user data table 1
  • user 2 creates user data table 2
  • user data table 1 and user data table 2 are stored in Hive relationship.
  • the user data table 1 and the user data table 2 may have an association relationship.
  • User 1 first user
  • the receiving unit 420 of the Hive may receive an access request event sent by the user 1, and the access request event may carry the user data table 1 and the user data table 2 to be accessed designated by the user 1.
  • the identity authentication authority of each user can be pre-stored to determine the permissions that each user is allowed to access.
  • the Hive can include a permission configuration information module for the user to access the data collection. Pre-configure which user data tables a user can access. For example: User 1 allows access to users 1, 2, 3, and user data table 1 belongs to user 1, user data table 2 belongs to user 2.
  • the determining unit 440 can determine whether the first user has access rights to the plurality of data sets by searching the rights management information. For example, the user 2 is found in the rights management information, and the user data table 2 belongs to the user 2.
  • the user data table 2 belongs to the user 2, indicating that the access request event is legal, and subsequent access can be performed. If User 1 allows access to User 3 and User 4 in the rights management information, the access request event cannot pass the validity check, indicating that the access request event is invalid and cannot continue to perform access.
  • the data warehouse 400 can automatically save the information of the user data table, which can include the user identification of the user data table, the file storage path information of the user data table, and the like.
  • the determining unit 440 may determine, according to the plurality of data sets to be accessed that are specified by the first user in the access request event received by the receiving unit 420, the plurality of data sets, such as user data tables of the plurality of users, and read the user data table. Information, determining a plurality of user identifiers corresponding to each data set to be accessed.
  • the obtaining unit 460 may also obtain file storage path information corresponding to each data set to be accessed in the information of the user data table.
  • the obtaining unit 460 may further acquire the plurality of user identifiers from the rights configuration information module of the user accessing the user data table.
  • the identity authentication authority may include an identity authentication authority corresponding to multiple user identifiers, that is, a token, or may be Corresponding relationship between the identity authentication authority corresponding to the plurality of user identifiers and the file storage path information of the plurality of data sets to be accessed. For example, as shown in FIG.
  • the identity authentication authority of user 2 is token 2
  • the user data table allowed to be accessed by user 2 is user data table 2
  • the file storage path information saved by the user data table 2 in HDFS is file storage.
  • the token 2 has a correspondence relationship with the file storage path information 2.
  • the sending unit 480 is connected to the obtaining unit 460, and is configured to send a parallel access task to the parallel computing system, where the parallel access task carries the identity authentication authority and the file storage path information.
  • the Hive (data warehouse) sending unit 480 can send the identity authentication authority and the file storage path information to the MR (MapReduce) system for the subsequent MR system to access the user data table 2 using the token 2. Data collection.
  • the obtaining unit 460 may be further configured to: obtain an identity authentication authority of each user identifier; and establish an identifier corresponding to each data identifier of each user identifier. Correspondence of storage path information. Thus, the correspondence relationship may also be included in the parallel access task sent by the sending unit 480 to the parallel computing system.
  • the obtaining unit 460 may acquire the user by searching the right configuration information module.
  • the identity authentication authority of 2 is token 2, and the correspondence between the token 2 and the file storage path information 2 of the user data table 2 is established.
  • the obtaining unit 460 may be further configured to: obtain the super token, and the super token allows access to a data set of all users.
  • a super token that can access a data set of all users of the file system may be preset, and the super token is stored in a rights configuration information module of a user of the data warehouse to access the user data table.
  • Receiving an access request event determining unit at receiving unit 420 of data warehouse 400 After determining that the first user has access rights to access each data set to be accessed, the obtaining unit 460 may also obtain the super token from the rights configuration information module.
  • the determining unit may determine each data if the determining unit determines that the first user has access rights to access the plurality of data sets to be accessed.
  • the collection unit is configured to identify, and the acquiring unit may obtain file storage path information corresponding to each data set and identity authentication authority corresponding to each user identifier.
  • the sending unit may send the identity authentication authority and the file storage path information to the MR system, so that the MR system can use the identity authentication authority to access the data set corresponding to the file storage path information in the HDFS according to the file storage path information of the data set to be accessed.
  • a cross-user access is implemented, and a user can access data collections of multiple users.
  • FIG. 5 is a block diagram showing the structure of a data access system according to Embodiment 5 of the present invention.
  • the data access system 500 can include:
  • the data warehouse 520 may be the data warehouse described in the fourth embodiment above.
  • Parallel computing system 540 Parallel computing system 540.
  • the first user may send an access request event to the data warehouse 520 of the data access system 500, and the access request event is received by the data warehouse 520 through the receiving unit 420, and the determining unit 440 After determining that the first user has the access right to access each data set to be accessed, the determining unit 440 may determine, according to the information of the user data table saved in the data warehouse 520, the plurality of data sets to be accessed by the first user.
  • the plurality of user identifiers are obtained, and the file storage path information corresponding to each data set and the identity authentication authority corresponding to each user identifier are obtained by the obtaining unit 460, and the sending unit 480 sends the identity authentication authority and the file storage path information to the MR system 540 together.
  • the MR system 540 can access the data set corresponding to the file storage path information in the file system according to the file storage path information of the data set to be accessed using the corresponding identity authentication authority in the identity authentication authority. Further, the MR system 540 can include:
  • the processing unit 560 is configured to: in the process of initializing, search for a file storage path of the currently accessed data set according to the correspondence between the identity authentication authority of each user identifier and the file storage path information corresponding to each data set.
  • the identity authentication authority corresponding to the information, and the identity authentication authority is used as an access token;
  • the access unit 580 is connected to the processing unit 560, and is configured to access the data set corresponding to the file storage path information by using the access token.
  • the MR system 540 can receive the identity authentication authority and the file storage path information sent by the data warehouse 520, where the identity authentication authority can include the identity authentication authority and the identity authentication authority corresponding to the plurality of user identifiers and the plurality of data sets to be accessed. Correspondence between file storage path information.
  • the processing unit 560 may search for the currently accessed data set according to the correspondence between the identity authentication authority corresponding to the multiple user identifiers and the file storage path information of the plurality of data sets to be accessed.
  • the file storage path information corresponds to the identity authentication authority, and the identity authentication authority is used as an access token for accessing the file system, and the access unit 580 can use the access token to access the file storage path information corresponding to the to-be-accessed data set in the file system. Data collection.
  • the MR system 540 can use the token 1 as an access token to access the user data table 1 of the user 1 in the HDFS according to the file storage path information 1. .
  • the MR system 540 can replace the token 1 with the token 2 as an access token, and use the token 2 to access the user data table 2 in the HDFS according to the file storage path information 2.
  • processing unit 560 can also be configured to use the super token as an access token during initialization.
  • the MR system 540 can receive the identity authentication authority and the file storage path information sent by the data warehouse 520, and the identity authentication authority can include a super token, and the super token allows access to all User's data collection.
  • the processing unit 560 can use the super token as an access token for accessing the file system, and the access unit 580 can access the data corresponding to the file storage path information corresponding to the to-be-accessed data set in the file system by using the access token. set.
  • MR system 540 can use token 1 as an access token to access user data table 1 of user 1 in HDFS according to file storage path information 1. Assuming that the super token is token 3, when the MR system 540 needs to access the user data table 2 of the user 2, the MR system 540 can acquire the token 3 during the initialization process and replace the token 1 with the token 3 as the access order. The card is used to access the user data table 2 in the HDFS according to the file storage path information 2 using the token 3.
  • the data warehouse receives the access request event of the first user, and obtains the super token and each data set if the first user has access rights to access the plurality of data sets to be accessed.
  • the file stores path information and sends the super token along with the file storage path information for each data set to the MR system.
  • the processing unit of the MR system can use the super token as the access token, and the access unit can use the access token to access the data set corresponding to the file storage path information corresponding to the data set to be accessed in the HDFS, thereby realizing cross-user access, and one user can Access data collections from multiple users.
  • FIG. 6 is a block diagram showing the structure of a data access device according to Embodiment 6 of the present invention.
  • the data access device 600 may be a host server having a computing capability, a personal computer PC, or a portable computer or terminal that can be carried.
  • the specific embodiment of the present invention does not limit the specific implementation of the computing node.
  • the data access device 600 includes a processor 610, a communications interface 620, a memory array 630, and a bus 640.
  • the processor 610, the communication interface 620, and the memory 630 complete communication with each other through the bus 640.
  • the communication interface 620 is configured to communicate with a network element, where the network element includes, for example, a virtual machine management center, shared storage, and the like.
  • the processor 610 is for executing a program.
  • the processor 610 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
  • ASIC Application Specific Integrated Circuit
  • the memory 630 is used to store files.
  • Memory 630 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
  • Memory 630 can also be a memory array.
  • Memory 630 may also be partitioned, and the blocks may be combined into virtual volumes according to certain rules.
  • the above program may be a program code including computer operating instructions. This program can be used to:
  • the access request event carries a plurality of data sets to be accessed designated by the first user, where the multiple data sets are created by multiple users;
  • the obtaining the identity authentication authority corresponding to each user identifier includes:
  • the method includes:
  • the parallel computing system searches for the file storage path information of the currently accessed data set according to the correspondence between the identity authentication authority of each user identifier and the file storage path information corresponding to each data set.
  • the identity authentication authority Corresponding to the identity authentication authority, using the identity authentication authority as an access token;
  • the parallel computing system uses the access token to access the data set corresponding to the file storage path information.
  • the identity authentication authority includes a super token
  • the obtaining the identity authentication authority corresponding to each user identifier further includes:
  • the super token allows access to a data set of all users.
  • the method further includes:
  • the parallel computing system uses the super token as an access token during initialization; the parallel computing system uses the access token to access the data set corresponding to the file storage path information.
  • the function is implemented in the form of computer software and sold or used as a stand-alone product, all or part of the technical solution of the present invention may be considered to some extent (for example, prior art)
  • the part that contributes to the technology is embodied in the form of computer software products.
  • the computer software product is typically stored in a computer readable storage medium, including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

Landscapes

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

Abstract

涉及一种数据访问方法、系统及数据仓库,其中该数据访问方法包括接收第一用户提交的访问请求事件;确定所述第一用户对所述多个数据集合的访问权限;若所述第一用户具有访问每个数据集合的访问权限,确定所述多个数据集合对应的多个用户标识;获取所述每个数据集合对应的文件存储路径信息;根据所述多个用户标识,获取每个用户标识对应的身份认证权限;向并行计算系统下发并行访问任务。通过向并行计算系统发送多个用户标识对应的身份认证权限和文件存储路径信息,可以实现跨用户访问,一个用户可以访问多个用户的数据集合。

Description

数据访问方法、 系统及数据仓库
技术领域 本发明涉及文件管理领域, 尤其涉及一种数据访问方法、 系统及数据仓 库。
背景技术
文件系统可以用于管理文件存储,常见的文件系统包括 lmux的文件系统、 windows的文件系统等。它们都具有针对不同使用者或使用组的访问权限管理 方法, 其中可以包括读取文件内容、 修改文件内容以及可执行权限。 一个文 件一般只属于一个用户和群组, 要使不同的用户对相同的文件具有不同的权 限是比较困难的。
例如: 现有的 Hadoop分布式文件系统 (英文: Hadoop Distributed File System, 缩写: HDFS ) , 不同的用户只对用户具有访问权限的文件系统进行 操作, 难以实现复杂的跨用户访问控制, 如用户 1只具有对用户 1自身创建的 文件 1的访问权限, 不具有用户 2创建的文件 2的访问权限, 用户 1只能对文件 1 进行操作, 不能对文件 2进行操作。
发明内容 技术问题 有鉴于此, 本发明要解决的技术问题是, 如何实现跨用户访问控制。 解决方案 为了解决上述技术问题, 根据本发明的一实施例, 第一方面, 提供了一 种数据访问方法, 包括: 接收第一用户提交的访问请求事件, 所述访问请求事件携带所述第一用 户指定的待访问的多个数据集合, 所述多个数据集合由多个用户创建; 确定所述第一用户对所述多个数据集合的访问权限;
若所述第一用户具有访问每个数据集合的访问权限, 确定所述多个数据 集合对应的多个用户标识;
获取所述每个数据集合对应的文件存储路径信息;
根据所述多个用户标识, 获取每个用户标识对应的身份认证权限; 向并行计算系统下发并行访问任务, 所述并行访问任务携带所述身份认 证权限和所述文件存储路径信息。
结合第一方面, 在第一种可能的实现方式中, 所述获取每个用户标识对 应的身份认证权限, 包括:
获取所述每个用户标识的身份认证权限;
建立所述每个用户标识的身份认证权限与所述每个数据集合对应的文件 存储路径信息的对应关系;
所述并行访问任务中还包括所述对应关系。
结合第一方面的第一种可能的实现方式, 在第二种可能的实现方式中, 在所述向并行计算系统下发并行访问任务之后, 包括:
所述并行计算系统在初始化的过程中, 根据所述每个用户标识的身份认 证权限与所述每个数据集合对应的文件存储路径信息的对应关系, 查找当前 访问的数据集合的文件存储路径信息对应的所述身份认证权限, 将所述身份 认证权限作为访问令牌 ·' 所述并行计算系统采用所述访问令牌, 访问所述文件存储路径信息对应 的所述数据集合。
结合第一方面, 在第三种可能的实现方式中, 所述身份认证权限包括超 级令牌, 所述获取每个用户标识对应的身份认证权限, 还包括: 获取所述超级令牌, 所述超级令牌允许访问所有用户的数据集合。
结合第一方面的第三种可能的实现方式, 在第四种可能的实现方式中, 在所述向并行计算系统下发并行访问任务之后, 还包括:
所述并行计算系统在初始化的过程中, 将所述超级令牌作为访问令牌; 所述并行计算系统采用所述访问令牌, 访问所述文件存储路径信息对应 的所述数据集合。
根据本发明的另一实施例, 第二方面, 提供了一种数据仓库, 包括: 接收单元, 用于接收第一用户提交的访问请求事件, 所述访问请求事件 携带所述第一用户指定的待访问的多个数据集合, 所述多个数据集合由多个 用户创建;
确定单元, 与所述接收单元连接, 用于确定所述第一用户对所述多个数 据集合的访问权限,
所述确定单元还用于若所述第一用户具有访问每个数据集合的访问权 限, 确定所述多个数据集合对应的多个用户标识;
获取单元, 与所述确定单元连接, 用于获取所述每个数据集合对应的文 件存储路径信息,
所述获取单元还用于根据所述多个用户标识, 获取每个用户标识对应的 身份认证权限;
发送单元, 与所述获取单元连接, 用于向并行计算系统下发并行访问任 务, 所述并行访问任务携带所述身份认证权限和所述文件存储路径信息。
结合第二方面, 在第一种可能的实现方式中, 所述获取单元还用于获取 所述每个用户标识的身份认证权限, 建立所述每个用户标识的身份认证权限 与所述每个数据集合对应的文件存储路径信息的对应关系;
所述并行访问任务中还包括所述对应关系。
结合第二方面, 在第二种可能的实现方式中, 所述身份认证权限包括超 级令牌, 所述获取单元还用于获取超级令牌, 所述超级令牌允许访问所有用 户的数据集合。
根据本发明的另一实施例, 第三方面, 提供了一种数据访问系统, 包括: 数据仓库, 采用本发明实施例中任意一种结构的数据仓库; 以及 并行计算系统。
结合第三方面, 在第一种可能的实现方式中, 所述并行计算系统包括: 处理单元, 用于在初始化的过程中, 根据所述每个用户标识的身份认证 权限与所述每个数据集合对应的文件存储路径信息的对应关系, 查找当前访 问的数据集合的文件存储路径信息对应的所述身份认证权限, 将所述身份认 证权限作为访问令牌;
访问单元, 与所述处理单元连接, 用于采用所述访问令牌, 访问所述文 件存储路径信息对应的所述数据集合。
结合第三方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述处理单元还用于在初始化的过程中, 将所述超级令牌作为访问令牌。
有益效果
本发明实施例中, 数据仓库接收到第一用户的访问请求事件后, 可以在 第一用户具有待访问的每个数据集合的访问权限的情况下, 获取每个数据集 合对应的用户标识、 文件存储路径信息和身份认证权限, 并将身份认证权限 和文件存储路径信息一起发送至并行计算系统, 使得并行计算系统可以使用 身份认证权限访问文件存储路径信息对应的数据集合, 实现了跨用户访问, 一个用户可以访问多个用户的数据集合。
根据下面参考附图对示例性实施例的详细说明, 本发明的其它特征及方 面将变得清楚。 附图说明 包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本 发明的示例性实施例、 特征和方面, 并且用于解释本发明的原理。
图 1 a示出根据本发明实施例一的数据访问方法的流程图 ·'
图 lb示出根据本发明实施例一的数据访问方法的场景示意图;
图 2示出根据本发明实施例二的数据访问方法的流程图;
图 3示出根据本发明实施例三的数据访问方法的流程图;
图 4示出根据本发明实施例四的数据仓库的结构框图;
图 5示出根据本发明实施例五的数据访问系统的结构框图;
图 6示出根据本发明实施例六的数据访问装置的结构框图。 具体实施方式
以下将参考附图详细说明本发明的各种示例性实施例、 特征和方面。 附 图中相同的附图标记表示功能相同或相似的元件。 尽管在附图中示出了实施 例的各种方面, 但是除非特别指出, 不必按比例绘制附图。
在这里专用的词"示例性 "意为 "用作例子、 实施例或说明性"。 这里作为
"示例性"所说明的任何实施例不必解释为优于或好于其它实施例。
另外, 为了更好的说明本发明, 在下文的具体实施方式中给出了众多的 具体细节。 本领域技术人员应当理解, 没有某些具体细节, 本发明同样可以 实施。 在另外一些实例中, 对于大家熟知的方法、 手段、 元件和电路未作详 细描述, 以便于凸显本发明的主旨。
实施例 1
图 la示出根据本发明实施例一的数据访问方法的流程图。 如图 la所示, 该数据访问方法包括:
歩骤 100、接收第一用户提交的访问请求事件, 所述访问请求事件携带所 述第一用户指定的待访问的多个数据集合, 所述多个数据集合由多个用户创 建。
具体地, 数据仓库如 Hive可以基于并行计算 (英文: MapReduce, 缩写:
MR)系统访问文件系统。在数据仓库中可以保存用户数据集合, 所述数据集 合可以是采用用户数据表的形式实现, 用户数据集合可能归属不同的用户。 在实际的业务场景中, 用户可能需要交叉访问彼此的数据集合, 比如第一用 户可能需要将第二用户的用户数据表和自己的用户数据表进行关联查询, 第 二用户可以是除了第一用户之外的其他用户。 例如, 第一用户创建的用户数 据表中包括客户姓名和订单号, 第二用户创建的用户数据表中包括订单号和 客户联系电话, 则第一用户的用户数据表和第二用户的用户数据表具有关联 关系。 如果想要查询客户 A的联系电话, 可以通过对第一用户的用户数据表 和第二用户的用户数据表进行关联查询得到。底层的文件系统可以是分布式 文件系统 (英文: Distributed File System , 缩写: HDFS )。 如果需要 实现跨用户访问, 即实现第一用户访问第二用户的用户数据表, 第一用户可 以向 Hive发送访问请求事件, 从而将第一用户指定的待访问的多个数据表告 知数据仓库, 这些数据集合可以是由多个用户创建的用户数据表。
例如, 图 lb示出根据本发明实施例一的数据访问方法的场景示意图, 如 图 lb所示, 在 Hive (数据仓库) 中, 用户 1创建了用户数据表 1, 用户 2创建了 用户数据表 2, 用户数据表 1与用户数据表 2可以具有关联关系。 假设, 用户 1 (第一用户) 需要访问多个数据集合 (用户数据表 1和用户数据表 2)。 用户 1 可以将此访问请求事件提交至 Hive,该访问请求事件中可以携带用户 1指定的 待访问的用户数据表 1和用户数据表 2。
歩骤 110、 确定所述第一用户对所述多个数据集合的访问权限。
Hwe的关系型数据库中, 可以预先配置保存各个用户的身份认证权限, 用于确定每个用户允许访问的权限, 例如: 数据仓库中可以包括用户访问用 户数据表的权限配置信息模块, 权限配置信息模块中可以预先配置某一用户 能够访问哪些用户数据表的权限。 例如: 用户 1允许访问用户 1、 2、 3, 并且 用户数据表 1属于用户 1, 用户数据表 2属于用户 2。 如图 lb所示, 在 Hive接收 到访问请求事件后, 可以在权限管理信息中查找到用户 2是用户 1允许访问的 用户, 用户数据表 2属于用户 2, 表明该访问请求事件合法, 可以进行后续的 访问。 如果在权限管理信息中, 用户 1允许访问用户 3、 用户 4, 那么该访问请 求事件不能通过合法性校验, 表明该访问请求事件不合法, 不能继续执行访 问。
歩骤 120、若所述第一用户具有访问每个数据集合的访问权限, 确定所述 多个数据集合对应的多个用户标识;
歩骤 130、 获取所述每个数据集合对应的文件存储路径信息。
具体地, 用户在数据仓库中创建用户数据表时, 数据仓库可以自动保存 用户数据表的信息, 该信息可以包括创建用户数据表的用户标识、 用户数据 表的文件存储路径信息等。 数据仓库可以根据访问请求事件中第一用户指定 的待访问的多个数据集合, 确定该多个数据集合如多个用户的用户数据表, 并读取用户数据表的信息, 确定待访问的每个数据集合对应的用户标识和文 件存储路径信息。
歩骤 140、根据所述多个用户标识, 获取每个用户标识对应的身份认证权 限。
在数据仓库接收到访问请求事件之后, 数据仓库可以从权限配置信息模 块中获取多个用户标识对应的身份认证权限, 该身份认证权限可以包括多个 用户标识对应令牌 (token)。 例如, 如图 lb所示, 用户 2的身份认证权限为 token2 ,用户 2允许访问的用户数据表为用户数据表 2,该用户数据表 2在 HDFS 中保存的文件存储路径信息为文件存储路径信息 2。
歩骤 150、 向并行计算系统下发并行访问任务, 所述并行访问任务携带所 述身份认证权限和所述文件存储路径信息。 例如, 如图 lb所示, Hive (数据仓库)通过 MR任务 (并行访问任务)将 令牌 2 (身份认证权限) 和文件存储路径信息发送给 MR (MapReduce) 系统 后, MR系统可以使用令牌 2访问用户数据表 2。
本实施例的数据访问方法,数据仓库接收到第一用户的访问请求事件后, 可以在第一用户具有待访问的每个数据集合的访问权限的情况下, 获取每个 数据集合对应的用户标识、 文件存储路径信息和身份认证权限, 并将身份认 证权限和文件存储路径信息一起发送至 MR系统, 使得 MR系统可以使用身份 认证权限访问 HDFS中文件存储路径信息对应的数据集合, 实现了跨用户访 问, 一个用户可以访问多个用户的数据集合。
实施例 2
图 2示出根据本发明实施例二的数据访问方法的流程图。 图 2中标号与图 la相同的歩骤具有相同的功能, 为简明起见, 省略对这些歩骤的详细说明。
如图 2所示,本实施例与图 la所示数据访问方法的主要区别在于,歩骤 140 可以包括:
歩骤 200、 获取所述每个用户标识的身份认证权限;
歩骤 210、建立所述每个用户标识的身份认证权限与所述每个数据集合对 应的文件存储路径信息的对应关系;
因此, 在上述实施例的歩骤 150中, 数据仓库向并行计算系统下发的并行 访问任务中还可以包括所述对应关系。
例如, 如图 lb所示, 在 Hive接收到访问请求事件之后, 可以查找权限配 置信息模块, 获取用户 2的身份认证权限即令牌 2, 建立令牌 2与用户数据表 2 的文件存储路径信息 2的对应关系, 通过 MR任务将令牌 2、文件存储路径信息 2、 及其对应关系一起发送给 MR系统。
进一歩地, 歩骤 150之后, 可以包括:
歩骤 220、所述并行计算系统在初始化的过程中, 根据所述每个用户标识 的身份认证权限与所述每个数据集合对应的文件存储路径信息的对应关系, 查找当前访问的数据集合的文件存储路径信息对应的所述身份认证权限, 将 所述身份认证权限作为访问令牌;
歩骤 230、所述并行计算系统采用所述访问令牌, 访问所述文件存储路径 信息对应的所述数据集合。
例如, 如图 lb所示, 通常, 用户 1需要通过 Hive访问自身的数据集合时, MR系统可以使用令牌 1作为访问令牌按照文件存储路径信息 1访问 HDFS (文 件系统) 中用户 1的用户数据表 1。 在用户 1需要访问用户 2的用户数据表 2时, MR系统可以使用令牌 2替换令牌 1作为访问令牌, 使用令牌 2按照文件存储路 径信息 2访问 HDFS中用户数据表 2。
本实施例的数据访问方法,数据仓库接收到第一用户的访问请求事件后, 可以在第一用户具有待访问的每个数据集合的访问权限的情况下, 获取每个 数据集合对应的用户标识、 文件存储路径信息和身份认证权限, 并将身份认 证权限和文件存储路径信息一起发送至 MR系统, 使得 MR系统可以根据身份 认证权限和文件存储路径信息确定访问令牌,使用访问令牌访问 HDFS中文件 存储路径信息对应的数据集合, 实现了跨用户访问, 一个用户可以访问多个 用户的数据集合。
实施例 3
图 3示出根据本发明实施例三的数据访问方法的流程图。 图 3中标号与图 la和图 2中相同的歩骤具有相同的功能, 为简明起见, 省略对这些歩骤的详细 说明。
如图 3所示, 本实施例与图 la和图 2所示数据访问方法的主要区别在于, 如果所述身份认证权限包括超级令牌, 歩骤 140还可以包括:
歩骤 300、 获取超级令牌, 所述超级令牌允许访问所有用户的数据集合。 具体地, 可以预先设置一个可以访问文件系统所有用户的数据集合的超 级令牌, 并将该超级令牌存储在数据仓库的用户访问表的权限配置信息模块 中。 在数据仓库接收到访问请求事件之后, 可以从权限配置信息模块中, 获 取该超级令牌。
进一歩地, 歩骤 150之后, 可以包括:
歩骤 310、所述并行计算系统在初始化的过程中, 将所述超级令牌作为访 问令牌;
歩骤 320、所述并行计算系统采用所述访问令牌, 访问所述文件存储路径 信息对应的所述数据集合。
例如, 通常, 用户 1需要通过 Hive访问自身的数据集合时, MR系统可以 使用令牌 1作为访问令牌按照文件存储路径信息 1访问 HDFS中用户 1的用户数 据表 1。 假设超级令牌为令牌 3, 在用户 1需要访问用户 2的用户数据表 2时, MR系统可以在初始化的过程中获取令牌 3, 并使用令牌 3替换令牌 1作为访问 令牌, 使用令牌 3按照文件存储路径信息 2访问 HDFS中用户数据表 2。
本实施例的数据访问方法,数据仓库接收到第一用户的访问请求事件后, 可以在第一用户具有待访问的每个数据集合的访问权限的情况下, 获取每个 数据集合对应的用户标识、 文件存储路径信息和超级令牌, 并将超级令牌和 文件存储路径信息一起发送至 MR系统, 使得 MR系统可以使用超级令牌根据 待访问数据集合的文件存储路径信息访问 HDFS中文件存储路径信息对应的 数据集合, 实现了跨用户访问, 一个用户可以访问多个用户的数据集合。
实施例 4
图 4示出根据本发明实施例四的数据仓库的结构框图。 如图 4所示, 该数 据仓库 400可以包括:
接收单元 420, 用于接收第一用户提交的访问请求事件, 所述访问请求事 件携带所述第一用户指定的待访问的多个数据集合, 所述多个数据集合由多 个用户创建。 确定单元 440, 与所述接收单元 420连接, 用于确定所述第一用户对所述 多个数据集合的访问权限。
所述确定单元 440还用于若所述第一用户具有访问每个数据集合的访问 权限, 确定所述多个数据集合对应的多个用户标识;
获取单元 460, 与所述确定单元 440连接, 用于获取所述每个数据集合对 应的文件存储路径信息。
所述获取单元 460还用于根据所述多个用户标识,获取每个用户标识对应 的身份认证权限。
具体地, 数据仓库 400如 Hive可以基于并行计算 (英文: MapReduce, 缩 写: MR)系统访问文件系统。 在数据仓库中可以保存用户数据集合, 所述数 据集合可以是采用用户数据表的形式实现, 用户数据集合可能归属不同的用 户。 在实际的业务场景中, 用户可能需要交叉访问彼此的数据集合, 比如第 一用户可能需要将第二用户的用户数据表和自己的用户数据表进行关联查 询, 第二用户可以是除了第一用户之外的其他用户。 例如, 在数据仓库 400 中第一用户创建的用户数据表包括客户姓名和订单号, 第二用户创建的用户 数据表包括订单号和客户联系电话, 则第一用户的用户数据表和第二用户的 用户数据表具有关联关系。 如果想要查询客户 A的联系电话, 可以通过对第 一用户的用户数据表和第二用户的用户数据表进行关联查询得到。 底层的文 件系统可以是分布式文件系统(英文: Distributed File System , 缩写: HDFS 如果需要实现跨用户访问, 即实现第一用户访问第二用户的用户数 据表, 第一用户可以向数据仓库 400发送访问请求事件, 接收单元 420接收访 问请求事件, 从而得到第一用户指定的待访问的数据集合。
例如, 如图 lb所示, 在 Hive (数据仓库 400 ) 中, 用户 1创建了用户数据 表 1, 用户 2创建了用户数据表 2, 用户数据表 1和用户数据表 2都保存在 Hive 的关系型数据库中, 用户数据表 1与用户数据表 2可以具有关联关系。 假设, 用户 1 (第一用户) 需要访问多个数据集合 (用户数据表 1和用户数据表 2)。 Hive的接收单元 420可以接收用户 1发送的访问请求事件, 该访问请求事件中 可以携带用户 1指定的待访问的用户数据表 1和用户数据表 2。
Hwe的关系型数据库中, 可以预先保存各个用户的身份认证权限, 用于 确定每个用户允许访问的权限, 例如, Hive中可以包括用户访问数据集合的 权限配置信息模块, 权限配置信息模块中可以预先配置某一用户能够访问哪 些用户数据表的权限。 例如: 用户 1允许访问用户 1、 2、 3, 并且用户数据表 1 属于用户 1, 用户数据表 2属于用户 2。 如图 lb所示, 在 Hive接收到访问请求事 件后,确定单元 440可以通过查找权限管理信息确定第一用户是否具有对多个 数据集合的访问权限。 例如: 在权限管理信息中查找到用户 2是用户 1允许访 问的用户, 用户数据表 2属于用户 2, 表明该访问请求事件合法, 可以进行后 续的访问。 如果在权限管理信息中, 用户 1允许访问用户 3、 用户 4, 那么该访 问请求事件不能通过合法性校验, 表明该访问请求事件不合法, 不能继续执 行访问。
用户在数据仓库 400中创建用户数据表时, 数据仓库 400可以自动保存用 户数据表的信息, 该信息可以包括创建用户数据表的用户标识、 用户数据表 的文件存储路径信息等。 确定单元 440可以根据接收单元 420接收到的访问请 求事件中第一用户指定的待访问的多个数据集合, 确定该多个数据集合如多 个用户的用户数据表, 并读取用户数据表的信息, 确定待访问的每个数据集 合对应的多个用户标识。获取单元 460也可以在用户数据表的信息中获取到待 访问的每个数据集合对应的文件存储路径信息。
在接收单元 420接收到访问请求事件、 确定单元 440确定第一用户具有访 问每个数据集合的访问权限之后,获取单元 460还可以从用户访问用户数据表 的权限配置信息模块中获取多个用户标识对应的身份认证权限, 该身份认证 权限可以包括多个用户标识对应的身份认证权限即令牌 (token) , 也可以包 括多个用户标识对应的身份认证权限和待访问的多个数据集合的文件存储路 径信息的对应关系。 例如, 如图 lb所示, 用户 2的身份认证权限为令牌 2, 用 户 2允许访问的用户数据表为用户数据表 2, 该用户数据表 2在 HDFS中保存的 文件存储路径信息为文件存储路径信息 2,则令牌 2与文件存储路径信息 2具有 对应关系。
发送单元 480, 与所述获取单元 460连接, 用于向并行计算系统下发并行 访问任务, 所述并行访问任务携带所述身份认证权限和所述文件存储路径信 息。
例如, 如图 lb所示, Hive (数据仓库) 的发送单元 480可以将身份认证权 限和文件存储路径信息发送给 MR (MapReduce) 系统, 以用于后续 MR系统 使用令牌 2访问用户数据表 2的数据集合。
在一种可能的实现方式中, 获取单元 460还可以用于: 获取所述每个用户 标识的身份认证权限; 建立所述每个用户标识的身份认证权限与所述每个数 据集合对应的文件存储路径信息的对应关系。这样, 发送单元 480向并行计算 系统下发的并行访问任务中还可以包括所述对应关系。
例如, 如图 lb所示, 在 Hive的接收单元 420接收到访问请求事件、 确定单 元 440确定用户 1具有访问用户数据表 2的访问权限之后, 获取单元 460可以通 过查找权限配置信息模块, 获取用户 2的身份认证权限即令牌 2, 建立令牌 2 与用户数据表 2的文件存储路径信息 2的对应关系。
在另一种可能的实现方式中, 如果所述身份认证权限包括超级令牌, 获 取单元 460还可以用于: 获取所述超级令牌, 所述超级令牌允许访问所有用户 的数据集合。
具体地, 可以预先设置一个可以访问文件系统所有用户的数据集合的超 级令牌, 并将该超级令牌存储在数据仓库的用户访问用户数据表的权限配置 信息模块中。 在数据仓库 400的接收单元 420接收到访问请求事件、 确定单元 440确定第一用户具有访问待访问的每个数据集合的访问权限之后,获取单元 460还可以从权限配置信息模块中, 获取该超级令牌。
本实施例的数据仓库, 接收单元接收到第一用户的访问请求事件后, 在 确定单元确定第一用户具有访问待访问的多个数据集合的访问权限的情况 下, 确定单元可以确定每个数据集合对应的用于标识, 获取单元可以获取每 个数据集合对应的文件存储路径信息和每个用户标识对应的身份认证权限。 通过发送单元可以将身份认证权限和文件存储路径信息一起发送至 MR系统, 以使得 MR系统可以使用身份认证权限根据待访问数据集合的文件存储路径 信息访问 HDFS中文件存储路径信息对应的数据集合, 实现了跨用户访问,一 个用户可以访问多个用户的数据集合。
实施例 5
图 5示出根据本发明实施例五的数据访问系统的结构框图。 如图 5所示, 该数据访问系统 500可以包括:
数据仓库 520, 可以是上述实施例四中所描述的数据仓库 ·'
并行计算系统 540。
具体地, 在第一用户需要进行数据访问时, 第一用户可以向数据访问系 统 500的数据仓库 520发送访问请求事件, 在数据仓库 520通过其接收单元 420 接收到该访问请求事件、确定单元 440确定第一用户具有访问待访问的每个数 据集合的访问权限之后, 确定单元 440可以根据数据仓库 520中保存的用户数 据表的信息, 确定第一用户指定的待访问的多个数据集合对应的多个用户标 识,并通过获取单元 460获取每个数据集合对应的文件存储路径信息和每个用 户标识对应的身份认证权限,发送单元 480将身份认证权限和文件存储路径信 息一起发送至 MR系统 540, MR系统 540可以根据待访问的数据集合的文件存 储路径信息使用身份认证权限中相应的身份认证权限访问文件系统中文件存 储路径信息对应的数据集合。 进一歩地, MR系统 540可以包括:
处理单元 560, 用于在初始化的过程中, 根据所述每个用户标识的身份认 证权限与所述每个数据集合对应的文件存储路径信息的对应关系, 查找当前 访问的数据集合的文件存储路径信息对应的所述身份认证权限, 将所述身份 认证权限作为访问令牌;
访问单元 580, 与所述处理单元 560连接, 用于采用所述访问令牌, 访问 所述文件存储路径信息对应的所述数据集合。
具体地, MR系统 540可以接收数据仓库 520发送的身份认证权限和文件存 储路径信息, 身份认证权限中可以包括多个用户标识对应的身份认证权限和 身份认证权限与待访问的多个数据集合的文件存储路径信息的对应关系。 在 MR系统 540初始化过程中,处理单元 560可以根据身份认证权限中多个用户标 识对应的身份认证权限和待访问的多个数据集合的文件存储路径信息的对应 关系, 查找当前访问的数据集合对应的文件存储路径信息对应的身份认证权 限, 并将该身份认证权限作为访问文件系统的访问令牌, 访问单元 580可以采 用访问令牌访问文件系统中待访问数据集合对应的文件存储路径信息对应的 数据集合。
例如, 如图 lb所示, 通常, 用户 1需要通过 Hive访问自身的数据集合时, MR系统 540可以使用令牌 1作为访问令牌按照文件存储路径信息 1访问 HDFS 中用户 1的用户数据表 1。 在用户 1需要访问用户 2的用户数据表 2时, MR系统 540可以使用令牌 2替换令牌 1作为访问令牌, 使用令牌 2按照文件存储路径信 息 2访问 HDFS中用户数据表 2。
在一种可能的实现方式中, 处理单元 560还可以用于在初始化的过程中, 将所述超级令牌作为访问令牌。
具体地, MR系统 540可以接收数据仓库 520发送的身份认证权限和文件存 储路径信息, 身份认证权限中可以包括超级令牌, 该超级令牌允许访问所有 用户的数据集合。在 MR系统 540初始化过程中, 处理单元 560可以将超级令牌 作为访问文件系统的访问令牌,访问单元 580可以采用访问令牌访问文件系统 中待访问数据集合对应的文件存储路径信息对应的数据集合。
例如, 通常, 用户 1需要通过 Hive访问自身的数据集合时, MR系统 540 可以使用令牌 1作为访问令牌按照文件存储路径信息 1访问 HDFS中访问用户 1 的用户数据表 1。假设超级令牌为令牌 3, 在 MR系统 540需要访问用户 2的用户 数据表 2时, MR系统 540可以在初始化的过程中获取令牌 3, 并使用令牌 3替换 令牌 1作为访问令牌, 使用令牌 3按照文件存储路径信息 2访问 HDFS中用户数 据表 2。
本实施例的数据访问系统, 数据仓库接收第一用户的访问请求事件, 并 在第一用户具有访问待访问的多个数据集合的访问权限的情况下, 获取超级 令牌和每个数据集合的文件存储路径信息, 并将超级令牌和每个数据集合的 文件存储路径信息一起发送至 MR系统。 MR系统的处理单元可以采用超级令 牌作为访问令牌,访问单元可以使用访问令牌访问 HDFS中待访问的数据集合 对应的文件存储路径信息对应的数据集合, 实现了跨用户访问, 一个用户可 以访问多个用户的数据集合。
实施例 6
图 6示出根据本发明实施例六的数据访问装置的结构框图。所述数据访问 装置 600可以是具备计算能力的主机服务器、 个人计算机 PC、 或者可携带的 便携式计算机或终端等。 本发明具体实施例并不对计算节点的具体实现做限 定。
所述数据访问装置 600包括处理器 (processor ) 610、 通信接口 ( Communications Interface ) 620、 存 ii者器 ( memory array) 630禾口总线 640。 其中, 处理器 610、 通信接口 620、 以及存储器 630通过总线 640完成相互间的 通信。 通信接口 620用于与网元通信, 其中网元包括例如虚拟机管理中心、共享 存储等。
处理器 610用于执行程序。 处理器 610可能是一个中央处理器 CPU, 或者 是专用集成电路 ASIC (Application Specific Integrated Circuit) , 或者是被配置 成实施本发明实施例的一个或多个集成电路。
存储器 630用于存放文件。 存储器 630可能包含高速 RAM存储器, 也可能 还包括非易失性存储器 (non-volatile memory) , 例如至少一个磁盘存储器。 存储器 630也可以是存储器阵列。 存储器 630还可能被分块, 并且所述块可按 一定的规则组合成虚拟卷。
在一种可能的实施方式中, 上述程序可为包括计算机操作指令的程序代 码。 该程序具体可用于:
接收第一用户提交的访问请求事件, 所述访问请求事件携带所述第一用 户指定的待访问的多个数据集合, 所述多个数据集合由多个用户创建;
确定所述第一用户对所述多个数据集合的访问权限;
若所述第一用户具有访问每个数据集合的访问权限, 确定所述多个数据 集合对应的多个用户标识;
获取所述每个数据集合对应的文件存储路径信息;
根据所述多个用户标识, 获取每个用户标识对应的身份认证权限; 向并行计算系统下发并行访问任务, 所述并行访问任务携带所述身份认 证权限和所述文件存储路径信息。
在一种可能的实现方式中,所述获取每个用户标识对应的身份认证权限, 包括:
获取所述每个用户标识的身份认证权限;
建立所述每个用户标识的身份认证权限与所述每个数据集合对应的文件 存储路径信息的对应关系; 所述并行访问任务中还包括所述对应关系。
在一种可能的实现方式中, 在所述向并行计算系统下发并行访问任务之 后, 包括:
所述并行计算系统在初始化的过程中, 根据所述每个用户标识的身份认 证权限与所述每个数据集合对应的文件存储路径信息的对应关系, 查找当前 访问的数据集合的文件存储路径信息对应的所述身份认证权限, 将所述身份 认证权限作为访问令牌;
所述并行计算系统采用所述访问令牌, 访问所述文件存储路径信息对应 的所述数据集合。
在一种可能的实现方式中, 所述身份认证权限包括超级令牌, 所述获取 每个用户标识对应的身份认证权限, 还包括:
获取所述超级令牌, 所述超级令牌允许访问所有用户的数据集合。
在一种可能的实现方式中, 在所述向并行计算系统下发并行访问任务之 后, 还包括:
所述并行计算系统在初始化的过程中, 将所述超级令牌作为访问令牌; 所述并行计算系统采用所述访问令牌, 访问所述文件存储路径信息对应 的所述数据集合。
本领域普通技术人员可以意识到, 本文所描述的实施例中的各示例性单 元及算法歩骤, 能够以电子硬件、或者计算机软件和电子硬件的结合来实现。 这些功能究竟以硬件还是软件形式来实现, 取决于技术方案的特定应用和设 计约束条件。 专业技术人员可以针对特定的应用选择不同的方法来实现所描 述的功能, 但是这种实现不应认为超出本发明的范围。
如果以计算机软件的形式来实现所述功能并作为独立的产品销售或使用 时, 则在一定程度上可认为本发明的技术方案的全部或部分 (例如对现有技 术做出贡献的部分) 是以计算机软件产品的形式体现的。 该计算机软件产品 通常存储在计算机可读取的存储介质中, 包括若干指令用以使得计算机设备 (可以是个人计算机、 服务器、 或者网络设备等) 执行本发明各实施例方法 的全部或部分歩骤。 而前述的存储介质包括 U盘、 移动硬盘、 只读存储器 ( ROM , Read-Only Memory )、 随机存取存储器 ( RAM , Random Access Memory), 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。

Claims

权利 要求 书
1、 一种数据访问方法, 其特征在于, 包括:
接收第一用户提交的访问请求事件, 所述访问请求事件携带所述第一用 户指定的待访问的多个数据集合, 所述多个数据集合由多个用户创建;
确定所述第一用户对所述多个数据集合的访问权限;
若所述第一用户具有访问每个数据集合的访问权限, 确定所述多个数据 集合对应的多个用户标识;
获取所述每个数据集合对应的文件存储路径信息;
根据所述多个用户标识, 获取每个用户标识对应的身份认证权限; 向并行计算系统下发并行访问任务, 所述并行访问任务携带所述身份认 证权限和所述文件存储路径信息。
2、 根据权利要求 1所述的数据访问方法, 其特征在于, 所述获取每个用 户标识对应的身份认证权限, 包括:
获取所述每个用户标识的身份认证权限;
建立所述每个用户标识的身份认证权限与所述每个数据集合对应的文件 存储路径信息的对应关系;
所述并行访问任务中还包括所述对应关系。
3、 根据权利要求 2所述的数据访问方法, 其特征在于, 在所述向并行计 算系统下发并行访问任务之后, 包括:
所述并行计算系统在初始化的过程中, 根据所述每个用户标识的身份认 证权限与所述每个数据集合对应的文件存储路径信息的对应关系, 查找当前 访问的数据集合的文件存储路径信息对应的所述身份认证权限, 将所述身份 认证权限作为访问令牌;
所述并行计算系统采用所述访问令牌, 访问所述文件存储路径信息对应 的所述数据集合。
4、 根据权利要求 1所述的数据访问方法, 其特征在于, 所述身份认证权 限包括超级令牌, 所述获取每个用户标识对应的身份认证权限, 还包括: 获取所述超级令牌, 所述超级令牌允许访问所有用户的数据集合。
5、 根据权利要求 4所述的数据访问方法, 其特征在于, 在所述向并行计 算系统下发并行访问任务之后, 还包括:
所述并行计算系统在初始化的过程中, 将所述超级令牌作为访问令牌; 所述并行计算系统采用所述访问令牌, 访问所述文件存储路径信息对应 的所述数据集合。
6、 一种数据仓库, 其特征在于, 包括:
接收单元, 用于接收第一用户提交的访问请求事件, 所述访问请求事件 携带所述第一用户指定的待访问的多个数据集合, 所述多个数据集合由多个 用户创建;
确定单元, 与所述接收单元连接, 用于确定所述第一用户对所述多个数 据集合的访问权限,
所述确定单元还用于若所述第一用户具有访问每个数据集合的访问权 限, 确定所述多个数据集合对应的多个用户标识;
获取单元, 与所述确定单元连接, 用于获取所述每个数据集合对应的文 件存储路径信息,
所述获取单元还用于根据所述多个用户标识, 获取每个用户标识对应的 身份认证权限;
发送单元, 与所述获取单元连接, 用于向并行计算系统下发并行访问任 务, 所述并行访问任务携带所述身份认证权限和所述文件存储路径信息。
7、 根据权利要求 6所述的数据仓库, 其特征在于, 所述获取单元还用于 获取所述每个用户标识的身份认证权限, 建立所述每个用户标识的身份认证 权限与所述每个数据集合对应的文件存储路径信息的对应关系;
所述并行访问任务中还包括所述对应关系。
8、 根据权利要求 6所述的数据仓库, 其特征在于, 所述身份认证权限包 括超级令牌, 所述获取单元还用于获取超级令牌, 所述超级令牌允许访问所 有用户的数据集合。
9、 一种数据访问系统, 其特征在于, 包括:
数据仓库, 采用权利要求 6-8中任一项所述的数据仓库;
并行计算系统。
10、 根据权利要求 9所述的数据访问系统, 其特征在于, 所述并行计算系 统包括:
处理单元, 用于在初始化的过程中, 根据所述每个用户标识的身份认证 权限与所述每个数据集合对应的文件存储路径信息的对应关系, 查找当前访 问的数据集合的文件存储路径信息对应的所述身份认证权限, 将所述身份认 证权限作为访问令牌;
访问单元, 与所述处理单元连接, 用于采用所述访问令牌, 访问所述文 件存储路径信息对应的所述数据集合。
11、 根据权利要求 10所述的数据访问系统, 其特征在于, 所述处理单元 还用于在初始化的过程中, 将所述超级令牌作为访问令牌。
PCT/CN2014/084482 2013-09-30 2014-08-15 数据访问方法、系统及数据仓库 WO2015043329A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310465886.2A CN103488791B (zh) 2013-09-30 2013-09-30 数据访问方法、系统及数据仓库
CN201310465886.2 2013-09-30

Publications (1)

Publication Number Publication Date
WO2015043329A1 true WO2015043329A1 (zh) 2015-04-02

Family

ID=49829017

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/084482 WO2015043329A1 (zh) 2013-09-30 2014-08-15 数据访问方法、系统及数据仓库

Country Status (2)

Country Link
CN (1) CN103488791B (zh)
WO (1) WO2015043329A1 (zh)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488791B (zh) * 2013-09-30 2018-03-27 华为技术有限公司 数据访问方法、系统及数据仓库
CN105069370B (zh) * 2015-07-22 2018-01-30 北京京东尚科信息技术有限公司 数据库自动授权访问方法
CN106055968B (zh) * 2016-05-31 2019-09-17 北京金山安全软件有限公司 一种权限设置方法、装置及电子设备
CN107944288B (zh) * 2016-10-12 2022-09-06 北京京东尚科信息技术有限公司 一种数据访问控制方法和装置
CN108073823B (zh) * 2016-11-18 2021-04-20 阿里巴巴集团控股有限公司 数据处理方法、装置及系统
CN106649772A (zh) * 2016-12-27 2017-05-10 上海上讯信息技术股份有限公司 一种访问数据的方法及设备
CN107622211A (zh) * 2017-09-27 2018-01-23 浪潮软件股份有限公司 一种大数据集群权限访问控制方法及装置
CN110795137A (zh) * 2018-08-03 2020-02-14 北京京东金融科技控股有限公司 权限配置方法、装置、系统、电子设备及可读介质
CN109214210A (zh) * 2018-09-14 2019-01-15 南威软件股份有限公司 一种优化蜂巢权限管理的方法及系统
CN109543448B (zh) * 2018-11-16 2022-07-15 深圳前海微众银行股份有限公司 Hdfs文件访问权限控制方法、设备及存储介质
CN110083680B (zh) * 2019-03-20 2023-07-25 创新先进技术有限公司 一种分布式系统中上下文数据管理方法及装置
CN110866228A (zh) * 2019-10-17 2020-03-06 北京旷视科技有限公司 对于数据下发的数据信息权限管理方法、装置及系统
CN111367945A (zh) * 2020-02-28 2020-07-03 平安医疗健康管理股份有限公司 报表查询方法、装置、设备及计算机可读存储介质
CN111563064B (zh) * 2020-04-28 2023-03-14 上海鸿翼软件技术股份有限公司 一种文件操作的方法、系统、设备及可读存储介质
CN112446047A (zh) * 2020-11-26 2021-03-05 长沙树根互联技术有限公司 数据处理方法和装置、服务器及存储介质
CN112507298A (zh) * 2020-11-30 2021-03-16 北京达佳互联信息技术有限公司 用户鉴权方法、装置、服务器以及存储介质
CN113051611B (zh) * 2021-03-15 2022-04-29 上海商汤智能科技有限公司 在线文件的权限控制方法和相关产品
CN113806777A (zh) * 2021-09-18 2021-12-17 深圳须弥云图空间科技有限公司 文件访问的实现方法及装置、存储介质及电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070143292A1 (en) * 2005-12-19 2007-06-21 Hiroshi Nozaki Method, system, and program product for access control to resource content
CN101187930A (zh) * 2007-12-04 2008-05-28 浙江大学 分布式文件系统虚拟目录及命名空间的实现方法
CN101866360A (zh) * 2010-06-28 2010-10-20 北京用友政务软件有限公司 基于对象多维属性空间的数据仓库鉴权方法及系统
CN102081710A (zh) * 2010-12-14 2011-06-01 中国石油集团川庆钻探工程有限公司 权限设置方法和权限控制方法
CN103268455A (zh) * 2013-05-09 2013-08-28 华为技术有限公司 数据的访问方法及装置
CN103488791A (zh) * 2013-09-30 2014-01-01 华为技术有限公司 数据访问方法、系统及数据仓库

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100223673A1 (en) * 2009-02-27 2010-09-02 At&T Intellectual Property I, L.P. Providing multimedia content with access restrictions
CN102012981B (zh) * 2010-11-16 2012-09-05 传神联合(北京)信息技术有限公司 一种通用权限等级分配与匹配方法及其系统
CN102685086A (zh) * 2011-04-14 2012-09-19 天脉聚源(北京)传媒科技有限公司 一种文件访问方法和系统
CN103179126A (zh) * 2013-03-26 2013-06-26 山东中创软件商用中间件股份有限公司 一种访问控制方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070143292A1 (en) * 2005-12-19 2007-06-21 Hiroshi Nozaki Method, system, and program product for access control to resource content
CN101187930A (zh) * 2007-12-04 2008-05-28 浙江大学 分布式文件系统虚拟目录及命名空间的实现方法
CN101866360A (zh) * 2010-06-28 2010-10-20 北京用友政务软件有限公司 基于对象多维属性空间的数据仓库鉴权方法及系统
CN102081710A (zh) * 2010-12-14 2011-06-01 中国石油集团川庆钻探工程有限公司 权限设置方法和权限控制方法
CN103268455A (zh) * 2013-05-09 2013-08-28 华为技术有限公司 数据的访问方法及装置
CN103488791A (zh) * 2013-09-30 2014-01-01 华为技术有限公司 数据访问方法、系统及数据仓库

Also Published As

Publication number Publication date
CN103488791B (zh) 2018-03-27
CN103488791A (zh) 2014-01-01

Similar Documents

Publication Publication Date Title
WO2015043329A1 (zh) 数据访问方法、系统及数据仓库
US11526476B2 (en) File system permission setting method and apparatus
US8590030B1 (en) Credential seed provisioning system
WO2019000979A1 (zh) 一种文件系统的权限设置方法及装置
JP5320433B2 (ja) 統合検索装置、統合検索システム、統合検索方法
US20120109940A1 (en) Information processing system, method of controlling information processing system, and search controller
WO2013048439A1 (en) Managing basic input/output system (bios) access
US10013572B2 (en) Implementing extent granularity authorization command flow processing in CAPI adapters
US20150095973A1 (en) Cloud database lockdown
CN114021089A (zh) 一种目录访问控制方法、装置、设备及可读存储介质
CN101917438A (zh) 在网络通信系统中访问控制方法和系统
CN109145621B (zh) 文档管理方法及装置
US11550942B2 (en) Universal file access control system and method
US10055574B2 (en) Implementing extent granularity authorization processing in CAPI adapters
US9231957B2 (en) Monitoring and controlling a storage environment and devices thereof
WO2019052328A1 (zh) 一种匿名账户的鉴权方法及服务器
US10169605B2 (en) Implementing block device extent granularity authorization model processing in CAPI adapters
US9898599B2 (en) Implementing extent granularity authorization and deauthorization processing in CAPI adapters
JPH10293749A (ja) コンピュータシステムおよびそのアクセス管理方法
US9697370B2 (en) Implementing and processing extent granularity authorization mechanism in CAPI adapters
TW202305628A (zh) 自動啟動帳號方法、電子設備及電腦儲存介質

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: 14848436

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14848436

Country of ref document: EP

Kind code of ref document: A1