Method for controlling rights and related device

By defining the permissions of metadata nodes and dependent nodes in custom queries, the data security issue in custom queries is resolved, enabling flexible access control for analysis and exploratory experiments, and ensuring the security and accuracy of system data.

CN117272374BActive Publication Date: 2026-11-24BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311213307.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2026-11-24
Estimated Expiration
2043-09-19

AI Technical Summary

Technical Problem

Existing technologies lack effective methods to ensure data security during custom queries, especially in flexible analysis and exploratory experiments where user access control is not strict enough.

Method used

By obtaining the query statement, determining the metadata node based on the preset metadata and the query statement, marking the definition of the computed field, and determining the permissions of the computed field based on the permissions of the dependent metadata node, the authentication of the computed field is achieved.

Benefits of technology

It implements data security controls during custom queries, ensuring the security of system data and the accuracy of access control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117272374B_ABST
    Figure CN117272374B_ABST
Patent Text Reader

Abstract

This disclosure provides a method and related device for controlling permissions. Specifically, the control method includes: obtaining a query statement; determining and marking at least one metadata node corresponding to the query statement based on preset metadata and the query statement; determining the definition of a calculated field based on the query statement; filtering the at least one metadata node to obtain dependent metadata nodes of the calculated field based on the definition of the calculated field; and determining the permissions of the calculated field based on the permissions of the dependent metadata nodes, thereby achieving authentication of the calculated field and ensuring system data security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method and related equipment for controlling permissions. Background Technology

[0002] With economic development, users' business types are becoming increasingly diverse, generating massive amounts of data. To ensure the uniformity of the storage system and accommodate business diversity, a unified data modeling and description is necessary. This allows a single system to flexibly adapt to different business needs, rather than requiring the creation of entirely new data tables for each business. In this data modeling, business-related tables and fields are mapped to the actual tables and fields stored in the database. This mapping relationship is stored in metadata, allowing users to directly access the business fields they are familiar with.

[0003] Commonly used query actions such as analysis, filtering, tagging, and grouping are directly converted into Structured Query Language (SQL) statements for use with the final actual database by a pre-defined program, combined with metadata information. However, for more flexible analysis or exploratory experiments, custom queries are needed, such as Objective Query Language (OQL). Users can obtain relevant data through custom queries and output it as virtual tables for use in components; however, currently, there is a lack of effective methods to ensure data security. Summary of the Invention

[0004] In view of this, the purpose of this disclosure is to propose a method for controlling access and related equipment.

[0005] To achieve the above objectives, this disclosure provides a method for controlling permissions, including:

[0006] Retrieve the query statement;

[0007] Based on the preset metadata and the query statement, determine and mark at least one metadata node corresponding to the query statement;

[0008] The definition of the calculated field is determined based on the query statement;

[0009] Based on the definition of the computed field, the dependent metadata nodes of the computed field are obtained by filtering the at least one metadata node; and

[0010] The permissions of the computed field are determined based on the permissions of the dependent metadata nodes.

[0011] Based on the same inventive concept, this disclosure also provides an access control device, including:

[0012] The retrieval module is configured to retrieve query statements.

[0013] The identification module is configured to: determine and mark at least one metadata node corresponding to the query statement based on preset metadata and the query statement;

[0014] The definition module is configured to: determine the definition of the calculated field based on the query statement;

[0015] The dependency determination module is configured to: based on the definition of the computed field, filter the at least one metadata node to obtain the dependency metadata nodes of the computed field; and

[0016] The permission determination module is configured to determine the permissions of the computed field based on the permissions of the dependent metadata nodes.

[0017] Based on the same inventive concept, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the control method as described in any of the above claims when executing the program.

[0018] Based on the same inventive concept, this disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions, characterized in that the computer instructions are used to cause a computer to execute any of the control methods described above.

[0019] As can be seen from the above, the permission control method and related devices provided in this disclosure first determine and mark at least one metadata node corresponding to the query statement based on preset metadata and query statement; then determine the definition of the calculated field based on the query statement; based on the definition of the calculated field, filter the at least one metadata node to obtain the dependent metadata nodes of the calculated field; finally, determine the permissions of the calculated field based on the permissions of the dependent metadata nodes, thereby realizing the authentication of the calculated field and ensuring system data security. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1A This diagram illustrates an application scenario provided by an embodiment of the present disclosure.

