Permission query method and device based on graph database, equipment and medium

Through the permission query method based on graph database, the multi-level node relationship description graph database is parsed and queryed, which solves the problem of low efficiency in traditional databases when handling complex permission configurations, and achieves more efficient and accurate permission query.

CN118981783APending Publication Date: 2024-11-19BEIJING YOUTEJIE INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411070236.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

When traditional relational databases deal with many-to-many relationships and nested permission structures, query efficiency is low, making it difficult to flexibly manage complex permission configurations.

Method used

The permission query method based on the graph database is adopted. By obtaining the permission query instructions, the company name and the description information of the node to be queryed are input to the pre-constructed multi-level node relationship description diagram database by obtaining the permission query results and feeding them back to the user.

Benefits of technology

It improves the efficiency and accuracy of user permission query, and solves the problem that the permission management system is difficult to flexibly handle complex permission configurations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981783A_ABST
    Figure CN118981783A_ABST
Patent Text Reader

Abstract

The invention discloses an authority query method, device and equipment based on a graph database and a medium. The method comprises the following steps: acquiring a current permission query instruction, and analyzing the current permission query instruction to obtain a current permission query instruction analysis result corresponding to the current permission query instruction; wherein the current authority query instruction analysis result comprises a current company name and current to-be-queried node description information; inputting the current company name and the current to-be-queried node description information into a pre-constructed multi-level node relation description graph database to obtain a current permission query result corresponding to the current permission query instruction; and feeding back and displaying the current permission query result to the user to complete the operation of the current permission query instruction. The problem that the permission management system is difficult to flexibly process complex permission configuration is solved, the flexibility of processing the complex permission configuration by the user permission management system is improved, and the efficiency and accuracy of user permission query are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a permission query method, device, equipment and medium based on a graph database. Background Art

[0002] With the development of information technology, there is more and more employee data in enterprises. Different employees have different permissions. Therefore, it is very important to quickly query permissions.

[0003] In the process of implementing the present invention, the inventors found that the prior art has the following defects: At present, the traditional permission management system is usually based on a relational database, which manages the relationship between users, roles and permissions through the association between tables. However, when dealing with many-to-many relationships and nested permission structures, the query efficiency of the relational database is low, and the design of the data table is also relatively complex. Summary of the invention

[0004] The present invention provides a permission query method, device, equipment and medium based on a graph database to improve the efficiency and accuracy of user permission query.

[0005] According to one aspect of the present invention, a permission query method based on a graph database is provided, which includes:

[0006] Obtaining a current permission query instruction, and parsing the current permission query instruction to obtain a current permission query instruction parsing result corresponding to the current permission query instruction;

[0007] The parsing result of the current permission query instruction includes the current company name and the description information of the current node to be queried;

[0008] Input the current company name and the current node description information to be queried into a pre-built multi-level node relationship description graph database to obtain a current authority query result corresponding to the current authority query instruction;

[0009] The current permission query result is fed back to the user and displayed to complete the operation of the current permission query instruction.

[0010] According to another aspect of the present invention, a permission query device based on a graph database is provided, which includes:

[0011] A current permission query instruction parsing result obtaining module, used to obtain the current permission query instruction, and parse the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction;

[0012] The parsing result of the current permission query instruction includes the current company name and the description information of the current node to be queried;

[0013] A current authority query result obtaining module is used to input the current company name and the current node description information to be queried into a pre-built multi-level node relationship description graph database to obtain a current authority query result corresponding to the current authority query instruction;

[0014] The current permission query result feedback module is used to feed back and display the current permission query result to the user to complete the operation of the current permission query instruction.

[0015] According to another aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the permission query method based on the graph database described in any embodiment of the present invention is implemented.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the permission query method based on a graph database described in any embodiment of the present invention when executed.

[0017] The technical solution of the embodiment of the present invention obtains the current permission query instruction and parses the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction; wherein the current permission query instruction parsing result includes the current company name and the current node description information to be queried; the current company name and the current node description information to be queried are input into a pre-built multi-level node relationship description graph database to obtain the current permission query result corresponding to the current permission query instruction; the current permission query result is fed back and displayed to the user to complete the operation of the current permission query instruction. The problem that the permission management system is difficult to flexibly handle complex permission configurations is solved, the flexibility of the user permission management system in handling complex permission configurations is improved, and the efficiency and accuracy of user permission queries are improved.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 This is a flowchart of a permission query method based on a graph database provided according to the first embodiment of the present invention;

