Data request processing method and device, equipment and storage medium

By parsing tenant and job information in the SaaS platform and querying and comparing data permissions, the problem of inaccurate permission control in existing technologies is solved, multi-dimensional permission management is achieved, and the security and flexibility of system data are improved.

CN121327872APending Publication Date: 2026-01-13BEIJING BAIJU YIXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511189677.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing SaaS platform permission management struggles to achieve precise permission control at both the tenant and data object levels, leading to either overly open or overly restrictive permissions, increasing the risk of data leakage, and failing to meet the complex business scenarios and ever-changing permission management needs.

Method used

By receiving users' data access requests, parsing tenant and job information, querying the data permissions associated with tenants and jobs from the permission database, comparing them, determining the user's target data permissions, and responding to access requests only when the user has dual permissions, multi-dimensional permission control is achieved.

Benefits of technology

It improves the security of system data, avoids data leakage caused by single access control, achieves precise data access management, and enhances the security and flexibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121327872A_ABST
    Figure CN121327872A_ABST
Patent Text Reader

Abstract

The invention relates to a data request processing method and device, computer equipment and a storage medium, and the method comprises the steps: receiving a data access request, and analyzing user information and request information from the data access request; if the data access request is used for requesting system service data, analyzing a request parameter of a data request object from the request information; obtaining a tenant identifier from the user information, and querying a data permission associated with a tenant to which the user belongs according to the tenant identifier; acquiring a post identifier from the user information, and querying a data permission associated with a post to which the user belongs according to the post identifier; comparing the data authority associated with the tenant with the data authority associated with the post to obtain a target data authority of the user; and identifying whether the user has the data permission of the data request object according to the request parameter and the target data permission, and if yes, responding to the data access request. According to the method, the security of system data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data request processing method, apparatus, computer equipment, and storage medium. Background Technology

[0002] In the SaaS model, multiple tenants share the same software service and underlying data storage. Different tenants may have different business needs and data access permission requirements. How to efficiently and accurately verify data permissions for different tenants and users while ensuring data security is a problem that needs to be solved.

[0003] Existing SaaS platform access control, based on simple, single-dimensional permission settings and broad role-based access control (RBAC), struggles to meet the increasingly complex business scenarios and ever-changing access management needs. For example, in financial SaaS platforms, different investment departments have extremely granular access requirements for customer asset and transaction data. Simple RBAC cannot precisely customize permissions at the tenant and data object levels based on the specific business characteristics and data sensitivity differences of each department. This leads to either overly open or overly restrictive permissions, increasing the risk of data leaks and hindering flexible business operations. Summary of the Invention

[0004] Therefore, it is necessary to provide a data request processing method, apparatus, computer equipment, and storage medium to address the aforementioned technical problems. This method can set up multi-dimensional access control, enabling precise access control at the tenant and data object levels, thereby improving the security of system data.

[0005] This application provides a data request processing method, comprising: receiving a data access request initiated by a user through a SaaS application, and parsing the user's user information and request information from the data access request; if the request information identifies that the data access request is for requesting system business data, then parsing the request parameters of the data request object from the request information; obtaining a tenant identifier from the user information, and querying the data permissions associated with the user's tenant from the tenant table in the permission database based on the tenant identifier; obtaining a job identifier from the user information, and querying the data permissions associated with the user's job from the job table in the permission database based on the job identifier; comparing the data permissions associated with the tenant with the data permissions associated with the job to obtain the user's target data permissions, wherein the target data permissions belong to both the data permissions associated with the tenant and the data permissions associated with the job; and identifying whether the user has the data permissions for the data request object based on the request parameters and the target data permissions, and if so, responding to the data access request.

[0006] Preferably, responding to a data access request includes: sending a data request object to a downstream service based on the request parameters; receiving the target system business data returned by the downstream service; and, when it is confirmed that the tenant has the data permission for the target system business data and the position has the data permission for the target system business data, feeding back the target system business data to the user's SaaS application.

[0007] Preferably, a data request processing method further includes: configuring the data permissions of the city, the transportation company, and the fleet of each system business data of the downstream service; identifying whether the user has the data permissions of the data request object based on the request parameters and the target data permissions, including: if the request parameters include the target city or the transportation company or the fleet of the target city, and the target data permission is the data permission of the target city, then it is determined that the user has the data permissions of the data request object; if the request parameters include the transportation company or the fleet of the transportation company, and the target data permission is the data permission of the transportation company, then it is determined that the user has the data permissions of the data request object; if the request parameters include the fleet, and the target data permission is the data permission of the fleet, then it is determined that the user has the data permissions of the data request object.

[0008] Preferably, a data request processing method further includes: if the data access request is identified as a request for system resources through the request information, then the request parameters of the data request object are parsed from the request information; a tenant identifier is obtained from the user information, and the resource permissions associated with the user's tenant are queried from the tenant table of the permission database based on the tenant identifier; a job identifier is obtained from the user information, and the resource permissions associated with the user's job are queried from the job table of the permission database based on the job identifier; the resource permissions associated with the tenant are compared with the resource permissions associated with the job to obtain the user's target resource permissions, wherein the target resource permissions belong to both the resource permissions associated with the tenant and the resource permissions associated with the job; and the user is identified as having the resource permissions for the data request object based on the request parameters and the target resource permissions, and if so, the data access request is responded to.