[0022] Figure 1B Show Figure 1A A schematic diagram of the configuration interface for application scenarios in the example;

[0023] Figure 2 This diagram illustrates a processing flow of a query statement provided in an embodiment of the present disclosure.

[0024] Figure 3 A flowchart illustrating a permission control method provided in an embodiment of this disclosure is shown.

[0025] Figure 4 This diagram illustrates the structure of a metadata node provided in an embodiment of the present disclosure.

[0026] Figure 5 This diagram illustrates the definition of a calculated field provided in an embodiment of the present disclosure.

[0027] Figure 6 This diagram illustrates the structure of a permission control device provided in an embodiment of the present disclosure.

[0028] Figure 7 This diagram illustrates the structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0030] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar words used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0031] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0032] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0033] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0034] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0035] To facilitate understanding of the technical solutions disclosed herein, some technical terms involved in this disclosure will be introduced below.

[0036] Database: Also known as a data management system, it is a collection of data that is processed and stored together in a certain way, which can be shared by multiple users and minimizes redundancy. In short, it can be regarded as an electronic filing cabinet - a place to store electronic files.

[0037] Metadata: also known as intermediary data or relay data, is data about data. It mainly describes the properties of data and is used to support functions such as indicating storage location, historical data, resource lookup, and file records.

[0038] Physical tables: These are the core components of a database, consisting of rows and columns. A row contains several columns of information items, and a row of data constitutes one or more records; columns are also called fields, used to describe the characteristics of related data.

[0039] Virtual tables: These are tables that do not actually exist (physically), but logically exist. Virtual tables are defined based on physical tables and are used to provide data services, but they do not actually store data. Their data usage is the same as that of physical tables.

[0040] SDK: Software Development Kit. In this disclosure, the SDK includes functions related to parsing object query language.

[0041] To make the technical solution of this disclosure clearer and easier to understand, the application scenario of an access control method provided by an embodiment of this disclosure is described below with reference to the accompanying drawings.

[0042] Figure 1A This diagram illustrates an application scenario provided by an embodiment of the present disclosure. Figure 1B Show Figure 1A This is a schematic diagram of the configuration interface for application scenarios. Page 100 includes component 101. Figure 1B The configuration interface includes a logic configuration interface 102 and a data editing interface 103. For example, referring to the logic configuration interface 102, clicking component 101 results in a logic request for data 1. If successful, the corresponding data value is displayed; otherwise, a failure message is displayed. Using the data editing interface 103, an object query language can be written to query objects. The virtual table can be the logical relationship corresponding to the object query statement, and the corresponding field values ​​can be used by component 101 as data 1.

[0043] Figure 2 This diagram illustrates a query statement processing flow provided in an embodiment of this disclosure. (In conjunction with...) Figure 2 This document explains the process from querying a statement to obtaining data 1. It should be noted that this explanation uses an object query language as an example.

[0044] First, the user can input a first query statement through the terminal, or the terminal can invoke a pre-configured first query statement based on preset conditions. This first query statement can be written in a standardized language, which can be an object query language.

[0045] Next, the software development kit 201 can be used to parse the first query statement. The software development kit 201 can perform lexical analysis, syntax analysis, and semantic analysis on the first query statement and ultimately generate intermediate code. Semantic analysis includes semantic understanding and semantic checking. The semantic understanding stage can call objects and fields from the preset metadata 203. Semantic checking can perform anomaly detection on the first query statement, such as checking for anomalous statements like Cartesian products, large table left joins, or sensitive words; if any are found, the query is rejected. A large table is defined as a table or view with more than a specified number of records or occupying more than a specified amount of storage.

[0046] Finally, the intermediate code can be transformed into a second query statement. Here, the second query statement can directly query the database. With the help of Data Engine 202, the second query statement can be optimized to generate target code and executed. The execution result is the result of the virtual table.

[0047] Different users typically have different database permissions. Therefore, it is usually necessary to determine the user's permissions for relevant data before generating intermediate code. Currently, for authentication of custom queries, which is equivalent to deriving a new model from a data model, two methods are generally used. The first is to directly ignore the permissions of the original model and design a separate authorization system for the new model. This method is simpler from a technical point of view, but considering the complexity of the original model, it is prone to errors and omissions. The second is to inherit the permissions of the original model, which is not easy to implement from a technical point of view.