[0021] Figure 2 It is a structural schematic diagram of a permission query device based on a graph database provided according to the second embodiment of the present invention;

[0022] Figure 3 It is a structural schematic diagram of an electronic device provided according to Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not 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 should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "target", "current", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] Embodiment 1

[0026] Figure 1 A flowchart of a permission query method based on a graph database is provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where user permissions are queried. The method can be executed by a permission query device based on a graph database, and the permission query device based on a graph database can be implemented in the form of hardware and / or software.

[0027] Correspondingly, such as Figure 1 As shown, the method includes:

[0028] S110: Acquire a current permission query instruction, and parse the current permission query instruction to obtain a current permission query instruction parsing result corresponding to the current permission query instruction.

[0029] The parsing result of the current permission query instruction includes the current company name and the description information of the current node to be queried.

[0030] The current permission query instruction may be an instruction for querying permissions issued to a permission query system based on a graph database.

[0031] In this embodiment, user rights can be queried in real time. User rights can be queried through the current user node description information, the current role node description information, or the current department node description information. The sub-rights corresponding to the user rights can also be queried and processed.

[0032] The current permission query instruction parsing result may be a parsing result obtained by parsing the current permission query instruction, and may include the current company name and the current description information of the node to be queried.

[0033] S120: Input the current company name and the current node description information to be queried into a pre-built multi-level node relationship description graph database to obtain a current permission query result corresponding to the current permission query instruction.

[0034] Among them, the multi-level node relationship description graph database can be a graph database used to describe multiple relationship description nodes and the relationship between each relationship description node. Specifically, the relationship description nodes are connected by lines to indicate the association relationship between each relationship description node.

[0035] Specifically, the current company name and the current node description information to be queried are input into a pre-built multi-level node relationship description graph database to obtain a current permission query result corresponding to the current permission query instruction, including: inputting the current company name and the current node description information to be queried into the multi-level node relationship description graph database to determine whether the current company name can match each company name in the multi-level node relationship description graph database; if they can match, querying according to the current node description information to be queried to obtain a current permission query result corresponding to the current permission query instruction; wherein the current node description information to be queried includes at least one of the following: current user node description information, current role node description information and current department node description information; if they cannot match, feeding back to the user an instruction that the current permission query instruction has failed.

[0036] The current node description information to be queried may be information describing the node to be queried. Specifically, the current node description information to be queried may include current user node description information, current role node description information, and current department node description information.

[0037] In this embodiment, it is assumed that the company names included in the multi-level node relationship description graph database are Company A, Company B, Company C, and Company D. It is assumed that the parsing result of the current permission query instruction is: the current company name is Company A; the current node description information to be queried is User A.

[0038] Further, company A and user a are input into the multi-level node relationship description graph database, and it is determined whether company A can match the company names in the multi-level node relationship description graph database. Since it can match, a query is performed based on user a to obtain a current permission query result corresponding to the current permission query instruction.

[0039] In addition, suppose the result of the current permission query instruction analysis is: the current company name is company E; the current node description information to be queried is user a. Since company E cannot be matched, the user can be fed back the instruction that the current permission query instruction failed. The user can perform manual analysis based on the fed back failed instruction and add it to the multi-level node relationship description graph database to implement the update processing of the multi-level node relationship description graph database.

[0040] S130: Feedback and display the current permission query result to the user to complete the operation of the current permission query instruction.

[0041] In this embodiment, after obtaining the current permission query result, the current permission query result can be fed back to the user and displayed through the terminal page, and the user can obtain the current permission query result corresponding to the current permission query instruction.

[0042] In this embodiment, before obtaining the current permission query instruction and parsing the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction, it is also necessary to construct a multi-level node relationship description graph database.

[0043] Specifically, before obtaining the current permission query instruction and parsing the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction, it also includes: obtaining historical multi-level node relationship description data corresponding to multiple company names respectively; parsing a target historical multi-level node relationship description data in turn to obtain at least one historical relationship description node and the relationship between each historical relationship description node; constructing target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data according to each historical relationship description node and the relationship between each historical relationship description node, and jointly storing the target company name and the target multi-level node relationship description graph data in a multi-level node relationship description graph database; returning to execute the operation of parsing a target historical multi-level node relationship description data in turn until all historical multi-level node relationship description data are traversed.