[0009] Preferably, a data request processing method further includes: creating a user's job posting, configuring the user's job posting's role and data permissions, and configuring the role's resource permissions; configuring the user's job posting to the job posting table in the permissions database; configuring the user's job posting's role to the role table in the permissions database, and configuring the role's resource permissions to the role's permission table in the permissions database; configuring the user's job posting's data permissions to the job posting permission table in the permissions database; querying the resource permissions associated with the user's job posting from the job posting table in the permissions database based on the job posting identifier, including: querying the user's job posting from the job posting table in the permissions database based on the job posting identifier; querying the role table based on the user's job posting to obtain the job posting's role; querying the role permission table based on the job posting's role to obtain the role's resource permissions, wherein the role's resource permissions are the resource permissions associated with the job posting; and querying the data permissions associated with the user's job posting from the job posting table in the permissions database based on the job posting identifier, including: querying the user's job posting from the job posting table in the permissions database based on the job posting identifier; and querying the job posting permission table based on the user's job posting to obtain the job posting's data permissions.

[0010] Preferably, a data request processing method further includes: when it is detected that a tenant has modified or deleted any one or more of the user's job role, the user's job data permissions, and the role's resource permissions through the job management interface, updating the role table, the role permission table, or the job permission table based on the tenant's modification or deletion operation.

[0011] Preferably, a data request processing method further includes: creating a tenant table, in which the identification information and name information of each tenant are recorded; creating a tenant permission table, in which the data permissions of each tenant and the identification of each tenant are recorded; and querying the data permissions associated with the user's tenant from the tenant table in the permission database based on the tenant identification, including: querying the identification of the user's tenant from the tenant table in the permission database based on the tenant identification; and querying the data permissions associated with the user's tenant from the tenant permission table based on the identification of the user's tenant.

[0012] This application also provides a data request processing apparatus, comprising: a first parsing module, configured to receive a data access request initiated by a user through a SaaS application, and parse user information and request information from the data access request; a second parsing module, configured to, if the request information indicates that the data access request is for requesting system business data, parse request parameters of the data request object from the request information; a first query module, configured to obtain a tenant identifier from the user information, and query the data permissions associated with the user's tenant from the tenant table of the permission database based on the tenant identifier; a second query module, configured to obtain a job identifier from the user information, and query the data permissions associated with the user's job from the job table of the permission database based on the job identifier; an acquisition module, configured to compare the data permissions associated with the tenant with the data permissions associated with the job to obtain the user's target data permissions, wherein the target data permissions belong to both the data permissions associated with the tenant and the data permissions associated with the job; and a response module, configured to, based on the request parameters and the target data permissions, determine whether the user possesses the data permissions for the data request object, and if so, respond to the data access request.

[0013] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described above.

[0014] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.

[0015] The aforementioned data request processing method, apparatus, computer equipment, and storage medium receive data access requests initiated by users through SaaS applications and parse user information and request information from the data access requests. If the request information indicates that the data access request is for requesting system business data, the request parameters of the data request object are parsed from the request information. A tenant identifier is obtained from the user information, and the user's associated data permissions are queried from the tenant table of the permission database based on the tenant identifier. A job identifier is obtained from the user information, and the user's associated data permissions are queried from the job table of the permission database based on the job identifier. The tenant-associated data permissions are compared with the job-associated data permissions to obtain the user's target data permissions, which are both tenant-associated and job-associated data permissions. Based on the request parameters and target data permissions, it is determined whether the user possesses the data permissions for the data request object; if so, the data access request is responded to. Therefore, upon receiving a user's data access request, the system can determine whether the user possesses the data permissions for the data request object based on the user's tenant-level and job-level data permissions, and respond to the user's data access request, avoiding the leakage of system business data due to single-access control and improving the security of system business data. Attached Figure Description

[0016] Figure 1 This is an application environment diagram of a data request processing method in one embodiment;

[0017] Figure 2 This is a flowchart illustrating a data request processing method in one embodiment;

[0018] Figure 3 This is a schematic diagram of the database table structure in one embodiment;

[0019] Figure 4 This is a flowchart illustrating a data request processing method in a specific example.

[0020] Figure 5 This is a structural block diagram of a data request processing device in one embodiment;

[0021] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0023] The technical terms used in this application specification are explained as follows:

[0024] SaaS stands for Software as a Service. It is a model that delivers software services via the internet based on cloud computing technology. In this model, multiple tenants share the same software system and underlying infrastructure. Tenants do not need to install the software locally; they can use the software functions simply through a client such as a browser. This greatly reduces software deployment and maintenance costs and improves the convenience and flexibility of software use.

[0025] Tenant: Refers to different customers or organizations using the SaaS platform services. Each tenant has independent business needs, organizational structure, and data access permissions on the SaaS platform. Strict isolation and customized management of data between tenants are achieved through a multi-layered data permission verification mechanism.