[0048] In view of this, embodiments of this disclosure provide a method, apparatus, electronic device, and storage medium for controlling permissions. First, based on preset metadata and a query statement, at least one metadata node corresponding to the query statement is determined and marked; then, the definition of a calculated field is determined based on the query statement; based on the definition of the calculated field, the dependent metadata nodes of the calculated field are obtained by filtering the at least one metadata node; finally, based on the permissions of the dependent metadata nodes, the permissions of the calculated field are determined, thereby achieving authentication of the calculated field and ensuring system data security.

[0049] The fields that a query statement can output may include referenced fields and calculated fields. In some embodiments, the distinction between the two is as follows:

[0050] The value of the referenced field is taken directly from a field in other metadata (object / dataset, etc.);

[0051] The value of a calculated field is derived from various syntaxes, including constants, field values, and functions.

[0052] For example, query statement 1 is shown below:

[0053] select field+1as newField, field from object.

[0054] As can be seen from query statement 1, newField is obtained by adding 1 to field, and is a calculated field; field comes directly from object, and is a reference field.

[0055] For example, query statement 2 is shown below:

[0056] select 1as newField1, newField2 from(select field as newField2 fromobject).

[0057] As can be seen from query statement 2, newField1 is a constant (1) and not directly taken from metadata; it is a computed field. The field from object is directly used as newField2, so newField2 references the field.

[0058] The permission control methods provided in some embodiments of this disclosure employ different permission control methods for referenced fields and calculated fields.

[0059] In some embodiments, the permissions of a referenced field are determined based on the permissions of the field it references. Optionally, if a user has permissions on the object field it references, then the user has permissions on the referenced field.

[0060] In some embodiments, the permissions of a computed field need to be inferred based on whether the field has permissions. The inference rule is: if the computed field uses an object field without permissions, then it has no permissions; if it does not use an object field without permissions, then it has permissions. Here, an object field refers to a field in the object referenced by the computed field. Here, the object is the reference target determined by the query statement, usually located after FROM, such as a data table, dataset, etc., which is not limited in this disclosure.

[0061] Next, combined Figure 2 , Figure 4 and Figure 5 The permission control method provided in the embodiments of this disclosure will be described in detail.

[0062] As mentioned earlier, the first query statement is parsed. Here, parsing the first query statement can be done using... Figure 2 The SDK 201 shown is used. Through lexical analysis, syntax analysis, and semantic analysis, and by using information such as the position and name of words in the first query statement, it is possible to deduce which nodes in the first query statement are objects and which nodes are fields.

[0063] Optionally, the preset metadata 203 can be data with business significance, such as the mapping relationship between business-meaning tables and fields and the actual tables and fields stored in the database. The preset metadata 203 can include objects and fields. Objects can be tables, data, etc.

[0064] During the semantic analysis phase, information about the preset metadata 203 can be obtained. For example, information about the preset metadata 203 can be obtained by calling methods such as LoadObjects and LoadFields of the metadata service.

[0065] In some embodiments, the field node of the first query statement is compared with the preset metadata 203. If the field node successfully matches any field of the preset metadata, it indicates that the field node matches the preset metadata 203, that is, the field node is a metadata node. At this time, the field node can be marked, for example, as "field". In some embodiments, the metadata information corresponding to the field node from the aforementioned obtained preset metadata information is filled into the field node.

[0066] Optionally, the metadata information corresponding to the field node includes permission information, which is superimposed with the permission information of the object to which the field node belongs. It should be noted that in the preset metadata, an object can typically include multiple fields, and permissions can be set for both the object and the fields separately. A user has permission for a field only if they have permissions for both the object and the field; otherwise, they do not have permission for the field.

[0067] In some embodiments, the object node of the first query statement is compared with the preset metadata 203. If the object node successfully matches any object in the preset metadata, it indicates that the object node matches the preset metadata 203, that is, the object node is a metadata node. At this time, the object node can be marked, for example, as "object". In some embodiments, the metadata information corresponding to the object node from the aforementioned obtained preset metadata information is filled into the object node.

[0068] In some embodiments, if an object node or field node fails to match any of the preset metadata, it indicates that there is an error in the object node or field node. In this case, an error message can be displayed so that the user can make corrections.

[0069] For example, the first query statement is as follows:

[0070] select number+1as newField from object.