[0044] The historical multi-level node relationship description data may be data describing different relationship description nodes in each company and the relationships between the relationship description nodes.

[0045] Specifically, the historical relationship description nodes may include: at least one historical user node, at least one historical role node, at least one historical authority node and at least one historical department node; wherein each historical user node corresponds to a historical user node description information; each historical role node corresponds to a historical role node description information; each historical authority node corresponds to a historical authority node description information; and each historical department node corresponds to a historical department node description information.

[0046] In addition, each of the historical authority nodes also includes at least one historical sub-authority node; wherein each historical sub-authority node corresponds to a historical sub-authority node description information.

[0047] Optionally, the target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data is constructed according to each historical relationship description node and the relationship between each historical relationship description node, including: constructing the target graph data node according to each historical user node, each historical role node, each historical authority node and each historical department node; connecting the relationship of the target graph data nodes according to the relationship between each historical relationship description node to construct the target graph data node relationship; wherein the relationship between each historical relationship description node includes: the relationship between each historical user node and each historical role node, the relationship between each historical user node and each historical authority node, the relationship between each historical user node and each historical department node, the relationship between each historical role node and each historical authority node, the relationship between each historical role node and each historical department node, and the relationship between each historical authority node and each historical department node; the target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data is obtained according to the target graph data nodes and the target graph data node relationships.

[0048] Exemplarily, for company name A, by parsing its corresponding historical multi-level node relationship description data, historical relationship description nodes and the relationship between each historical relationship description node can be obtained. For example, the historical relationship description node may include 3 historical user nodes, 3 historical role nodes, 5 historical authority nodes and 3 historical department nodes. Specifically, the historical user node description information is user a, user b and user c respectively. The historical role node description information is administrative staff, managers and technical staff respectively. The historical authority node description information is read permission, write permission, execute permission, view report permission and edit report permission respectively. The historical department node description information is the human resources department, technical department and sales department respectively.

[0049] You can first create historical user nodes, that is, create nodes for user a, user b, and user c; then create historical role nodes, that is, create nodes for administrative staff, managers, and technical staff; you need to create historical permission nodes, that is, create nodes for read permission, write permission, execute permission, view report permission, and edit report permission; finally, you need to create historical department nodes, that is, create nodes for the human resources department, technical department, and sales department; that is, the target graph data node is constructed.

[0050] Furthermore, it is necessary to perform node connection processing based on the relationship between the nodes described in the historical relationship, that is, the relationship between each historical user node and each historical role node, the relationship between each historical user node and each historical authority node, the relationship between each historical user node and each historical department node, the relationship between each historical role node and each historical authority node, the relationship between each historical role node and each historical department node, and the relationship between each historical authority node and each historical department node, that is, the target graph data node relationship is constructed.

[0051] Continuing with the previous example, assume that user a is an administrative staff member; user b is a manager; and user c is a technical staff member. The historical permission node description information of the administrative staff member is read permission, write permission, and execute permission; the historical permission node description information of the manager is report viewing permission; and the historical permission node description information of the technical staff member is read permission. Assuming that when the historical permission node description information is report viewing permission, the nested sub-permissions are read permission, write permission, execute permission, and report editing permission. User a is in the human resources department; user b is in the technical department; and user c is in the technical department and the sales department. This means that the target graph data node relationship has been constructed.

[0052] Accordingly, the target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data can be obtained according to the target graph data nodes and the target graph data node relationships. Similarly, the historical multi-level node relationship description data of other companies can be processed to obtain a multi-level node relationship description graph database.

[0053] After constructing the multi-level node relationship description graph database, permission query processing can be performed based on the current permission query instruction parsing result corresponding to the current permission query instruction, including the current company name and the current node description information to be queried.

[0054] Optionally, after obtaining the target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data according to the target graph data nodes and the target graph data node relationships, it also includes: obtaining each historical sub-authority node corresponding to each historical permission node, and the relationship between each historical permission node and each historical sub-authority node; under each historical permission node, respectively add each historical sub-authority node, and connect the relationships according to the relationship between each historical permission node and each historical sub-authority node to obtain updated target graph data nodes and target graph data node relationships, and update the target multi-level node relationship description graph data.

