WO2020244408A1 - 数据管理方法、装置、系统及可读存储介质 - Google Patents

数据管理方法、装置、系统及可读存储介质 Download PDF

Info

Publication number
WO2020244408A1
WO2020244408A1 PCT/CN2020/092137 CN2020092137W WO2020244408A1 WO 2020244408 A1 WO2020244408 A1 WO 2020244408A1 CN 2020092137 W CN2020092137 W CN 2020092137W WO 2020244408 A1 WO2020244408 A1 WO 2020244408A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
subsystem
token
incremental
request
Prior art date
Application number
PCT/CN2020/092137
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 WO2020244408A1 publication Critical patent/WO2020244408A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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

  • This application relates to the technical field of Fintech, and in particular to a data management method, device, system and readable storage medium.
  • Data management in the financial field involves many technologies.
  • Data management in the financial field includes access control management of the data resources of the subsystems.
  • Management system For an enterprise, there are generally multiple subsystems. Each subsystem needs to control access to data resources to establish a management system, which obviously wastes computer resources, and since each management system needs to configure at least one operation management Staff, it will cause a waste of human resources.
  • the main purpose of this application is to provide a data management method, device, system, and readable storage medium, which are intended to solve the technical problem of excessive consumption of enterprise data resource access control management in the prior art.
  • an embodiment of the present application provides a data management method, which is applied to a data management system that manages multiple subsystems, and the data management method includes:
  • the first feedback data including the second token is fed back to the subsystem, so that the subsystem realizes data synchronization with the data management system based on the first feedback data.
  • This application also provides a data management device, which includes:
  • the detection module is used to obtain the authentication parameters in the authentication request when the authentication request sent by the subsystem is detected;
  • the first generation module is configured to generate a first signature associated with the authentication request according to the first token in the authentication parameters and a preset first generation algorithm, and determine the first signature and the authentication parameters Whether the second signature in is consistent;
  • a second generation module configured to generate a second token according to a preset second generation algorithm if the first signature is consistent with the second signature in the authentication parameters
  • the synchronization module is configured to feed back the first feedback data including the second token to the subsystem, so that the subsystem realizes data synchronization with the data management system based on the first feedback data.
  • the present application also provides a readable storage medium having a data management program stored on the readable storage medium, and when the data management program is executed by a processor, the steps of the data management method as described above are implemented.
  • this application obtains the authentication parameters in the authentication request; according to the first token in the authentication parameters and the preset first generation algorithm, the The first signature associated with the authorization request, and determine whether the first signature is consistent with the second signature in the authentication parameters; if the first signature is consistent with the second signature in the authentication parameters, the A generation algorithm generates a second token; feeds back the first feedback data including the second token to the subsystem, so that the subsystem can synchronize data with the data management system based on the first feedback data .
  • it is no longer to set up a data resource access control management system for each subsystem of the enterprise, but only set up a data management system, and the unified management subsystem can realize data synchronization with each subsystem.
  • the data management system first authenticates the subsystem that needs data synchronization. Specifically, the data management system receives the authentication request sent by the subsystem, and based on the first token parameter in the authentication request and the preset The first generation algorithm generates the first signature associated with the authentication request to compare the first signature with the second signature parameters to determine whether the subsystem is authenticated or not.
  • the second generation algorithm is preset to generate the second token to determine the first feedback data including the second token to be fed back to the subsystem, so that the subsystem can communicate with the second token based on the first feedback data.
  • Data synchronization of data management system That is, in this application, it is no longer necessary to develop a management system for each subsystem, but also to manage and control the access to the data resources of each subsystem, thereby solving the problem that the access control management of enterprise data resources in the prior art is too expensive.
  • FIG. 1 is a schematic flowchart of the first embodiment of the data management method of this application
  • FIG. 2 is a schematic diagram of the detailed flow before the step of obtaining the authentication parameters in the authentication request when the authentication request sent by the subsystem is detected in the second embodiment of the data management method of this application;
  • FIG. 3 is a schematic diagram of the system structure of the hardware operating environment involved in the method of the embodiment of this application;
  • the data management method is applied to a data management system that manages multiple subsystems.
  • the data management method includes:
  • Step S10 when the authentication request sent by the subsystem is detected, the authentication parameters in the authentication request are obtained;
  • a data management system uniformly controls and manages user access to multiple subsystems of the enterprise.
  • data synchronization refers to the process in which each subsystem obtains user access control data from the data management system through communication requests such as HTTP requests
  • data isolation refers to the synchronization acquisition of each subsystem from the data management system
  • the data management system needs to perform subsystem authentication for each subsystem. Right refers to that each subsystem initiates a legality verification request to the management system through communication requests such as HTTP requests. Among them, the subsystem can realize data synchronization from the data management system only after the data management system has passed the authentication. .
  • the subsystem Before the authentication parameter step in, include:
  • Step S01 If an access request from the subsystem requesting to access the data management system is received, obtain the role permission data and the user role data in the access request to combine the role permission data with the The user role data is associated with the preset user mapping in the data management system to obtain the mapping data;
  • RBAC Role-Based Access Control
  • roles and permissions are defined first, and the roles and permissions are recorded in the role table and permission table respectively.
  • the role permission association table By using the role permission association table, different roles are given different permissions, that is, the role permission association table Record the mapping relationship between roles and permissions.
  • assign corresponding roles to users by using the user role association table that is, the user role association table records the mapping relationship between users and roles, because the role to which the user belongs is recorded In this way, a user entity that belongs to a certain role has the authority of that role.
  • the management system In the management system, it can be expressed as the authority to correctly access the corresponding data resources on the subsystem.
  • a user group can be associated with multiple roles, so that if a user belongs to a user group, it can indirectly have multiple roles, reducing the operation of assigning roles to a user multiple times, and achieving more efficient and efficient management results .
  • the RBAC of the data management system includes at least a role management module, a permission management module, and an information query module.
  • the role management module is used to define roles and maintain the mapping relationship between roles and permissions; permission management The module is used to divide the permissions of system resource operations, assign permissions to the defined roles of the system and maintain the corresponding mapping relationship, and the information query module is used to query the role permissions information of system users, as shown in the figure.
  • the corresponding subsystem needs to access the data management system. Specifically, if the subsystem requests access to the data management system, When a system access request is made, the data management system obtains the role permission data and user role data carried in the access request, wherein the role permission data and user role data include roles, permissions, user role mapping tables, and role permission mappings Tables and other content, after obtaining the role permission data and user role data, associate the role permission data and the user role data with the preset user mapping in the data management system to obtain the mapping data, for example, role permissions
  • the data and user role data include user A, the corresponding role is developer, the corresponding permission is permission a, user A is obtained from the user list of the data management system, and based on the received role permission data and user role data, in The data management system associates the A user in the user list with the developer and a permission.
  • the data management system in this embodiment sets three large modules based on RBAC: a visualization management module, a subsystem access module, and a data transmission interface module.
  • the visualization management module includes four sub-systems. Modules: role management sub-module, authority management sub-module, authorization management sub-module and subsystem authentication management sub-module, role management sub-module is used to maintain and manage the role data defined by multiple subsystems, and provide visual addition, deletion, and modification , Check, and batch import of role data. If the subsystem has role data modification or import requirements, it needs to apply to the data management system to achieve it.
  • the authority management sub-module is responsible for maintaining and managing the authority data defined by multiple subsystems , And provide visual addition, deletion, modification, query, and batch import operations of permission data; the authorization management sub-module is used to provide visual authorization and batch role permission data and or batch user role data import operations. In addition, the authorization management sub-module It is also used to maintain and manage the mapping relationship between users and permissions, and to provide user permission checking functions. It should be noted that the authorization management sub-module involves tables including role tables, permission tables, user role association tables, and role permission association tables.
  • Step S02 Assign an application ID and the first token to the subsystem, and store the application ID, the first token, and the mapping data in association.
  • the data management system also includes a subsystem authentication management module.
  • the subsystem authentication management module is used to manage the authentication of multiple subsystems. Before performing authentication, the subsystem authentication management module also provides The system applies for a subsystem application identification ID (application ID or appId) and the first token token (first token or apptoken) of the corresponding subsystem, where the application ID is used to identify a subsystem, and the first token is used for encrypted storage. And it is used to generate the corresponding data signature when the subsystem initiates an authentication request. In addition, when the subsystem subsequently synchronizes data, it can also carry the first token.
  • application ID application ID or appId
  • first token token first token or apptoken
  • the application ID allocated by the subsystem and the first token are correspondingly saved under the subsystem authentication management module, and the application ID, the first token, and the mapping data are associated and stored.
  • the purpose of the associated storage is: To lay the foundation for data isolation of the data of each subsystem.
  • the data management system can extract authentication parameters including random code, time stamp, and second
  • Step S20 Generate a first signature associated with the authentication request according to the first token in the authentication parameters and a preset first generation algorithm, and determine whether the first signature is related to the second in the authentication parameters. Whether the signatures are consistent;
  • the first token parameters are extracted, and the first signature associated with the authentication request is generated with the preset first generation algorithm, and the first generation is preset
  • Step S30 if the first signature is consistent with the second signature in the authentication parameters, generate a second token according to a preset second generation algorithm
  • Step S40 Feed back the first feedback data including the second token to the subsystem, so that the subsystem realizes data synchronization with the data management system based on the first feedback data.
  • the first feedback data including the second token is fed back to the subsystem.
  • the first feedback data fed back by the data management system is data in JSON format, and the first feedback data is specifically Including appId, second token, auth, expireTime, etc.
  • the subsystem realizes data synchronization with the data management system based on the first feedback data.
  • the data synchronization includes increment Data synchronization and full data synchronization, etc.
  • the step of feeding back the first feedback data including the second token to the subsystem so that the subsystem can synchronize data with the data management system based on the first feedback data includes:
  • Step S41 feeding back the first feedback data including the second token to the subsystem
  • the first feedback data including the second token is fed back to the subsystem for the subsystem to obtain the second token.
  • Step S42 if a query request from the subsystem asking whether incremental synchronization is required is received, determine whether there is incremental data of the subsystem from the last synchronization time to the current time based on the query request;
  • the subsystem initiates an inquiry request to the data management system every preset time period. For example, the subsystem initiates an inquiry request every 30 seconds to ask whether incremental synchronization is required. If the data management system receives When the subsystem asks whether incremental synchronization is required, it obtains the pre-recorded last synchronization time of the subsystem, and checks whether the subsystem has new or updated data from the last synchronization time to the current time, for example Whether there is an update of the role table, permission table, user role association table, role permission association table, etc., check whether the subsystem has new or updated data from the last synchronization time to the current time is mainly obtained by viewing the update time field.
  • the update time field is used to record the time of the corresponding data insertion or the last update. If the update time in the update time field is earlier than the last synchronization time, then there is incremental data. If there is incremental data, you need to get the increment.
  • Data specifically, the incremental role data of the subsystem from the last synchronization time to the current time according to the appId, that is, the modified or newly added role data, and the incremental role data of the subsystem from the last synchronization time to the current time according to the appId Permission data, that is, the modified or newly added permission data, according to the appId to find the incremental user role data of the subsystem from the last synchronization time to the current time, that is, the modified or added user role data, and the last synchronization according to the appId
  • the incremental role authority data of the subsystem until the current time is the modified or added role authority to obtain complete incremental data. When there is no incremental data, a prompt that there is no incremental data is returned Specifically, the incremental data includes incremental role permission data and incremental
  • Step S43 if the incremental data of the subsystem exists, return to the subsystem a second feedback result that the incremental data of the subsystem exists;
  • the second feedback result of the incremental data of the subsystem is returned to the subsystem for the subsystem to make a first incremental synchronization request based on the second feedback result Generation and delivery.
  • Step S44 receiving a first incremental synchronization request sent by the subsystem based on the second feedback result, and performing a first check on the second token in the first incremental synchronization request;
  • the request parameters of the first incremental synchronization request are: appId, auth, and second token, where auth and second token can be Obtained from the system authentication request, that is, when the first incremental synchronization request occurs within a certain time of the subsystem accessing the data management system, the second token can be the same as the first token, that is, not every time The first incremental synchronization request needs to obtain a new token.
  • auth and second token can be Obtained from the system authentication request, that is, when the first incremental synchronization request occurs within a certain time of the subsystem accessing the data management system
  • the second token can be the same as the first token, that is, not every time
  • the first incremental synchronization request needs to obtain a new token.
  • the first token in the authentication parameter is within the validity period
  • the first token can be set as the second token for verification, and the second token is verified.
  • the process can be as follows: firstly, the second token needs to be decrypted, and after decryption, the appId, expireTime, and auth are obtained. First, check whether the appId and auth are consistent with the corresponding parameters in the data management system. If they are consistent, proceed according to expireTime. Determine whether the second token passes the verification.
  • the step of receiving the first incremental synchronization request sent by the subsystem based on the second feedback result, and performing a first verification on the second token in the first incremental synchronization request includes:
  • Step S441 Receive the first incremental synchronization request sent by the subsystem based on the second feedback result, and obtain the validity period of the second token in the first incremental synchronization request;
  • the first incremental synchronization request sent by the subsystem based on the second feedback result is received, and the validity period of the second token in the first incremental synchronization request is acquired, such as any token
  • the validity period can be 2 hours.
  • the purpose of obtaining the validity period is to determine whether the subsystem needs to be re-authenticated, that is, it is not necessary to obtain a new second token every time the first incremental synchronization request is made. Therefore, the subsystem can be reduced The access times of the authentication interface to reduce the waste of resources.
  • Step S442 Determine whether the second token is within the validity period, and when the second token is within the validity period, determine that the second token in the synchronization request passes the first verification.
  • Step S45 if it is detected that the second token passes the first verification, the incremental data is returned to the subsystem, where the incremental data includes incremental role authority data and incremental user role data.
  • the incremental data includes incremental role permission data, incremental user role data, etc.
  • the obtained incremental data is returned to The said subsystem realizes the unified management subsystem and the incremental data synchronization of the subsystem.
  • this application obtains the authentication parameters in the authentication request; according to the first token in the authentication parameters and the preset first generation algorithm, the The first signature associated with the authorization request, and determine whether the first signature is consistent with the second signature in the authentication parameters; if the first signature is consistent with the second signature in the authentication parameters, the A generation algorithm generates a second token; feeds back the first feedback data including the second token to the subsystem, so that the subsystem can synchronize data with the data management system based on the first feedback data .
  • it is no longer to set up a data resource access control management system for each subsystem of the enterprise, but only set up a data management system, and the unified management subsystem can realize data synchronization with each subsystem.
  • the data management system first authenticates the subsystem that needs data synchronization. Specifically, the data management system receives the authentication request sent by the subsystem, and based on the first token parameter in the authentication request and the preset The first generation algorithm generates the first signature associated with the authentication request to compare the first signature with the second signature parameters to determine whether the subsystem is authenticated or not.
  • the second generation algorithm is preset to generate the second token to determine the first feedback data including the second token to be fed back to the subsystem, so that the subsystem can communicate with the subsystem based on the first feedback data.
  • Data synchronization of data management system That is, in this application, it is no longer necessary to develop a management system for each subsystem, but also to manage and control the access to the data resources of each subsystem, thereby solving the problem that the access control management of enterprise data resources in the prior art is too expensive.
  • the present application provides another embodiment of a data management method.
  • the step of feeding back the first feedback data including the second token to the subsystem includes:
  • Step S451 Invoke a preset redis-based distributed lock mechanism to perform a lock operation on the first incremental synchronization request or the first full synchronization request, and obtain the first incremental synchronization request or the first incremental synchronization request in the locked state.
  • Full synchronization request
  • the multiple computer machines may send the same incremental synchronization request or full synchronization request to the data management system at the same time.
  • the preset redis-based distributed lock mechanism is called to perform the lock operation processing on the first incremental synchronization request or the first full synchronization request, and the lock is locked.
  • the first incremental synchronization request or the first full synchronization request of the state refers to: calling the redis set() method to implement the redis distributed deployment lock, set () Method definition set(String key, String value, String nx, String px, int time)
  • String is a string
  • String key that is, the key value string is unique, when the key value string is different , The corresponding incremental synchronization request is different, therefore, you can judge whether multiple incremental synchronization requests are the same according to the key value string
  • String value that is, the value string is associated with the second token token value
  • String nx means: String key is not If it exists, perform the set operation
  • String px adds an expiration setting to the String key.
  • the expiration setting refers to whether the lock setting of the specific first incremental synchronization request is in an expired state or a non-expired state, and the first incremental synchronization request Whether the lock setting is in an expired state or in a non-expired state is determined by the fifth parameter time; int time corresponds to String px, int time identifies the expiration time of the String key, and the set() method of redis generally leads to two results: If there is no first incremental synchronization request currently in the locked state (when the key does not exist), the received first incremental synchronization request is locked and the expiration setting is added accordingly; if there is already a locked state The existence of the first incremental synchronization request does not perform other lock operations.
  • Step S452 if a second incremental synchronization request consistent with the first incremental synchronization request in the locked state is detected, or if a second incremental synchronization request consistent with the first full synchronization request in the locked state is detected In the case of a full synchronization request, the second incremental synchronization request or the second full synchronization request is ignored, and prompt information is sent to the subsystem.
  • the second incremental synchronization request is ignored, and if it is detected that it is in the locked state
  • the first full synchronization request is consistent with the second full synchronization request
  • the second full synchronization request is ignored, and the second incremental synchronization request that is consistent with the first incremental synchronization request in the locked state refers to Is a request for the same requested synchronization data
  • a second full synchronization request that is consistent with the first full synchronization request in the locked state refers to a request for the same requested synchronization data, for the second incremental synchronization request
  • the second full synchronization request is ignored, that is, the second incremental synchronization request or the second full synchronization request is not fed back, and the non-feedback prompt information is sent to the subsystem.
  • the step of feeding back the first feedback data including the second token to the subsystem for the subsystem to implement data synchronization with the data management system based on the first feedback data includes:
  • Step S453 It is judged whether the feedback information of successful data synchronization of the subsystem is received;
  • Step S454 if the feedback information of the successful data synchronization of the subsystem is not received, unlock the first incremental synchronization request or the first full synchronization request to call the preset redis-based distributed lock
  • the mechanism performs a lock operation processing on the second incremental synchronization request or the second full synchronization request, so as to obtain and feed back the incremental data.
  • the first incremental synchronization request or the first full synchronization request in the locked state is unlocked to facilitate the data management system
  • Process other second incremental synchronization requests consistent with the first incremental synchronization request in the locked state or second full synchronization requests consistent with the first incremental synchronization request in the locked state that is, call the preset
  • the distributed lock mechanism based on redis locks the second incremental synchronization request or the second incremental synchronization request to obtain the incremental data or the full amount of data and feedback, so as to avoid the problem of a certain computer machine Failure to obtain the corresponding synchronization data for a long time caused by failure.
  • the first incremental synchronization request or the first full synchronization request is locked by calling the preset redis-based distributed lock mechanism, and the first incremental synchronization in the locked state is obtained.
  • Request or the first full synchronization request if a second incremental synchronization request consistent with the first incremental synchronization request in the locked state is detected, or if the first full synchronization request in the locked state is detected.
  • ignore the second incremental synchronization request or the second full synchronization request ignore the second incremental synchronization request or the second full synchronization request, and send a prompt message to the subsystem.
  • the waste of resources caused by the data management system needing to process multiple identical incremental synchronization requests is avoided.
  • the first feedback data including the second token is fed back to the subsystem for the subsystem based on the
  • the step of realizing data synchronization between the first feedback data and the data management system includes:
  • Step S46 feeding back the first feedback data including the second token to the subsystem
  • Step S47 receiving a first full synchronization request sent by the subsystem based on the first feedback data, and performing a second check on the second token in the first full synchronization request;
  • the synchronization of the full amount of data can also be realized.
  • the full amount of data refers to all the data in the data management system for the corresponding users, roles, permissions, role permissions, user roles, etc. of the subsystem, specifically, receiving the sub Based on the first full synchronization request sent by the first feedback data, the system performs a second check on the second token in the first full synchronization request, and performs a second check on the second token in the first full synchronization request.
  • the process of performing the second verification on the second token is basically the same as the process of performing the first verification on the second token in the incremental synchronization request, and will not be repeated here.
  • Step S48 if it is detected that the second token passes the second verification, obtain the full amount of data of the subsystem based on the query request, and return the full amount of data to the subsystem, where the full amount
  • the data includes full role permission data and full user role data.
  • the full amount of data of the subsystem is acquired based on the query request, and the full amount of data is returned to the subsystem, where the full amount of data includes the full amount of data Role permission data and full user role data, specifically, look up the full role data, full permission data, full user role data, and full role permission data of the subsystem according to the appId to obtain complete and full data.
  • the subsystem By feeding back the first feedback data including the second token to the subsystem; receiving the first full synchronization request sent by the subsystem based on the first feedback data, and responding to the first full synchronization request in the first full synchronization request.
  • the second token performs a second verification; if it is detected that the second token passes the second verification, the full amount of data of the subsystem is acquired based on the query request, and the full amount of data is returned to the Said subsystem, wherein the full amount of data includes full amount of role authority data and full amount of user role data.
  • synchronization of full data is achieved.
  • FIG. 3 is a schematic diagram of the system structure of the hardware operating environment involved in the solution of the embodiment of the present application.
  • the data management system of the embodiment of the present application may be a PC, or a terminal device such as a smart phone, a tablet computer, and a portable computer.
  • the data management system may include a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection and communication between the processor 1001 and the memory 1005.
  • the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 1005 may also be a storage device independent of the foregoing processor 1001.
  • the data management system may also include a target user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and so on.
  • the target user interface may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional target user interface may also include a standard wired interface and a wireless interface.
  • the network interface can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • FIG. 3 does not constitute a limitation on the data management system, and may include more or fewer components than shown in the figure, or a combination of certain components, or different components Layout.
  • the memory 1005 which is a computer storage medium, may include an operating system, a network communication module, and a data management program.
  • the operating system is a program that manages and controls the hardware and software resources of the data management system, and supports the operation of the data management program and other software and/or programs.
  • the network communication module is used to implement communication between various components in the memory 1005, and communication with other hardware and software in the data management system.
  • the processor 1001 is used to execute the data management program stored in the memory 1005 to implement the steps of the data management method described in any one of the above.
  • an embodiment of the present application also proposes a data management device, and the specific implementation of the data management device is basically the same as each embodiment of the above data management method, and will not be repeated here.
  • this application also provides a computer-readable storage medium that stores one or more programs, and the one or more programs can also be executed by one or more processors for use For realizing the steps of each embodiment of the above data management method.
  • the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. ⁇
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present application.

