Data range filtering method and device based on access authority and electronic equipment

By determining job access permissions and data table access permissions in the SQL database system and filtering data query conditions, the problem of insufficient automation and security of permission application during data query is solved, and flexible support and high-level support for different business scenarios and access roles is achieved. Secure data access.

CN118964380APending Publication Date: 2024-11-15EFUTURE (BEIJING) ROYALSTONE INFORMATION TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410983181.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the prior art, it is difficult for SQL database systems to automatically apply data access permission rules during data query, and cannot flexibly support the permission dimensions of different business scenarios and access roles. In addition, data security is insufficient, and there is a risk of data leakage.

Method used

By determining the job access permissions in the system database, configuring the job data scope and data table access permissions, intercepting the query conditions for data access requests, filtering out the permission data scope allowed to query based on the permission data table, and filtering the data query conditions to ensure that Only authorized persons have access to specific data ranges.

Benefits of technology

It realizes automatic application and dual limitation of data permissions, improves the database system's support capabilities for different permission dimensions, enhances data security, and prevents data leakage caused by overprivileged access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964380A_ABST
    Figure CN118964380A_ABST
Patent Text Reader

Abstract

The invention provides a data range filtering method and device based on access permission and electronic equipment, and the method comprises the steps: determining a post data range, which can be queried in a system database, of a post access permission, and configuring a table access permission for each data table in the post data range to obtain a permission data table; when an application post having the post access permission initiates a data access request to a system database, intercepting a request query condition of the data access request to determine a request access permission, and then filtering a permission data range allowed to be queried by the application post from a permission data table based on the request access permission; and finally, filtering the permission data range to obtain a filtering query condition for querying the target data table. By means of the method and device, the problems that in the prior art, the data permission dimension needs to be automatically applied to the data query condition, a database system cannot flexibly support different data permissions, and the data security of a system database is lack of guarantee due to setting of the data permissions are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data range filtering method, device and electronic device based on access rights. Background Art

[0002] In an SQL database system with a huge amount of data, in order to improve the efficiency of data query, you can consider filtering the data range to be queried according to different business scenarios and access roles of the SQL database system to narrow the scope of data query.

[0003] In the prior art, the scope of data query is limited by setting access permissions for data in SQL databases. However, the method of filtering data ranges based on data permissions faces several technical difficulties. First, SQL queries often need to be dynamically generated based on user input or system status, so the rules for data access permissions need to be automatically applied to dynamic SQL query conditions. Secondly, there is the diversity of data access permissions. For different business scenarios and access roles of the database system, different permission dimensions need to be set for the data (that is, one data may need to be set with more than two data access permissions), and the database system must also flexibly support these different permission dimensions. Furthermore, filtering the data range based on data access permissions must ensure that only authorized persons can access a specific data range, which requires the database system to have high security to prevent potential data leakage risks. Summary of the invention

[0004] The present invention provides a data range filtering method, device and electronic device based on access rights, which are used to solve the problems in the prior art that data permission dimensions need to be automatically applied to data query conditions, the database system cannot flexibly support these different data permissions, and the data security of the database system cannot be guaranteed due to the setting of data access rights.

[0005] The present invention provides a data range filtering method based on access rights, comprising the following steps: Determine the job data range that the job access right allows to query in the system database, and configure table access rights for each data table within the job data range to obtain a permission data table; When an application position having the position access right initiates a data access request to the system database, intercepting a request query condition of the data access request, and determining the requested access right according to the request query condition; Based on the requested access rights, filtering out the permission data range that the application position is allowed to query from the permission data table; The request query condition is filtered through the permission data range to obtain a filtering query condition, wherein the filtering query condition is used to query and obtain a target data table to be accessed by the data access request within the permission data range.

[0006] In some embodiments, before determining the scope of position data that the position access authority is allowed to query in the system database, the method further includes: For each application position in the system database, a position data range of the application position is set, and position access rights are configured for the application position according to the position data range.

[0007] In some embodiments, each permission data table within the job data range is provided with a permission control mode, and determining the requested access rights according to the request query condition includes: Determine the target data table to be queried by the data access request from the request query condition; When the target data table is a permission data table, the permission control mode of the permission data table is determined, and the position access rights are adjusted according to the permission control mode to obtain the requested access rights corresponding to the requested query condition.