[0055] In this embodiment, it is also necessary to obtain the historical sub-authority nodes corresponding to each historical authority node, as well as the relationship between each historical authority node and each historical sub-authority node. Continuing with the previous example, assuming that the historical authority node description information is the view report authority, the sub-authorities that can be nested are the read authority, write authority, execute authority and edit report authority, and new historical sub-authority nodes can also be nested, such as the encryption report authority. The historical authority nodes and historical sub-authority nodes can be nested according to the above relationship.

[0056] Furthermore, historical sub-authority nodes can be added to the target graph data nodes to implement the update processing of the target graph data nodes. At the same time, the target graph data node relationships need to be updated to implement the update processing of the target multi-level node relationship description graph data, and the update of the multi-level node relationship description graph database can also be implemented.

[0057] The technical solution of the embodiment of the present invention obtains the current permission query instruction and parses the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction; wherein the current permission query instruction parsing result includes the current company name and the current node description information to be queried; the current company name and the current node description information to be queried are input into a pre-built multi-level node relationship description graph database to obtain the current permission query result corresponding to the current permission query instruction; the current permission query result is fed back and displayed to the user to complete the operation of the current permission query instruction. The problem that the permission management system is difficult to flexibly handle complex permission configurations is solved, the flexibility of the user permission management system in handling complex permission configurations is improved, and the efficiency and accuracy of user permission queries are improved.

[0058] Embodiment 2

[0059] Figure 2 This is a schematic diagram of the structure of a permission query device based on a graph database provided in the second embodiment of the present invention. The permission query device based on a graph database provided in this embodiment can be implemented by software and / or hardware, and can be configured in a terminal device or a server to implement a permission query method based on a graph database in the embodiment of the present invention. Figure 2 As shown, the device includes: a current permission query instruction parsing result obtaining module 210, a current permission query result obtaining module 220 and a current permission query result feedback module 230.

[0060] The current permission query instruction parsing result obtaining module 210 is used to obtain the current permission query instruction, and parse the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction;

[0061] The parsing result of the current permission query instruction includes the current company name and the description information of the current node to be queried;

[0062] The current authority query result obtaining module 220 is used to input the current company name and the current node description information to be queried into a pre-built multi-level node relationship description graph database to obtain the current authority query result corresponding to the current authority query instruction;

[0063] The current permission query result feedback module 230 is used to feed back and display the current permission query result to the user to complete the operation of the current permission query instruction.

[0064] The technical solution of the embodiment of the present invention obtains the current permission query instruction and parses the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction; wherein the current permission query instruction parsing result includes the current company name and the current node description information to be queried; the current company name and the current node description information to be queried are input into a pre-built multi-level node relationship description graph database to obtain the current permission query result corresponding to the current permission query instruction; the current permission query result is fed back and displayed to the user to complete the operation of the current permission query instruction. The problem that the permission management system is difficult to flexibly handle complex permission configurations is solved, the flexibility of the user permission management system in handling complex permission configurations is improved, and the efficiency and accuracy of user permission queries are improved.

[0065] On the basis of the above-mentioned embodiments, the current permission query result obtaining module 220 can be specifically used for: inputting the current company name and the current node description information to be queried into the multi-level node relationship description graph database, and judging whether the current company name can match the company names in the multi-level node relationship description graph database; if they can match, querying according to the current node description information to be queried, and obtaining the current permission query result corresponding to the current permission query instruction; wherein, the current node description information to be queried includes at least one of the following: current user node description information, current role node description information and current department node description information; if they cannot match, feeding back to the user an instruction indicating that the current permission query instruction has failed.

[0066] On the basis of the above embodiments, a multi-level node relationship description graph database construction module can be specifically used for: obtaining the historical multi-level node relationship description data corresponding to multiple company names respectively before obtaining the current permission query instruction and parsing the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction; parsing a target historical multi-level node relationship description data in turn to obtain at least one historical relationship description node and the relationship between each historical relationship description node; constructing the target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data according to each historical relationship description node and the relationship between each historical relationship description node, and jointly storing the target company name and the target multi-level node relationship description graph data in the multi-level node relationship description graph database; returning to execute the operation of parsing a target historical multi-level node relationship description data in turn until all the historical multi-level node relationship description data are traversed.