[0026] Role: Within a tenant, a role is the packaged entity for page / button functionality. Different roles have different page operation permissions.

[0027] Job Role: Within a tenant's organization, this refers to a set of permissions based on different job responsibilities and functions. Different job roles have different roles and data permissions.

[0028] Data permissions: When a user accesses a page, the data will be returned based on the user's permissions for the city / transportation company / fleet.

[0029] This application provides a data request processing method, applicable to, for example, Figure 1 The application environment shown. For example... Figure 1As shown, the SaaS platform 200 is used to execute a data request processing method according to this application. Specifically, a SaaS application is installed on the terminal device 100. The user sends a data access request to the SaaS platform 200 through the SaaS application on the terminal device 100. The SaaS platform 200 receives the data access request initiated by the user through the SaaS application and parses the user's user information and request information from the data access request; if the request information identifies that the data access request is for requesting system business data, the request parameters of the data request object are parsed from the request information; the tenant identifier is obtained from the user information, and the data permissions associated with the user's tenant are queried from the tenant table of the permission database based on the tenant identifier; the job identifier is obtained from the user information, and the data permissions associated with the user's job are queried from the job table of the permission database based on the job identifier; the data permissions associated with the tenant are compared with the data permissions associated with the job to obtain the user's target data permissions, which belong to both the tenant-associated data permissions and the job-associated data permissions; the user is identified as having the data permissions for the data request object based on the request parameters and the target data permissions, and if so, the data access request is responded to. The terminal device 100 can be a mobile phone, tablet computer, etc.

[0030] In one embodiment, such as Figure 2 As shown, a data request processing method is provided, which is applied to... Figure 1 Taking the SaaS platform 200 as an example, the following steps are included:

[0031] S201 receives data access requests initiated by users through SaaS applications and parses user information and request information from the data access requests.

[0032] In this embodiment, a user initiates a data access request through a SaaS application. The SaaS platform immediately intercepts the request and parses the user information and request information from the token in the data access request. The user information includes user ID, tenant ID, and job ID, etc. The request information includes the request operation type, the identifier of the data request object, and request parameters, etc. The request operation type is query or modification.

[0033] S202, if the request information identifies that the data access request is for requesting system business data, then the request parameters of the data request object are parsed from the request information.

[0034] In this embodiment, the request information includes the identifier of the data request object and request parameters. The identifier of the data request object allows identification of the data request object, thereby determining the type of user request. For example, a request for system business data or a request for system resources. If it is a request for system business data, the request parameters of the data request object are parsed from the request information. The request parameters include the identifier of the data request object.

[0035] S203: Obtain the tenant identifier from the user information, and query the data permissions associated with the user's tenant from the tenant table in the permissions database based on the tenant identifier.

[0036] In this embodiment, a tenant identifier, such as a tenant ID, is obtained from the user information. This tenant identifier is used to identify the tenant to which the user belongs. Then, the data permissions associated with the user's tenant are queried from the tenant table in the permissions database. The tenant table is pre-configured in the permissions database, containing multiple tenants, each associated with corresponding data permissions. Alternatively, the tenant table can be cached, and when a user's data access request is received, the tenant table is retrieved from the cache for data processing. If the cached tenant table records the user's tenant, the SaaS platform directly uses the cached data to proceed to the next verification step, significantly improving the efficiency of permission verification. If the cached tenant table does not record the user's tenant, the tenant table is accessed from the permissions database to check whether the administrator has added the user's tenant information through a tenant table update.

[0037] S204. Obtain the job identifier from the user information, and query the data permissions associated with the user's job in the job table of the permission database based on the job identifier.

[0038] In this embodiment, a job identifier, such as a job ID, is obtained from the user information. This job identifier is used to identify the user's job position. Then, the data permissions associated with the user's job position are queried from the job table in the permission database. The job table is pre-configured in the permission database, containing multiple job positions, each associated with corresponding data permissions. Alternatively, the job table can be cached. When a user's data access request is received, the job table is retrieved from the cache for data processing. If the cached job table records the user's job position, the SaaS platform directly uses the cached data to proceed to the next verification step, significantly improving the efficiency of permission verification. If the cached job table does not record the user's job position, the job table is accessed from the permission database to check whether the administrator has added the user's job position information through a job table update.

[0039] S205 compares the data permissions associated with the tenant with the data permissions associated with the job position to obtain the user's target data permissions. The target data permissions belong to both the data permissions associated with the tenant and the data permissions associated with the job position.

[0040] In this embodiment, the data permissions associated with a user's tenant can be one or more, and the data permissions associated with a user's job position can also be one or more. The data permissions of both are compared, and the target data permissions that fall within both the tenant-related and job-related data permission categories are selected. For example, if the data permissions associated with a user's tenant include data permission A, data permission B, and data permission C, and the data permissions associated with a user's job position include data permission B, data permission C, and data permission D, then the target data permissions include data permission B and data permission C.

