WO2019153592A1 - 用户权限数据管理装置、方法及计算机可读存储介质 - Google Patents

用户权限数据管理装置、方法及计算机可读存储介质 Download PDF

Info

Publication number
WO2019153592A1
WO2019153592A1 PCT/CN2018/089131 CN2018089131W WO2019153592A1 WO 2019153592 A1 WO2019153592 A1 WO 2019153592A1 CN 2018089131 W CN2018089131 W CN 2018089131W WO 2019153592 A1 WO2019153592 A1 WO 2019153592A1
Authority
WO
WIPO (PCT)
Prior art keywords
directory
data
user
service unit
user information
Prior art date
Application number
PCT/CN2018/089131
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 WO2019153592A1 publication Critical patent/WO2019153592A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/144Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/137Hash-based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling

Definitions

  • the present application relates to the field of data management technologies, and in particular, to a user rights data management apparatus, method, and computer readable storage medium.
  • each bank or financial institution will have a set of authority management system to manage and maintain the rights of employees.
  • an employee conducts a transaction, he or she needs to check whether he has the right to perform related business operations through the above rights management platform.
  • the rights management system stores information about user rights of each employee in the DB2 database.
  • the user rights information is queried from the DB2 database through a WAS server, and the privilege calculation is performed by using the queried user authority related information, and the user privilege information is obtained and provided to the user.
  • the shortcoming of this technology is that the performance of the DB2 database is high, especially when the amount of users is large, the efficiency of searching data from a huge database is low, and fast retrieval cannot be achieved, resulting in a response speed for the permission data acquisition request. slow.
  • the present application provides a user rights data management apparatus, method, and computer readable storage medium, the main purpose of which is to improve the query efficiency of the rights data, so as to improve the response speed of the rights data acquisition request.
  • the present application provides a user rights data management apparatus, which includes a memory and a processor, wherein the memory stores a rights management program executable on the processor, and the rights management program is The following steps are implemented when the processor is executed:
  • the present application further provides a user rights data management method, where the method includes:
  • the present application further provides a computer readable storage medium having a rights management program stored thereon, the rights management program being executable by one or more processors to implement The steps of the user rights data management method as described above.
  • the user right data management device, the method, and the computer readable storage medium provided by the application when receiving the permission data acquisition request sent by the user terminal, obtain the user ⁇ from the request, and determine the business unit corresponding to the user information, according to the pre-
  • the hash algorithm and the user information are used to calculate a first storage path of the privilege data corresponding to the user information, and the directory configuration file in the management service component is queried, and the current primary directory of the service unit is determined to be in an abnormal state according to the directory configuration file.
  • the user terminal in the solution of the present application, does not need to retrieve from a large number of files when acquiring the permission data of the user, but calculates the storage path according to the user information, directly obtains the permission data under the path, and improves the permission data. Query efficiency, fast access to permission data, improved permissions The response speed of the data acquisition request.
  • FIG. 1 is a schematic diagram of a preferred embodiment of a user rights data management apparatus of the present application
  • FIG. 2 is a schematic diagram of a program module of a rights management program in an embodiment of a user rights data management apparatus of the present application
  • FIG. 3 is a flowchart of a preferred embodiment of a method for managing user rights data according to the present application.
  • the application provides a user authority data management device.
  • FIG. 1 a schematic diagram of a preferred embodiment of a user rights data management apparatus of the present application is shown.
  • the user authority data management device may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet computer, or a portable computer.
  • PC Personal Computer
  • terminal device such as a smart phone, a tablet computer, or a portable computer.
  • the user rights data management device includes at least a memory 11, a processor 12, a communication bus 13, and a network interface 14.
  • the memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (for example, an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like.
  • the memory 11 may be an internal storage unit of the user rights data management device, such as a hard disk of the user rights data management device, in some embodiments.
  • the memory 11 may also be an external storage device of the user rights data management device in other embodiments, such as a plug-in hard disk equipped with a user rights data management device, a smart memory card (SMC), and a secure digital (Secure) Digital, SD) cards, flash cards, etc.
  • the memory 11 may also include both an internal storage unit of the user rights data management device and an external storage device.
  • the memory 11 can be used not only for storing application software installed in the user authority data management device and various types of data, such as code of the rights management program, but also for temporarily storing data that has been output or will be output.
  • the processor 12 in some embodiments, may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data processing chip for running program code or processing stored in the memory 11. Data, such as the execution rights management program.
  • CPU Central Processing Unit
  • controller microcontroller
  • microprocessor or other data processing chip for running program code or processing stored in the memory 11.
  • Data such as the execution rights management program.
  • Communication bus 13 is used to implement connection communication between these components.
  • the network interface 14 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and is typically used to establish a communication connection between the device and other electronic devices.
  • a standard wired interface such as a WI-FI interface
  • FIG. 1 shows only user rights data management devices having components 11-14 and rights management programs, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the device may further include a user interface
  • the user interface may include a display
  • an input unit such as a keyboard
  • the optional user interface may further include a standard wired interface and a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch sensor, or the like.
  • the display may also be appropriately referred to as a display screen or a display unit for displaying information processed in the user authority data management device and a user interface for displaying visualization.
  • a rights management program is stored in the memory 11; when the processor 12 executes the rights management program stored in the memory 11, the following steps are implemented:
  • the user information is obtained from the privilege data acquisition request, and the service unit corresponding to the user information is determined, where the service unit includes one or more service systems.
  • the user rights data management device provided in this embodiment is used to control the user's acquisition of the authority data.
  • the device stores user rights data under multiple service systems, wherein multiple service systems can be grouped into one service unit according to requirements.
  • the health insurance business system, the property insurance business system, and the auto insurance business system form an insurance business unit.
  • the unit has the above three business systems, and correspondingly stores user authority data of the three business systems.
  • the device in this embodiment is provided with an active directory for providing online query and an alternate directory for online rollback.
  • the primary directory and the standby directory are respectively stored on different physical storage devices, and when there is user authority data of any one of the service systems.
  • the user right data stored in the primary and secondary directories is updated at the same time.
  • the main directory is normal, when the user queries the permission data, the permission data in the main directory is returned to the user.
  • the main directory is abnormal, the permission data can be obtained from the alternate directory and returned to the user.
  • the first storage path of the authority data corresponding to the user information is calculated according to the preset hash algorithm and the user information.
  • the permission data stored in the device may be manually input by an administrator or may be sent by the management system.
  • the storage path of the authority data of each user is fixed, and the storage path is calculated by using a preset hash algorithm and user information, when the device stores the permission data of a certain user. Even if the permission data has changed during subsequent use, its storage path remains unchanged.
  • the algorithm for calculating the storage path of the authority data corresponding to the user information according to the preset hash algorithm and the user information is as follows:
  • the main directory Take the main directory as an example, set the directory depth to N level, and the number of folders in each level directory is 100. Then there will be 100 N folders in the fourth level directory of the main directory.
  • the number of users can be set according to the number of users, and the more the number of users, the larger the value of N.
  • a directory constant is set for each level of the directory.
  • the number of levels of each level of the directory can be set to its directory constant.
  • the directory constant of the first level directory is 01; the user information is uniquely identifiable.
  • the user's information in this implementation, the user information may be the user ID of the user in his business system.
  • the device also needs to set a constant Z according to the number of bits of the hash operation result and the number of folders of each level directory.
  • the requirement of the constant Z satisfies the following condition: after calculating the user information and the hash value of a certain level directory, according to the constant Z
  • the hash value is subjected to a remainder operation, and the result is less than or equal to the maximum number of folders of the level directory.
  • the calculated hash value uid.hashN is six digits
  • the number of folders in each level directory is 100, and the numbers are 00 to 99 respectively.
  • the constant Z can be set to 10000, and any one of the six digits is divided.
  • the remainder obtained by Z is a 2-digit number.
  • the number of bits of the hash value is determined by a preset hash algorithm, and the user can set a hash algorithm as needed to determine the number of bits of the calculated hash value. If the number of folders in each level is set to 1000 and the number is from 000 to 999, the constant can be set to 1000.
  • each of the calculated hash values is subjected to a remainder operation to obtain uid.hash01-a01, uid.hash02-a02, ...uid.hashN-aN, and the remainder is calculated according to the hash value corresponding to each directory.
  • the storage path of the user's permission data in the storage directory is generated as follows:
  • the storage directory includes a primary directory and an alternate directory, and the primary directory and the alternate directory have the same directory structure except for the storage area. If you want to find the permission data in the main directory or the alternate directory, you only need to add the main directory path of the main directory or the alternate directory in front of the above path.
  • the storage path can be calculated according to the above manner, and the folder is newly created for the new permission data in the main directory and the alternate directory according to the calculated path.
  • the storage path is calculated according to the same algorithm, and the permission data is directly obtained from the folder corresponding to the path.
  • the permission data closest to the current time point is read from the first storage path of the standby directory of the service unit, and the read permission data is sent to the user terminal.
  • the main directory of the business unit in the directory configuration file After calculating the storage path of the requested permission data, querying the directory configuration file in the management service component, when detecting that the main directory of the business unit is abnormal, the main directory of the business unit in the directory configuration file The status is marked as an abnormal state. If it is determined according to the directory configuration file whether the current primary directory of the service unit is in an abnormal state, the permission data closest to the current time point is read from the first storage path of the standby directory of the service unit. Send to the user terminal; otherwise, the read permission data is obtained from the same path in the main directory and sent to the user terminal.
  • the query directory corresponding to each business unit is defined in the directory configuration file.
  • the query directory of the business unit is the primary directory, and when the business unit is detected, When an exception occurs in the directory, modify its query directory to an alternate directory. Therefore, it can be determined whether the main directory is in an abnormal state according to the query directory corresponding to the service unit in the directory configuration file that is queried.
  • the preset time is up to the current time point.
  • the primary directory of the unit is marked as an abnormal state. In this embodiment, when the same service unit has a plurality of data read errors within a preset time interval, it is determined that the primary directory has an abnormality.
  • the device of the present application when the device of the present application receives the user rights data change notification sent by the management system, determining the rights data change information and the corresponding user information according to the change notification; The hash algorithm calculates a second storage path of the user information; and synchronously updates the second storage path of the primary directory and the rights data in the second storage path of the alternate directory according to the rights data change information.
  • the apparatus of the present application sends a rights data rollback request corresponding to the service unit to the management server, and receives the management server based on the And the right data corresponding to the service unit returned by the permission data rollback request; and the permission data corresponding to the service unit in the main directory is updated according to the received permission data.
  • the standby directory is used to respond to the privilege data acquisition request sent by the user terminal, and the abnormal data in the active directory is rolled back in time to restore the data to the management system last time.
  • the permission data rollback request corresponding to the service unit is sent to the management server, and the management system sends the permission data of all users corresponding to the service that was last updated before the time point of receiving the rollback request to the device for updating. .
  • the user rights data management device When receiving the permission data acquisition request sent by the user terminal, the user rights data management device proposed in this embodiment acquires the user ⁇ from the request, determines the service unit corresponding to the user information, and according to the preset hash algorithm and the user information. Calculating a first storage path of the permission data corresponding to the user information, querying a directory configuration file in the management service component, and determining, according to the directory configuration file, whether the current primary directory of the service unit is in an abnormal state, and if so, the standby from the service unit The first storage path of the directory reads the permission data closest to the current time point and sends the permission data to the user terminal. If not, the permission data is obtained from the first storage path of the primary directory and sent to the user terminal, in the inventive solution.
  • the rights management program may also be divided into one or more modules, and one or more modules are stored in the memory 11 and are composed of one or more processors (this embodiment is The processor 12) is executed to complete the application.
  • a module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function for describing the execution process of the rights management program in the user authority data management device.
  • FIG. 2 it is a schematic diagram of a program module of a rights management program in an embodiment of the user rights data management apparatus of the present application.
  • the rights management program may be divided into an information acquiring module 10 and a path calculating module 20
  • the state determination module 30 and the data lookup module 40 are illustratively:
  • the information obtaining module 10 is configured to: when receiving the permission data acquisition request sent by the user terminal, acquire user information from the permission data acquisition request, and determine a service unit corresponding to the user information, where the service unit includes one Or multiple business systems;
  • the path calculation module 20 is configured to: calculate, according to the preset hash algorithm and the user information, a first storage path of the permission data corresponding to the user information, where the permission data of each user is stored in the user right data.
  • the status determining module 30 is configured to: query a directory configuration file in the management service component, and determine, according to the directory configuration file, whether the current primary directory of the service unit is in an abnormal state;
  • the data search module 40 is configured to: if yes, read the permission data closest to the current time point from the first storage path of the standby directory of the service unit, and send the read permission data to the user terminal;
  • the present application also provides a user rights data management method.
  • FIG. 3 it is a flowchart of a preferred embodiment of the user rights data management method of the present application. The method can be performed by a device that can be implemented by software and/or hardware.
  • the user rights data management method includes:
  • Step S10 When receiving the permission data acquisition request sent by the user terminal, obtain the user information from the permission data acquisition request, and determine the service unit corresponding to the user information, where the service unit includes one or more services. system.
  • the device is used to control the user's acquisition of the authority data.
  • the device stores user rights data under multiple service systems.
  • multiple business systems can be grouped into one business unit according to needs.
  • the health insurance business system, the property insurance business system, and the auto insurance business system form an insurance business unit.
  • the unit has the above three business systems, and correspondingly stores the three.
  • the user authority data management device is provided with an active directory for providing online query and an alternate directory for online rollback.
  • the primary directory and the standby directory are respectively stored on different physical storage devices, and when there is user authority data of any one of the service systems.
  • the user right data stored in the primary and secondary directories is updated at the same time.
  • the main directory is normal, when the user queries the permission data, the permission data in the main directory is returned to the user.
  • the main directory is abnormal, the permission data can be obtained from the alternate directory and returned to the user.
  • Step S20 Calculate a first storage path of the authority data corresponding to the user information according to the preset hash algorithm and the user information.
  • the permission data stored in the device may be manually input by an administrator or may be sent by the management system.
  • the storage path of the authority data of each user is fixed, and the storage path is calculated by using a preset hash algorithm and user information, when the device stores the permission data of a certain user. Even if the permission data has changed during subsequent use, its storage path remains unchanged.
  • the algorithm for calculating the storage path of the authority data corresponding to the user information according to the preset hash algorithm and the user information is as follows:
  • the main directory Take the main directory as an example, set the directory depth to N level, and the number of folders in each level directory is 100. Then there will be 100 N folders in the fourth level directory of the main directory.
  • the number of users can be set according to the number of users. The more the number of users, the larger the value of N. Preferably, in an embodiment, the value of N is 3.
  • a directory constant is set for each level of the directory. In this embodiment, the number of levels of each level of the directory can be set to its directory constant. For example, the directory constant of the first level directory is 01; the user information is uniquely identifiable.
  • the user's information in this implementation, the user information may be the user ID of the user in his business system.
  • the user authority data management apparatus also needs to set a constant Z according to the number of bits of the hash operation result and the number of folders of each level directory, and the requirement of the constant Z satisfies the following condition: after calculating the user information and the hash value of a certain level directory, The hash value is subjected to a remainder operation according to the constant Z, and the result is less than or equal to the maximum number of folders of the level directory.
  • the calculated hash value uid.hashN is six digits
  • the number of folders in each level directory is 100, and the numbers are 00 to 99 respectively.
  • the constant Z can be set to 10000, and any one of the six digits is divided.
  • the remainder obtained by Z is a 2-digit number.
  • the number of bits of the hash value is determined by a preset hash algorithm, and the user can set a hash algorithm as needed to determine the number of bits of the hash value. If the number of folders in each level is set to 1000 and the number is from 000 to 999, the constant can be set to 1000.
  • each of the calculated hash values is subjected to a remainder operation to obtain uid.hash01-a01, uid.hash02-a02, ...uid.hashN-aN, and the remainder is calculated according to the hash value corresponding to each directory.
  • the storage path of the user's permission data in the storage directory is generated as follows:
  • the storage directory includes a primary directory and an alternate directory, and the primary directory and the alternate directory have the same directory structure except for the storage area. If you want to find the permission data in the main directory or the alternate directory, you only need to add the main directory path of the main directory or the alternate directory in front of the above path.
  • the storage path can be calculated according to the above manner, and the newly created rights data is respectively in the main directory and the standby directory according to the calculated path. Create a folder for storage.
  • the storage path is calculated according to the same algorithm, and the permission data is directly obtained from the folder corresponding to the path.
  • Step S30 Query a directory configuration file in the management service component, and determine, according to the directory configuration file, whether the current primary directory of the service unit is in an abnormal state.
  • Step S40 if yes, reading the permission data closest to the current time point from the first storage path of the standby directory of the service unit, and transmitting the read permission data to the user terminal.
  • Step S50 if not, reading the permission data from the first storage path of the primary directory of the service unit, and transmitting the read permission data to the user terminal, where the primary use
  • the directory and the alternate directory are respectively located on different physical storage devices.
  • the main directory of the business unit in the directory configuration file After calculating the storage path of the requested permission data, querying the directory configuration file in the management service component, when detecting that the main directory of the business unit is abnormal, the main directory of the business unit in the directory configuration file The status is marked as an abnormal state. If it is determined according to the directory configuration file whether the current primary directory of the service unit is in an abnormal state, the permission data closest to the current time point is read from the first storage path of the standby directory of the service unit. Send to the user terminal; otherwise, the read permission data is obtained from the same path in the main directory and sent to the user terminal.
  • the query directory corresponding to each service unit is defined in the directory configuration file.
  • the query directory of the business unit is the primary directory, and when the primary unit of the business unit is detected When an exception occurs in the directory, modify its query directory to an alternate directory. Therefore, it can be determined whether the main directory is in an abnormal state according to the query directory corresponding to the service unit in the directory configuration file that is queried.
  • the preset time is up to the current time point.
  • the primary directory of the unit is marked as an abnormal state. In this embodiment, when the same service unit has a plurality of data read errors within a preset time interval, it is determined that the primary directory has an abnormality.
  • the user rights data management device when the user rights data management device receives the user rights data change notification sent by the management system, determining the rights data change information and the corresponding user information according to the change notification; a hashing algorithm calculates a second storage path of the user information; and synchronously updates the second storage path of the primary directory and the rights data in the second storage path of the alternate directory according to the rights data change information .
  • the user rights data management device sends a rights data rollback request corresponding to the service unit to the management server, and receives the management server based on And the rights data corresponding to the service unit returned by the rights data rollback request; and the rights data corresponding to the service unit in the main directory is updated according to the received rights data.
  • the standby directory is used to respond to the privilege data acquisition request sent by the user terminal, and the abnormal data in the active directory is rolled back in time to restore the data to the management system last time.
  • the permission data rollback request corresponding to the service unit is sent to the management server, and the management system sends the permission data of all users corresponding to the service that was last updated before the time point of receiving the rollback request to the device for updating. .
  • the user rights data management method When receiving the permission data acquisition request sent by the user terminal, acquires the user ⁇ from the request, determines the service unit corresponding to the user information, and according to the preset hash algorithm and the user information. Calculating a first storage path of the permission data corresponding to the user information, querying a directory configuration file in the management service component, and determining, according to the directory configuration file, whether the current primary directory of the service unit is in an abnormal state, and if so, the standby from the service unit The first storage path of the directory reads the permission data closest to the current time point and sends the permission data to the user terminal. If not, the permission data is obtained from the first storage path of the primary directory and sent to the user terminal, in the inventive solution.
  • the embodiment of the present application further provides a computer readable storage medium, where the rights management program is stored, and the rights management program can be executed by one or more processors to implement the following operations:
  • the technical solution of the present application which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in the various embodiments of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Marketing (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Mathematical Physics (AREA)
  • Library & Information Science (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种用户权限数据管理装置、方法以及一种计算机可读存储介质,所述装置包括存储器和处理器,存储器上存储有可在处理器上运行的权限管理程序,该程序被处理器执行时实现如下步骤:当接收到权限数据获取请求时,获取用户信息,确定用户信息对应的业务单元(S10);按照预设哈希算法和用户信息计算权限数据的第一存储路径(S20);查询管理服务组件中的目录配置文件,判断业务单元当前的主用目录是否处于异常状态(S30);若是,则从备用目录的第一存储路径下读取距离当前时间点最近的权限数据(S40);若否,则从主用目录的第一存储路径下读取权限数据(S50)。所述装置提升了权限数据的查询效率,进而提高对权限数据获取请求的响应速度。

Description

用户权限数据管理装置、方法及计算机可读存储介质
本申请基于巴黎公约申明享有2018年02月06日递交的申请号为201810114648.X、名称为“用户权限数据管理装置、方法及计算机可读存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本申请涉及数据管理技术领域,尤其涉及一种用户权限数据管理装置、方法及计算机可读存储介质。
背景技术
随着金融行业的规模逐渐增大,一些银行、金融机构等从事的领域也在不断地扩大,这就需要提高对员工的权限管理的精确性。通常各个银行或者金融机构都会有一套权限管理系统对员工的权限进行管理、维护。员工在进行交易时,需要通过上述权限管理平台查询自己是否具有执行相关业务操作的权限。
目前,权限管理系统将各个员工的用户权限相关信息存储在DB2数据库中。用户登录时,通过一台WAS服务器从DB2数据库查询用户权限相关信息,利用查询到的用户权限相关信息进行权限计算,获得用户权限信息,并提供给用户。然而,这种技术的缺点是对DB2数据库性能的要求高,尤其在用户量较大时,从庞大的数据库中查找数据的效率较低,无法实现快速检索,导致对于权限数据获取请求的响应速度慢。
发明内容
本申请提供一种用户权限数据管理装置、方法及计算机可读存储介质,其主要目的在于提升权限数据的查询效率,以提高对权限数据获取请求的响应速度。
为实现上述目的,本申请提供一种用户权限数据管理装置,该装置包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的权限管理程 序,所述权限管理程序被所述处理器执行时实现如下步骤:
当接收到用户终端发送的权限数据获取请求时,从所述权限数据获取请求中获取用户信息,确定所述用户信息对应的业务单元,其中,所述业务单元包括一个或者多个业务系统;
按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径,其中,每一用户的权限数据在存储至所述用户权限数据管理装置时,根据预设哈希算法和用户信息确定存储路径;
查询管理服务组件中的目录配置文件,根据该目录配置文件判断所述业务单元当前的主用目录是否处于异常状态;
若是,则从所述业务单元的备用目录的所述第一存储路径下读取距离当前时间点最近的权限数据,并将读取到的权限数据发送到所述用户终端;
若否,则从所述业务单元的主用目录的所述第一存储路径下读取权限数据,并将读取到的权限数据发送到所述用户终端,其中,所述主用目录和所述备用目录分别位于不同的物理存储装置上。
此外,为实现上述目的,本申请还提供一种用户权限数据管理方法,该方法包括:
当接收到用户终端发送的权限数据获取请求时,从所述权限数据获取请求中获取用户信息,确定所述用户信息对应的业务单元,其中,所述业务单元包括一个或者多个业务系统;
按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径,其中,每一用户的权限数据在存储至所述用户权限数据管理装置时,根据预设哈希算法和用户信息确定存储路径;
查询管理服务组件中的目录配置文件,根据该目录配置文件判断所述业务单元当前的主用目录是否处于异常状态;
若是,则从所述业务单元的备用目录的所述第一存储路径下读取距离当前时间点最近的权限数据,并将读取到的权限数据发送到所述用户终端;
若否,则从所述业务单元的主用目录的所述第一存储路径下读取权限数据,并将读取到的权限数据发送到所述用户终端,其中,所述主用目录和所述备用目录分别位于不同的物理存储装置上。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述 计算机可读存储介质上存储有权限管理程序,所述权限管理程序可被一个或者多个处理器执行,以实现如上所述的用户权限数据管理方法的步骤。
本申请提出的用户权限数据管理装置、方法及计算机可读存储介质,在接收到用户终端发送的权限数据获取请求时,从该请求中获取用户嘻嘻,确定用户信息对应的业务单元,按照预设哈希算法和用户信息计算该用户信息对应的权限数据的第一存储路径,查询管理服务组件中的目录配置文件,根据该目录配置文件判断业务单元当前的主用目录是否处于异常状态,若是,则从业务单元的备用目录的第一存储路径下读取距离当前时间点最近的权限数据并发送到用户终端,若否,则从主用目录的第一存储路径下获取权限数据并发送至用户终端,本申请的方案中,在获取用户的权限数据时,不需要从大量的文件中进行检索,而是根据用户信息计算存储路径,直接到该路径下获取权限数据,提升了权限数据的查询效率,实现快速对权限数据定位,提高了权限数据获取请求的响应速度。
附图说明
图1为本申请用户权限数据管理装置较佳实施例的示意图;
图2为本申请用户权限数据管理装置一实施例中权限管理程序的程序模块示意图;
图3为本申请用户权限数据管理方法较佳实施例的流程图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种用户权限数据管理装置。参照图1所示,为本申请用户权限数据管理装置较佳实施例的示意图。
在本实施例中,用户权限数据管理装置可以是PC(Personal Computer,个人电脑),也可以是智能手机、平板电脑、便携计算机等终端设备。
该用户权限数据管理装置至少包括存储器11、处理器12,通信总线13, 以及网络接口14。
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是用户权限数据管理装置的内部存储单元,例如该用户权限数据管理装置的硬盘。存储器11在另一些实施例中也可以是用户权限数据管理装置的外部存储设备,例如用户权限数据管理装置上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括用户权限数据管理装置的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于用户权限数据管理装置的应用软件及各类数据,例如权限管理程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行权限管理程序等。
通信总线13用于实现这些组件之间的连接通信。
网络接口14可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该装置与其他电子设备之间建立通信连接。
图1仅示出了具有组件11-14以及权限管理程序的用户权限数据管理装置,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
可选地,该装置还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在用户权限数据管理装置中处理的信息以及用于显示可视化的用户界面。
在图1所示的装置实施例中,存储器11中存储有权限管理程序;处理器12执行存储器11中存储的权限管理程序时实现如下步骤:
当接收到用户终端发送的权限数据获取请求时,从所述权限数据获取请求中获取用户信息,确定所述用户信息对应的业务单元,其中,所述业务单元包括一个或者多个业务系统。
本实施例提出的用户权限数据管理装置用于管控用户对权限数据的获取,该装置中存储有多个业务系统下的用户权限数据,其中,可以根据需要将多个业务系统组成一个业务单元,例如,健康险业务系统、产险业务系统以及车险业务系统组成保险业务单元,该单元下有上述三个业务系统,对应存储有这三个业务系统的用户权限数据。
本实施例的装置中设置有用于提供在线查询的主用目录和在线回滚的备用目录,主用目录和备用目录分别存储在不同的物理存储装置上,当有任意一个业务系统的用户权限数据发生变更时,同时对主用目录和备用目录下对应存储的用户权限数据进行更新。在主用目录正常的情况下,用户查询权限数据时,将主用目录中的权限数据返回给用户,当主用目录发生异常时,可以从备用目录中获取权限数据返回给用户。
按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径。
需要说明的是,该装置中存储的权限数据可以是由管理员手动输入的,也可以是管理系统下发的。该实施例中,每一个用户的权限数据的存储路径都是固定的,并且该存储路径是通过预设哈希算法和用户信息计算出来的,当该装置中存储了某个用户的权限数据后,即使该权限数据在后续使用过程中发生了变更,其存储路径仍然保持不变。
具体地,根据预设哈希算法和用户信息计算该用户信息对应的权限数据的存储路径的算法如下:
分别根据用户信息和各层级目录的层级常数计算各层级目录的哈希值;对计算得到的各层级目录的哈希值求余运算获取余数;将各层级目录的计算得到的余数进行组合处理,生成与该用户信息对应的权限数据的存储路径。
以主用目录为例,将其目录深度设置为N级,每一级目录中的文件夹数量为100个,则该主用目录的第四级目录下就会有100 N个文件夹,N的数量可以根据用户的数量来设置,用户数量越多,则N值越大。并且,为每一级目录设置目录常数,在该实施例中,可以将每一级目录的层级数设置为其目 录常数,例如,第一级目录的目录常数为01;用户信息为能够唯一标识该用户的信息,本实施中用户信息可以是该用户在其业务系统中的用户ID。
将用户ID和第二级目录的目录常数组合为一个字符串,按照预设哈希算法计算该字符串的哈希值uid.hash01,将用户ID和第二级目录的目录常数组合为一个字符串,按照预设哈希算法计算该字符串的哈希值uid.hash02,以此类推,将用户ID和第N级目录的目录常数组合为一个字符串,按照预设哈希算法计算该字符串的哈希值uid.hashN。
该装置还需要预先根据哈希运算结果的位数和各级目录的文件夹数量设置常数Z,常数Z的需要满足如下条件:计算用户信息和某一级目录的哈希值之后,根据常数Z对该哈希值进行求余运算,其结果小于或者等于该级目录的文件夹数量的最大值。例如,计算得到的哈希值uid.hashN为六位,每一级目录中的文件夹数量为100个,编号分别为00~99,则常数Z可以设置为10000,任意一个六位的数除以Z得到的余数为一个2位的数。其中,哈希值的位数由预设哈希算法决定,用户可以根据需要设置哈希算法以确定计算得到的哈希值的位数。若每一级目录中文件夹的数量设置为1000个,编号由000~999,则常数可以设置为1000。
基于常数Z对计算得到的每一个哈希值进行求余运算得到uid.hash01-a01、uid.hash02-a02……uid.hashN-aN,根据各级目录对应的哈希值的求余运算的结果生成该用户的权限数据在存储目录中的存储路径如下:
uid.hash01-a01/uid.hash02-a02/……/uid.hashN-aN。
其中,上述存储目录包括主用目录和备用目录,主用目录和备用目录除了存储区域不同之外,其目录结构完全相同。如果要在主用目录或者备用目录中查找权限数据,则只需要上述路径的前面加上主用目录或者备用目录的主目录路径即可。
可以理解的是,在该装置中新增用户的权限数据时,可以按照上述方式计算出存储路径,并按照计算出的路径分别在主用目录和备用目录下为新增的权限数据建立文件夹进行存储。当用户查询权限数据时,按照同样的算法计算出该存储路径,直接从该路径对应的文件夹中获取权限数据。
查询管理服务组件中的目录配置文件,根据该目录配置文件判断所述业务单元当前的主用目录是否处于异常状态。
若是,则从所述业务单元的备用目录的所述第一存储路径下读取距离当前时间点最近的权限数据,并将读取到的权限数据发送到所述用户终端。
若否,则从所述业务单元的主用目录的所述第一存储路径下读取权限数据,并将读取到的权限数据发送到所述用户终端,其中,所述主用目录和所述备用目录分别位于不同的物理存储装置上。
在计算得到请求的权限数据的存储路径之后,查询管理服务组件中的目录配置文件,当检测到有业务单元的主用目录出现异常时,将目录配置文件中的该业务单元的主用目录的状态标记为异常状态,如果根据该目录配置文件判断业务单元当前的主用目录是否处于异常状态,则从该业务单元的备用目录的第一存储路径下读取距离当前时间点最近的权限数据并发送到用户终端;否则从主用目录下同样的路径获取读取权限数据发送给用户终端。
或者,在其他的实施例中,在该目录配置文件中定义各个业务单元对应的查询目录,当主用目录处于正常状态时,业务单元的查询目录为主用目录,当检测到有业务单元的主用目录出现异常时,将其查询目录修改为备用目录。因此可以根据查询到的目录配置文件中该业务单元对应的查询目录判断主用目录是否处于异常状态。
可选地,作为一个实施例,按照计算得到的第一存储路径从业务单元的主用目录下读取权限数据的步骤之后,若发生数据读取错误,则统计直至当前时间点的预设时间间隔内业务单元发生数据读取错误的次数;当统计的次数小于预设次数时,向用户终端发送数据获取失败的提示信息;当统计的次数大于或者等于预设次数时,将配置文件中业务单元的主用目录标记为异常状态。在该实施例中,当同一业务单元在预设时间间隔内发生多次数据读取错误,则判定主用目录发生异常。
进一步地,在一个实施例中,当本申请的装置接收到管理系统下发的用户权限数据变更通知时,根据所述变更通知确定权限数据变更信息以及对应的用户信息;按照所述预设哈希算法计算该用户信息的第二存储路径;根据所述权限数据变更信息,同步地更新所述主用目录的第二存储路径和所述备用目录的所述第二存储路径中的权限数据。
更进一步地,在将配置文件中业务单元的主用目录标记为异常状态之后,本申请的装置向管理服务器发送与所述业务单元对应的权限数据回滚请求,并 接收所述管理服务器基于所述权限数据回滚请求返回的与所述业务单元对应的权限数据;根据接收到的权限数据更新所述主用目录下与所述业务单元对应的权限数据。在主用目录发生异常后,使用备用目录响应用户终端发送的权限数据获取请求的同时,及时地对主用目录中的异常数据回滚操作,使数据及时地恢复到管理系统上次下发数据后的状态,向管理服务器发送与业务单元对应的权限数据回滚请求,管理系统将收到该回滚请求的时间点之前最后一次更新的该业务对应的所有用户的权限数据发送该装置进行更新。
本实施例提出的用户权限数据管理装置,在接收到用户终端发送的权限数据获取请求时,从该请求中获取用户嘻嘻,确定用户信息对应的业务单元,按照预设哈希算法和用户信息计算该用户信息对应的权限数据的第一存储路径,查询管理服务组件中的目录配置文件,根据该目录配置文件判断业务单元当前的主用目录是否处于异常状态,若是,则从业务单元的备用目录的第一存储路径下读取距离当前时间点最近的权限数据并发送到用户终端,若否,则从主用目录的第一存储路径下获取权限数据并发送至用户终端,发明的方案中,在获取用户的权限数据时,不需要从大量的文件中进行检索,而是根据用户信息计算存储路径,直接到该路径下获取权限数据,提升了权限数据的查询效率,实现快速对权限数据定位,提高了权限数据获取请求的响应速度。
可选地,在其他的实施例中,权限管理程序还可以被分割为一个或者多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行以完成本申请,本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段,用于描述权限管理程序在用户权限数据管理装置中的执行过程。
例如,参照图2所示,为本申请用户权限数据管理装置一实施例中的权限管理程序的程序模块示意图,该实施例中,权限管理程序可以被分割为信息获取模块10、路径计算模块20、状态判断模块30和数据查找模块40,示例性地:
信息获取模块10用于:当接收到用户终端发送的权限数据获取请求时,从所述权限数据获取请求中获取用户信息,确定所述用户信息对应的业务单元,其中,所述业务单元包括一个或者多个业务系统;
路径计算模块20用于:按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径,其中,每一用户的权限数据在存储至所述用户权限数据管理装置时,根据预设哈希算法和用户信息确定存储路径;
状态判断模块30用于:查询管理服务组件中的目录配置文件,根据该目录配置文件判断所述业务单元当前的主用目录是否处于异常状态;
数据查找模块40用于:若是,则从所述业务单元的备用目录的所述第一存储路径下读取距离当前时间点最近的权限数据,并将读取到的权限数据发送到所述用户终端;
以及,若否,则从所述业务单元的主用目录的所述第一存储路径下读取权限数据,并将读取到的权限数据发送到所述用户终端,其中,所述主用目录和所述备用目录分别位于不同的物理存储装置上。
上述信息获取模块10、路径计算模块20、状态判断模块30和数据查找模块40等程序模块被执行时所实现的功能或操作步骤与上述实施例大体相同,在此不再赘述。
此外,本申请还提供一种用户权限数据管理方法。参照图3所示,为本申请用户权限数据管理方法较佳实施例的流程图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。
在本实施例中,用户权限数据管理方法包括:
步骤S10,当接收到用户终端发送的权限数据获取请求时,从所述权限数据获取请求中获取用户信息,确定所述用户信息对应的业务单元,其中,所述业务单元包括一个或者多个业务系统。
以下以用户权限数据管理装置作为执行主体对本实施例提出的用户权限数据管理方法进行说明,该装置用于管控用户对权限数据的获取,该装置中存储有多个业务系统下的用户权限数据,其中,可以根据需要将多个业务系统组成一个业务单元,例如,健康险业务系统、产险业务系统以及车险业务系统组成保险业务单元,该单元下有上述三个业务系统,对应存储有这三个业务系统的用户权限数据。
用户权限数据管理装置中设置有用于提供在线查询的主用目录和在线回滚的备用目录,主用目录和备用目录分别存储在不同的物理存储装置上,当 有任意一个业务系统的用户权限数据发生变更时,同时对主用目录和备用目录下对应存储的用户权限数据进行更新。在主用目录正常的情况下,用户查询权限数据时,将主用目录中的权限数据返回给用户,当主用目录发生异常时,可以从备用目录中获取权限数据返回给用户。
步骤S20,按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径。
需要说明的是,该装置中存储的权限数据可以是由管理员手动输入的,也可以是管理系统下发的。该实施例中,每一个用户的权限数据的存储路径都是固定的,并且该存储路径是通过预设哈希算法和用户信息计算出来的,当该装置中存储了某个用户的权限数据后,即使该权限数据在后续使用过程中发生了变更,其存储路径仍然保持不变。
具体地,根据预设哈希算法和用户信息计算该用户信息对应的权限数据的存储路径的算法如下:
分别根据用户信息和各层级目录的层级常数计算各层级目录的哈希值;对计算得到的各层级目录的哈希值求余运算获取余数;将各层级目录的计算得到的余数进行组合处理,生成与该用户信息对应的权限数据的存储路径。
以主用目录为例,将其目录深度设置为N级,每一级目录中的文件夹数量为100个,则该主用目录的第四级目录下就会有100 N个文件夹,N的数量可以根据用户的数量来设置,用户数量越多,则N值越大,优选地,在一实施例中,N的取值为3。并且,为每一级目录设置目录常数,在该实施例中,可以将每一级目录的层级数设置为其目录常数,例如,第一级目录的目录常数为01;用户信息为能够唯一标识该用户的信息,本实施中用户信息可以是该用户在其业务系统中的用户ID。
将用户ID和第二级目录的目录常数组合为一个字符串,按照预设哈希算法计算该字符串的哈希值uid.hash01,将用户ID和第二级目录的目录常数组合为一个字符串,按照预设哈希算法计算该字符串的哈希值uid.hash02,以此类推,将用户ID和第N级目录的目录常数组合为一个字符串,按照预设哈希算法计算该字符串的哈希值uid.hashN。
用户权限数据管理装置还需要预先根据哈希运算结果的位数和各级目录的文件夹数量设置常数Z,常数Z的需要满足如下条件:计算用户信息和某 一级目录的哈希值之后,根据常数Z对该哈希值进行求余运算,其结果小于或者等于该级目录的文件夹数量的最大值。例如,计算得到的哈希值uid.hashN为六位,每一级目录中的文件夹数量为100个,编号分别为00~99,则常数Z可以设置为10000,任意一个六位的数除以Z得到的余数为一个2位的数。其中,哈希值的位数由预设哈希算法决定,用户可以根据需要设置哈希算法以确定哈希值的位数。若每一级目录中文件夹的数量设置为1000个,编号由000~999,则常数可以设置为1000。
基于常数Z对计算得到的每一个哈希值进行求余运算得到uid.hash01-a01、uid.hash02-a02……uid.hashN-aN,根据各级目录对应的哈希值的求余运算的结果生成该用户的权限数据在存储目录中的存储路径如下:
uid.hash01-a01/uid.hash02-a02/……/uid.hashN-aN。
其中,上述存储目录包括主用目录和备用目录,主用目录和备用目录除了存储区域不同之外,其目录结构完全相同。如果要在主用目录或者备用目录中查找权限数据,则只需要上述路径的前面加上主用目录或者备用目录的主目录路径即可。
可以理解的是,在用户权限数据管理装置中新增用户的权限数据时,可以按照上述方式计算出存储路径,并按照计算出的路径分别在主用目录和备用目录下为新增的权限数据建立文件夹进行存储。当用户查询权限数据时,按照同样的算法计算出该存储路径,直接从该路径对应的文件夹中获取权限数据。
步骤S30,查询管理服务组件中的目录配置文件,根据该目录配置文件判断所述业务单元当前的主用目录是否处于异常状态。
步骤S40,若是,则从所述业务单元的备用目录的所述第一存储路径下读取距离当前时间点最近的权限数据,并将读取到的权限数据发送到所述用户终端。
步骤S50,若否,则从所述业务单元的主用目录的所述第一存储路径下读取权限数据,并将读取到的权限数据发送到所述用户终端,其中,所述主用目录和所述备用目录分别位于不同的物理存储装置上。
在计算得到请求的权限数据的存储路径之后,查询管理服务组件中的目录配置文件,当检测到有业务单元的主用目录出现异常时,将目录配置文件 中的该业务单元的主用目录的状态标记为异常状态,如果根据该目录配置文件判断业务单元当前的主用目录是否处于异常状态,则从该业务单元的备用目录的第一存储路径下读取距离当前时间点最近的权限数据并发送到用户终端;否则从主用目录下同样的路径获取读取权限数据发送给用户终端。
或者,在其他的实施例中,在目录配置文件中定义各个业务单元对应的查询目录,当主用目录处于正常状态时,业务单元的查询目录为主用目录,当检测到有业务单元的主用目录出现异常时,将其查询目录修改为备用目录。因此可以根据查询到的目录配置文件中该业务单元对应的查询目录判断主用目录是否处于异常状态。
可选地,作为一个实施例,按照计算得到的第一存储路径从业务单元的主用目录下读取权限数据的步骤之后,若发生数据读取错误,则统计直至当前时间点的预设时间间隔内业务单元发生数据读取错误的次数;当统计的次数小于预设次数时,向用户终端发送数据获取失败的提示信息;当统计的次数大于或者等于预设次数时,将配置文件中业务单元的主用目录标记为异常状态。在该实施例中,当同一业务单元在预设时间间隔内发生多次数据读取错误,则判定主用目录发生异常。
进一步地,在一个实施例中,当用户权限数据管理装置接收到管理系统下发的用户权限数据变更通知时,根据所述变更通知确定权限数据变更信息以及对应的用户信息;按照所述预设哈希算法计算该用户信息的第二存储路径;根据所述权限数据变更信息,同步地更新所述主用目录的第二存储路径和所述备用目录的所述第二存储路径中的权限数据。
更进一步地,在将配置文件中业务单元的主用目录标记为异常状态之后,用户权限数据管理装置向管理服务器发送与所述业务单元对应的权限数据回滚请求,并接收所述管理服务器基于所述权限数据回滚请求返回的与所述业务单元对应的权限数据;根据接收到的权限数据更新所述主用目录下与所述业务单元对应的权限数据。在主用目录发生异常后,使用备用目录响应用户终端发送的权限数据获取请求的同时,及时地对主用目录中的异常数据回滚操作,使数据及时地恢复到管理系统上次下发数据后的状态,向管理服务器发送与业务单元对应的权限数据回滚请求,管理系统将收到该回滚请求的时间点之前最后一次更新的该业务对应的所有用户的权限数据发送该装置进行 更新。
本实施例提出的用户权限数据管理方法,在接收到用户终端发送的权限数据获取请求时,从该请求中获取用户嘻嘻,确定用户信息对应的业务单元,按照预设哈希算法和用户信息计算该用户信息对应的权限数据的第一存储路径,查询管理服务组件中的目录配置文件,根据该目录配置文件判断业务单元当前的主用目录是否处于异常状态,若是,则从业务单元的备用目录的第一存储路径下读取距离当前时间点最近的权限数据并发送到用户终端,若否,则从主用目录的第一存储路径下获取权限数据并发送至用户终端,发明的方案中,在获取用户的权限数据时,不需要从大量的文件中进行检索,而是根据用户信息计算存储路径,直接到该路径下获取权限数据,提升了权限数据的查询效率,实现快速对权限数据定位,提高了权限数据获取请求的响应速度。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有权限管理程序,所述权限管理程序可被一个或多个处理器执行,以实现如下操作:
当接收到用户终端发送的权限数据获取请求时,从所述权限数据获取请求中获取用户信息,确定所述用户信息对应的业务单元,其中,所述业务单元包括一个或者多个业务系统;
按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径,其中,每一用户的权限数据在存储至所述用户权限数据管理装置时,根据预设哈希算法和用户信息确定存储路径;
查询管理服务组件中的目录配置文件,根据该目录配置文件判断所述业务单元当前的主用目录是否处于异常状态;
若是,则从所述业务单元的备用目录的所述第一存储路径下读取距离当前时间点最近的权限数据,并将读取到的权限数据发送到所述用户终端;
若否,则从所述业务单元的主用目录的所述第一存储路径下读取权限数据,并将读取到的权限数据发送到所述用户终端,其中,所述主用目录和所述备用目录分别位于不同的物理存储装置上。
本申请计算机可读存储介质具体实施方式与上述用户权限数据管理装置和方法各实施例基本相同,在此不作累述。
需要说明的是,上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种用户权限数据管理装置,其特征在于,所述装置包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的权限管理程序,所述权限管理程序被所述处理器执行时实现如下步骤:
    当接收到用户终端发送的权限数据获取请求时,从所述权限数据获取请求中获取用户信息,确定所述用户信息对应的业务单元,其中,所述业务单元包括一个或者多个业务系统;
    按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径,其中,每一用户的权限数据在存储至所述用户权限数据管理装置时,根据预设哈希算法和用户信息确定存储路径;
    查询管理服务组件中的目录配置文件,根据该目录配置文件判断所述业务单元当前的主用目录是否处于异常状态;
    若是,则从所述业务单元的备用目录的所述第一存储路径下读取距离当前时间点最近的权限数据,并将读取到的权限数据发送到所述用户终端;
    若否,则从所述业务单元的主用目录的所述第一存储路径下读取权限数据,并将读取到的权限数据发送到所述用户终端,其中,所述主用目录和所述备用目录分别位于不同的物理存储装置上。
  2. 如权利要求1所述的用户权限数据管理装置,其特征在于,所述权限管理程序还可被所述处理器执行,以实现如下步骤:
    当接收到管理系统下发的用户权限数据变更通知时,根据所述变更通知确定权限数据变更信息以及对应的用户信息;
    按照所述预设哈希算法计算该用户信息的第二存储路径;
    根据所述权限数据变更信息,同步地更新所述主用目录的第二存储路径和所述备用目录的所述第二存储路径中的权限数据。
  3. 如权利要求1所述的用户权限数据管理装置,其特征在于,所述权限管理程序还可被所述处理器执行,以在所述按照计算得到的第一存储路径从所述业务单元的主用目录下读取权限数据的步骤之后,还实现如下步骤:
    若发生数据读取错误,则统计直至当前时间点的预设时间间隔内所述业务单元发生数据读取错误的次数;
    当统计的次数小于预设次数时,向所述用户终端发送数据获取失败的提 示信息;
    当统计的次数大于或者等于所述预设次数时,将所述配置文件中所述业务单元的主用目录标记为异常状态。
  4. 如权利要求2所述的用户权限数据管理装置,其特征在于,所述权限管理程序还可被所述处理器执行,以在所述按照计算得到的第一存储路径从所述业务单元的主用目录下读取权限数据的步骤之后,还实现如下步骤:
    若发生数据读取错误,则统计直至当前时间点的预设时间间隔内所述业务单元发生数据读取错误的次数;
    当统计的次数小于预设次数时,向所述用户终端发送数据获取失败的提示信息;
    当统计的次数大于或者等于所述预设次数时,将所述配置文件中所述业务单元的主用目录标记为异常状态。
  5. 如权利要求3所述的用户权限数据管理装置,其特征在于,所述权限管理程序还可被所述处理器执行,以在所述将所述配置文件中所述业务单元的主用目录标记为异常状态的步骤之后,还实现如下步骤:
    向管理服务器发送与所述业务单元对应的权限数据回滚请求,并接收所述管理服务器基于所述权限数据回滚请求返回的与所述业务单元对应的权限数据;
    根据接收到的权限数据更新所述主用目录下与所述业务单元对应的权限数据。
  6. 如权利要求3所述的用户权限数据管理装置,其特征在于,所述按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径的步骤包括:
    分别根据用户信息和各层级目录的层级常数计算各层级目录的哈希值;
    对计算得到的各层级目录的哈希值求余运算获取余数;
    将各层级目录的计算得到的余数进行组合处理,生成与该用户信息对应的权限数据的第一存储路径。
  7. 如权利要求5所述的用户权限数据管理装置,其特征在于,所述按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径的步骤包括:
    分别根据用户信息和各层级目录的层级常数计算各层级目录的哈希值;
    对计算得到的各层级目录的哈希值求余运算获取余数;
    将各层级目录的计算得到的余数进行组合处理,生成与该用户信息对应的权限数据的第一存储路径。
  8. 一种用户权限数据管理方法,其特征在于,所述方法包括:
    当接收到用户终端发送的权限数据获取请求时,从所述权限数据获取请求中获取用户信息,确定所述用户信息对应的业务单元,其中,所述业务单元包括一个或者多个业务系统;
    按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径,其中,每一用户的权限数据在存储至所述用户权限数据管理装置时,根据预设哈希算法和用户信息确定存储路径;
    查询管理服务组件中的目录配置文件,根据该目录配置文件判断所述业务单元当前的主用目录是否处于异常状态;
    若是,则从所述业务单元的备用目录的所述第一存储路径下读取距离当前时间点最近的权限数据,并将读取到的权限数据发送到所述用户终端;
    若否,则从所述业务单元的主用目录的所述第一存储路径下读取权限数据,并将读取到的权限数据发送到所述用户终端,其中,所述主用目录和所述备用目录分别位于不同的物理存储装置上。
  9. 如权利要求8所述的用户权限数据管理方法,其特征在于,所述方法还包括步骤:
    当接收到管理系统下发的用户权限数据变更通知时,根据所述变更通知确定权限数据变更信息以及对应的用户信息;
    按照所述预设哈希算法计算该用户信息的第二存储路径;
    根据所述权限数据变更信息,同步地更新所述主用目录的第二存储路径和所述备用目录的所述第二存储路径中的权限数据。
  10. 如权利要求8所述的用户权限数据管理方法,其特征在于,所述按照计算得到的第一存储路径从所述业务单元的主用目录下读取权限数据的步骤之后,所述方法还包括步骤:
    若发生数据读取错误,则统计直至当前时间点的预设时间间隔内所述业务单元发生数据读取错误的次数;
    当统计的次数小于预设次数时,向所述用户终端发送数据获取失败的提示信息;
    当统计的次数大于或者等于所述预设次数时,将所述配置文件中所述业务单元的主用目录标记为异常状态。
  11. 如权利要求9所述的用户权限数据管理方法,其特征在于,所述按照计算得到的第一存储路径从所述业务单元的主用目录下读取权限数据的步骤之后,所述方法还包括步骤:
    若发生数据读取错误,则统计直至当前时间点的预设时间间隔内所述业务单元发生数据读取错误的次数;
    当统计的次数小于预设次数时,向所述用户终端发送数据获取失败的提示信息;
    当统计的次数大于或者等于所述预设次数时,将所述配置文件中所述业务单元的主用目录标记为异常状态。
  12. 如权利要求10所述的用户权限数据管理方法,其特征在于,所述将所述配置文件中所述业务单元的主用目录标记为异常状态的步骤之后,所述方法还包括步骤:
    向管理服务器发送与所述业务单元对应的权限数据回滚请求,并接收所述管理服务器基于所述权限数据回滚请求返回的与所述业务单元对应的权限数据;
    根据接收到的权限数据更新所述主用目录下与所述业务单元对应的权限数据。
  13. 如权利要求10所述的用户权限数据管理方法,其特征在于,所述按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径的步骤包括:
    分别根据用户信息和各层级目录的层级常数计算各层级目录的哈希值;
    对计算得到的各层级目录的哈希值求余运算获取余数;
    将各层级目录的计算得到的余数进行组合处理,生成与该用户信息对应的权限数据的第一存储路径。
  14. 如权利要求12所述的用户权限数据管理方法,其特征在于,所述按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一 存储路径的步骤包括:
    分别根据用户信息和各层级目录的层级常数计算各层级目录的哈希值;
    对计算得到的各层级目录的哈希值求余运算获取余数;
    将各层级目录的计算得到的余数进行组合处理,生成与该用户信息对应的权限数据的第一存储路径。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有权限管理程序,所述权限管理程序可被一个或者多个处理器执行,以实现如下步骤:
    当接收到用户终端发送的权限数据获取请求时,从所述权限数据获取请求中获取用户信息,确定所述用户信息对应的业务单元,其中,所述业务单元包括一个或者多个业务系统;
    按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径,其中,每一用户的权限数据在存储至所述用户权限数据管理装置时,根据预设哈希算法和用户信息确定存储路径;
    查询管理服务组件中的目录配置文件,根据该目录配置文件判断所述业务单元当前的主用目录是否处于异常状态;
    若是,则从所述业务单元的备用目录的所述第一存储路径下读取距离当前时间点最近的权限数据,并将读取到的权限数据发送到所述用户终端;
    若否,则从所述业务单元的主用目录的所述第一存储路径下读取权限数据,并将读取到的权限数据发送到所述用户终端,其中,所述主用目录和所述备用目录分别位于不同的物理存储装置上。
  16. 如权利要求15所述的计算机可读存储介质,其特征在于,所述方法还包括如下步骤:
    当接收到管理系统下发的用户权限数据变更通知时,根据所述变更通知确定权限数据变更信息以及对应的用户信息;
    按照所述预设哈希算法计算该用户信息的第二存储路径;
    根据所述权限数据变更信息,同步地更新所述主用目录的第二存储路径和所述备用目录的所述第二存储路径中的权限数据。
  17. 如权利要求15所述的计算机可读存储介质,其特征在于,所述按照计算得到的第一存储路径从所述业务单元的主用目录下读取权限数据的步骤 之后,所述方法还包括如下步骤:
    若发生数据读取错误,则统计直至当前时间点的预设时间间隔内所述业务单元发生数据读取错误的次数;
    当统计的次数小于预设次数时,向所述用户终端发送数据获取失败的提示信息;
    当统计的次数大于或者等于所述预设次数时,将所述配置文件中所述业务单元的主用目录标记为异常状态。
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,所述按照计算得到的第一存储路径从所述业务单元的主用目录下读取权限数据的步骤之后,所述方法还包括如下步骤:
    若发生数据读取错误,则统计直至当前时间点的预设时间间隔内所述业务单元发生数据读取错误的次数;
    当统计的次数小于预设次数时,向所述用户终端发送数据获取失败的提示信息;
    当统计的次数大于或者等于所述预设次数时,将所述配置文件中所述业务单元的主用目录标记为异常状态。
  19. 如权利要求17所述的计算机可读存储介质,其特征在于,在所述将所述配置文件中所述业务单元的主用目录标记为异常状态的步骤之后,所述方法还包括如下步骤:
    向管理服务器发送与所述业务单元对应的权限数据回滚请求,并接收所述管理服务器基于所述权限数据回滚请求返回的与所述业务单元对应的权限数据;
    根据接收到的权限数据更新所述主用目录下与所述业务单元对应的权限数据。
  20. 如权利要求17所述的计算机可读存储介质,其特征在于,所述按照预设哈希算法和所述用户信息,计算与该用户信息对应的权限数据的第一存储路径的步骤包括:
    分别根据用户信息和各层级目录的层级常数计算各层级目录的哈希值;
    对计算得到的各层级目录的哈希值求余运算获取余数;
    将各层级目录的计算得到的余数进行组合处理,生成与该用户信息对应 的权限数据的第一存储路径。
PCT/CN2018/089131 2018-02-06 2018-05-31 用户权限数据管理装置、方法及计算机可读存储介质 WO2019153592A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810114648.XA CN108388604B (zh) 2018-02-06 2018-02-06 用户权限数据管理装置、方法及计算机可读存储介质
CN201810114648.X 2018-02-06

Publications (1)

Publication Number Publication Date
WO2019153592A1 true WO2019153592A1 (zh) 2019-08-15

Family

ID=63075153

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089131 WO2019153592A1 (zh) 2018-02-06 2018-05-31 用户权限数据管理装置、方法及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN108388604B (zh)
WO (1) WO2019153592A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221727A (zh) * 2019-12-30 2020-06-02 瑞庭网络技术(上海)有限公司 测试方法、装置、电子设备和计算机可读介质
CN112328985A (zh) * 2020-11-25 2021-02-05 北京百度网讯科技有限公司 权限管理方法、装置、设备和存储介质
CN112507354A (zh) * 2020-12-04 2021-03-16 北京神州泰岳软件股份有限公司 一种基于图数据库的权限管理的方法及系统
CN113254805A (zh) * 2020-02-12 2021-08-13 维沃移动通信有限公司 一种查询组位置的方法和网络设备
CN115277680A (zh) * 2022-07-29 2022-11-01 山石网科通信技术股份有限公司 用于提高同步安全性的文件同步方法
CN114978673B (zh) * 2022-05-19 2023-07-04 中国联合网络通信集团有限公司 用户权限认证方法、装置、电子设备及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110232292A (zh) * 2019-05-06 2019-09-13 平安科技(深圳)有限公司 数据访问权限认证方法、服务器及存储介质
CN112836187B (zh) * 2019-11-25 2024-02-02 杭州海康威视系统技术有限公司 一种权限管理方法、装置及电子设备
CN111240708B (zh) * 2019-12-24 2023-04-28 北京威努特技术有限公司 工控系统主机、工控系统及工控系统主机软件升级的方法
CN114077619A (zh) * 2020-08-20 2022-02-22 北京字节跳动网络技术有限公司 数据查询方法、装置、电子设备和存储介质
CN112487086B (zh) * 2020-11-17 2024-04-16 中国人寿保险股份有限公司 一种数据同步方法、装置、电子设备及存储介质
CN113407528A (zh) * 2020-11-20 2021-09-17 广东美云智数科技有限公司 一种权限数据的同步方法、管理装置以及存储介质
CN112988278B (zh) * 2021-04-12 2022-09-06 上海米哈游天命科技有限公司 资源文件的meta文件修改方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719141A (zh) * 2009-12-24 2010-06-02 成都市华为赛门铁克科技有限公司 基于目录对象的文件处理方法和系统
CN102024044A (zh) * 2010-12-08 2011-04-20 华为技术有限公司 分布式文件系统
CN106227620A (zh) * 2016-07-20 2016-12-14 中国航空工业集团公司航空动力控制系统研究所 可恢复的Flash数据存储方法
CN106980473A (zh) * 2017-03-30 2017-07-25 四川长虹电器股份有限公司 提升eeprom读写可靠性及速率的方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6532476B1 (en) * 1999-11-13 2003-03-11 Precision Solutions, Inc. Software based methodology for the storage and retrieval of diverse information
CN101398869B (zh) * 2008-10-07 2010-04-14 深圳市蓝韵实业有限公司 一种海量数据存储方法
CN102394894B (zh) * 2011-11-28 2014-01-15 武汉大学 一种基于云计算的网络虚拟磁盘文件安全管理方法
CN103150394B (zh) * 2013-03-25 2014-07-23 中国人民解放军国防科学技术大学 面向高性能计算的分布式文件系统元数据管理方法
CN106990915B (zh) * 2017-02-27 2020-01-14 北京航空航天大学 一种基于存储介质类型和加权配额的存储资源管理方法
CN107342992B (zh) * 2017-06-27 2020-12-08 深圳媒介之家文化传播有限公司 一种系统权限管理方法、装置及计算机可读存储介质
CN107508892A (zh) * 2017-08-29 2017-12-22 努比亚技术有限公司 一种页面访问方法、服务器及计算机可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719141A (zh) * 2009-12-24 2010-06-02 成都市华为赛门铁克科技有限公司 基于目录对象的文件处理方法和系统
CN102024044A (zh) * 2010-12-08 2011-04-20 华为技术有限公司 分布式文件系统
CN106227620A (zh) * 2016-07-20 2016-12-14 中国航空工业集团公司航空动力控制系统研究所 可恢复的Flash数据存储方法
CN106980473A (zh) * 2017-03-30 2017-07-25 四川长虹电器股份有限公司 提升eeprom读写可靠性及速率的方法

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221727A (zh) * 2019-12-30 2020-06-02 瑞庭网络技术(上海)有限公司 测试方法、装置、电子设备和计算机可读介质
CN111221727B (zh) * 2019-12-30 2024-03-08 瑞庭网络技术(上海)有限公司 测试方法、装置、电子设备和计算机可读介质
CN113254805A (zh) * 2020-02-12 2021-08-13 维沃移动通信有限公司 一种查询组位置的方法和网络设备
CN112328985A (zh) * 2020-11-25 2021-02-05 北京百度网讯科技有限公司 权限管理方法、装置、设备和存储介质
CN112507354A (zh) * 2020-12-04 2021-03-16 北京神州泰岳软件股份有限公司 一种基于图数据库的权限管理的方法及系统
CN114978673B (zh) * 2022-05-19 2023-07-04 中国联合网络通信集团有限公司 用户权限认证方法、装置、电子设备及存储介质
CN115277680A (zh) * 2022-07-29 2022-11-01 山石网科通信技术股份有限公司 用于提高同步安全性的文件同步方法
CN115277680B (zh) * 2022-07-29 2024-04-19 山石网科通信技术股份有限公司 用于提高同步安全性的文件同步方法

Also Published As

Publication number Publication date
CN108388604A (zh) 2018-08-10
CN108388604B (zh) 2022-06-10

Similar Documents

Publication Publication Date Title
WO2019153592A1 (zh) 用户权限数据管理装置、方法及计算机可读存储介质
US9965644B2 (en) Record level data security
US8959110B2 (en) Dynamic query for external data connections
JP6731783B2 (ja) 改ざん検知システム、及び改ざん検知方法
US10108645B1 (en) Database monitoring for online migration optimization
US9235589B2 (en) Optimizing storage allocation in a virtual desktop environment
WO2019085471A1 (zh) 数据库同步方法、应用服务器及计算机可读存储介质
AU2018203739A1 (en) Processing mutations for a remote database
US9830345B1 (en) Content-addressable data storage
CN111400308B (zh) 缓存数据的处理方法、电子装置及可读存储介质
WO2019085474A1 (zh) 计算引擎实现方法、电子装置及存储介质
US8521768B2 (en) Data storage and management system
US10089334B2 (en) Grouping of database objects
US10445417B2 (en) Entry of values into multiple fields of a form using touch screens
US20150363435A1 (en) Declarative Virtual Data Model Management
WO2019071968A1 (zh) 薪资计算方法、应用服务器及计算机可读存储介质
US11650967B2 (en) Managing a deduplicated data index
US10235422B2 (en) Lock-free parallel dictionary encoding
US10691757B1 (en) Method and system for cached document search
US20190354455A1 (en) Skew detector for data storage system
US8868485B2 (en) Data flow cost modeling
US11500837B1 (en) Automating optimizations for items in a hierarchical data store
US11500943B2 (en) Method and system for cached early-binding document search
US8818955B2 (en) Reducing storage costs associated with backing up a database
CN112559871A (zh) 一种信息查询方法及其系统、服务器设备

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.11.20.20)

122 Ep: pct application non-entry in european phase

Ref document number: 18905292

Country of ref document: EP

Kind code of ref document: A1