[0067] Based on the above embodiments, the historical relationship description nodes include: at least one historical user node, at least one historical role node, at least one historical authority node and at least one historical department node; wherein each historical user node corresponds to a historical user node description information; each historical role node corresponds to a historical role node description information; each historical authority node corresponds to a historical authority node description information; and each historical department node corresponds to a historical department node description information.

[0068] On the basis of the above embodiments, each of the historical authority nodes further includes at least one historical sub-authority node; wherein each historical sub-authority node corresponds to a historical sub-authority node description information.

[0069] On the basis of the above embodiments, the multi-level node relationship description graph database construction module can also be specifically used for: constructing a target graph data node according to each historical user node, each historical role node, each historical authority node and each historical department node; connecting the target graph data nodes according to the relationship between each of the historical relationship description nodes to construct the target graph data node relationship; wherein the relationship between each of the historical relationship description nodes includes: the relationship between each historical user node and each historical role node, the relationship between each historical user node and each historical authority node, the relationship between each historical user node and each historical department node, the relationship between each historical role node and each historical authority node, the relationship between each historical role node and each historical department node, and the relationship between each historical authority node and each historical department node; according to the target graph data node and the target graph data node relationship, obtain the target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data.

[0070] On the basis of the above embodiments, the target multi-level node relationship description graph data update module can be specifically used for: after obtaining the target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data according to the target graph data nodes and the target graph data node relationships, obtaining each historical sub-authority node corresponding to each historical authority node, and the relationship between each historical authority node and each historical sub-authority node; under each historical authority node, adding each historical sub-authority node, and connecting the relationships according to the relationships between each historical authority node and each historical sub-authority node, obtaining the updated target graph data nodes and the target graph data node relationships, and updating the target multi-level node relationship description graph data.

[0071] The permission query device based on the graph database provided in the embodiment of the present invention can execute the permission query method based on the graph database provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0072] Embodiment 3

[0073] Figure 3 A schematic diagram of the structure of an electronic device 10 that can be used to implement the third embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0074] like Figure 3 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0075] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0076] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a permission query method based on a graph database.

[0077] In some embodiments, the permission query method based on the graph database can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the permission query method based on the graph database described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the permission query method based on the graph database in any other appropriate manner (for example, by means of firmware).

[0078] The method includes: obtaining a current permission query instruction, and parsing the current permission query instruction to obtain a current permission query instruction parsing result corresponding to the current permission query instruction; wherein the current permission query instruction parsing result includes the current company name and the current node description information to be queried; inputting the current company name and the current node description information to be queried into a pre-built multi-level node relationship description graph database to obtain a current permission query result corresponding to the current permission query instruction; and feeding back and displaying the current permission query result to a user to complete the operation of the current permission query instruction.

[0079] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0080] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0081] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0082] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0083] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0084] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0085] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0086] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

[0087] Embodiment 4

[0088] Embodiment 4 of the present invention also provides a computer-readable storage medium, wherein the computer-readable instructions are used to execute a permission query method based on a graph database when executed by a computer processor, the method comprising: obtaining a current permission query instruction, and parsing the current permission query instruction to obtain a current permission query instruction parsing result corresponding to the current permission query instruction; wherein the current permission query instruction parsing result includes the current company name and the current node description information to be queried; inputting the current company name and the current node description information to be queried into a pre-built multi-level node relationship description graph database to obtain a current permission query result corresponding to the current permission query instruction; and feeding back and displaying the current permission query result to the user to complete the operation of the current permission query instruction.

[0089] Of course, the computer-readable storage medium provided in an embodiment of the present invention has computer executable instructions that are not limited to the method operations described above, and can also execute related operations in the permission query method based on the graph database provided in any embodiment of the present invention.

[0090] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk or an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0091] It is worth noting that in the above-mentioned embodiment of the permission query device based on the graph database, the various units and modules included are only divided according to the functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0092] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A permission query method based on a graph database, characterized in that: include: Obtaining a current permission query instruction, and parsing the current permission query instruction to obtain a current permission query instruction parsing result corresponding to the current permission query instruction; The parsing result of the current permission query instruction includes the current company name and the description information of the current node to be queried; Input the current company name and the current node description information to be queried into a pre-built multi-level node relationship description graph database to obtain a current authority query result corresponding to the current authority query instruction; The current permission query result is fed back to the user and displayed to complete the operation of the current permission query instruction.