[0041] S206: Based on the request parameters and target data permissions, determine whether the user has the data permissions for the requested data object. If so, respond to the data access request.

[0042] In this embodiment, the request parameters include the identifier of the data request object, and the target data permission includes the identifier of the data object. For example, the request parameters include the identifier of city A, and the target data permission includes the identifier of city B. If the identifier of the data request object in the request parameters matches the identifier of the data object in the target data permission, then it is determined that the user has the data permission to access the data request object. Otherwise, it is determined that the user does not have the data permission to access the data request object. For example, if the request parameters include the identifier of city A, then the request object of the data access request is the system business data of city A. If the target data permission includes the identifier of city A, and the target data permission is the data permission of city A, then it is determined that the user has the data permission to access the system business data of city A. Therefore, dual data permission control of system business data is achieved from the tenant level and from the job level, preventing users from accessing system business data with only a single dimension of data permission. For example, it prevents the leakage of system business data caused by users only meeting the tenant's data permission or only meeting the job's data permission.

[0043] The aforementioned data request processing method receives a data access request initiated by a user through a SaaS application and parses the user's information and request information from the request. If the request information indicates that the data access request is for requesting system business data, the request parameters of the data request object are parsed from the request information. The tenant identifier is obtained from the user information, and the data permissions associated with the user's tenant are queried from the tenant table in the permissions database based on the tenant identifier. The job identifier is obtained from the user information, and the data permissions associated with the user's job are queried from the job table in the permissions database based on the job identifier. The tenant-associated data permissions are compared with the job-associated data permissions to obtain the user's target data permissions, which are both tenant-associated and job-associated. Based on the request parameters and target data permissions, it is determined whether the user possesses the data permissions for the requested data object. If so, the data access request is responded to. Therefore, upon receiving a user's data access request, the system can determine whether the user possesses the data permissions for the requested data object based on the user's tenant-level and job-level data permissions, and respond to the user's data access request accordingly. This avoids the leakage of system business data caused by single-access control and improves the security of system business data.

[0044] In one embodiment, step S206 above, responding to a data access request, includes: sending a data request for a data request object to a downstream service according to the request parameters; receiving target system business data returned by the downstream service; and, when it is confirmed that the tenant has data permissions for the target system business data and the job position has data permissions for the target system business data, feeding back the target system business data to the user's SaaS application.

[0045] In this embodiment, it is determined whether the request parameters fall within the user's permission scope. If so, the downstream service is invoked to query the target system business data of the data request object, and a second permission verification is performed on the returned target system business data to determine whether the returned target system business data is within the permission scope of the user's tenant and their assigned role, thus preventing data unauthorization.

[0046] In one example, prior to the step of identifying whether a user has data permissions for the data request object based on request parameters and target data permissions, a data request processing method further includes: configuring the data permissions for the city, the transportation company, and the fleet of each system business data of the downstream service; wherein, the step of identifying whether a user has data permissions for the data request object based on request parameters and target data permissions includes: if the request parameters include a target city or a transportation company or a fleet of the target city, and the target data permission is the data permission for the target city, then it is determined that the user has data permissions for the data request object; if the request parameters include a transportation company or a fleet of the transportation company, and the target data permission is the data permission for the transportation company, then it is determined that the user has data permissions for the data request object; if the request parameters include a fleet, and the target data permission is the data permission for the fleet, then it is determined that the user has data permissions for the data request object.

[0047] Specifically, when a user has data access to a city, they are considered to have data access to all transportation companies / fleets within that city. Similarly, when a user has data access to a transportation company, they are considered to have data access to all fleets within that company. Therefore, more detailed data permissions are no longer recorded, significantly reducing the size of user data permissions and the amount of permission data stored in the database.

[0048] In one example, after step S201 above, i.e., after parsing the user's information and request information from the data access request, a data request processing method further includes: if the request information identifies that the data access request is for requesting system resources, then parsing the request parameters of the data request object from the request information; obtaining the tenant identifier from the user information, and querying the resource permissions associated with the user's tenant from the tenant table of the permission database based on the tenant identifier; obtaining the job identifier from the user information, and querying the resource permissions associated with the user's job from the job table of the permission database based on the job identifier; comparing the resource permissions associated with the tenant with the resource permissions associated with the job to obtain the user's target resource permissions, wherein the target resource permissions belong to both the resource permissions associated with the tenant and the resource permissions associated with the job; and identifying whether the user has the resource permissions of the data request object based on the request parameters and the target resource permissions, and if so, responding to the data access request.

[0049] In this example, the data request object can be identified by its identifier, thus determining the user's request type. For example, it could be a request for system business data or a request for system resources. If it's a request for system resources, the request parameters of the data request object are parsed from the request information, and the tenant identifier and job identifier are extracted from the user information. The tenant identifier identifies the resource permissions of the user's tenant, and the job identifier identifies the resource permissions of the user's job position. By comparing these, the target resource permissions—requirements associated with both the tenant and the job position—are determined. The request parameters carry the identifier of the data request object. Therefore, based on the request parameters and the target resource permissions, it's determined whether the user possesses the resource permissions for the data request object.

