Data table permission processing method, device, computer equipment and storage medium
By receiving and processing models and permission files, generating and storing the association between data table names and permission user classes, and providing front-end page queries, it solves the problem of low efficiency in user permission search in existing technologies, realizes self-service query and rapid response, and improves operational efficiency and information security.
Patent Information
- Application Number
- CN202010100595.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-18
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2040-02-18
AI Technical Summary
In the existing technology, users' access to data tables requires operators to log in to the production server to find the files transferred by developers, resulting in large consumption of manpower and material resources, low efficiency, high operating costs, and difficulty in quickly responding to permission issues.
By receiving the model and permission files handed over by developers, parsing and weighting them, generating data table names and associating storage permission user classes, providing a front-end page for users to query permissions by themselves, and combining regular detection and audit mechanisms, we ensure the accuracy and security of permissions.
It enables users to query data table permissions by themselves, reduces labor costs, improves operational efficiency, quickly responds to permission issues, ensures information security, and improves customer satisfaction.
Smart Images

Figure CN111400696B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a method, apparatus, computer equipment, and storage medium for processing data table permissions. Background Art
[0002] Data tables are stored in the system. Different user classes have different viewing permissions for data tables. Depending on the permissions of the user class, the amount of information in the data table that the corresponding user can view is also different.
[0003] The user class's access to data tables depends on operations personnel logging into the production server and finding the files handed over by developers. However, because the system contains a large number of data tables, operations personnel need to review each one one by one, which is very labor-intensive and resource-intensive, resulting in low efficiency and high operating costs. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to propose a method for processing data table permissions, so that users can self-service through the front-end page to know the user class that has the permission to view the corresponding data table.
[0005] In order to solve the above technical problems, the present application provides a method for processing data table permissions, which adopts the following technical solutions:
[0006] A method for processing data table permissions includes the following steps:
[0007] Receive at least two different model files and at least two different permissions files that developers hand over to the production environment;
[0008] Parsing the permission file and performing weighted processing on the model file to obtain a model file with added permission control, wherein the permission file includes at least one permission user class, and the permission user class has permission to view a corresponding data table;
[0009] Using the model file for adding permission control, data is retrieved from the database to generate a data table for adding permission control, and the data table is named according to a preset rule to generate a data table name;
[0010] Associating the permission user class with the data table name in the database and storing it; and
[0011] Provide a front-end page. When receiving the data table name sent by the front-end page, determine the authorized user class with viewing permission according to the data table name, and display the authorized user class with viewing permission for the corresponding data table to the user through the front-end page.
[0012] Furthermore, the step of parsing the authority file and performing weighted processing on the model file includes:
[0013] Parsing the permission file using a weighting tool to extract the permission user class, model name, and weighting requirements in the permission file;
[0014] Determining the corresponding model file according to the extracted model name;
[0015] Obtain authority restrictions according to the weighted requirements, and append the authority restrictions and the authority user class to the model file to obtain a model file with added authority control.
[0016] Furthermore, the step of naming the data table according to a preset rule and generating a data table name includes:
[0017] Identify the current year, month, and data type in the data table, name the data table, and generate a data table name.
[0018] Furthermore, the step of associating and storing the permission user class with the data table name in the database includes:
[0019] After processing all the model files and permission files handed over by the current developer, the generated data table name is associated with the permission user class and stored to generate a lookup table;
[0020] Determine whether a lookup table is stored in the database;
[0021] If the lookup table is not stored in the database, the generated lookup table is written into the database;
[0022] If a lookup table is stored in the database, the original lookup table is deleted and the generated lookup table is written into the database.
[0023] Furthermore, after the step of parsing the authority file and performing weighted processing on the model file to obtain the model file for adding authority control, the method further includes:
[0024] Regularly check whether the data sheet has been viewed;
[0025] If the time difference between the last login time of the data table currently being detected and the current detection time is greater than a preset time period, the data table currently being detected is hidden.
[0026] Furthermore, after the step of parsing the authority file and performing weighted processing on the model file to obtain the model file for adding authority control, the method further includes:
[0027] Associating a pre-stored first user ID with at least one permission user class so that the first user ID has permission to view a data table controlled by the permission user class;
[0028] Regularly detecting the login status of the first user ID;
[0029] If the time difference between the last login time of the first user ID and the current detection time is greater than a preset time period, the association between the first user ID and the authorized user class is released.
[0030] Furthermore, after the step of associating the pre-stored first user ID with at least one permission user class so that the first user ID has permission to view the data table controlled by the permission user class, the method further includes:
[0031] Providing a front-end page, when receiving a permission application request sent by the front-end page, the permission application request carries the permission user class and the second user ID, and sending the permission user class and the second user ID to the administrator for review;
[0032] When the consent instruction sent by the administrator is received, the permission user class is configured for the second user ID so that the second user ID has the permission to view the corresponding data table, and the review result is displayed to the user through the front-end page.
[0033] In order to solve the above technical problems, the embodiment of the present application further provides a data table permission processing device, which adopts the following technical solution:
[0034] A data table authority processing device, comprising:
[0035] A receiving module, configured to receive at least two different model files and at least two different permission files handed over by developers to the production environment;
[0036] A weighting module, configured to parse the permission file and perform weighting processing on the model file to obtain a model file with added permission control, wherein the permission file includes at least one permission user class, and the permission user class has permission to view a corresponding data table;
[0037] A generation module is used to use the model file for adding permission control to retrieve data from the database to generate a data table for adding permission control, and to name the data table according to a preset rule to generate a data table name;
[0038] A storage module, used for associating and storing the permission user class with the data table name in a database; and
[0039] A module is provided for providing a front-end page. When a data table name sent by the front-end page is received, the user class with viewing permission is determined based on the data table name, and the user class with viewing permission for the corresponding data table is displayed to the user through the front-end page.
[0040] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0041] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned data table permission processing method when executing the computer program.
[0042] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0043] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for processing data table permissions.
[0044] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0045] The permissions corresponding to user classes and data tables are stored in the database, so that all users can query by themselves through the front-end page. Users only need to enter the data table name in the page input box and click query to see which user classes have the permission to view the data table. Event personnel can quickly respond to permission issues reported by users, operation personnel can quickly handle report permission errors, and developers can quickly view report permissions for reference in report development; thereby helping enterprises improve service quality and increase customer satisfaction; when a user has not logged in for a long time, the association between the user ID and the permission user class will be cancelled to ensure information security in the system in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the solutions in this application, a brief introduction will be given below to the drawings required for use in the description of the embodiments of this application. Obviously, the drawings described below are some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0048] Figure 2 is a flowchart of an embodiment of a method for processing data table permissions according to the present application;
[0049] Figure 3 yes Figure 2 Specific flow chart of step S2;
[0050] Figure 4 yes Figure 2 Specific flow chart of step S4;
[0051] Figure 5 is a flowchart of another embodiment of a method for processing data table permissions according to the present application;
[0052] Figure 6 is a flowchart of another embodiment of a method for processing data table permissions according to the present application;
[0053] Figure 7 This is a structural diagram of an embodiment of a data table permission processing device according to the present application;
[0054] Figure 8 It is a structural diagram of an embodiment of a computer device according to the present application.
[0055] Figure numerals: 200, computer device; 201, memory; 202, processor; 203, network interface; 300, data table authority processing device; 301, receiving module; 302, weighting module; 303, generating module; 304, storage module; 305, providing module. DETAILED DESCRIPTION
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0057] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0058] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0059] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0060] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0061] Terminal devices 101, 102, and 103 can be various electronic devices with display screens and support web browsing, including but not limited to smartphones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.
[0062] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0063] It should be noted that the method for processing data table permissions provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the device for processing data table permissions is generally set in the server / terminal device.
[0064] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0065] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for processing data table permissions according to the present application. The method for processing data table permissions includes the following steps:
[0066] S1: Receive at least two different model files and at least two different permissions files that developers hand over to the production environment.
[0067] In this embodiment, the suffixes of the model file and the permission file are different. The suffix of the model file is mdl, and the suffix of the permission file is xml. The model name of the model file and the permission name of the permission file have a one-to-one correspondence. The model name of the current model file is intercepted, and the permission name corresponding to the model name is identified according to the model name to determine the corresponding permission file. The model file is used to retrieve data from the database to generate a data table. For example: if the model name of the current model file is a.mdl, the corresponding permission file is found by finding the permission name a.xml. In addition, the data table can be a report; the model file retrieves data including the required information such as the financial status, operating results and cash flow of the enterprise for a certain period of time from the database to generate a report. The permission file (xml) is used to add permissions to the model file so that the report generated by the model file can only be viewed by the user class with the corresponding permissions.
[0068] In this embodiment, the data table authority processing method is executed on the electronic device (eg Figure 1 The server / terminal device shown in the figure can receive the model file and permission file transferred by the developer through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0069] S2: Parse the permission file and perform weighted processing on the model file to obtain a model file with added permission control, wherein the permission file includes at least one permission user class, and the permission user class has permission to view a corresponding data table.
[0070] In this embodiment, the model file is weighted in the production environment. By adding permission control to the model file, only user classes with corresponding permissions can view the data table generated by the corresponding model file. Of course, this application can also parse the permission file after the model file generates the data table and perform weighted processing on the data table. The model file is used to retrieve data from the database to generate the data table, and the permission file is used to add permissions to the model file so that the data table generated by the model file can only be viewed by user classes with corresponding permissions.
[0071] Specifically, such as Figure 3 As shown, Figure 3 yes Figure 2Specific flow chart of step S2 in step S2. In step S2, the steps of parsing the authority file and performing weighted processing on the model file include:
[0072] S21: using a weighting tool to parse the authority file, extracting the authority user class, model name, and weighting requirement in the authority file;
[0073] S22: Determine the corresponding model file according to the extracted model name;
[0074] S23: Obtaining permission restrictions according to the weighted requirements, and appending the permission restrictions and permission user class to the model file to obtain a model file with added permission control.
[0075] In this embodiment, a weighting tool is used to append the contents of the permission file (xml) to the model (mdl) file, thereby adding a layer of permission control to the model file. When the model file extracts data from the database to form a data table, only the authorized user class with corresponding permissions can lift the permission restriction and view the corresponding data table. When the weighting tool is not used to append the contents of the permission file to the model file, the data table formed by the data extracted from the database by the model file can be viewed by all user classes without the need for permissions.
[0076] Alternatively, the permission user class, model name, and weighting requirements in the permission file can be extracted and stored in a database, establishing a corresponding relationship. This eliminates the need to immediately perform weighting on the model file. When weighting is required, the permission user class stored in the database can be directly appended to the corresponding model file, eliminating the need to re-receive and parse the permission file, thereby improving computer response speed.
[0077] S3: Using the model file for adding permission control, data is retrieved from the database to generate a data table for adding permission control, and the data table is named according to a preset rule to generate a data table name.
[0078] In this embodiment, the name of the generated data table corresponds to the data table to which permission control is added. The data table to which permission control is added corresponds to the model file to which the permission control is added. The model file to which permission control is added corresponds to the permission user class attached to it. Therefore, the data table name corresponds to the permission user class. Generating data table names according to preset rules facilitates data table management.
[0079] Specifically, in step S3, that is, naming the data table according to a preset rule, the step of generating the data table name includes:
[0080] Identify the current year, month, and data type in the data table, name the data table, and generate a data table name.
[0081] In this embodiment, if the data type in the data table is a data type, it is a financial table. If the data type in the data table is a statistical graph type, it is a statistical table. The year and month when the data table was generated and the data type therein can be obtained simply by the data table name, which facilitates the unified management and identification of data tables by relevant personnel.
[0082] S4: The permission user class is associated with the data table name and stored in the database.
[0083] In this embodiment, the permission user class is associated with the data table name and stored in the database, so that corresponding records are stored in the database, which facilitates calling and viewing the corresponding association relationship.
[0084] Specifically, such as Figure 4 As shown, Figure 4 yes Figure 2 Specific flow chart of step S4. In step S4, the step of associating and storing the permission user class with the data table name in the database includes:
[0085] S41: After processing all the model files and permission files handed over by the current developer, the generated data table name is associated with the permission user class and stored to generate a lookup table;
[0086] S42: Determine whether a lookup table is stored in the database;
[0087] S43: If the lookup table is not stored in the database, write the generated lookup table into the database;
[0088] S44: If a lookup table is stored in the database, the original lookup table is deleted and the generated lookup table is written into the database.
[0089] In this embodiment, before writing the lookup table into the database, it is confirmed whether the lookup table is already stored in the database. If the lookup table is stored in the database, it means that it is an old lookup table, and the old lookup table is deleted; then a new lookup table is written. If the lookup table is not stored in the data, it means that the lookup table has not been written into the database before, and then the new lookup table can be written directly. The old and new lookup tables are generated after processing all the model files and permission files for the current and last time respectively. As time changes, the data in the original database changes, the new model files are also different, and the permission user classes of the model files granted by the permission files also have new changes. At this time, it is extremely complicated to modify them one by one, so the new model files and permission files can be retransmitted. Then the generated new lookup table is different from the content of the old lookup table, and the old lookup table is deleted to avoid system recognition errors, free up the system's storage space, and improve the system response speed.
[0090] Furthermore, in the lookup table, the data table name and the permission user class have a one-to-one correspondence, a one-to-many relationship, a many-to-one relationship, or a many-to-many relationship.
[0091] In this embodiment, in the authority file, the data table name and the authority user class have a one-to-one, one-to-many, or many-to-one relationship, which can be flexibly adjusted according to needs.
[0092] S5: Provide a front-end page. When receiving the data table name sent by the front-end page, determine the permission user class with viewing permission according to the data table name, and display the permission user class with viewing permission of the corresponding data table to the user through the front-end page.
[0093] In this embodiment, the user can input the name of the data table to be queried through the front-end page. Based on the data table name input by the user, the correspondence between the data table name and the permission user class is searched in the database to determine the permission user class that has the permission to view the data table. The corresponding permission user class is displayed to the user through the front-end page, so that the user can know which user classes have the permission to view the data table.
[0094] When incident personnel receive feedback about permission issues, they can quickly identify and respond to them by querying the front-end page. Operations personnel can also quickly resolve data table permission errors. Developers can quickly view and confirm data table permissions through the front-end page, providing a reference for data table development. At the same time, it also enables monitoring of which data tables can be viewed by which users. For example, if a certain important data table cannot be viewed by everyone, but a developer forgets to add permissions or transfer the permission file, querying the database information on the front-end page can quickly monitor the corresponding permission user category for the data table.
[0095] In actual applications, such as the application of reports: the data in the report is confidential and not everyone can view all the data. Through the front-end page, users can know which user classes have the permission to view the queried report, so that they can timely count and determine the relevant permission information.
[0096] At the same time, the present application can also provide a front-end page. When a permission application request is received from the front-end page, the permission application request carries the permission user class and the second user ID, and the permission user class and the second user ID are sent to the administrator for review; when a consent instruction is received from the administrator, the permission user class is configured for the second user ID so that the second user ID has the permission to view the corresponding data table, and the review results are displayed to the user through the front-end page.
[0097] In this embodiment, the user corresponding to the second user ID is an ordinary employee of the company. When the ordinary employee requests permission to view the data table due to work needs, he needs to send a permission application request with the corresponding second user ID through the front-end page, and then pass the review of the management personnel before he can obtain permission to view the data table. The correspondence between the data table and the permission user class of this application is pre-set by the people in the business department, that is, the people in the business department pre-determine which data table can be viewed by which user classes; when the user needs to view a certain data table, he needs to first query which user classes have permission to view the data table; then apply for these permission user classes with permission. When the management personnel agree, the user can obtain the permission user class and then obtain permission to view the data table. This is conducive to the clear management and control of data table viewing permissions and ensures the information security of the data table.
[0098] In some optional implementations of this embodiment, such as Figure 5 As shown, Figure 5 This is a flowchart of another embodiment of a method for processing data table permissions according to the present application. After step S2, that is, after parsing the permissions file and performing weighted processing on the model file to obtain a model file for adding permission control, the electronic device may further perform the following steps:
[0099] S6: Regularly check whether the data table is checked;
[0100] S7: If the time difference between the last login time of the data table currently being detected and the current detection time is greater than a preset time period, the data table currently being detected is hidden.
[0101] In this embodiment, if a data table is detected to have not been viewed for a long period of time, it is hidden, preventing even authorized users with permission to view the corresponding data table from viewing it. Hiding a data table allows the system to ignore it when searching for it, reducing the number of table searches and improving system response speed. If a data table is hidden for more than a preset time, the table name and the start time of the hiding are sent to the relevant personnel, who can then delete or unhide the data table based on the actual situation.
[0102] like Figure 6 As shown, Figure 6 This is a flowchart of another embodiment of a method for processing data table permissions according to the present application. After step S2, that is, after parsing the permissions file and performing weighted processing on the model file to obtain a model file for adding permission control, the method further includes:
[0103] S8: Associating a pre-stored first user ID with at least one permission user class, so that the first user ID has permission to view a data table controlled by the permission user class;
[0104] S9: Regularly checking the login status of the first user ID;
[0105] S10: If the time difference between the last login time of the first user ID and the current detection time is greater than a preset time period, the association between the first user ID and the authorized user class is released.
[0106] In this embodiment, the users corresponding to the first user ID are the supervisors, general managers, deputy general managers, etc. of various departments of the company. Different permission user classes are associated with the corresponding first user ID according to the user's position authority. If the time difference between the last login time of the first user ID and the current detection time is greater than six months, the permission will be revoked and the association between the first user ID and the permission user class will be discontinued; if the first user ID has not logged in for more than six months, it means that the corresponding user of the first user ID has resigned or is on long vacation, and the viewing permission of the first user ID that has not logged in for a long time will be revoked to ensure the security of the information;
[0107] Of course, it is also possible to associate a pre-stored first user ID with at least one permission user class so that the first user ID has permission to view the data tables controlled by the permission user class, regularly monitor the first user ID's access to each data table, determine which data tables have not been viewed by the first user ID for more than a preset time period, identify the permission user class corresponding to the data table, and disassociate the permission user class from the first user ID, while retaining the association between the other permission user classes and the first user ID. In this solution, regardless of how many data tables the permission user class has permission to view, as long as any data table under the permission user class has not been viewed by the first user ID for more than a preset time period, the association between the permission user class and the first user ID is disassociated, so that the first user ID can no longer view all data tables under the permission user class, thereby protecting the security of all data tables under the user class.
[0108] Alternatively, a pre-stored first user ID may be associated with at least one permission user class, so that the first user ID has permission to view the data tables controlled by the permission user class. The first user ID's access to each data table is periodically monitored to determine which data tables have not been viewed by the first user ID for a preset period of time, and the permission user class corresponding to the data table is identified. If all data tables under the permission user class have not been viewed by the first user ID for a preset period of time, the permission user class is disassociated from the first user ID, while retaining the associations between other permission user classes and the first user ID. In this solution, the permission user class is only disassociated from the first user ID if all data tables under the permission user class have not been viewed by the first user ID for a preset period of time, to prevent erroneous disassociation and prevent the user's work progress from being affected.
[0109] The above implementation methods of this application can be flexibly selected according to actual conditions.
[0110] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0111] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified 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 flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0112] Further references Figure 7 , as a response to the above Figure 2 The present application provides an embodiment of a data table permission processing device, which is similar to the embodiment of the present invention. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0113] like Figure 7 As shown, the data table permission processing device 300 of this embodiment includes: a receiving module 301, a weighting module 302, a generating module 303, a storing module 304 and a providing module 305. Among them:
[0114] A receiving module 301 is configured to receive at least two different model files and at least two different permission files handed over by a developer to a production environment;
[0115] A weighting module 302 is configured to parse the permission file and perform weighting processing on the model file to obtain a model file for adding permission control, wherein the permission file includes at least one permission user class, and the permission user class has permission to view a corresponding data table;
[0116] The generation module 303 is used to use the model file for adding permission control to retrieve data from the database to generate a data table for adding permission control, and to name the data table according to a preset rule to generate a data table name;
[0117] The storage module 304 is used to associate and store the permission user class with the data table name in a database; and
[0118] A module 305 is provided for providing a front-end page. When a data table name sent by the front-end page is received, the user class with viewing permission is determined based on the data table name, and the user class with viewing permission for the corresponding data table is displayed to the user through the front-end page.
[0119] The weighting module 302 includes a parsing unit, an extraction unit, and an appending unit. The parsing unit is used to parse the permission file using a weighting tool to extract the permission user class, model name, and weighting requirement from the permission file; the extraction unit is used to determine the corresponding model file based on the extracted model name; and the appending unit is used to obtain permission restrictions based on the weighting requirement and append the permission restrictions and permission user class to the model file to obtain a model file with added permission control.
[0120] The storage module 304 includes a creation unit, a judgment unit, a writing unit, and a deletion unit. The creation unit is used to process all the model files and permission files handed over by the current developer, associate the generated data table name with the permission user class, and store it to generate a lookup table; the judgment unit is used to determine whether the lookup table is stored in the database; the writing unit is used to write the generated lookup table to the database if the lookup table is not stored in the database; the deletion unit is used to delete the original lookup table if the lookup table is stored in the database, and write the generated lookup table to the database through the writing unit.
[0121] The data table permission processing device 300 also includes a detection module and a hiding module. The detection module is used to periodically detect whether the data table is being viewed; the hiding module is used to hide the currently detected data table when the time difference between the last login time of the currently detected data table and the current detection time is greater than a preset time period.
[0122] In this embodiment, compared with the solution that can only rely on the operation personnel to log in to the production server to find the files handed over by the developer to determine which user classes have the permission to view the corresponding data tables, and each system has hundreds or thousands of data tables. Each data table is checked one by one by the operation personnel, which is very labor-intensive, with high operating costs and affected customer satisfaction, the present application puts the permission status corresponding to the user class and the data table into the database, so that all users can query by themselves through the front-end page. The user only needs to enter the data table name in the page input box and click query to view which user classes have the permission to view the data table. Event personnel can quickly respond to permission issues reported by users, operation personnel can quickly handle report permission error issues, and developers can quickly view report permissions for reference in report development; thereby helping enterprises improve service quality and improve customer satisfaction; when the user has not logged in for a long time, the association between the user ID and the permission user class is cancelled to ensure information security in the system in a timely manner.
[0123] To solve the above technical problems, the present application also provides a computer device. Figure 8 , Figure 8 This is a basic structural block diagram of the computer device in this embodiment.
[0124] The computer device 200 includes a memory 201, a processor 202, and a network interface 203 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 200 having components 201-203, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0125] The computer device may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.
[0126] The memory 201 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 201 may be an internal storage unit of the computer device 200, such as a hard disk or memory of the computer device 200. In other embodiments, the memory 201 may also be an external storage device of the computer device 200, such as a plug-in hard disk equipped on the computer device 200, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Of course, the memory 201 may also include both the internal storage unit of the computer device 200 and its external storage device. In this embodiment, the memory 201 is generally used to store the operating system and various application software installed on the computer device 200, such as program code of a method for processing data table permissions. In addition, the memory 201 can also be used to temporarily store various data that has been output or is about to be output.
[0127] In some embodiments, the processor 202 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 202 is generally used to control the overall operation of the computer device 200. In this embodiment, the processor 202 is used to execute program code stored in the memory 201 or process data, such as executing program code of a method for processing data table permissions.
[0128] The network interface 203 may include a wireless network interface or a wired network interface. The network interface 203 is generally used to establish a communication connection between the computer device 200 and other electronic devices.
[0129] In this embodiment, the user class with the authority to view the corresponding data table can be directly displayed to the user through the computer device, which facilitates management and improves the user experience.
[0130] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores a data table permission processing program, and the data table permission processing program can be executed by at least one processor to enable the at least one processor to perform the steps of the data table permission processing method as described above.
[0131] In this embodiment, the data table permission processing program stored in the computer-readable storage medium can effectively manage the viewing permission of the data table, and realize the user's self-service query of the permission user class of the data table.
[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0133] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.
Claims
1. A method for processing data table permissions, characterized in that: The steps include: Receive at least two different model files and at least two different permissions files that developers hand over to the production environment; Parsing the permission file and performing weighted processing on the model file to obtain a model file with added permission control, wherein the permission file includes at least one permission user class, and the permission user class has permission to view a corresponding data table; Using the model file for adding permission control, data is retrieved from the database to generate a data table for adding permission control, and the data table is named according to a preset rule to generate a data table name; Associating the permission user class with the data table name in the database and storing it; and Providing a front-end page, when receiving a data table name sent by the front-end page, determining the permission user class with viewing permission according to the data table name, and displaying the permission user class with viewing permission of the corresponding data table to the user through the front-end page; The step of parsing the authority file and performing weighted processing on the model file includes: Parsing the permission file using a weighting tool to extract the permission user class, model name, and weighting requirements in the permission file; Establishing a corresponding relationship between the permission user class, the model name, and the weighted requirement in a database, and generating permission user class relationship information for storage; The permission user class is appended to the corresponding model file according to the permission user class relationship information to obtain a model file with added permission control.
2. The method for processing data table permissions according to claim 1, characterized in that: The step of naming the data table according to a preset rule and generating a data table name includes: Identify the current year, month, and data type in the data table, name the data table, and generate a data table name.
3. The method for processing data table permissions according to any one of claims 1 to 2, characterized in that: The step of associating and storing the permission user class with the data table name in the database includes: After processing all the model files and permission files handed over by the current developer, the generated data table name is associated with the permission user class and stored to generate a lookup table; Determine whether a lookup table is stored in the database; If the lookup table is not stored in the database, the generated lookup table is written into the database; If a lookup table is stored in the database, the original lookup table is deleted and the generated lookup table is written into the database.
4. The method for processing data table permissions according to any one of claims 1 to 2, characterized in that: After the step of parsing the authority file and performing weighted processing on the model file to obtain the model file for adding authority control, the method further includes: Regularly check whether the data sheet has been viewed; If the time difference between the last login time of the data table currently being detected and the current detection time is greater than a preset time period, the data table currently being detected is hidden.
5. The method for processing data table permissions according to any one of claims 1 to 2, characterized in that: After the steps of parsing the authority file and performing weighted processing on the model file to obtain a model file for adding authority control, the method further includes: Associating a pre-stored first user ID with at least one permission user class so that the first user ID has permission to view a data table controlled by the permission user class; Regularly detecting the login status of the first user ID; If the time difference between the last login time of the first user ID and the current detection time is greater than a preset time period, the association between the first user ID and the authorized user class is released.
6. The method for processing data table permissions according to claim 5, characterized in that: After the step of associating the pre-stored first user ID with at least one permission user class so that the first user ID has permission to view the data table controlled by the permission user class, the method further includes: Providing a front-end page, when receiving a permission application request sent by the front-end page, the permission application request carries the permission user class and the second user ID, and sending the permission user class and the second user ID to the administrator for review; When the consent instruction sent by the administrator is received, the permission user class is configured for the second user ID so that the second user ID has the permission to view the corresponding data table, and the review result is displayed to the user through the front-end page.
7. A data table authority processing device, characterized in that: include: A receiving module, configured to receive at least two different model files and at least two different permission files handed over by developers to the production environment; A weighting module, configured to parse the permission file and perform weighting processing on the model file to obtain a model file with added permission control, wherein the permission file includes at least one permission user class, and the permission user class has permission to view a corresponding data table; A generation module is used to use the model file for adding permission control to retrieve data from the database to generate a data table for adding permission control, and to name the data table according to a preset rule to generate a data table name; A storage module, used for associating and storing the permission user class with the data table name in a database; and A module is provided for providing a front-end page, and when receiving a data table name sent by the front-end page, determining a permission user class with viewing permission according to the data table name, and displaying the permission user class with viewing permission of the corresponding data table to the user through the front-end page; The weighting module includes: A file parsing unit, configured to parse the permission file using a weighting tool, and extract the permission user class, model name, and weighting requirement from the permission file; An information generating unit, configured to establish a corresponding relationship between the permission user class, the model name, and the weighted requirement in a database, and generate permission user class relationship information for storage; An information appending unit is used to append the permission user class to a corresponding model file according to the permission user class relationship information to obtain a model file with added permission control.
8. A computer device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the method for processing data table permissions according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for processing data table permissions according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data access permission management method and apparatus, terminal device and storage medium
CN108280365A
Data processing method and device, server and storage medium
CN109522357A