[0008] In some embodiments, adjusting the position access rights corresponding to the application position according to the permission control method to obtain the requested access rights corresponding to the request query condition includes: When the authority control mode is all, the position access rights corresponding to the application position and the table access rights configured in the authority data table are used as the request access rights of the request query condition; When the permission control mode is customized and the table access permission configured in the permission data table is enabled, the position access permission corresponding to the application position and the table access permission of the permission data table are used as the request access permission of the request query condition; When the authority control mode is customized and the table access rights of the authority data table are not enabled, the position access rights corresponding to the application position are used as the request access rights of the request query condition.

[0009] In some embodiments, filtering the request query condition by the permission data range to obtain the filtering query condition includes: The permission data range is used as an additional query range, and query conditions are merged with the original query data range included in the request query condition to obtain a filtered data range; The request query condition is updated according to the filtering data range to obtain a filtering query condition.

[0010] In some embodiments, the method further comprises: For each application menu in the system database, determining a menu data range of the application menu, and configuring menu access rights for the application menu according to the menu data range; When an application position with position access rights initiates a menu access request to the system database, a menu query condition of the menu access request is intercepted, and a menu access right is determined according to the menu query condition; Based on the menu access rights, a list of menu data that the application position is allowed to query is filtered out from the menu data range, and the menu query conditions are filtered through the menu data list to obtain menu query filtering conditions, wherein the menu query filtering conditions are used to query from the menu data list to obtain the target application menu corresponding to the menu access request.

[0011] The present invention also provides a data range filtering device based on access rights, which specifically includes the following modules: A configuration module is used to determine the job data range that the job access authority is allowed to query in the system database, and configure the table access authority for each data table within the job data range to obtain the authority data table; a determination module, configured to intercept a request query condition of the data access request when an application position having the position access right initiates a data access request to the system database, and determine the requested access right according to the request query condition; A filtering module, configured to filter out the permission data range allowed to be queried by the application position from the permission data table based on the requested access rights; The filtering module is further used to filter the request query condition through the permission data range to obtain a filtering query condition, wherein the filtering query condition is used to query and obtain a target data table to be accessed by the data access request from within the permission data range.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a data range filtering method based on access rights as described above is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for filtering a data range based on access rights as described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for filtering data ranges based on access rights.

[0015] The data range filtering method, device and electronic device provided by the present invention based on access rights configure table access rights for each data table within the position data range of the position access rights on the basis of the application position, and obtain the permission data table. When the application position initiates a data access request, the request query condition of the data access request is intercepted to determine the request access rights, and the permission data range allowed to be queried by the application position is further filtered out from the permission data table to filter the request query condition to obtain the filtering query condition, which is used to query the target data table to be accessed by the data access request. In this way, not only the data range determined by the data permission is automatically applied to the data query condition, but also the preliminary position access rights and further table access rights are used to double-limit the data access, so that the database system can effectively and conveniently support these different permission dimensions. And the mechanism of double limitation of the data table will not cause data leakage due to unauthorized access to the data table, thereby enhancing data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a flowchart of a data range filtering method based on access rights provided by the present invention.

[0018] Figure 2 It is a schematic diagram of the permission dimension definition provided by the present invention.

[0019] Figure 3 It is a schematic diagram of the application position authority configuration provided by the present invention.

[0020] Figure 4 It is a schematic diagram of the data table permission configuration provided by the present invention.

[0021] Figure 5 It is a schematic diagram of the menu access authority configuration provided by the present invention.

[0022] Figure 6 It is a structural schematic diagram of the data range filtering device based on access rights provided by the present invention.

[0023] Figure 7 It is a schematic diagram of the physical structure of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Combine the following Figure 1 Describe the data range filtering method based on access rights of the present invention, Figure 1 is a flow chart of a data range filtering method based on access rights provided by the present invention, such as Figure 1 As shown, the method includes the following steps.

[0026] In step 101, the position data range that the position access authority is allowed to query in the system database is determined, and table access authority is configured for each data table within the position data range to obtain an authority data table.

[0027] In an embodiment of the present invention, the objects faced in the system database of the application system (representing a specific entity business system, hereinafter referred to as the system) are set as application positions, and different position access rights can be set for different application positions. Therefore, the position access rights of each application position can demarcate a position data range in the system database. According to the actual needs of the system, in an embodiment of the present invention, the application positions of the system database are divided into three application positions: stores, counter groups, and operating companies. Each application position is set with corresponding position access rights, and can only access data (tables) within a specific position data range in the database within the position access rights.