[0050] Data permissions refer to a user's access rights to system business data. Resource permissions refer to a user's access rights to system resources. For example, data permissions could be a user's permission to access system-configured business data related to city vehicle management. Resource permissions could be a user's permission to access system-configured resources such as functions, like having permission to use the "query" function.

[0051] In one example, prior to step S201 above, i.e., before receiving the data access request initiated by the user through the SaaS application, a data request processing method further includes: creating a user's job posting, configuring the user's job posting's roles and data permissions, and configuring the role's resource permissions; configuring the user's job posting to the job posting table in the permissions database; configuring the user's job posting's roles to the role table in the permissions database, and configuring the role's resource permissions to the role's permission table in the permissions database; configuring the user's job posting's data permissions to the job posting permission table in the permissions database; wherein, the above-mentioned querying the resource permissions associated with the user's job posting from the job posting table in the permissions database based on the job posting identifier includes: querying the user's job posting from the job posting table in the permissions database based on the job posting identifier; querying the role table based on the user's job posting to obtain the job posting's role; querying the role permission table based on the job posting's role to obtain the role's resource permissions, wherein the role's resource permissions are the resource permissions associated with the job posting; wherein, the above-mentioned querying the data permissions associated with the user's job posting from the job posting table in the permissions database based on the job posting identifier includes: querying the user's job posting from the job posting table in the permissions database based on the job posting identifier; querying the job posting permission table based on the user's job posting to obtain the job posting's data permissions.

[0052] Furthermore, in one example, prior to step S201 above, i.e., before receiving the data access request initiated by the user through the SaaS application, a data request processing method further includes: creating a tenant table, which records the identification information and name information of each tenant; creating a tenant permission table, which records the data permissions of each tenant and the identification of each tenant; and querying the data permissions associated with the user's tenant from the tenant table in the permission database based on the tenant identification, including: querying the identification of the user's tenant from the tenant table in the permission database based on the tenant identification; and querying the data permissions associated with the user's tenant from the tenant permission table based on the identification of the user's tenant.

[0053] Specifically, tenant-level permissions are defined: When a new tenant joins the SaaS platform, the system creates a default super administrator account, super administrator role, and super administrator position for the tenant based on the information submitted by the tenant, and assigns all platform data permissions to the position. Furthermore, for specific positions, role permissions and data permissions are configured. Specifically, tenants can freely create various positions on the platform and assign resource and data permissions to these positions. Data permission configuration: Data permission configuration is applied to the platform's system business data across three dimensions: city, transportation company, and fleet. Users must possess the corresponding data permissions to access the relevant system business data.

[0054] In addition, user accounts, positions, roles, and data permissions are configured and stored in corresponding data tables. This departs from conventional data permission storage methods and instead employs an optimized database table structure. Specifically, for example... Figure 3 As shown: Create independent and closely related user information tables, user account-job relationship tables, job information tables, role tables, and job data permission tables. The job data permission tables include job-city relationship tables, job-transportation company relationship tables, and job-fleet relationship tables. The role tables include user-role relationship tables, role information tables, role-resource relationship tables, and resource tables.

[0055] The user information table records detailed key tenant information, such as tenant ID, name, creation time, and industry type, providing fundamental support for tenant-level access control. The role table stores role ID, name, associated tenant ID, and role description. The job information table stores job name and description, clearly defining the job's position and responsibilities within the tenant environment. The job data permission table records the data permissions for each job across city / transportation company / fleet, constructing a complete multi-level permission relationship network. This design not only ensures data integrity and consistency but also significantly improves the efficiency of querying and updating permission data.

[0056] The traditional model directly associates users with roles, and roles are then associated with resources. In this embodiment, as shown... Figure 3As shown, the resources and data permissions (city / transportation company / fleet) of a role are packaged into the job position, so users only need to focus on the job information. The resources bound to the role include, for example, the pages and buttons that users can see on the system interface.

[0057] Furthermore, when it is detected that a tenant has modified or deleted any one or more of the user's job role, the user's job data permissions, and the role's resource permissions through the job management interface, the role table, role permission table, or job permission table is updated based on the tenant's modification or deletion operation.

[0058] Specifically, when a tenant needs to adjust user permissions, the administrator logs into the job management interface and modifies the job's data permissions. When the system detects that any one or more of the job's role, the user's job's data permissions, or the role's resource permissions have been modified or deleted, it updates the cached data permissions in real time based on the modification or deletion operation, ensuring that subsequent permission verification uses the latest permission configuration.

[0059] Furthermore, sensitive data in the job table, role table, role permission table, job permission table, tenant table, and tenant permission table are encrypted. Data permissions or resource permissions in the job table, role table, role permission table, job permission table, tenant table, and tenant permission table that have an access frequency greater than a set frequency value are cached. When it is confirmed that the data permissions associated with the user information in the data access request and the data permissions associated with the job are cached, the data permissions associated with the user's tenant and the data permissions associated with the user's job are retrieved from the cache.

