User Permission Data Query via MD5 Hash Pre-calculation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing human resource systems face performance issues and low query efficiency due to large data volumes and repeated tree traversals when managing information for tens of thousands of staffs, leading to inefficient user permission data queries.
Innovation Solution
A method and device that preprocess user permission data by calculating MD5 values from administration authority information in data records, storing these values in a separate table, and screening unique MD5 values to enable quick permission queries without repeated data traversals, improving system performance and query efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If the system recursively traverses multiple data tables to determine user permission authority in real time, then the permission data can be accurately retrieved, but the query efficiency deteriorates significantly when managing tens of thousands of staffs
Solution Approach 1:
The patent pre-calculates and stores the MD5 hash values of administration authority information during data insertion or update operations. This preliminary action transforms the complex authority data into compact hash representations, which are then used for rapid comparison during query operations without requiring real-time recursive traversal of the original data tables.
Solution Approach 2:
The patent creates a simplified copy of the permission data structure by storing MD5 hash values in a dedicated permission table alongside staff identification numbers and roles. This copy enables fast lookup operations while the original detailed data tables remain intact for reference when needed.
2Adaptability or versatility
If the system stores detailed administration authority information for each user role in the role permission table, then the permission management remains flexible and accurate, but the data table size increases leading to repeated traversal of large data sets
Solution Approach 1:
The patent extracts the essential identifying feature from the detailed administration authority information by computing MD5 hash values. These hash values are then stored in a separate permission table, effectively separating the large detailed data tables from the query-critical permission identifiers, thereby reducing the data volume that must be traversed during permission checks.
3Reliability
If the system repeatedly traverses the role permission table for each user query request, then real-time permission verification is achieved, but system performance deteriorates with increased staff规模
Solution Approach 1:
The system performs preliminary hashing of administration authority information during data insertion or update operations, storing the MD5 hash values in advance. When permission queries are executed, the system directly compares the computed hash of the current user's authority with the pre-stored hash values, eliminating the need for repeated full-table traversals and enabling real-time verification even with large staff numbers.
Data Source
AI summary
A user permission data query method which includes obtaining a first data table including staff identification numbers and departments corresponding to the staff identification numbers, and obtaining a second data table including a correspondence relationship among the staff identification numbers, roles, and administration authority information; obtaining, from the second data table, a plurality of data records having the same staff identification number and the same role, calculating an MD5 value corresponding to the staff identification number and the role; screening various MD5 values that are different from each other, and obtaining the management departments and the management staffs respectively corresponding to the various MD5 values obtaining a MD5 value corresponding to the permission query request and determining the management departments and the management staffs corresponding to the MD5 value as permission data of a user, when a permission query request is received.