[0028] In the embodiment of the present invention, the permission dimensions are defined according to the job access rights, and the permission classification based on the job data permission maintenance is performed, that is, the store is taken as a dimension, the cabinet group is taken as a dimension, and the operating company is taken as a dimension. The following will be explained according to these three permission dimensions, but it should be noted that the number of permission dimensions is not limited, and dimensions can be further increased according to the actual situation of the system business.

[0029] See also Figure 2 , Figure 2 is a schematic diagram of the permission dimension definition provided by the present invention, such as Figure 2 As shown, referring to the defined permission dimensions, the system database defines the position access rights into three permission dimensions: store permission, cabinet group permission, and operating company permission according to the position data range. In this way, it can be determined which application positions in the system need permission configuration.

[0030] Therefore, before determining the job data range that the job access authority is allowed to query in the system database, for each application position in the system database, the job data range of the application position is set, and the job access authority is configured for the application position according to the job data range.

[0031] For example Figure 3 As shown, Figure 3 It is a schematic diagram of the application position authority configuration provided by the present invention. First, select the store position for which the authority is to be configured, set the store data range of the store position from the system database, and configure the store authority within this store data range, indicating that only users who have configured and granted store authority can access the system data (table) within the store data range.

[0032] Optionally, for some special application positions, their position data range also includes other position data ranges, so multiple position access permissions can be configured for these application positions, that is, these application positions can have multiple permission dimensions. Figure 3 As shown in the figure, for a "201 store position", it is a very special position with two permission dimensions. It can not only access data in the store data range, but also access data in the operating company data range. Therefore, in the setting column of position data permissions, store permissions and operating company permissions can be configured for "201 store position" at the same time.

[0033] After the position access rights are configured, the position data range that the position access rights are allowed to query in the system database is determined. For example, if a store position is configured with store rights, it is authorized to access data within the store data range. If a store position is configured with both store rights and operating company rights, it is authorized to access both data within the store data range and data within the operating company range.

[0034] Since the data in the system are all stored in the system database, and the data in the system database is stored in the form of a data table, the embodiment of the present invention further configures table access permissions for each data table within the job data range to obtain a permission data table.

[0035] Here, in the system, the configuration of data access rights is refined. Since the data in the system database is recorded in data tables (rows and columns), the present invention configures table access rights for each data table within the job data range, so that each data table is called an authority data table. Table access rights are still applicable to the three authority dimensions of stores, counter groups, and operating companies, indicating what kind of authority dimensions can access the current data table.

[0036] Of course, there are exceptions. For example, there are some unimportant data tables in the system database, such as some remark data tables or system-provided information tables. These data tables have no security requirements. Therefore, in order to reduce the difficulty of permission configuration, table access permissions can be configured for these unimportant data tables, and these data tables are not called permission data tables.