Abstract

本申请公开了一种数据管理方法、装置、系统及可读存储介质,该方法包括:在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名与所述鉴权参数中的第二签名是否一致;若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。本申请解决现有技术中企业数据资源的访问控制管理耗费过多的技术问题。

Description

数据管理方法、装置、系统及可读存储介质
本申请要求于2019年06月06日提交中国专利局、申请号为201910494610.4、发明名称为“数据管理方法、装置、系统及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中
技术领域
本申请涉及金融科技(Fintech)技术领域,尤其涉及一种数据管理方法、装置、系统及可读存储介质。
背景技术
随着金融科技(Fintech),尤其是互联网科技金融的不断发展,越来越多的技术应用在金融领域。其中,金融领域中的数据管理即是涉及众多技术,金融领域中的数据管理包括子系统数据资源的访问控制管理,在现有技术中,针对每个子系统数据资源的访问控制,都对应设置一个管理系统,而对于企业而言,一般存在多个子系统,每个子系统都需要对数据资源的访问控制建立一个管理系统,显然会浪费计算机资源,且由于每个管理系统都需要至少配置一个运营管理员,更是会造成人力资源的浪费。
发明概述
技术问题
问题的解决方案
技术解决方案
本申请的主要目的在于提供一种数据管理方法、装置、系统及可读存储介质,旨在解决现有技术中企业数据资源的访问控制管理耗费过多的技术问题。
为实现上述目的,本申请实施例提供一种数据管理方法,所述数据管理方法应用于管理多个子系统的数据管理系统,所述数据管理方法包括:
在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;
根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名与所述鉴权参数中的第二签名是否一致;
若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;
向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。
本申请还提供一种数据管理装置,所述数据管理装置包括:
检测模块,用于在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;
第一生成模块,用于根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名与所述鉴权参数中的第二签名是否一致;
第二生成模块,用于若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;
同步模块,用于向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。
本申请还提供一种可读存储介质,所述可读存储介质上存储有数据管理程序,所述数据管理程序被处理器执行时实现如上述的数据管理方法的步骤。
本申请在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名与所述鉴权参数中的第二签名是否一致;若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。在本申请中,不再是针对企业的每个子系统都设置一个数据资源的访问控制管理系统,而是只设置一个数据管理系统,且该统一管理子系统能够实现与各个子系统进行数据同步,以在隔离各个子系统之间的数据交互外统一管理控制各个子系统的数据资源的访问,具体地,为在隔离各个子系统之间的数据交互外统一管理控制各个子系统的数据资源的访问,在本申请中,数据管理系统对需要数据同步的子系统先进行鉴权,具体地,数据管理系统接收子系统发送的鉴权请求,并基于鉴 权请求中第一令牌参数与预设第一生成算法生成与所述鉴权请求关联的第一签名,以根据第一签名与第二签名参数进行比对,以确定子系统是否鉴权是否通过,当子系统鉴权通过时,根据预设第二生成算法生成第二令牌,以确定向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。也即,在本申请中,不再针对每个子系统都开发一个管理系统也可以实现管理控制各个子系统的数据资源的访问,进而解决了现有技术中企业数据资源的访问控制管理耗费过多的技术问题。
发明的有益效果
对附图的简要说明
附图说明
图1为本申请数据管理方法第一实施例的流程示意图;
图2为本申请数据管理方法第二实施例中在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数步骤之前的细化流程示意图;
图3是本申请实施例方法涉及的硬件运行环境的系统结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
发明实施例
本发明的实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种数据管理方法,在数据管理方法一实施例中,所述数据管理方法应用于管理多个子系统的数据管理系统,参照图3,所述数据管理方法包括:
步骤S10,在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;
在本实施例中,设置有数据管理系统,该数据管理系统统一对企业的多个子系统进行用户访问的控制管理,在统一对企业的多个子系统进行用户访问的控制管理过程中,涉及数据同步以及数据隔离过程,其中,数据同步指的是各个子 系统通过通信请求如HTTP请求从数据管理系统中获取用户访问控制数据的过程,而数据隔离指的是每个子系统从数据管理系统中同步获取到只属于本子系统的数据,其他子系统的数据对本子系统是不可获取以及不可见的,而为了实现数据同步以及数据隔离,数据管理系统需要对各个子系统进行子系统鉴权,子系统鉴权指的是各个子系统通过通信请求如HTTP请求方式向管理系统发起合法性验证请求,其中,子系统只有在数据管理系统鉴权通过后,子系统才可以实现从数据管理系统中进行数据同步。
需要说明的是,子系统在向管理系统发起鉴权请求之前,需要在管理系统中进行接入备案,具体地,所述在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数步骤之前包括:
步骤S01,若接收到所述子系统请求接入所述数据管理系统的接入请求时,获取所述接入请求中的角色权限数据以及用户角色数据,以将所述角色权限数据和所述用户角色数据,与所述数据管理系统中的预设用户映射关联,得到映射数据;
其中,数据管理系统对数据的管理是基于角色的访问控制RBAC(Role-Based Access Control)确定的。如图所示,RBAC中,首先定义各种角色、权限,将角色、权限分别记录在角色表和权限表中,通过使用角色权限关联表,给不同角色赋予不同权限,也即角色权限关联表记录角色到权限的映射关系,在得到角色权限关联表后,通过使用用户角色关联表,为用户分配对应角色,即是用户角色关联表记录用户到角色的映射关系,由于实现记录用户所属的角色,如此属于某种角色的用户实体,就拥有了该种角色的权限,在该管理系统中即可表现为可以正确访问子系统上对应的数据资源的权限,目前,为了扩展用户,还可以引入用户组的概念,用户组可以关联多个角色,这样一个用户如果属于某个用户组,就可以间接拥有多种角色,减少了为一个用户多次分配角色的操作,取得更加高效快捷的管理效果。其中,为了实现对数据的管理,数据管理系统的RBAC中至少包括角色管理模块、权限管理模块、信息查询模块,其中,角色管理模块用于定义角色,并维护角色与权限的映射关系;权限管理模块用于对系统资源操作进行权限划分,对系统已定义的角色进行权限分配并维护对应 的映射关系,信息查询模块,用于实现系统用户的角色权限信息的查询,具体如图所示。
在本实施例中,数据管理系统实现对多个子系统进行用户访问的控制管理前,对应的子系统需要接入数据管理系统,具体地,若接收到所述子系统请求接入所述数据管理系统的接入请求时,数据管理系统获取所述接入请求中的携带的角色权限数据以及用户角色数据,其中,角色权限数据以及用户角色数据包括角色、权限、用户角色映射表和角色权限映射表等内容,在得到角色权限数据以及用户角色数据后,将所述角色权限数据和所述用户角色数据,与所述数据管理系统中的预设用户映射关联,得到映射数据,例如,角色权限数据以及用户角色数据中包括A用户,对应的角色是开发人员,对应的权限为a权限,从数据管理系统的用户列表中获取A用户,并基于接收到的角色权限数据和用户角色数据,在数据管理系统中将用户列表中的A用户与开发人员、a权限关联。
具体地,为实现统一管理各个子系统,本实施例中的数据管理系统基于RBAC设置三个大模块:可视化管理模块、子系统接入模块和数据传输接口模块,所述可视化管理模块包含四个子模块:角色管理子模块、权限管理子模块、授权管理子模块和子系统鉴权管理子模块,角色管理子模块用于维护和管理多个子系统定义好的角色数据,提供可视化的增、删、改、查以及角色数据批量导入操作,子系统如果有角色数据修改或导入等需求,需要通过向数据管理系统进行申请等操作才能实现,权限管理子模块负责维护和管理多个子系统定义好的权限数据,并提供可视化的增、删、改、查以及权限数据批量导入操作;授权管理子模块用于提供可视化的授权和批量角色权限数据以及或者批量用户角色数据的导入操作,此外,授权管理子模块还用于维护和管理用户和权限的映射关系,同时提供用户权限查功能,需要说明的是,该授权管理子模块涉及包括角色表、权限表、用户角色关联表、角色权限关联表等表格。
步骤S02,向所述子系统分配应用ID与所述第一令牌,并将所述应用ID、所述第一令牌与所述映射数据关联存储。
在本实施例中,数据管理系统还包括子系统鉴权管理模块,子系统鉴权管理模块用于管理多个子系统的鉴权,在进行鉴权前,子系统鉴权管理模块还为每个 子系统申请一个子系统应用标识ID(应用ID或者appId)和对应子系统的第一令牌token(第一token或者apptoken),其中应用ID用于标识一个子系统,第一token用于加密存储,以及用于子系统发起鉴权请求时生成对应的数据签名,另外,子系统在后续同步数据时,也可以携带第一token,若子系统的应用ID与所述第一令牌都申请通过后,在子系统鉴权管理模块下对应保存该子系统分配的应用ID与所述第一token,并将所述应用ID、所述第一token与所述映射数据关联存储,关联存储的目的在于,为对每个子系统的数据进行数据隔离奠定基础。
在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;
在本实施例中,子系统首先生成鉴权请求,具体地,子系统在接收到用户的鉴权操作时,先调用随机码生成程序段生成随机码(nonce),其中,nonce可以为5位数字,在得到随机码nonce后,调用预设第一生成算法生成第二签名sign,生成第二签名sign的预设第一生成算法为:sign=md5(md5(appId+nonce+timeStamp)+apptoken),其中,md5(x)表示求x的md5值即密码散列函数值,appId为应用ID,timeStamp为时间戳,apptoken为第一token,将随机码、第二签名、时间戳等参数添加至鉴权请求中,因而,在检测到子系统发送的鉴权请求时,数据管理系统可以从鉴权请求中提取包括随机码、时间戳以及第二签名等鉴权参数。
步骤S20,根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名与所述鉴权参数中的第二签名是否一致;
对于数据管理系统而言,在得到鉴权参数后,提取其中的第一令牌参数,并将与预设第一生成算法生成与所述鉴权请求关联的第一签名,预设第一生成算法为:sign=md5(md5(appId+nonce+timeStamp)+apptoken),在得到第一签名后,判断第一签名与所述鉴权参数中的第二签名是否相同。
步骤S30,若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;
若第一签名与所述鉴权参数中的第二签名相同时,根据预设第二生成算法生成第二令牌,其中,预设第二生成算法为:第二令牌token(第二token)= des(appId+expireTime+auth+key),其中,expireTime为失效时间,单位是秒,随机数(auth)为5位随机数字,des是一种对称加密算法,key为加密秘钥。
步骤S40,向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。
在得到第二令牌后,向所述子系统反馈包括所述第二令牌的第一反馈数据,其中,数据管理系统反馈的第一反馈数据为JSON格式的数据,第一反馈数据中具体包括appId,第二token,auth,expireTime等内容,在反馈第一反馈数据给子系统后,所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步,数据同步包括增量数据同步以及全量数据同步等。
具体地,所述向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步步骤包括:
步骤S41,向所述子系统反馈包括所述第二令牌的第一反馈数据;
向所述子系统反馈包括所述第二令牌的第一反馈数据,以供子系统获取第二令牌。
步骤S42,若接收到所述子系统询问是否需要增量同步的询问请求时,基于所述询问请求判断是否存在上次同步时间到当前时间为止所述子系统的增量数据;
在本实施例中,子系统每隔预设时间段向数据管理系统发起一次询问请求,例如,子系统每隔30秒发起一次询问请求,询问是否需要进行增量同步,数据管理系统若接收到所述子系统询问是否需要增量同步的询问请求时,获取预先记录的该子系统上次同步时间,并查看上次同步时间到当前时间为止该子系统是否有新增或更新的数据,例如是否存在角色表、权限表、用户角色关联表、角色权限关联表中等的更新,查看上次同步时间到当前时间为止该子系统是否有新增或更新的数据主要通过查看更新时间字段方式得到,其中更新时间字段用于记录对应数据插入或最后一次更新的时间,如果更新时间字段中的更新时间先于上次同步时间,则存在增量数据,存在增量数据时,还需要获取该增量数据,具体地,根据appId查找上次同步时间到当前时间为止子系统的增量角色数据,即所修改或新增的角色数据,根据appId查找上次同步时间到当前时间为止 子系统的增量权限数据,即所修改或新增的权限数据,根据appId查找上次同步时间到当前时间为止子系统的增量用户角色数据,即所修改或新增的用户角色数据,根据appId查找上次同步时间到当前时间为止子系统的增量角色权限数据,即所修改或新增的角色权限,以得到完整的增量数据,其中,当未存在增量数据时,返回未存在增量数据的提示,具体地,增量数据包括增量角色权限数据以及增量用户角色数据等。
步骤S43,若存在所述子系统的增量数据时,向所述子系统返回存在所述子系统的增量数据的第二反馈结果;
若存在所述子系统的增量数据时,向所述子系统返回存在所述子系统的增量数据的第二反馈结果,以供子系统基于该第二反馈结果进行第一增量同步请求的生成以及发送。
步骤S44,接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,对所述第一增量同步请求中的所述第二令牌进行第一校验;
接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,第一增量同步请求的请求参数为:appId、auth和第二token,其中auth和第二token可以是在子系统鉴权请求中获得的,也即,第一增量同步请求在子系统接入数据管理系统的确定时间内发生时,第二token可以与第一token相同,也即,并不是每次进行第一增量同步请求都需要获取新的token,当鉴权参数中的第一令牌处于有效期时,可以将该第一令牌设为第二token进行校验,校验第二令牌的过程可以为:首先需要对第二令牌进行des解密,解密后得到appId、expireTime和auth等内容,首先比对appId和auth与数据管理系统中对应的参数是否一致,若一致,则根据expireTime进行判断,确定第二令牌是否通过验证。
所述接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,对所述第一增量同步请求中的所述第二令牌进行第一校验步骤包括:
步骤S441,接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,获取所述第一增量同步请求中所述第二令牌的有效期;
在本实施例中,接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,获取所述第一增量同步请求中所述第二令牌的有效期,如任何令牌的有效 期可以为2小时,获取有效期的目的在于确定子系统是否需要重新进行鉴权,也即并不是每次进行第一增量同步请求都需要获取新的第二token,因而,可以减少子系统鉴权接口的访问次数,以减少资源的浪费.。
步骤S442,判断所述第二令牌是否在所述有效期内,当所述第二令牌在所述有效期内时,确定所述同步请求中的所述第二令牌通过第一校验。
判断所述第二令牌是否在所述有效期内,当所述第二令牌在所述有效期内时,确定所述同步请求中的所述第二令牌通过第一校验,当所述第二令牌未在所述有效期内,重新生成第二令牌,并对应执行后续逻辑。
步骤S45,若检测到所述第二令牌通过第一校验时,将所述增量数据返回给所述子系统,其中,所述增量数据包括增量角色权限数据以及增量用户角色数据。
所述增量数据包括增量角色权限数据以及增量用户角色数据等,在本实施例中,若检测到所述第二令牌通过第一校验时,将获取得到的增量数据返回给所述子系统,以实现统一管理子系统与子系统的增量数据同步。
本申请在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名与所述鉴权参数中的第二签名是否一致;若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。在本申请中,不再是针对企业的每个子系统都设置一个数据资源的访问控制管理系统,而是只设置一个数据管理系统,且该统一管理子系统能够实现与各个子系统进行数据同步,以在隔离各个子系统之间的数据交互外统一管理控制各个子系统的数据资源的访问,具体地,为在隔离各个子系统之间的数据交互外统一管理控制各个子系统的数据资源的访问,在本申请中,数据管理系统对需要数据同步的子系统先进行鉴权,具体地,数据管理系统接收子系统发送的鉴权请求,并基于鉴权请求中第一令牌参数与预设第一生成算法生成与所述鉴权请求关联的第一签名,以根据第一签名与第二签名参数进行比对,以确定子系统是否鉴权是否通 过,当子系统鉴权通过时,根据预设第二生成算法生成第二令牌,以确定向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。也即,在本申请中,不再针对每个子系统都开发一个管理系统也可以实现管理控制各个子系统的数据资源的访问,进而解决了现有技术中企业数据资源的访问控制管理耗费过多的技术问题。
进一步地,本申请提供数据管理方法另一实施例,在该实施例中,所述向所述子系统反馈包括所述第二令牌的第一反馈数据步骤之后包括:
步骤S451,调用预设的基于redis的分布式锁机制对所述第一增量同步请求或者第一全量同步请求进行加锁操作处理,得到处于锁住状态的第一增量同步请求或者第一全量同步请求;
每个子系统都存在多个计算机机器,该多个计算机机器可能同时向数据管理系统发送同样的增量同步请求或者全量同步请求,为避免数据管理系统需要处理多个同样的增量同步请求或者全量同步请求所造成的资源浪费,在本实施例中,调用预设的基于redis的分布式锁机制对所述第一增量同步请求或者第一全量同步请求进行加锁操作处理,得到处于锁住状态的第一增量同步请求或者第一全量同步请求,具体地,调用预设的基于redis的分布式锁机制指的是:调用redis的set()方法来实现redis的分布式部署锁,set()方法定义set(String key,String value,String nx,String px,int time)共5个参数,String为字符串,String key也即键值字符串是唯一的,当键值字符串不同时,对应增量同步请求不同,因而,可以根据键值字符串判断多个增量同步请求是否相同;String value也即值字符串与第二令牌token值关联;String nx表示为:String key不存在时,进行set操作;String px为给String key添加过期设置,过期设置指的是具体第一增量同步请求的加锁设置是否处于过期状态还是处于非过期状态,第一增量同步请求的加锁设置是否处于过期状态还是处于非过期状态的时间由第五个参数time决定;int time与String px呼应,int time标识String key的过期时间,redis的set()方法一般导致两种结果:若当前没有处于锁住状态的第一增量同步请求(key不存在时),则对接收的第一增量同步请求进行加锁操作,并对应添加过期设置;若已有处于锁住状态的 第一增量同步请求的存在,不执行其他的加锁操作。
步骤S452,若检测到与所述处于锁住状态的第一增量同步请求一致的第二增量同步请求,或者若检测到与所述处于锁住状态的第一全量同步请求一致的第二全量同步请求时,对所述第二增量同步请求或者所述第二全量同步请求进行忽略处理,并发送提示信息给所述子系统。
若检测到与所述处于锁住状态的第一增量同步请求一致的第二增量同步请求时,对所述第二增量同步请求进行忽略处理,若检测到与所述处于锁住状态的第一全量同步请求一致的第二全量同步请求时,对所述第二全量同步请求进行忽略处理,与所述处于锁住状态的第一增量同步请求一致的第二增量同步请求指的是请求的同步数据相同的请求,与所述处于锁住状态的第一全量同步请求一致的第二全量同步请求指的是请求的同步数据相同的请求,对所述第二增量同步请求或者第二全量同步请求进行忽略处理即是不反馈该第二增量同步请求或者第二全量同步请求,并发送不反馈的提示信息给所述子系统。
所述向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步步骤之后包括:
步骤S453,判断是否接收到所述子系统数据同步成功的反馈信息;
步骤S454,若未接收到所述子系统的数据同步成功的反馈信息时,对所述第一增量同步请求或者第一全量同步请求进行解锁处理,以调用预设的基于redis的分布式锁机制对所述第二增量同步请求或者第二全量同步请求进行加锁操作处理,以得到所述增量数据并反馈。
需要说明的是,在本实施例中,若处于锁住状态的第一增量同步请求或者第一全量同步请求的加锁设置处于过期状态时,或者未接收到所述子系统的数据同步成功的反馈信息时,第一增量同步请求或者第一全量同步请求对应的同步数据获取失败,对处于锁住状态的第一增量同步请求或者第一全量同步请求进行解锁处理,以便数据管理系统处理其他的与该处于锁住状态的第一增量同步请求一致的第二增量同步请求或者与该处于锁住状态的第一增量同步请求一致的第二全量同步请求,即调用预设的基于redis的分布式锁机制对所述第二增量同步请求或者第二增量同步请求行加锁操作处理,以得到所述增量数据或者全量数 据并反馈,以避免因某一计算机机器故障而造成长时间难以得到对应的同步数据。
在本实施例中,通过调用预设的基于redis的分布式锁机制对所述第一增量同步请求或者第一全量同步请求进行加锁操作处理,得到处于锁住状态的第一增量同步请求或者第一全量同步请求;若检测到与所述处于锁住状态的第一增量同步请求一致的第二增量同步请求,或者若检测到与所述处于锁住状态的第一全量同步请求一致的第二全量同步请求时,对所述第二增量同步请求或者所述第二全量同步请求进行忽略处理,并发送提示信息给所述子系统。在本实施例中,避免数据管理系统需要处理多个同样的增量同步请求所造成的资源浪费。
进一步地,在本申请提供数据管理方法另一实施例,在该实施例中,所述向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步步骤包括:
步骤S46,向所述子系统反馈包括所述第二令牌的第一反馈数据;
步骤S47,接收所述子系统基于所述第一反馈数据发送的第一全量同步请求,对所述第一全量同步请求中的所述第二令牌进行第二校验;
在本实施例中,还可以实现全量数据的同步,全量数据指的该数据管理系统中针对子系统对应用户、角色、权限、角色权限,用户角色等全部的数据,具体地,接收所述子系统基于所述第一反馈数据发送的第一全量同步请求后对所述第一全量同步请求中的所述第二令牌进行第二校验,对所述第一全量同步请求中的所述第二令牌进行第二校验的过程与对所述增量同步请求中的所述第二令牌进行第一校验的过程基本相同,在此不再赘述。
步骤S48,若检测到所述第二令牌通过第二校验时,基于所述询问请求获取所述子系统的全量数据,将所述全量数据返回给所述子系统,其中,所述全量数据包括全量角色权限数据以及全量用户角色数据。
若检测到所述第二令牌通过第二校验时,基于所述询问请求获取所述子系统的全量数据,将所述全量数据返回给所述子系统,其中,所述全量数据包括全量角色权限数据以及全量用户角色数据,具体地,根据appId查找子系统的全量角色数据,全量权限数据,全量用户角色数据,全量角色权限数据,以得到完整 的全量数据。
通过向所述子系统反馈包括所述第二令牌的第一反馈数据;接收所述子系统基于所述第一反馈数据发送的第一全量同步请求,对所述第一全量同步请求中的所述第二令牌进行第二校验;若检测到所述第二令牌通过第二校验时,基于所述询问请求获取所述子系统的全量数据,将所述全量数据返回给所述子系统,其中,所述全量数据包括全量角色权限数据以及全量用户角色数据。在本实施例中,实现全量数据的同步。
参照图3,图3是本申请实施例方案涉及的硬件运行环境的系统结构示意图。
本申请实施例数据管理系统可以是PC,也可以是智能手机、平板电脑、便携计算机等终端设备。
如图3所示,该数据管理系统可以包括:处理器1001,例如CPU,存储器1005,通信总线1002。其中,通信总线1002用于实现处理器1001和存储器1005之间的连接通信。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储设备。
可选地,该数据管理系统还可以包括目标用户接口、网络接口、摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。目标用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选目标用户接口还可以包括标准的有线接口、无线接口。网络接口可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。
本领域技术人员可以理解,图3中示出的数据管理系统结构并不构成对数据管理系统的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图3所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块以及数据管理程序。操作系统是管理和控制数据管理系统硬件和软件资源的程序,支持数据管理程序以及其它软件和/或程序的运行。网络通信模块用于实现存储器1005内部各组件之间的通信,以及与数据管理系统中其它硬件和软件之间通信。
在图3所示的数据管理系统中,处理器1001用于执行存储器1005中存储的数据管理程序,实现上述任一项所述的数据管理方法的步骤。
本申请数据管理系统具体实施方式与上述数据管理方法各实施例基本相同,在此不再赘述。
此外,本申请实施例还提出一种数据管理装置,该数据管理装置具体实施方式与上述数据管理方法各实施例基本相同,在此不再赘述。
此外,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序还可被一个或者一个以上的处理器执行以用于实现上述数据管理方法各实施例的步骤。
本申请系统及可读存储介质(即计算机可读存储介质)的具体实施方式的拓展内容与上述数据管理方法各实施例基本相同,在此不做赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个......”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的 范围情况下,还可做出很多形式,这些均属于本申请的保护之内。