[0060] Specifically, data encryption and caching technologies are introduced. For data encryption, high-strength encryption algorithms (such as AES) are used to encrypt and store sensitive information in the permission database, such as user passwords and core permission configurations for key data objects, effectively preventing unauthorized theft or tampering during storage. Simultaneously, an efficient caching system is built to cache frequently accessed permission data, such as permission sets for common roles and the overall permission scope for tenants. When a user initiates a data access request, the system first quickly queries the cache. If the cache is hit, the cached data is directly used for permission verification, significantly shortening the verification response time. If the cache is not hit, the system queries and loads the data permissions from the permission database, and simultaneously updates the cache with the query results for subsequent use. This combination of caching and encryption technologies significantly improves the overall performance of the system while ensuring data security.

[0061] The data request processing method described in the above embodiments enables fine-grained and flexible data access control and efficient and secure data storage and access. Fine-grained and flexible data access control: It innovatively constructs a multi-dimensional access model, breaking through traditional limitations. At the tenant level, it can accurately delineate data access boundaries based on each tenant's business, architecture, and security policies, achieving strict data isolation and customized control between tenants. Efficient and secure data storage and access: Access data storage and management, on the one hand, optimizes the design of data table structures, ensuring data integrity and consistency through independent and related tenant tables, job permission tables, and permission association tables, significantly improving the efficiency of access data query and update. On the other hand, it introduces cutting-edge encryption and caching technologies, using high-strength encryption algorithms to encrypt and store sensitive access data, preventing data theft or tampering; it constructs an efficient caching system, caching frequently accessed access data, prioritizing cache queries when users request data, shortening verification response time, ensuring data security while significantly improving overall system performance.

[0062] In one specific embodiment, such as Figure 4 As shown, a data request processing method includes the following steps:

[0063] 1. System initialization: Create a unique tenant ID for each tenant and a super administrator user role for each tenant.

[0064] 2. User Registration and Permission Assignment: When creating a tenant account, select a role for each account. Based on the user's actual business needs, specific data permissions (city / transportation company / fleet) can be added or modified for the user through the role management interface.

[0065] 3. Permission Verification Process: When a user accesses the page to retrieve data, the service first intercepts the request, parses the user information based on the request token, and then queries the tenant's city / transportation company / fleet data based on the user's tenant. Next, it uses the user ID to find the user's job information, and then uses the job ID to find the city / transportation company / fleet data associated with that job, filtering out city / transportation company / fleet data not belonging to the tenant. It then checks if the city / transportation company / fleet in the request parameters exists within the user's permission range. If so, it calls the downstream service to retrieve the data and performs a second permission verification on the returned data, checking if the returned data belongs to the user's tenant and that the city / transportation company / fleet carried in the returned data is within the user's permission range to prevent unauthorized data access.

[0066] Specifically, (1) Initialize the permission model construction process:

[0067] Tenant-level permission definition: When a new tenant is added to the SaaS platform, the system creates a default super administrator account, super administrator role, and super administrator position for the tenant based on the information submitted by the tenant, and assigns all data permissions of the platform to the position.

[0068] Detailed role permissions: Tenants can freely create various roles on the platform and assign role resources and data permissions to these roles.

[0069] Data object permission configuration: The platform's data is tagged with three dimensions: city, transportation company, and fleet. Users are required to specify which city, transportation company, or fleet permissions they have to access / operate on the page.

[0070] (2) Data access request verification process:

[0071] Request interception and parsing: When a user initiates a data access request through a SaaS application, the system immediately intercepts it, parses the request data packet to obtain the user ID, the request operation type (such as query or modification), and the identifier of the target data object.

[0072] Cache data query: The system prioritizes querying the cache to check if the user's frequently used permission set and the permission scope of their tenant are present in the cache. If a match is found, the cached data is used directly to proceed to the next verification step, greatly improving verification efficiency. This step demonstrates the application of caching mechanisms in the introduction of cutting-edge encryption and caching technologies.

[0073] Multi-level permission verification: Starting at the tenant level, the system checks the tenant table records in the permission database to confirm that the requested data object is within the tenant's permission scope. Next, at the role level, based on the role table and permission association table, it determines whether the user role has the necessary permissions to perform the request. Finally, at the data object level, based on the data object table and permission association table, it verifies the user's permissions to operate on the specific data object. If any step fails, the request is rejected; if all steps pass, access is granted, fully demonstrating the application of a multi-dimensional, integrated permission model in the verification process.

[0074] (3) Permission adjustment process under business changes

[0075] Business Change Monitoring: The system monitors business changes in real time through multiple methods. When a user edits a job / role, the system updates the user's job data permissions in the cache while simultaneously updating the data in the database table.