[0037] like Figure 4 As shown, Figure 4 This is a schematic diagram of the data table permission configuration provided by the present invention. Each row in the figure is a data table ( Figure 4 The table names of 12 data tables are given as examples in the data management type column, you can configure the table access rights for the data table (that is, the three permission dimensions of cabinet group permission, store permission, or operating company permission). This table access right is used to limit which application positions with the access rights can access the table.

[0038] In addition, after configuring table access permissions for each data table, you can also set a permission control method for each permission data table. This permission control method can be regarded as a switch, which is divided into two control methods: all and custom. It is used to configure whether the permission data table enables table access permissions (such as store permissions, cabinet group permissions) to filter the access data range. For example Figure 4 As shown, in the Data Control Column Name column, you can set the permission control method for each permission data table, that is, configure whether to use full control or custom control.

[0039] Through the setting of data permissions in the above step 101, on the basis of the application position, by configuring table access permissions for each data table within the position data range of the position access permissions, a permission data table is obtained. The use of preliminary position access permissions and further table access permissions to double-limit data access is achieved, so that each application position can access the data table according to the configured position access permissions, and each data table can be accessed according to the configured permission dimension. The database system can effectively and conveniently support these different permission dimensions. In addition, the dual permission limitation mechanism for the data table will not cause data leakage due to unauthorized access to the data table, thereby enhancing data security.

[0040] Continue to see Figure 1 In step 102, when an application position with position access rights initiates a data access request to a system database, a request query condition of the data access request is intercepted, and the requested access rights are determined according to the request query condition.

[0041] The system can handle various business requests when it is running. When a user needs to use the system to query data (tables) in the system data, he / she initiates an operation request to the system. The system will verify the user's identity and permissions by comparing the user's authentication information (user name, password, token, etc.) with the permission list. Once the login is successful, the system can obtain the user's identity and permissions. For example, it can determine the application position to which the logged-in user belongs. If it is a store position, it can be determined in the permission list that the user is authorized with store permissions and can only query data within the store data range.

[0042] After the user successfully logs into the system, a data access request will be initiated to the system database when executing data query work (by entering SQL query statements). In the embodiment of the present invention, when an application position with position access rights initiates a data access request to the system database, the request query conditions of the data access request are intercepted, that is, the system will intercept the SQL query statement entered by the user to determine the user's request query conditions, and determine the request access rights based on the request query conditions, which is explained in detail below.

[0043] When intercepting the request query conditions of the data access request, it is necessary to determine the target data table to be queried by the data access request from the request query conditions, that is, to determine the data table that the data access request needs to query, which can be determined by parsing the SQL query statement. Next, it is necessary to determine whether the target data table is a permission data table, that is, to determine whether the target data table to be queried has table access permissions configured in the system database. When the target data table is a permission data table, it is determined that the target data table is configured with table access permissions, and then the permission control method of the permission data table is further determined, and the position access permissions corresponding to the application position are adjusted according to the permission control method to obtain the request access permissions corresponding to the request query conditions.

[0044] When the permission control mode is all, it means that the table access rights do not need to verify the control module information at this time, the table access rights take effect directly, and the query data range is filtered, then the position access rights corresponding to the application position and the table access rights configured in the permission data table are used as the requested access rights for the request query condition. The requested access rights here indicate that the user can only query the target data table with the corresponding table access rights within the permission data range of the position access rights. It can be seen from this that the table access rights are further set on the basis of the position access rights, which can further narrow the query data range.

[0045] When the permission control mode is customized and the table access rights configured in the permission data table are enabled, it means that the control module information needs to be verified and the table access rights configured in the permission data table are determined. At this time, the table access rights are verified and confirmed to take effect to filter the query data range. The position access rights corresponding to the position and the table access rights of the permission data table are used as the requested access rights for the request query condition. The requested access rights here also indicate that the user can only query the target data table with the corresponding table access rights within the permission data range of the position access rights.

[0046] When the permission control mode is customized and the table access rights of the permission data table are not enabled, it means that the control module information needs to be verified and it is determined that the table access rights configured in the permission data table are not enabled. At this time, the table access rights are verified to be invalid, and there is no need to filter the query data range. The position access rights corresponding to the position will be applied as the request access rights of the request query condition. The access request rights here indicate that the user can ignore the table access rights within the permission data range of the position access rights and directly query all permission data tables.

[0047] For example, if a user with store position permissions enters the SQL query statement "select* from salecostday where scddate>= 2024-06-01 and scddate<2024-07-01" into the system database, it can be determined that the user needs to query the target data table "salecostday" in the system database, and "salecostday" is confirmed as a permission data table. Therefore, it can be confirmed that the table access permissions configured under the store position permissions are only 201 store permissions and 202 store permissions. The query data range can be filtered later so that the user's requested access permissions are only 201 store permissions and 202 store permissions under the store position permissions.

[0048] In step 103, based on the requested access rights, the permission data range that the application position is allowed to query is filtered out from the permission data table.

[0049] After determining the requested access rights corresponding to the data access request, you can filter the permission data range that the application position is allowed to query from the permission data table based on the requested access rights. Here, the data query range in the data access request can be filtered by the requested access rights of the application position. Because there are many permission data tables in the system database, the unified query efficiency is too low. Therefore, the permission data table is filtered according to the requested access rights to obtain the permission data range that the application position is allowed to query.

[0050] For example, a user's data access request needs to query the target data table "salecostday", and "salecostday" is a permission data table. The table access permissions configured under the store position permissions are only 201 store permissions and 202 store permissions. Therefore, the query data range can be filtered so that the permission data range for which the user requests access permissions is only 201 store permissions and 202 store permissions under the store position permissions. When querying data, there is no need to query all permission data tables. You only need to query "salecostday" in the permission data tables that are allowed to be accessed by 201 store permissions and 202 store permissions.

[0051] In step 104, the request query condition is filtered by the authority data range to obtain the filtering query condition, wherein the filtering query condition is used to query and obtain the target data table to be accessed by the data access request from within the authority data range.

[0052] Through step 103, after filtering out the permission data range according to the requested access rights, in order to facilitate the query, the request query condition is filtered by the permission data range to obtain the filtered query condition. Specifically, the permission data range is used as an additional query range, and the query condition is merged with the original query data range included in the request query condition to obtain the filtered data range. The additional query range here is a limited data range, and after the query condition is merged with the original query data range included in the request query condition, it is equivalent to adding a limited query condition to the request query condition, and narrowing the original query data range.

[0053] The method of query condition merging is to directly splice the additional query range as a limiting condition after the original query data range through the "and" character in the SQL query statement. This process is equivalent to the filtering process, thereby filtering to obtain a filtering request range. Finally, the request query condition is updated according to the filtering data range to obtain the filtering query condition.

[0054] For example, a user with store position permissions enters the SQL query statement "select * fromsalecostday where scddate>= 2024-06-01 and scddate<2024-07-01", indicating that the target data table "salecostday" needs to be queried in the system database, and the original query data range is "scddate>= 2024-06-01 and scddate<2024-07-01". At this time, "salecostday" is determined as a permission data table, and the table access permissions configured under the store position permissions are only 201 store permissions and 202 store permissions. The statement is "scdmkt in (201, 202)", and scdmkt is the filter field, that is, store. Next, "scdmkt in (201, 202)" is used as an additional query range and is concatenated with the original query data range "scddate>= 2024-06-01 and scddate<2024-07-01" through the "and" character to obtain the filter data range to update the request query condition and obtain the filter query condition. The SQL query statement corresponding to the filter query condition can be described as "select * from salecostday where scddate>= 2024-06-01 and scddate<2024-07-01 and scdmkt in (201, 202)".

[0055] After the filter query conditions are determined, they can be used to query the target data table to be accessed by the data access request within the scope of the permission data. The filter query conditions are sent to the system database for execution, and the system database immediately parses the SQL query statement of the filter query conditions, executes the corresponding query operation and returns the query result set.

[0056] For example, within the scope of the permission data allowed to be accessed by the 201 store permission and the 202 store permission, use the filtering query condition "select * from salecostday where scddate>=2024-06-01 and scddate<2024-07-01 and scdmkt in (201, 202)" to query the data in the "salecostday" table that meets the condition "scddate>=2024-06-01and scddate<2024-07-01".

[0057] In some embodiments, according to the application requirements of the system, the menu access rights can also be configured for each application menu in the system database on an application menu basis. Figure 5 , Figure 5 is a schematic diagram of the menu access permission configuration provided by the present invention, such as Figure 5 As shown, after logging into the system, you can select the corresponding application menu according to the specific application function module of the system, determine the menu data range of the application menu, and configure the menu access rights according to the menu data range (the permission dimensions are still the three permission dimensions of store permission, cabinet group permission, and operating company permission).

[0058] Specifically, for each application menu in the system database, the menu data range of the application menu is first determined, and the menu access rights are configured for the application menu according to the menu data range. Figure 5 As shown, the permission dimension of menu access rights is directly configured in the menu data range.

[0059] Optionally, the menu data scope of an application menu may not be limited to one permission dimension, that is, an application menu can be configured with multiple menu access permissions. For example, an application menu of "Report Management" is configured with two menu access permissions, store permission and operating company permission, according to the menu data scope. This means that application positions with position access permissions of store permission or operating company permission can access the data table of this "Report Management" application menu.

[0060] When an application position with position access rights initiates a menu access request to the system database, the menu query conditions of the menu access request are intercepted, and the menu access rights are determined according to the menu query conditions. The process of determining the menu access rights here is similar to the method of determining the requested access rights in step 102, and will not be repeated here.

[0061] Next, based on the menu access rights, filter out the menu data list that the application position is allowed to query from the menu data range, and filter the menu query conditions through the menu data list to obtain the menu query filter conditions. For example, if the menu access rights of an application position are store rights, then the menu data list that is configured with store rights can be filtered out from the menu data range.

[0062] Finally, the menu query conditions are filtered through the menu data list, that is, the menu data list is used as an additional query range, and the query conditions are merged with the original menu query data range included in the menu query conditions to obtain the menu filter data range, and the menu filter data range is used to update the menu query conditions to obtain the menu query filter conditions. This menu query filter condition is used to query the target application menu corresponding to the menu access request from the menu data list.

[0063] Therefore, from the perspective of the application menu of the system, data permissions can also be set to filter the query data range, which can effectively improve the efficiency of data query for the query requirements of the application menu. Of course, the embodiment of the present invention can also set data permissions from other perspectives of the system, such as from the perspective of the functional items (modules) of the system and the perspective of the specific business items (modules). On the basis of these perspectives, the data range filtering method based on access rights provided by the present invention can be adopted to obtain the same technical effect. Since the filtering method used is the same, the specific method process will not be repeated here, only to illustrate that the embodiment of the present invention does not specifically limit the perspective from which the filtering method is adopted.

[0064] In some embodiments, the data range filtering method based on access rights provided by the present invention can be deployed in a plug-in, and then the plug-in is installed in the entity business system for use. Every time the system runs the plug-in to query data, the system processes the result set returned by the system database to meet the specific needs of the system front-end application, such as data formatting or paging, to obtain specific data results. And the system will also respond to the user with the processed specific data results. If the user does not have access rights, the corresponding error message or empty data is returned. At each query, the plug-in will record the system's operation log, including user information, request time, operation type, requested permission data range and returned data results, for auditing and monitoring. In addition, the plug-in is also designed with an exception handling mechanism that can properly handle abnormal situations such as permission verification failure, SQL injection attacks, and database connection failures.

[0065] Through the embodiment of the present application, on the basis of the application position, by configuring table access rights for each data table within the position data range of the position access rights, a permission data table is obtained. When the application position initiates a data access request, the request query condition of the data access request is intercepted to determine the request access rights, and the permission data range allowed to be queried by the application position is further filtered out from the permission data table to filter the request query condition to obtain the filtering query condition, which is used to query the target data table to be accessed by the data access request. In this way, not only the data range determined by the data authority is automatically applied to the data query condition, but also the preliminary position access rights and further table access rights are used to double-limit the data access, so that the database system can effectively and conveniently support these different permission dimensions. And the mechanism of double limitation of the data table will not cause data leakage due to unauthorized access to the data table, thereby enhancing data security.

[0066] The data range filtering device based on access rights provided by the present invention is described below. The data range filtering device based on access rights described below and the data range filtering method based on access rights described above can correspond to each other.

[0067] Figure 6 is a schematic diagram of the structure of the data range filtering device based on access rights provided by the present invention, such as Figure 6 As shown, the present invention provides a data range filtering device based on access rights, and the device specifically includes: a configuration module 601, a determination module 602, and a filtering module 603. Among them, the configuration module 601 is used to determine the job data range that the job access rights allow to be queried in the system database, and configure the table access rights for each data table within the job data range to obtain the permission data table; the determination module 602 is used to intercept the request query conditions of the data access request when the application position with the job access rights initiates a data access request to the system database, and determine the request access rights according to the request query conditions; the filtering module 603 is used to filter out the permission data range that the application position allows to be queried from the permission data table based on the request access rights; the filtering module 603 is also used to filter the request query conditions by the permission data range to obtain the filter query conditions, wherein the filter query conditions are used to query and obtain the target data table to be accessed by the data access request from the permission data range.

[0068] Specifically, the above-mentioned data range filtering device based on access rights provided by the present invention can implement all the method steps implemented by the above-mentioned data range filtering method embodiment based on access rights, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.

[0069] Figure 7 is a schematic diagram of the physical structure of an electronic device provided by the present invention, such as Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to perform data range filtering based on access rights, the method comprising: determining the position data range that the position access rights allow to be queried in the system database, and configuring table access rights for each data table within the position data range to obtain an access rights data table; when the application position with the position access rights initiates a data access request to the system database, intercepting the request query condition of the data access request, and determining the request access rights according to the request query condition; based on the request access rights, filtering out the access data range that the application position allows to be queried from the access rights data table; filtering the request query condition through the access rights data range to obtain a filter query condition, wherein the filter query condition is used to query and obtain the target data table to be accessed by the data access request from the access rights data range.

[0070] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0071] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data range filtering method based on access rights provided by the above methods, which method includes: determining the position data range that the position access rights allow to be queried in the system database, and configuring table access rights for each data table within the position data range to obtain a permission data table; when an application position with the position access rights initiates a data access request to the system database, intercepting the request query conditions of the data access request, and determining the request access rights according to the request query conditions; based on the request access rights, filtering out the permission data range that the application position is allowed to query from the permission data table; filtering the request query conditions through the permission data range to obtain a filtering query condition, wherein the filtering query condition is used to query and obtain the target data table to be accessed by the data access request from within the permission data range.