[0071] The default metadata 203 includes object and number. After the above processing, it can be determined that both the object node and the number node are metadata nodes, and both have corresponding tags and metadata information. For example, the tag of the object node is "object", and the tag of the number node is "field".

[0072] Figure 4 This diagram illustrates the structure of a metadata node according to an embodiment of the present disclosure. The metadata node 400 includes a node name (number), a tag 401 (field), and object field information 402.

[0073] Next, the definition of the computed field can be determined based on the first query statement. In some embodiments, a computed field node is generated, during which the definition of the computed field is assigned to the computed field node. Figure 5 This diagram illustrates the definition of a computed field according to an embodiment of the present disclosure. The computed field definition in the computed field (newField) node 500 includes parameters 501 and 502, and a function operation. Parameter 501 is the field value of the metadata node number, parameter 502 is the constant 1, and the function operation is addition.

[0074] Then, based on the definition of the computed field, the metadata nodes can be filtered to obtain the dependent metadata nodes. For example, the aforementioned determined metadata nodes include object nodes and number nodes. As can be seen from the definition of the computed field, the value of the computed field is related to the number node but not to the object node; therefore, the dependent metadata node is determined to be the number field node.

[0075] This disclosure also provides another example of a scheme for determining dependent metadata nodes. The first query statement is as follows:

[0076] select newField+1as newField2 from(select number+1as newField fromobject)as temp.

[0077] When the first query statement includes multiple computed fields, the dependent metadata nodes are determined according to the order from outermost to innermost. Based on the first query statement, it can be determined that `newField` is defined as `number+1`, and `newField2` is defined as `newField+1`. When determining the permissions of the outermost computed field `newField2`, it can be determined that it depends on `newField` and constant node 1. Then, by traversing the definitions of `newField`, the dependent metadata node of `newField2` is finally found to be the object field `number`.

[0078] Next, the permissions of the computed field can be deduced based on the permissions of the dependent metadata nodes (e.g., the number field). Optionally, the permissions of the dependent metadata nodes can be determined based on their metadata information. In some embodiments, if any of the metadata nodes lacks permissions, the computed field lacks permissions; otherwise, the computed field has permissions.

[0079] Finally, when the user has permissions to the calculated fields and / or referenced fields involved in the first query statement, intermediate code can be generated based on the first query statement to generate a second query statement that can directly access the database. The steps for performing database queries based on the second query statement are not described in detail in this embodiment. When the user does not have permissions to the calculated fields and / or referenced fields involved in the first query statement, a permission-deficient message can be displayed to the user.

[0080] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.

[0081] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0082] This exemplary embodiment also discloses a method for controlling permissions. Figure 3 This diagram illustrates a flowchart of a permission control method provided in an embodiment of the present disclosure. The control method includes:

[0083] Step S302: Obtain the query statement; it should be noted that the query statement here can be the first query statement, and the method for obtaining the query statement can be found in the aforementioned description of obtaining the first query statement. Optionally, the query statement can be a query statement written in an object query language.

[0084] Step S304: Based on the preset metadata and the query statement, determine and mark at least one metadata node corresponding to the query statement; here, refer to Figure 2 The default metadata 203 can be data with business significance, such as business-meaning tables and fields, and their mapping relationships with the actual tables and fields stored in the database; the default metadata 203 can include objects and fields; objects can be tables, data, etc.; the structure of the metadata node can be found in [reference needed]. Figure 4 ;

[0085] Step S306: Determine the definition of the calculated field based on the query statement (see [link]). Figure 5It should be noted that the definition of a calculated field refers to the expression of the calculated field; optionally, the expression includes parameters and function operations.

[0086] Step S308: Based on the definition of the computed field, filter the at least one metadata node to obtain the dependent metadata nodes of the computed field;

[0087] Step S3010: Determine the permissions of the computed field based on the permissions of the dependent metadata nodes. This method eliminates the need to redesign the authentication system; by deriving the permissions of the computed field from preset metadata, data security can be easily and conveniently guaranteed.

[0088] In some embodiments, the metadata node includes a field node; the step of determining and marking at least one metadata node corresponding to the query statement based on the preset metadata and the query statement specifically includes:

[0089] By parsing the query statement, at least one field node corresponding to the query statement is obtained; it should be noted that the query statement includes multiple nodes, such as object nodes, field nodes, constant nodes, etc.

