Time series data authority management method and system
By implementing tag-based access control on time series data columns and data rows in the time series database, the problem of lack of fine-grained permission control in the time series database is solved, fine-grained permission management of IoT device data is realized, and it is compatible with the usage of traditional relational databases.
Patent Information
- Application Number
- CN202411289524.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119357987A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of database technology, and specifically provides a time series data authority management method and system. Background Art
[0002] With the rapid development of IoT technology, the amount of data generated by IoT devices has increased exponentially, and a branch of time series databases has emerged in the database field. Time series databases often use concepts similar to traditional relational data to manage time series data, and use interfaces similar to or even compatible with relational databases to provide external services, but the internal implementation is often different from that of relational databases, thereby greatly optimizing the writing and query performance of time series data.
[0003] In time series databases, "tables" are often used as the logical unit for managing time series data. However, since the total number of IoT devices that generate data is large and the data output by devices of the same model is similar, the time series database will manage these data by including devices of the same model in one "table".
[0004] For the time series data in the same "table", the time series database often makes the following subdivision definitions: Data fields related to the characteristics of the IoT device itself, such as MAC address, manufacturer, and model, do not change during the entire device declaration cycle, so the time series database defines these data segments as tags, also known as static attributes; and for the actual data collected by the IoT device, such as temperature, humidity, speed, etc., since these data are constantly changing, they are called dynamic attributes. Due to the high repetition of tags or static attribute data, when the database system is implemented, they are often stored and processed independently from dynamic attribute data.
[0005] There is a problem here. Time series databases generally use "tables" as units to manage data. A table includes data from multiple devices, and the granularity of "tables" as units of permission management is relatively large. When users want to restrict ordinary users from viewing data on a specific device, there is a lack of convenient and effective permission control methods. Summary of the invention
[0006] The present invention aims to overcome the above-mentioned deficiencies in the prior art and provides a time series data authority management method with strong practicality.
[0007] A further technical task of the present invention is to provide a time series data authority management system that is reasonably designed, safe and applicable.
[0008] The technical solution adopted by the present invention to solve its technical problem is:
[0009] A time series data rights management method comprises the following steps:
[0010] S1. Perform access control on time series data columns;
[0011] S2. Perform access control on time series data rows based on tags.
[0012] Furthermore, in step S1, it further includes:
[0013] S1-1. Administrator uses authorization command;
[0014] S1-2. The time series database query compiler detects whether the user has access rights based on the existing authorization status.
[0015] Furthermore, in step S1 - 1 , the administrator uses an authorization command to grant access rights to a certain tag column or a certain data column to a certain user or role.
[0016] Furthermore, in step S1-2, when a user attempts to access a time series tag column or a data column, the time series database query compiler detects whether the user has access rights based on existing authorization conditions.
[0017] Furthermore, in step S2, it further includes:
[0018] S2-1, Administrator user uses specific commands;
[0019] S2-2. The time series database engine is based on specific access logic for tags.
[0020] Furthermore, in step S2-1, the administrator user uses a specific command, an improved grant statement, or a newly added syntax for creating an access policy to set a range of values of a specific tag column in a table that certain users or roles can access.
[0021] Furthermore, in step S2-2, when a user attempts to access data in a time series data table, the time series database engine determines the value conditions of the tag column to which the current user is granted access based on specific access logic for the tag, and skips the data of the time series device corresponding to the unauthorized tag.
[0022] A time series data rights management system, firstly, performs access control on time series data columns, including an administrator using authorization commands and a time series database query compiler to detect whether the user has access rights according to existing authorization conditions;
[0023] Access control to time series data rows based on tags includes administrator users using specific commands and the time series database engine using specific access logic for tags.
[0024] Furthermore, when performing access control on time series data columns;
[0025] The administrator uses the authorization command to grant access rights to a certain label column or a certain data column to a certain user or role;
[0026] When a user tries to access a time series label column or data column, the time series database query compiler detects whether the user has access rights based on the existing authorization status.
[0027] Furthermore, when access control is performed on time series data rows based on tags;
[0028] Administrator users use specific commands, improved grant statements, or the newly added syntax for creating access policies to set the range of values of a specific tag column in a table that certain users or roles can access;
[0029] When a user tries to access data in a time series data table, the time series database engine determines the value conditions of the tag column to which the current user is granted access based on specific access logic for tags, and skips the data of the time series devices corresponding to unauthorized tags.
[0030] Compared with the prior art, the time series data rights management method and system of the present invention have the following outstanding beneficial effects:
[0031] The present invention enables users of time series databases to have finer granularity in data access permission control, and implements independent permission management of sensitive device data without adding more data tables, and is basically compatible with traditional relational database usage. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Attached Figure 1 It is a flowchart of a method for managing permissions of time series data;
[0034] Attached Figure 2 It is a schematic diagram of a time series data permission management method in which an administrator uses a tag-based method to control the time series data permission.
[0035] Attached Figure 3 The present invention is a flowchart of implementing data column access control for users in a time series data permission management method. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] A best embodiment is given below:
[0038] like Figure 1-3 As shown, a time series data rights management method in this embodiment has the following steps:
[0039] S1. Perform access control on time series data columns;
[0040] Further including:
[0041] S1-1. Administrator uses authorization command;
[0042] The administrator uses the authorization command to grant access permissions to a certain label column or a certain data column to a certain user or role.
[0043] S1-2, the time series database query compiler detects whether the user has access rights based on the existing authorization status;
[0044] When a user tries to access a time series label column or data column, the time series database query compiler checks whether the user has access rights based on the existing authorization status.
[0045] S2, access control of time series data rows based on tags;
[0046] Further including:
[0047] S2-1, Administrator user uses specific commands;
[0048] Administrator users use specific commands, such as the improved grant statement or the newly added syntax for creating access policies, to set the range of values of a specific tag column in a table that certain users or roles can access;
[0049] S2-2, the time series database engine is based on specific access logic for tags;
[0050] When a user tries to access data in a time series data table, the time series database engine determines the value conditions of the tag column to which the current user is granted access based on specific access logic for tags, and skips the data of the time series devices corresponding to unauthorized tags.
[0051] Based on the above method, a time series data rights management system in this embodiment firstly performs access control on the time series data column, including the administrator using authorization commands and the time series database query compiler to detect whether the user has access rights according to the existing authorization status;
[0052] Access control to time series data rows based on tags includes administrator users using specific commands and the time series database engine using specific access logic for tags.
[0053] When performing access control on time series data columns;
[0054] The administrator uses the authorization command to grant access rights to a certain label column or a certain data column to a certain user or role;
[0055] When a user tries to access a time series label column or data column, the time series database query compiler detects whether the user has access rights based on the existing authorization status.
[0056] When access control to time series data rows is performed based on tags;
[0057] Administrator users use specific commands, improved grant statements, or the newly added syntax for creating access policies to set the range of values of a specific tag column in a table that certain users or roles can access;
[0058] When a user tries to access data in a time series data table, the time series database engine determines the value conditions of the tag column to which the current user is granted access based on specific access logic for tags, and skips the data of the time series devices corresponding to unauthorized tags.
[0059] The above-mentioned specific implementations are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementations. Any technical solutions that comply with the claims of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.
[0060] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A time series data rights management method, characterized in that: The steps are as follows: S1. Perform access control on time series data columns; S2. Perform access control on time series data rows based on tags.
2. A time series data rights management method according to claim 1, characterized in that: In step S1, further comprising: S1-1. Administrator uses authorization command; S1-2. The time series database query compiler detects whether the user has access rights based on the existing authorization status.
3. A time series data rights management method according to claim 2, characterized in that: In step S1 - 1 , the administrator uses an authorization command to grant access rights to a certain tag column or a certain data column to a certain user or role.
4. A time series data rights management method according to claim 3, characterized in that: In step S1-2, when a user attempts to access a time series tag column or data column, the time series database query compiler detects whether the user has access rights based on existing authorization conditions.
5. A time series data rights management method according to claim 4, characterized in that: In step S2, further comprising: S2-1, Administrator user uses specific commands; S2-2. The time series database engine is based on specific access logic for tags.
6. A time series data rights management method according to claim 5, characterized in that: In step S2-1, the administrator user uses a specific command, an improved grant statement, or a newly added syntax for creating an access policy to set the range of values of a specific tag column in a table that certain users or roles can access.
7. A time series data rights management method according to claim 5, characterized in that: In step S2-2, when a user attempts to access data in a time series data table, the time series database engine determines the value conditions of the tag column to which the current user is granted access based on specific access logic for tags, and skips the data of the time series devices corresponding to unauthorized tags.
8. A time series data rights management system, characterized in that: First, access control is performed on the time series data column, including the administrator using authorization commands and the time series database query compiler to detect whether the user has access rights based on the existing authorization status; Access control to time series data rows based on tags includes administrator users using specific commands and the time series database engine using specific access logic for tags.
9. A time series data rights management system according to claim 8, characterized in that: When performing access control on time series data columns; The administrator uses the authorization command to grant access rights to a certain label column or a certain data column to a certain user or role; When a user tries to access a time series label column or data column, the time series database query compiler detects whether the user has access rights based on the existing authorization status.
10. A time series data rights management system according to claim 9, characterized in that: When access control to time series data rows is performed based on tags; Administrator users use specific commands, improved grant statements, or the newly added syntax for creating access policies to set the range of values of a specific tag column in a table that certain users or roles can access; When a user tries to access data in a time series data table, the time series database engine determines the value conditions of the tag column to which the current user is granted access based on specific access logic for tags, and skips the data of the time series devices corresponding to unauthorized tags.
Citation Information
Patent Citations
Terminal user-based database fine-grained access control method
CN107403106A
Data label-based data access method, server and system
CN110995657A
System and method for realizing service general data authority management
CN111274606A
Row-column-level data authority management and access query method and system
CN115114643A
Time sequence data processing method and device, electronic equipment and storage medium
CN116049153A