[0072] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the data range filtering method based on access rights provided by the above-mentioned methods, the method comprising: determining the position data range that the position access rights allow to be queried in the system database, and configuring table access rights for each data table within the position data range to obtain a permission data table; when an application position with the position access rights initiates a data access request to the system database, intercepting the request query conditions of the data access request, and determining the request access rights according to the request query conditions; based on the request access rights, filtering out the permission data range that the application position is allowed to query from the permission data table; filtering the request query conditions through the permission data range to obtain a filtering query condition, wherein the filtering query condition is used to query and obtain a target data table to be accessed by the data access request from within the permission data range.

[0073] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0074] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data range filtering method based on access rights, characterized in that: The method comprises: Determine the job data range that the job access right allows to query in the system database, and configure table access rights for each data table within the job data range to obtain a permission data table; When an application position having the position access right initiates a data access request to the system database, intercepting a request query condition of the data access request, and determining the requested access right according to the request query condition; Based on the requested access rights, filtering out the permission data range that the application position is allowed to query from the permission data table; The request query condition is filtered through the permission data range to obtain a filtering query condition, wherein the filtering query condition is used to query and obtain a target data table to be accessed by the data access request within the permission data range.

2. The data range filtering method based on access rights according to claim 1, characterized in that: Before determining the job data range that the job access authority is allowed to query in the system database, the method further includes: For each application position in the system database, a position data range of the application position is set, and position access rights are configured for the application position according to the position data range.