[0076] It should be understood that although the steps in the flowchart are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0077] This application also provides a data request processing apparatus. For example... Figure 5 As shown, a data request processing device includes a first parsing module 501, a second parsing module 502, a first query module 503, a second query module 504, an acquisition module 505, and a response module 506. The first parsing module 501 is used to receive data access requests initiated by users through the SaaS application and parse the user's user information and request information from the data access requests; the second parsing module 502 is used to parse the request parameters of the data request object from the request information if the data access request is identified as a request for system business data; the first query module 503 is used to obtain the tenant identifier from the user information and query the data permissions associated with the user's tenant from the tenant table in the permission database based on the tenant identifier; the second query module 504 is used to obtain the job identifier from the user information and query the data permissions associated with the user's job from the job table in the permission database based on the job identifier; the acquisition module 505 is used to compare the data permissions associated with the tenant with the data permissions associated with the job to obtain the user's target data permissions, which belong to both the data permissions associated with the tenant and the data permissions associated with the job; the response module 506 is used to identify whether the user has the data permissions for the data request object based on the request parameters and the target data permissions, and if so, to respond to the data access request.

[0078] In one embodiment, responding to a data access request includes: sending a data request object to a downstream service based on request parameters; receiving target system business data returned by the downstream service; and, upon confirming that the tenant has data permissions for the target system business data and the job position has data permissions for the target system business data, providing feedback of the target system business data to the user's SaaS application.

[0079] In one embodiment, a data request processing apparatus further includes a first configuration module, configured to configure the data permissions of the city to which the business data of each system in the downstream service belongs, the data permissions of the transportation company to which it belongs, and the data permissions of the fleet to which it belongs; and to identify whether a user has the data permissions for the data request object based on the request parameters and the target data permissions, including: if the request parameters include the target city or the transportation company or the fleet of the target city, and the target data permission is the data permission of the target city, then it is determined that the user has the data permissions for the data request object; if the request parameters include the transportation company or the fleet of the transportation company, and the target data permission is the data permission of the transportation company, then it is determined that the user has the data permissions for the data request object; if the request parameters include the fleet, and the target data permission is the data permission of the fleet, then it is determined that the user has the data permissions for the data request object.

[0080] In one embodiment, a data request processing apparatus further includes a resource permission processing module, configured to: if the request information identifies that the data access request is for requesting system resources, parse the request parameters of the data request object from the request information; obtain a tenant identifier from the user information, and query the resource permissions associated with the user's tenant from the tenant table of the permission database based on the tenant identifier; obtain a job identifier from the user information, and query the resource permissions associated with the user's job from the job table of the permission database based on the job identifier; compare the resource permissions associated with the tenant with the resource permissions associated with the job to obtain the user's target resource permissions, wherein the target resource permissions belong to both the resource permissions associated with the tenant and the resource permissions associated with the job; and identify whether the user possesses the resource permissions for the data request object based on the request parameters and the target resource permissions, and if so, respond to the data access request.

[0081] In one embodiment, a data request processing apparatus further includes a second configuration module, configured to create a user's job posting, configure the user's job posting's role and data permissions, and configure the role's resource permissions; configure the user's job posting to the job posting table in the permissions database; configure the user's job posting's role to the role table in the permissions database, and configure the role's resource permissions to the role's permission table in the permissions database; configure the user's job posting's data permissions to the job posting permission table in the permissions database; query the resource permissions associated with the user's job posting from the job posting table in the permissions database based on the job posting identifier, including: querying the user's job posting from the job posting table in the permissions database based on the job posting identifier; querying the role table based on the user's job posting to obtain the job posting's role; querying the role permission table based on the job posting's role to obtain the role's resource permissions, wherein the role's resource permissions are the job posting's associated resource permissions; and query the data permissions associated with the user's job posting from the job posting table in the permissions database based on the job posting identifier, including: querying the user's job posting from the job posting table in the permissions database based on the job posting identifier; and querying the job posting permission table based on the user's job posting to obtain the job posting's associated data permissions.

[0082] In one embodiment, a data request processing apparatus further includes an update module, configured to update the role table, role permission table, or job permission table based on the tenant's modification or deletion operation when it is detected that the tenant has modified or deleted any one or more of the user's job role, the user's job data permissions, and the role's resource permissions through the job management interface.

[0083] In one embodiment, a data request processing apparatus further includes a creation module for creating a tenant table, which records the identification information and name information of each tenant; creating a tenant permission table, which records the data permissions of each tenant and the identification of each tenant; and querying the data permissions associated with the user's tenant from the tenant table in the permission database based on the tenant identification, including: querying the identification of the user's tenant from the tenant table in the permission database based on the tenant identification; and querying the data permissions associated with the user's tenant from the tenant permission table based on the identification of the user's tenant.

[0084] For specific limitations regarding a data request processing apparatus, please refer to the limitations regarding a data request processing method described above, and will not be repeated here. Each module in the aforementioned data request processing apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0085] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores permission data such as tenants, positions, and roles. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a data request processing method.

[0086] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device on which the present application is intended to be applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0087] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a data request processing method of any of the above embodiments.

[0088] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a data request processing method of any of the above embodiments.

