A data hierarchical query method and system based on data elements and qualifiers

By adopting a data grading method based on data elements and qualifiers, the problem of single data grading dimensions is solved, and efficient access control and accuracy of data query are achieved.

CN117033426BActive Publication Date: 2025-12-16中孚安全技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311068318.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2025-12-16
Estimated Expiration
2043-08-23

AI Technical Summary

Technical Problem

Existing data classification methods lack the definition of qualifiers, resulting in a single data classification dimension, which makes it difficult to meet the data classification maintenance and authorization of a large number of data units, and leads to low data query efficiency.

Method used

A data hierarchical method based on data elements and qualifiers is adopted. By dividing data units into data elements and qualifiers, and performing permission level judgments on each, the query results are returned or encrypted, thereby realizing data query permission control.

Benefits of technology

By reducing the number of data objects, the efficiency of data querying and the accuracy of access control are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117033426B_ABST
    Figure CN117033426B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data query, and provides a data hierarchical query method and system based on data units and qualifiers, which comprises the following steps: in response to a data query request, dividing each data unit to be queried in the data query request into data units and qualifiers, judging whether the data unit authority level of a user sending the data query request reaches a data unit hierarchical level, and judging whether the qualifier authority level of the user sending the data query request reaches a qualifier hierarchical level; and returning a query result of the data unit according to the two judgment results. The data object is reduced, and the data query efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of data query, and particularly relates to a data hierarchical query method and system based on data elements and qualifiers. BACKGROUND