Claims (20)

  1. 一种数据管理方法,其中,所述数据管理方法应用于管理多个子系统的数据管理系统,所述数据管理方法包括:
    在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;
    根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名与所述鉴权参数中的第二签名是否一致;
    若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;
    向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。
  2. 如权利要求1所述的数据管理方法,其中,所述在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数步骤之前包括:
    若接收到所述子系统请求接入所述数据管理系统的接入请求时,获取所述接入请求中的角色权限数据以及用户角色数据,以将所述角色权限数据和所述用户角色数据,与所述数据管理系统中的预设用户映射关联,得到映射数据;
    向所述子系统分配应用ID与所述第一令牌,并将所述应用ID、所述第一令牌与所述映射数据关联存储。
  3. 如权利要求2所述的数据管理方法,其中,所述向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步步骤包括:
    向所述子系统反馈包括所述第二令牌的第一反馈数据;
    接收所述子系统基于所述第一反馈数据发送的第一全量同步请求,对所述第一全量同步请求中的所述第二令牌进行第二校验;
    若检测到所述第二令牌通过第二校验时,基于所述询问请求获取所述子系统的全量数据,将所述全量数据返回给所述子系统,其中,所述全量数据包括全量角色权限数据以及全量用户角色数据。
  4. 如权利要求2所述的数据管理方法,其中,所述向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步步骤包括:
    向所述子系统反馈包括所述第二令牌的第一反馈数据;
    若接收到所述子系统询问是否需要增量同步的询问请求时,基于所述询问请求判断是否存在上次同步时间到当前时间为止所述子系统的增量数据;
    若存在所述子系统的增量数据时,向所述子系统返回存在所述子系统的增量数据的第二反馈结果;
    接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,对所述第一增量同步请求中的所述第二令牌进行第一校验;
    若检测到所述第二令牌通过第一校验时,将所述增量数据返回给所述子系统,其中,所述增量数据包括增量角色权限数据以及增量用户角色数据。
  5. 如权利要求1所述的数据管理方法,其中,所述向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步步骤包括:
    向所述子系统反馈包括所述第二令牌的第一反馈数据;
    接收所述子系统基于所述第一反馈数据发送的第一全量同步请求,对所述第一全量同步请求中的所述第二令牌进行第二校验;
    若检测到所述第二令牌通过第二校验时,基于所述询问请求获取所述子系统的全量数据,将所述全量数据返回给所述子系统,其中,所述全量数据包括全量角色权限数据以及全量用户角色数据。
  6. 如权利要求1所述的数据管理方法,其中,所述向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步步骤包括:
    向所述子系统反馈包括所述第二令牌的第一反馈数据;
    若接收到所述子系统询问是否需要增量同步的询问请求时,基于所述询问请求判断是否存在上次同步时间到当前时间为止所述子系统的增量数据;
    若存在所述子系统的增量数据时,向所述子系统返回存在所述子系统的增量数据的第二反馈结果;
    接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,对所述第一增量同步请求中的所述第二令牌进行第一校验;
    若检测到所述第二令牌通过第一校验时,将所述增量数据返回给所述子系统,其中,所述增量数据包括增量角色权限数据以及增量用户角色数据。
  7. 如权利要求6所述的数据管理方法,其中,所述接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,对所述第一增量同步请求中的所述第二令牌进行第一校验步骤包括:
    接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,获取所述第一增量同步请求中所述第二令牌的有效期;
    判断所述第二令牌是否在所述有效期内,当所述第二令牌在所述有效期内时,确定所述同步请求中的所述第二令牌通过第一校验。
  8. 如权利要求5所述的数据管理方法,其中,所述向所述子系统反馈包括所述第二令牌的第一反馈数据步骤之后包括:
    调用预设的基于redis的分布式锁机制对所述第一增量同步请求或者第一全量同步请求进行加锁操作处理,得到处于锁住状态的第一增量同步请求或者第一全量同步请求;
    若检测到与所述处于锁住状态的第一增量同步请求一致的第二增 量同步请求,或者若检测到与所述处于锁住状态的第一全量同步请求一致的第二全量同步请求时,对所述第二增量同步请求或者所述第二全量同步请求进行忽略处理,并发送提示信息给所述子系统。
  9. 如权利要求6所述的数据管理方法,其中,所述向所述子系统反馈包括所述第二令牌的第一反馈数据步骤之后包括:
    调用预设的基于redis的分布式锁机制对所述第一增量同步请求或者第一全量同步请求进行加锁操作处理,得到处于锁住状态的第一增量同步请求或者第一全量同步请求;
    若检测到与所述处于锁住状态的第一增量同步请求一致的第二增量同步请求,或者若检测到与所述处于锁住状态的第一全量同步请求一致的第二全量同步请求时,对所述第二增量同步请求或者所述第二全量同步请求进行忽略处理,并发送提示信息给所述子系统。
  10. 如权利要求8所述的数据管理方法,其中,所述向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步步骤之后包括:
    判断是否接收到所述子系统数据同步成功的反馈信息;
    若未接收到所述子系统的数据同步成功的反馈信息时,对所述第一增量同步请求或者第一全量同步请求进行解锁处理,以调用预设的基于redis的分布式锁机制对所述第二增量同步请求或者第二全量同步请求进行加锁操作处理,以得到所述增量数据并反馈。
  11. 一种数据管理装置,其中,所述数据管理装置应用于管理多个子系统的数据管理系统,所述数据管理装置包括:
    检测模块,用于在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;
    第一生成模块,用于根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名 与所述鉴权参数中的第二签名是否一致;
    第二生成模块,用于若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;
    同步模块,用于向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。
  12. 一种数据管理系统,其中,所述系统包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据管理程序,所述数据管理程序被所述处理器执行时实现如下步骤:
    在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;
    根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名与所述鉴权参数中的第二签名是否一致;
    若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;
    向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。
  13. 如权利要求12所述的数据管理系统,其中,所述数据管理程序被所述处理器执行时还实现如下步骤:
    若接收到所述子系统请求接入所述数据管理系统的接入请求时,
    获取所述接入请求中的角色权限数据以及用户角色数据,以将所述角色权限数据和所述用户角色数据,与所述数据管理系统中的预设用户映射关联,得到映射数据;
    向所述子系统分配应用ID与所述第一令牌,并将所述应用ID、所述第一令牌与所述映射数据关联存储。
  14. 如权利要求13所述的数据管理系统,其中,所述数据管理程序被 所述处理器执行时还实现如下步骤:
    向所述子系统反馈包括所述第二令牌的第一反馈数据;
    接收所述子系统基于所述第一反馈数据发送的第一全量同步请求,对所述第一全量同步请求中的所述第二令牌进行第二校验;
    若检测到所述第二令牌通过第二校验时,基于所述询问请求获取所述子系统的全量数据,将所述全量数据返回给所述子系统,其中,所述全量数据包括全量角色权限数据以及全量用户角色数据。
  15. 如权利要求13所述的数据管理系统,其中,所述数据管理程序被所述处理器执行时还实现如下步骤:
    向所述子系统反馈包括所述第二令牌的第一反馈数据;
    若接收到所述子系统询问是否需要增量同步的询问请求时,基于所述询问请求判断是否存在上次同步时间到当前时间为止所述子系统的增量数据;
    若存在所述子系统的增量数据时,向所述子系统返回存在所述子系统的增量数据的第二反馈结果;
    接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,对所述第一增量同步请求中的所述第二令牌进行第一校验;
    若检测到所述第二令牌通过第一校验时,将所述增量数据返回给所述子系统,其中,所述增量数据包括增量角色权限数据以及增量用户角色数据。
  16. 一种可读存储介质,其中,所述可读存储介质上存储有数据管理程序,所述数据管理程序被处理器执行时实现如下步骤:
    在检测到子系统发送的鉴权请求时,获取所述鉴权请求中的鉴权参数;
    根据所述鉴权参数中的第一令牌与预设第一生成算法生成与所述鉴权请求关联的第一签名,并判断第一签名与所述鉴权参数中的第二签名是否一致;
    若第一签名与所述鉴权参数中的第二签名一致时,根据预设第二生成算法生成第二令牌;
    向所述子系统反馈包括所述第二令牌的第一反馈数据,以供所述子系统基于所述第一反馈数据实现与所述数据管理系统的数据同步。
  17. 如权利要求16所述的可读存储介质,其中,所述数据管理程序被处理器执行时还实现如下步骤:
    若接收到所述子系统请求接入所述数据管理系统的接入请求时,获取所述接入请求中的角色权限数据以及用户角色数据,以将所述角色权限数据和所述用户角色数据,与所述数据管理系统中的预设用户映射关联,得到映射数据;
    向所述子系统分配应用ID与所述第一令牌,并将所述应用ID、所述第一令牌与所述映射数据关联存储。
  18. 如权利要求17所述的可读存储介质,其中,所述数据管理程序被处理器执行时还实现如下步骤:
    向所述子系统反馈包括所述第二令牌的第一反馈数据;
    接收所述子系统基于所述第一反馈数据发送的第一全量同步请求,对所述第一全量同步请求中的所述第二令牌进行第二校验;
    若检测到所述第二令牌通过第二校验时,基于所述询问请求获取所述子系统的全量数据,将所述全量数据返回给所述子系统,其中,所述全量数据包括全量角色权限数据以及全量用户角色数据。
  19. 如权利要求17所述的可读存储介质,其中,所述数据管理程序被处理器执行时还实现如下步骤:
    向所述子系统反馈包括所述第二令牌的第一反馈数据;
    若接收到所述子系统询问是否需要增量同步的询问请求时,基于所述询问请求判断是否存在上次同步时间到当前时间为止所述子系统的增量数据;
    若存在所述子系统的增量数据时,向所述子系统返回存在所述子系统的增量数据的第二反馈结果;
    接收所述子系统基于所述第二反馈结果发送的第一增量同步请求,对所述第一增量同步请求中的所述第二令牌进行第一校验;
    若检测到所述第二令牌通过第一校验时,将所述增量数据返回给所述子系统,其中,所述增量数据包括增量角色权限数据以及增量用户角色数据。
  20. 如权利要求16所述的可读存储介质,其中,所述数据管理程序被处理器执行时还实现如下步骤:
    向所述子系统反馈包括所述第二令牌的第一反馈数据;
    接收所述子系统基于所述第一反馈数据发送的第一全量同步请求,对所述第一全量同步请求中的所述第二令牌进行第二校验;
    若检测到所述第二令牌通过第二校验时,基于所述询问请求获取所述子系统的全量数据,将所述全量数据返回给所述子系统,其中,所述全量数据包括全量角色权限数据以及全量用户角色数据。