[0089] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0090] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0091] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A data request processing method, characterized in that, The method includes: Receive data access requests initiated by users through SaaS applications, and parse user information and request information from the data access requests; If the data access request is identified as a request for system business data through the request information, then the request parameters of the data request object are parsed from the request information. Obtain the tenant identifier from the user information, and query the data permissions associated with the tenant to which the user belongs from the tenant table of the permission database based on the tenant identifier; Obtain the job identifier from the user information, and query the data permissions associated with the job to which the user belongs from the job table of the permission database based on the job identifier; The data permissions associated with the tenant are compared with the data permissions associated with the job position to obtain the user's target data permissions. The target data permissions belong to both the data permissions associated with the tenant and the data permissions associated with the job position. Based on the request parameters and the target data permissions, determine whether the user has the data permissions for the data request object. If so, respond to the data access request.

2. The method according to claim 1, characterized in that, The response to the data access request includes: Send the data request of the data request object to the downstream service according to the request parameters; Receive the target system business data returned by the downstream service; Once it is confirmed that the tenant has data permissions for the target system's business data and the position has data permissions for the target system's business data, the target system's business data is fed back to the user's SaaS application.

3. The method according to claim 2, characterized in that, The method further includes: Configure the data permissions for the city, the transportation company, and the fleet of each system business data of the downstream service; The step of identifying whether the user has the data permissions for the data request object based on the request parameters and the target data permissions includes: If the request parameters include a target city, a transportation company in the target city, or a fleet of vehicles in the target city, and the target data permission is the data permission of the target city, then it is determined that the user has the data permission of the data request object; If the request parameters include a transportation company or a transportation company's fleet, and the target data permission is the data permission of the transportation company, then it is determined that the user has the data permission of the data request object; If the request parameters include a fleet, and the target data permission is the fleet's data permission, then it is determined that the user has the data permission for the data request object.

4. The method according to claim 1, characterized in that, The method further includes: If the data access request is identified as a request for system resources through the request information, then the request parameters of the data request object are parsed from the request information. Obtain the tenant identifier from the user information, and query the resource permissions associated with the tenant to which the user belongs from the tenant table of the permission database based on the tenant identifier; Obtain the job identifier from the user information, and query the resource permissions associated with the job to which the user belongs from the job table in the permission database based on the job identifier; The resource permissions associated with the tenant are compared with the resource permissions associated with the job position to obtain the user's target resource permissions. The target resource permissions belong to both the resource permissions associated with the tenant and the resource permissions associated with the job position. Based on the request parameters and the target resource permissions, determine whether the user has the resource permissions for the data request object. If so, respond to the data access request.

5. The method according to claim 4, characterized in that, The method further includes: Create the user's job posting, configure the user's job posting's role and data permissions, and configure the role's resource permissions; Configure the user's job position in the job position table of the permission database; Configure the user's job role in the role table of the permission database, and configure the role's resource permissions in the role permission table of the permission database; Configure the user's job data permissions in the job permission table of the permission database; The step of querying the resource permissions associated with the user's assigned position from the position table in the permission database based on the position identifier includes: The user's assigned position is retrieved from the position table in the permission database based on the position identifier. The role of the user is obtained by querying the role table based on the user's job position. The resource permissions of the role are obtained by querying the role permission table based on the role of the position, wherein the resource permissions of the role are the resource permissions associated with the position. The step of querying the data permissions associated with the user's assigned position from the position table in the permission database based on the position identifier includes: The user's assigned position is retrieved from the position table in the permission database based on the position identifier. The user's job title is used to query the job title permission table to obtain the data permissions associated with that job title.

6. The method according to claim 5, characterized in that, The method further includes: When it is detected that the tenant has modified or deleted any one or more of the user's job role, the user's job data permissions, and the role's resource permissions through the job management interface, the role table, the role permission table, or the job permission table is updated based on the tenant's modification or deletion operation.

7. The method according to claim 1, characterized in that, The method further includes: Create a tenant table, which records the identification information and name information of each tenant; Create a tenant permission table, which records the data permissions of each tenant and the identifier of each tenant; The step of querying the data permissions associated with the user's tenant from the tenant table of the permissions database based on the tenant identifier includes: Based on the tenant identifier, retrieve the identifier of the tenant to which the user belongs from the tenant table in the permissions database; Based on the identifier of the tenant to which the user belongs, query the data permissions associated with the tenant to which the user belongs from the tenant permission table.

8. A data request processing apparatus, characterized in that, The device includes: The first parsing module is used to receive data access requests initiated by users through SaaS applications, and to parse the user's user information and request information from the data access requests; The second parsing module is used to parse the request parameters of the data request object from the request information if the data access request is identified through the request information as a request for system business data. The first query module is used to obtain the tenant identifier from the user information and query the data permissions associated with the tenant to which the user belongs from the tenant table of the permission database based on the tenant identifier; The second query module is used to obtain the job identifier from the user information and query the data permissions associated with the job to which the user belongs from the job table of the permission database based on the job identifier. The acquisition module is used to compare the data permissions associated with the tenant with the data permissions associated with the job position to obtain the user's target data permissions, wherein the target data permissions belong to both the data permissions associated with the tenant and the data permissions associated with the job position. The response module is used to identify whether the user has the data permissions for the data request object based on the request parameters and the target data permissions. If so, it responds to the data access request.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.