[0090] In response to a match between the field node and any field of the preset metadata, the field node is marked, and the corresponding field information is obtained based on the preset metadata. Here, the mark can be a tag used to distinguish the type of node. For example, the mark for an object node can be an object tag, and the information obtained from the preset metadata is object information; the mark for a field node can be a field tag, and the information obtained from the preset metadata is field information.

[0091] In some embodiments, it also includes:

[0092] If a match between the field node and any field of the preset metadata fails, an error message is output. Outputting error messages reminds the user to check the query statement, improving query efficiency.

[0093] In some embodiments, the definition of the computed field includes at least one parameter, and the step of filtering the at least one metadata node to obtain the dependent metadata nodes of the computed field based on the definition of the computed field specifically includes:

[0094] Compare the parameter with the at least one metadata node;

[0095] In response to the parameter and any of the metadata nodes, the corresponding metadata node is determined as the dependent metadata node of the computed field.

[0096] In some embodiments, the metadata node includes metadata information, which is obtained based on matching preset metadata; for example, if the metadata node is a field node, then the metadata information is field information, where the field information describes field attributes, including but not limited to permission information; the method of obtaining the metadata information may be by calling Loadfields; the step of determining the permissions of the computed field based on the permissions of the dependent metadata node specifically includes:

[0097] The permissions of the dependent metadata nodes are determined based on the metadata information;

[0098] If any of the dependent metadata nodes lacks permission, the computed field is determined to lack permission; if all dependent metadata nodes have permission, the computed field is determined to have permission.

[0099] This method of determining permissions for calculated fields is simple and convenient.

[0100] In some embodiments, the metadata node includes a field node, and the metadata information is superimposed with the permission information of the object to which the field node belongs. Here, the permission information of the object can be obtained from the corresponding object in the preset metadata.

[0101] In some embodiments, it also includes:

[0102] The referenced fields are determined based on the query statement. Here, the definition of the referenced fields is as described above. Both the referenced fields and the calculated fields can be determined based on the parsing results of the query statement. This disclosure will not elaborate on this. The same applies to the calculated fields. Since the query statement corresponds to at least one metadata node, if there is a referenced field, the referenced field usually corresponds to one metadata node.

[0103] The permissions of the referenced field are determined based on the permissions of the metadata node corresponding to the referenced field. Here, the referenced field corresponds to a metadata node, and the metadata node includes the permission information of the metadata. Therefore, the permissions of the metadata can be directly reused as the permissions of the referenced field, which is simple and secure.

[0104] The permission control method provided in this disclosure determines permissions for referenced fields and calculated fields separately, making permission control more targeted and facilitating efficient and accurate permission determination.

[0105] Based on the same inventive concept, corresponding to any of the above-described embodiments, this disclosure also provides an access control device.

[0106] refer to Figure 6 The permission control device includes:

[0107] Module 602 is configured to retrieve query statements.

[0108] The identification module 604 is configured to: determine and mark at least one metadata node corresponding to the query statement based on the preset metadata and the query statement;

[0109] Definition module 606 is configured to: determine the definition of the calculated field based on the query statement;

[0110] The dependency determination module 608 is configured to: based on the definition of the computed field, filter the at least one metadata node to obtain the dependency metadata nodes of the computed field; and

[0111] The permission determination module 6010 is configured to determine the permissions of the computed field based on the permissions of the dependent metadata nodes.

[0112] In some embodiments, the metadata node includes a field node; the identification module 604 is further configured to: obtain at least one field node corresponding to the query statement by parsing the query statement;

[0113] In response to a match between the field node and any field of the preset metadata, the field node is marked and the corresponding field information is obtained based on the preset metadata.

[0114] In some embodiments, the identification module 604 is further configured to output an error message in response to a failure to match any field of the field node and the preset metadata.

[0115] In some embodiments, the definition of the computed field includes at least one parameter, and the dependency determination module 608 is further configured to compare the parameter with the at least one metadata node;

[0116] In response to the parameter and any of the metadata nodes, the corresponding metadata node is determined as the dependent metadata node of the computed field.

[0117] In some embodiments, the metadata node includes metadata information, which is obtained based on matching preset metadata; the permission determination module 6010 is further configured to:

[0118] The permissions of the dependent metadata nodes are determined based on the metadata information;

[0119] If any of the dependent metadata nodes lacks permission, the computed field is determined to lack permission; if all dependent metadata nodes have permission, the computed field is determined to have permission.