PCT/CN2020/092137 2019-06-06 2020-05-25 数据管理方法、装置、系统及可读存储介质 WO2020244408A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910494610.4A CN110263574A (zh) 2019-06-06 2019-06-06 数据管理方法、装置、系统及可读存储介质
CN201910494610.4 2019-06-06

Publications (1)

Publication Number Publication Date
WO2020244408A1 true WO2020244408A1 (zh) 2020-12-10

Family

ID=67917339

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/092137 WO2020244408A1 (zh) 2019-06-06 2020-05-25 数据管理方法、装置、系统及可读存储介质

Country Status (2)

Country Link
CN (1) CN110263574A (zh)
WO (1) WO2020244408A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263574A (zh) * 2019-06-06 2019-09-20 深圳前海微众银行股份有限公司 数据管理方法、装置、系统及可读存储介质
CN111294354B (zh) * 2020-02-04 2021-03-30 北京嗨学网教育科技股份有限公司 用于分布式环境的签名验证方法、装置、设备和存储介质
CN111865576B (zh) * 2020-07-03 2023-02-28 北京天空卫士网络安全技术有限公司 一种同步url分类数据的方法和装置
CN113783867B (zh) * 2021-09-07 2023-07-25 福建天泉教育科技有限公司 一种请求认证方法及终端

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101847428A (zh) * 2009-03-27 2010-09-29 索尼公司 信息处理装置、信息处理方法和程序
US20120027134A1 (en) * 2010-08-02 2012-02-02 Cleversafe, Inc. Receiving encoded data slices via wireless communication
CN105045783A (zh) * 2013-12-07 2015-11-11 庄颢 含冗余的数据压缩与解压缩的系统和方法
CN110263574A (zh) * 2019-06-06 2019-09-20 深圳前海微众银行股份有限公司 数据管理方法、装置、系统及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101847428A (zh) * 2009-03-27 2010-09-29 索尼公司 信息处理装置、信息处理方法和程序
US20120027134A1 (en) * 2010-08-02 2012-02-02 Cleversafe, Inc. Receiving encoded data slices via wireless communication
CN105045783A (zh) * 2013-12-07 2015-11-11 庄颢 含冗余的数据压缩与解压缩的系统和方法
CN110263574A (zh) * 2019-06-06 2019-09-20 深圳前海微众银行股份有限公司 数据管理方法、装置、系统及可读存储介质