2. The method according to claim 1, characterized in that The inputting the current company name and the current to-be-queried node description information into a pre-built multi-level node relationship description graph database to obtain a current permission query result corresponding to the current permission query instruction includes: Input the current company name and the current node description information to be queried into the multi-level node relationship description graph database, and determine whether the current company name can match each company name in the multi-level node relationship description graph database; If there is a match, query is performed according to the description information of the current node to be queried to obtain a current permission query result corresponding to the current permission query instruction; The current node description information to be queried includes at least one of the following: current user node description information, current role node description information, and current department node description information; If there is no match, the user is fed back an instruction indicating that the current permission query instruction failed.

3. The method according to claim 1, characterized in that Before obtaining the current permission query instruction and parsing the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction, the method further includes: Obtain historical multi-level node relationship description data corresponding to multiple company names; Sequentially parsing a target historical multi-level node relationship description data to obtain at least one historical relationship description node and the relationship between the historical relationship description nodes; According to each historical relationship description node and the relationship between each of the historical relationship description nodes, target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data is constructed, and the target company name and the target multi-level node relationship description graph data are jointly stored in a multi-level node relationship description graph database; Return to execute the operation of parsing the target historical multi-level node relationship description data in sequence until all historical multi-level node relationship description data are traversed.

4. The method according to claim 3, characterized in that The historical relationship description nodes include: at least one historical user node, at least one historical role node, at least one historical authority node and at least one historical department node; Among them, each historical user node corresponds to a historical user node description information; each historical role node corresponds to a historical role node description information; each historical authority node corresponds to a historical authority node description information; each historical department node corresponds to a historical department node description information.

5. The method according to claim 4, characterized in that Each of the historical authority nodes also includes at least one historical sub-authority node; Among them, each historical sub-authority node corresponds to a historical sub-authority node description information.

6. The method according to claim 5, characterized in that The method of constructing target multi-level node relationship description graph data corresponding to target historical multi-level node relationship description data according to each historical relationship description node and the relationship between each historical relationship description node includes: According to each historical user node, each historical role node, each historical authority node and each historical department node, the target graph data node is constructed; Connect the target graph data nodes according to the relationship between the historical relationship description nodes to complete the target graph data node relationship; The relationship between each of the historical relationship description nodes includes: the relationship between each historical user node and each historical role node, the relationship between each historical user node and each historical authority node, the relationship between each historical user node and each historical department node, the relationship between each historical role node and each historical authority node, the relationship between each historical role node and each historical department node, and the relationship between each historical authority node and each historical department node; According to the target graph data nodes and the target graph data node relationships, target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data is obtained.

7. The method according to claim 6, characterized in that After obtaining the target multi-level node relationship description graph data corresponding to the target historical multi-level node relationship description data according to the target graph data nodes and the target graph data node relationships, the method further includes: Obtain each historical sub-authority node corresponding to each historical authority node, and the relationship between each historical authority node and each historical sub-authority node; Under each historical authority node, each historical sub-authority node is added respectively, and relationship lines are connected according to the relationship between each historical authority node and each historical sub-authority node to obtain updated target graph data nodes and target graph data node relationships, and the target multi-level node relationship description graph data is updated.

8. A permission query device based on a graph database, characterized in that: include: A current permission query instruction parsing result obtaining module, used to obtain the current permission query instruction, and parse the current permission query instruction to obtain the current permission query instruction parsing result corresponding to the current permission query instruction; The parsing result of the current permission query instruction includes the current company name and the description information of the current node to be queried; A current authority query result obtaining module is used to input the current company name and the current node description information to be queried into a pre-built multi-level node relationship description graph database to obtain a current authority query result corresponding to the current authority query instruction; The current permission query result feedback module is used to feed back and display the current permission query result to the user to complete the operation of the current permission query instruction.

9. An electronic 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 computer program, it implements the permission query method based on the graph database as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a permission query method based on a graph database as described in any one of claims 1 to 7 when executed.