[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.

[0003] The existing data hierarchical method classifies data units and compares and authenticates according to user authorization levels to control data access permissions.

[0004] The data unit lacks the definition of qualifiers, the design of data hierarchical levels of qualifiers, and the data hierarchical dimension is single, which is difficult to meet the data hierarchical maintenance and authorization of a large number of data units. For example, the names of the director, the clerk, the contact person, the director's phone number, the clerk's phone number, and the contact person's phone number are six data units without qualifiers, and six data levels need to be set. This results in low data query efficiency. SUMMARY

[0005] In order to solve the technical problems in the background art, the present application provides a data hierarchical query method and system based on data elements and qualifiers, which completes data hierarchical based on data elements and qualifiers, realizes data query permission control, reduces data objects, and improves data query efficiency.

[0006] In order to achieve the above purpose, the present application adopts the following technical solutions:

[0007] The first aspect of the present application provides a data hierarchical query method based on data elements and qualifiers, which comprises:

[0008] In response to a data query request, each data unit to be queried in the data query request is divided into data elements and qualifiers, and then it is judged whether the data element permission level of the user issuing the data query request reaches the data element hierarchical level, and whether the qualifier permission level of the user issuing the data query request reaches the qualifier hierarchical level.

[0009] According to the results of the two judgments, the query result of the data unit is returned.

[0010] Further, for each data unit, if the results of the two judgments are both reached, the value in the data unit is returned.

[0011] Further, for each data unit, if there is a judgment result that is not reached in the two judgment results, the value in the data unit is encrypted and the encrypted string is returned.

[0012] Further, the value range of the data element permission level of the user who sends the data query request is equal to the value range of the data element hierarchical level.

[0013] Further, the value range of the qualifier permission level of the user who sends the data query request is equal to the value range of the qualifier hierarchical level.

[0014] Further, the logical values of the two judgment results of each data unit are subjected to AND operation, and the AND operation results of all data units are combined to obtain a data unit query permission list, and the query results of all data units are returned according to the data unit query permission list.

[0015] Further, the data element is stored in a data element list, or the qualifier is stored in a qualifier list.

[0016] The second aspect of the present application provides a data hierarchical query system based on data elements and qualifiers, which comprises:

[0017] The checking module is configured to: in response to a data query request, after each data unit to be queried in the data query request is divided into a data element and a qualifier, judge whether the data element permission level of the user who sends the data query request reaches the data element hierarchical level, and judge whether the qualifier permission level of the user who sends the data query request reaches the qualifier hierarchical level;

[0018] The processing module is configured to: return the query result of the data unit according to the two judgment results.

[0019] The third aspect of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the steps of the data hierarchical query method based on data elements and qualifiers.

[0020] The fourth aspect of the present application provides a computer device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor realizes the steps of the data hierarchical query method based on data elements and qualifiers when executing the program.

[0021] Compared with the prior art, the present application has the following beneficial effects:

[0022] The present application completes data hierarchical based on data elements and qualifiers, realizes data query permission control, reduces data objects and improves the efficiency of data query. BRIEF DESCRIPTION OF DRAWINGS

[0023] The accompanying drawings, which form a part of this specification, are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification. The embodiments of the application, together with its details, are described in this specification with illustrations.

[0024] Figure 1 is a flow chart of a data hierarchical query method based on data element and qualifier according to the first embodiment of the present application;

[0025] Figure 2 is a structure chart of a data hierarchical query system based on data element and qualifier according to the second embodiment of the present application. DETAILED DESCRIPTION

[0026] The application will be further described below in connection with the drawings and embodiments.

[0027] It should be noted that the following detailed description is illustrative only and is not intended to provide undue limitations on the present application. Except where otherwise indicated, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs.

[0028] Embodiment One

[0029] The present embodiment provides a data hierarchical query method based on data element and qualifier.

[0030] The data hierarchical query method based on data element and qualifier provided by the present embodiment uses the method of qualifier and data element to simplify the six data units of director name, section officer name, contact officer name, director phone number, section officer phone number, and contact officer phone number into three qualifiers (director, section officer, and contact officer) and two data elements (name and phone number), and only five data levels need to be set. When the number of data units becomes large, the efficiency of the method in the present application will be improved more obviously compared with the existing solutions.

[0031] The data hierarchical query method based on data element and qualifier provided by the present embodiment, as shown in Figure 1 , includes the following steps:

[0032] Step one, data element hierarchical setting. Obtain the data element list of the metadata system, and set the hierarchical value M x of each data element, where M x is an integer ranging from 0 to 99.

[0033] Step two, qualifier hierarchical setting. Obtain the qualifier list of the metadata system, and set the hierarchical value D y of each qualifier, where D y is an integer ranging from 0 to 99.

[0034] Step three, set user role permission. Create a user role, and authorize the data element permission of the role, the data element permission level of the role M c , M c is an integer ranging from 0 to 99; set the qualifier permission of the role, the qualifier permission level of the role D c , D c is an integer ranging from 0 to 99.

[0035] Step four, the user issues a data query request. The query request contains the union set N of data units to be queried and the filtering condition, and each data unit is divided into a data element and a qualifier.

[0036] Step five, user data query permission verification. Obtain the data element permission level M c of the user, the qualifier permission level D c , and the data unit union set N in step four, N = 1, 2, 3,..., n. Compare the data element permission level M c of the user with the data element classification level M n of the nth data unit; compare the qualifier permission level D c of the user with the qualifier classification level D n of the nth data unit. If M c > M n and D c > D n , the user query permission R n of the data unit is true, indicating that the data unit can be accessed; otherwise, R n is false, indicating that the permission is insufficient and the data unit cannot be accessed. Traverse the data unit union set N, perform an AND operation on the logical values of the two comparison results of each data unit, combine the AND operation results of all data units, and obtain the data unit query permission list R = [R1, R2, R3,..., R n ].

[0037] Step six, data processing. According to the data unit union set N query permission list R returned in step five, process each data unit. If R n is true, the original text of the value in the data unit is returned; if R n is false, the value in the data unit is encrypted, and the encrypted string is returned.

[0038] The data classification query method based on data elements and qualifiers provided in this embodiment realizes data classification based on data elements and qualifiers, and controls data query permission. The number of data objects is reduced, and the maintenance efficiency of data query permission is improved.

[0039] Embodiment Two

[0040] The embodiment provides a data hierarchical query system based on data elements and qualifiers, as shown in the figure, which specifically comprises: Figure 2

[0041] a data element hierarchical module for defining a data element hierarchical level;

[0042] a qualifier hierarchical module for defining a qualifier hierarchical level;

[0043] a user authority module for defining user roles and authorizing data authorities of the roles.

[0044] a verification module for verifying data access authorities of users and comparing the data access authorities with the hierarchical levels of the data elements and the qualifiers and returning comparison results, that is, in response to a data query request, judging whether data element authorities of a user sending the data query request reach the data element hierarchical level after dividing each data unit to be queried in the data query request into data elements and qualifiers and judging whether qualifier authorities of the user sending the data query request reach the qualifier hierarchical level.

[0045] a processing module for judging whether to perform encryption processing on data according to a result of the verification module and returning the processed data to the user, that is, returning a query result of the data unit according to the two judgment results.

[0046] It should be noted that each module in the embodiment corresponds to each step in Embodiment One one by one, and the specific implementation process is the same, which will not be repeated here.

[0047] Embodiment Three

[0048] The embodiment provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize steps in a data hierarchical query method based on data elements and qualifiers.

[0049] Embodiment Four

[0050] The embodiment provides a computer device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and the processor realizes steps in a data hierarchical query method based on data elements and qualifiers when executing the program.

[0051] ​The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more computer-readable media. Figure 1 one or more computer-readable media.

[0052] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more computer-readable media. Figure 1 one or more computer-readable media.

Claims

1. A data hierarchical query method based on data elements and qualifiers, characterized in that, include: In response to a data query request, each data unit to be queried in the data query request is divided into data elements and limiting words. Then, it is determined whether the data element permission level of the user who issued the data query request reaches the data element classification level, and whether the limiting word permission level of the user who issued the data query request reaches the limiting word classification level. Based on the results of the two judgments, return the query results for the data unit; Perform a bitwise AND operation on the logical values ​​of the two judgment results for each data unit, combine the results of the bitwise AND operation of all data units to obtain the data unit query permission list, and return the query results of all data units according to the data unit query permission list.

2. The data hierarchical query method based on data elements and qualifying terms as described in claim 1, characterized in that, For each data unit, if neither of the two judgments is satisfactory, then the value in the data unit is returned.

3. The data hierarchical query method based on data elements and qualifying terms as described in claim 1, characterized in that, For each data unit, if one of the two judgment results is "not met", then the value in the data unit is encrypted and the encrypted string is returned.

4. The data hierarchical query method based on data elements and qualifying terms as described in claim 1, characterized in that, The range of values ​​for the data element permission level of the user who issued the data query request is equal to the range of values ​​for the data element classification level.

5. The data hierarchical query method based on data elements and qualifying terms as described in claim 1, characterized in that, The range of values ​​for the qualifier permission level of the user who issued the data query request is equal to the range of values ​​for the qualifier classification level.

6. The data hierarchical query method based on data elements and qualifying terms as described in claim 1, characterized in that, The data elements are stored in a data element list; or, the qualifying words are stored in a qualifying word list.

7. A data hierarchical query system based on data elements and qualifiers, characterized in that, include: The verification module is configured to: in response to a data query request, divide each data unit to be queried in the data query request into data elements and limiting words, determine whether the data element permission level of the user who issued the data query request reaches the data element classification level, and determine whether the limiting word permission level of the user who issued the data query request reaches the limiting word classification level. The processing module is configured to return the query results of the data unit based on the results of the two judgments; Perform a bitwise AND operation on the logical values ​​of the two judgment results for each data unit, combine the results of the bitwise AND operation of all data units to obtain the data unit query permission list, and return the query results of all data units according to the data unit query permission list.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the data hierarchical query method based on data elements and qualifiers as described in any one of claims 1-6.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the data hierarchical query method based on data elements and qualifiers as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Data access control method and device

    CN111460506A

  • Data element analysis method and device, electronic device and storage medium

    CN112464640A