3. The data range filtering method based on access rights according to claim 1, characterized in that: Each authority data table within the job data range is provided with an authority control mode, and the request access authority is determined according to the request query condition, including: Determine the target data table to be queried by the data access request from the request query condition; When the target data table is a permission data table, the permission control mode of the permission data table is determined, and the position access rights are adjusted according to the permission control mode to obtain the requested access rights corresponding to the requested query condition.

4. The data range filtering method based on access rights according to claim 3 is characterized in that: The step of adjusting the position access rights corresponding to the application position according to the permission control method to obtain the request access rights corresponding to the request query condition includes: When the authority control mode is all, the position access rights corresponding to the application position and the table access rights configured in the authority data table are used as the request access rights of the request query condition; When the permission control mode is customized and the table access permission configured in the permission data table is enabled, the position access permission corresponding to the application position and the table access permission of the permission data table are used as the request access permission of the request query condition; When the authority control mode is customized and the table access rights of the authority data table are not enabled, the position access rights corresponding to the application position are used as the request access rights of the request query condition.

5. The data range filtering method based on access rights according to claim 1, characterized in that: The filtering of the request query condition by the permission data range to obtain the filtering query condition includes: The permission data range is used as an additional query range, and query conditions are merged with the original query data range included in the request query condition to obtain a filtered data range; The request query condition is updated according to the filtering data range to obtain a filtering query condition.