[0120] In some embodiments, the metadata node includes a field node, and the metadata information is superimposed with the permission information of the object to which the field node belongs.

[0121] In some embodiments, the definition module 606 is further configured to: determine the referenced field based on the query statement;

[0122] The permission determination module 6010 is also configured to: determine the permission of the referenced field based on the permissions of the metadata node corresponding to the referenced field.

[0123] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing this disclosure, the functions of each module can be implemented in one or more software and / or hardware.

[0124] The apparatus of the above embodiments is used to implement the corresponding control method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0125] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the control method described in any of the above embodiments.

[0126] Figure 7 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0127] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0128] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0129] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0130] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0131] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0132] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0133] The electronic devices described above are used to implement the corresponding control methods in any of the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0134] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute the control method as described in any of the above embodiments.

[0135] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0136] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the control method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0137] Based on the same inventive concept, corresponding to the control method described in any of the above embodiments, this disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer to cause the computer and / or the processor to perform the color correction method. Corresponding to the execution entity for each step in each embodiment of the color correction method, the processor executing the corresponding step can belong to the corresponding execution entity.

[0138] The computer program products of the above embodiments are used to cause the computer and / or the processor to execute the control method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0139] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.

[0140] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0141] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0142] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for controlling access permissions, characterized in that, include: Retrieve the query statement; Based on the preset metadata and the query statement, determine and mark at least one metadata node corresponding to the query statement; The definition of the calculated field is determined based on the query statement; Based on the definition of the computed field, the dependent metadata nodes of the computed field are obtained by filtering the at least one metadata node; as well as The permissions of the computed field are determined based on the permissions of the dependent metadata nodes; wherein, The step of determining the permissions of the computed field based on the permissions of the dependent metadata node specifically includes: The permissions of the dependent metadata node are determined based on the metadata information; wherein the metadata information is obtained based on preset metadata that matches the dependent metadata node; If any of the dependent metadata nodes lacks permission, the computed field is determined to lack permission; if all dependent metadata nodes have permission, the computed field is determined to have permission.

2. The control method according to claim 1, characterized in that, The metadata node includes field nodes; The step of determining and marking at least one metadata node corresponding to the query statement based on the preset metadata and the query statement specifically includes: By parsing the query statement, at least one field node corresponding to the query statement is obtained; In response to a match between the field node and any field of the preset metadata, the field node is marked and the corresponding field information is obtained based on the preset metadata.

3. The control method according to claim 2, characterized in that, Also includes: If the field node and any field of the preset metadata fail to match, an error message is output.

4. The control method according to claim 1, characterized in that, The definition of the computed field includes at least one parameter, and the step of filtering the at least one metadata node to obtain the dependent metadata nodes of the computed field based on the definition of the computed field specifically includes: Compare the parameter with the at least one metadata node; In response to the parameter and any of the metadata nodes, the corresponding metadata node is determined as the dependent metadata node of the computed field.

5. The control method according to claim 1, characterized in that, The metadata node includes field nodes, and the metadata information is superimposed with the permission information of the object to which the field node belongs.

6. The control method according to claim 1, characterized in that, Also includes: Determine the referenced fields based on the query statement; The permissions of the referenced field are determined based on the permissions of the metadata node corresponding to the referenced field.

7. A permission control device, characterized in that, include: The retrieval module is configured to retrieve query statements. The identification module is configured to: determine and mark at least one metadata node corresponding to the query statement based on preset metadata and the query statement; The definition module is configured to: determine the definition of the calculated field based on the query statement; The dependency determination module is configured to: based on the definition of the computed field, filter the at least one metadata node to obtain the dependency metadata nodes of the computed field; as well as The permission determination module is configured to: determine the permissions of the computed field based on the permissions of the dependent metadata nodes; The permission determination module is further configured to: determine the permissions of the dependent metadata node based on metadata information; wherein the metadata information is obtained based on preset metadata that matches the dependent metadata node; If any of the dependent metadata nodes lacks permission, the computed field is determined to lack permission; if all dependent metadata nodes have permission, the computed field is determined to have permission.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, characterized in that, The processor implements the control method according to any one of claims 1 to 6 when executing the computer program.

9. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the control method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data query method and device, electronic equipment and storage medium

    CN111782923A

  • Permission control method and device based on interceptor, computer equipment and medium

    CN114065296A