Also Published As

Publication number Publication date
CN110263574A (zh) 2019-09-20

Similar Documents

Publication Publication Date Title
WO2020244408A1 (zh) 数据管理方法、装置、系统及可读存储介质
US11606352B2 (en) Time-based one time password (TOTP) for network authentication
JP6066647B2 (ja) デバイス装置、その制御方法、およびそのプログラム
US9626137B2 (en) Image forming apparatus, server device, information processing method, and computer-readable storage medium
JP6154413B2 (ja) ルート証明書の無効化
US8554749B2 (en) Data file access control
CN108964885B (zh) 鉴权方法、装置、系统和存储介质
JP6061633B2 (ja) デバイス装置、制御方法、およびそのプログラム。
US20150271679A1 (en) System and method of verifying integrity of software
CN109379336B (zh) 一种统一认证方法、分布式系统和计算机可读存储介质
JP6376869B2 (ja) データ同期システム、その制御方法、認可サーバー、およびそのプログラム
JP6141041B2 (ja) 情報処理装置及びプログラム、制御方法
JPH0581204A (ja) 分散型コンピユータシステムにおけるアクセス制御
CN108259502A (zh) 用于获取接口访问权限的鉴定方法、服务端及存储介质
US20100042840A1 (en) Content sharing system and method
US10237252B2 (en) Automatic creation and management of credentials in a distributed environment
CN111526111B (zh) 登录轻应用的控制方法、装置和设备及计算机存储介质
CN103746801A (zh) 一种智能手机或平板电脑上动态口令种子密钥保护方法
CN101547202B (zh) 处理网络上的装置的安全等级的方法和设备
CN112596740A (zh) 一种程序部署方法及装置
CN103699824A (zh) 一种调用rest api的方法、系统及客户端
CN111737232A (zh) 数据库管理方法、系统、装置、设备及计算机存储介质
CN101729508B (zh) 一种内容管理方法和装置
CN113037682A (zh) 加密通信方法、加密通信装置及加密通信系统
CN115022021B (zh) 一种访问k8s方法、系统、设备及计算机可读存储介质

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

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

Country of ref document: EP

Kind code of ref document: A1