6. The data range filtering method based on access rights according to claim 1, characterized in that: The method further comprises: For each application menu in the system database, determining a menu data range of the application menu, and configuring menu access rights for the application menu according to the menu data range; When an application position with position access rights initiates a menu access request to the system database, a menu query condition of the menu access request is intercepted, and a menu access right is determined according to the menu query condition; Based on the menu access rights, a list of menu data that the application position is allowed to query is filtered out from the menu data range, and the menu query conditions are filtered through the menu data list to obtain menu query filtering conditions, wherein the menu query filtering conditions are used to query from the menu data list to obtain the target application menu corresponding to the menu access request.

7. A data range filtering device based on access rights, characterized in that: The device comprises: A configuration module is used to determine the job data range that the job access authority is allowed to query in the system database, and configure the table access authority for each data table within the job data range to obtain the authority data table; a determination module, configured to intercept a request query condition of the data access request when an application position having the position access right initiates a data access request to the system database, and determine the requested access right according to the request query condition; A filtering module, configured to filter out the permission data range allowed to be queried by the application position from the permission data table based on the requested access rights; The filtering module is further used to filter the request query condition through the permission data range to obtain a filtering query condition, wherein the filtering query condition is used to query and obtain a target data table to be accessed by the data access request from within the permission data range.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for filtering a data range based on access rights as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for filtering data range based on access rights as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, a data range filtering method based on access rights as described in any one of claims 1 to 6 is implemented.