CN107784091B - Operation authority query method and terminal device - Google Patents

Operation authority query method and terminal device Download PDF

Info

Publication number
CN107784091B
CN107784091B CN201710945921.9A CN201710945921A CN107784091B CN 107784091 B CN107784091 B CN 107784091B CN 201710945921 A CN201710945921 A CN 201710945921A CN 107784091 B CN107784091 B CN 107784091B
Authority
CN
China
Prior art keywords
dimension
operation authority
query
query condition
dimensions
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710945921.9A
Other languages
Chinese (zh)
Other versions
CN107784091A (en
Inventor
张小松
陈平
陈康飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201710945921.9A priority Critical patent/CN107784091B/en
Publication of CN107784091A publication Critical patent/CN107784091A/en
Application granted granted Critical
Publication of CN107784091B publication Critical patent/CN107784091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Fuzzy Systems (AREA)
  • Computer And Data Communications (AREA)
  • Storage Device Security (AREA)

Abstract

The invention belongs to the technical field of computers, and particularly relates to an operation authority query method and terminal equipment. The operation authority of the target operation in the embodiment of the invention is divided according to more than two preset dimensions, the operation authority of the target operation in each dimension is recorded in a preset operation authority table, when a user inquires the operation authority of the target operation, firstly, the inquiry condition of the operation authority of the target operation in each dimension input by the user is obtained, then, the operation authority item which meets the inquiry condition corresponding to each dimension in each dimension is searched in the operation authority table, and if the inquiry condition is not searched, the current inquiry condition in the main dimension is replaced by the upper layer inquiry condition to continue the searching process. Due to the adoption of the multi-dimension and main-dimension-based upward backtracking operation authority query mode, the refinement degree of the query result is improved, and the method can adapt to a complex multi-dimension service scene.

Description

Operation authority query method and terminal device
Technical Field
The invention belongs to the technical field of computers, and particularly relates to an operation authority query method and terminal equipment.
Background
With the continuous development of computer technology, software systems used by enterprise companies or public institutions are increasingly large and complex, wherein thousands or even tens of thousands of different operations are often involved, and for convenience of management, the operations are generally divided into operation authorities and different users are given different operation authorities. However, the current operation authority is generally divided in a single dimension, for example, the operation authority is divided according to the level of an organization (a head office, a provincial company, a city company, and the like), and when the operation authority is inquired, the inquiry can be only carried out in the single dimension.
Disclosure of Invention
In view of this, the embodiment of the present invention provides an operation permission query method and a terminal device, so as to solve the problem that the existing operation permission query method is not fine enough and is difficult to adapt to a complex multidimensional service scenario.
A first aspect of an embodiment of the present invention provides an operation authority query method, which may include:
when a user inquires the operation authority of a target operation, acquiring inquiry conditions of the operation authority of the target operation in each dimension, which are input by the user, and dividing the operation authority of the target operation according to more than two preset dimensions, wherein the more than two dimensions comprise a main dimension;
searching operation authority items meeting the query conditions corresponding to the dimensions in each dimension in a preset operation authority table, wherein the operation authority table records the operation authority of the target operation in each dimension;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are found in the operation authority table, determining the operation authority corresponding to the found operation authority items as query results;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are not found in the operation authority table, determining the upper-layer query conditions of the current query conditions on the main dimension according to a preset query condition hierarchy table, wherein the hierarchy relation of the query conditions on the main dimension is recorded in the query condition hierarchy table;
and replacing the current query condition on the main dimension with the determined upper-layer query condition, and then returning to the step of searching the operation authority items which meet the query condition corresponding to each dimension in the preset operation authority table until a query result is obtained or the current query condition on the main dimension does not have the upper-layer query condition.
A second aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of:
when a user inquires the operation authority of a target operation, acquiring inquiry conditions of the operation authority of the target operation in each dimension, which are input by the user, and dividing the operation authority of the target operation according to more than two preset dimensions, wherein the more than two dimensions comprise a main dimension;
searching operation authority items meeting the query conditions corresponding to the dimensions in each dimension in a preset operation authority table, wherein the operation authority table records the operation authority of the target operation in each dimension;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are found in the operation authority table, determining the operation authority corresponding to the found operation authority items as query results;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are not found in the operation authority table, determining the upper-layer query conditions of the current query conditions on the main dimension according to a preset query condition hierarchy table, wherein the hierarchy relation of the query conditions on the main dimension is recorded in the query condition hierarchy table;
and replacing the current query condition on the main dimension with the determined upper-layer query condition, and then returning to the step of searching the operation authority items which meet the query condition corresponding to each dimension in the preset operation authority table until a query result is obtained or the current query condition on the main dimension does not have the upper-layer query condition.
A third aspect of the embodiments of the present invention provides an operation authority query terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the following steps:
when a user inquires the operation authority of a target operation, acquiring inquiry conditions of the operation authority of the target operation in each dimension, which are input by the user, and dividing the operation authority of the target operation according to more than two preset dimensions, wherein the more than two dimensions comprise a main dimension;
searching operation authority items meeting the query conditions corresponding to the dimensions in each dimension in a preset operation authority table, wherein the operation authority table records the operation authority of the target operation in each dimension;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are found in the operation authority table, determining the operation authority corresponding to the found operation authority items as query results;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are not found in the operation authority table, determining the upper-layer query conditions of the current query conditions on the main dimension according to a preset query condition hierarchy table, wherein the hierarchy relation of the query conditions on the main dimension is recorded in the query condition hierarchy table;
and replacing the current query condition on the main dimension with the determined upper-layer query condition, and then returning to the step of searching the operation authority items which meet the query condition corresponding to each dimension in the preset operation authority table until a query result is obtained or the current query condition on the main dimension does not have the upper-layer query condition.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the operation authority of the target operation in the embodiment of the invention is divided according to more than two preset dimensions (wherein, the more than two dimensions comprise a main dimension), and the operation authority of the target operation in each dimension is recorded in a preset operation authority table, when a user inquires the operation authority of the target operation, firstly, the inquiry condition of the operation authority of the target operation in each dimension input by the user is obtained, then, the operation authority items meeting the inquiry condition corresponding to each dimension in each dimension are searched in the operation authority table, and if the operation authority items are found, the operation authority items corresponding to the found operation authority items are determined as the inquiry result; if the search is not available, replacing the current query condition on the main dimension with the upper-layer query condition to continue the search process. Due to the adoption of the multi-dimensional operation authority query mode, the refinement degree of the query result is improved, and due to the adoption of the upward backtracking query mode based on the main dimension, the corresponding operation authority can be conveniently and orderly searched even under the multi-dimensional environment, and the method can be well adapted to the complex multi-dimensional service scene.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart of an embodiment of a method for querying operation permissions according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of step S102 of an operation permission query method in an application scenario according to an embodiment of the present invention;
FIG. 3 is a schematic flowchart of a process of merging and simplifying operation permission tables in an application scenario according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of step S302 in an application scenario in the process of merging and simplifying the operation permission table in the embodiment of the present invention;
fig. 5 is a schematic block diagram of an operation authority query terminal device according to an embodiment of the present invention;
fig. 6 is a program module diagram of an operation right query program according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The operation authority of the target operation in the embodiment of the invention is divided according to more than two preset dimensions, the operation authority of the target operation in each dimension is recorded in a preset operation authority table, when a user inquires the operation authority of the target operation, firstly, the inquiry condition of the operation authority of the target operation in each dimension input by the user is obtained, then, the operation authority item which meets the inquiry condition corresponding to each dimension in each dimension is searched in the operation authority table, if the inquiry condition is not found, the inquiry condition of the higher layer in the main dimension is used for continuously searching until the inquiry result is obtained or no upper layer inquiry condition exists in the main dimension.
Referring to fig. 1, an embodiment of an operation permission query method according to an embodiment of the present invention may include:
step S101, when a user inquires the operation authority of the target operation, acquiring inquiry conditions of the operation authority of the target operation in each dimension, which are input by the user.
The operation authority of the target operation is divided according to more than two preset dimensions, wherein the more than two dimensions comprise a main dimension, and the dimensions except the main dimension are secondary dimensions.
Taking the operation of 'pay out of bill' of insurance company business system as an example, the 'pay out of bill' refers to that after the insurance company business system confirms in real time and automatically generates a unique effective instruction according to the full premium posting feedback information of related support systems (such as Unionpay, head company financial system and the like), the business system side can print formal insurance policy, the operation authority of the 'pay out of bill' target operation can be divided into head company, province company, city company and the like according to the dimension of the organization, can be divided into telephone channel, network channel, store channel and the like according to the dimension of the channel, can be divided into life insurance, car insurance and the like according to the dimension of the product, and can be divided into individuals, groups and the like according to the dimension of the group. And determining the primary dimension of the mechanism, wherein the dimensions of the channel, the product and the group are the secondary dimensions.
When a user queries the operation authority of the 'pay for sale order', query conditions of the operation authority of the target operation in each dimension need to be input on a query system, for example, the query condition input in the dimension of the organization is 'Shenzhen city company', the query condition input in the dimension of the channel is 'telephone channel', the query condition input in the dimension of the product is 'life insurance', and the query condition input in the dimension of the individual group is 'individual'.
Step S102, judging whether operation authority items meeting the query conditions corresponding to all the dimensions in all the dimensions are found in a preset operation authority table.
The operation authority table records the operation authority of the target operation on each dimension.
Preferably, step S102 may specifically include the steps as shown in fig. 2:
step S1021, judging whether the operation authority item meeting the query condition corresponding to the main dimension on the main dimension is found in the operation authority table.
If the operation authority entry meeting the query condition corresponding to the primary dimension is found in the operation authority table, executing step S1022, if the operation authority entry meeting the query condition corresponding to the primary dimension is not found in the operation authority table, executing step S1028,
step S1022, determining the found operation permission entry meeting the query condition corresponding to the primary dimension in the primary dimension as a preferred operation permission entry.
And S1023, selecting one secondary dimension from the secondary dimensions which are not selected yet as the current query dimension.
Step S1024, determining whether an operation permission entry satisfying the query condition corresponding to the current query dimension is found in the preferred operation permission entries.
Wherein, if an item satisfies any one of the following conditions, it can be considered that it satisfies the query condition in the current query dimension:
condition one, the query condition of the item in the current query dimension is consistent with the query condition input by the user.
For example, if the current query dimension is a channel and the query condition "telephone channel" input by the user is also the query condition "telephone channel" of an item in the channel dimension, it may be considered that the item satisfies the query condition in the current query dimension.
And secondly, the value of the item on the current query dimension is null.
In this embodiment, the query condition is null, which means that the query condition in the current query dimension is not related to the operation authority of the target operation, that is, under the condition that the query conditions in other dimensions are fixed, the final corresponding operation authority is the same no matter any query condition is selected in the current query dimension.
If the operation authority entry meeting the query condition corresponding to the current query dimension in the current query dimension is found in the preferred operation authority entry, executing step S1025, and if the operation authority entry meeting the query condition corresponding to the current query dimension in the current query dimension is not found in the preferred operation authority entry, executing step S1028.
And S1025, deleting the operation authority items which do not meet the query condition on the current query dimension from the preferred operation authority items.
In this way, all the preferred operation authority entries are operation authority entries which satisfy the query condition corresponding to the current query dimension in the current query dimension.
And step S1026, judging whether all secondary dimensions are selected.
If the secondary dimensions are not selected, the process returns to step S1023, and if all the secondary dimensions are selected, the process proceeds to step S1027.
Step S1027, determining the preferred operation authority entry as an operation authority entry satisfying the query condition corresponding to each dimension in each dimension.
Step S1028, determining that no operation authority entry satisfying the query condition corresponding to each dimension is found in the operation authority table.
For example, the operation authority table has 100 operation authority entries in total, and first, the 100 operation authority entries are searched according to the query condition "shenzhen city company" in the dimension (major dimension) of the organization, 12 operation authority entries are searched in total, then, the 12 operation authority entries are searched according to the query condition "telephone channel" in the dimension (minor dimension) of the channel, 4 operation authority entries are searched in total, then, the 4 operation authority entries are searched according to the query condition "life insurance" in the dimension (minor dimension) of the product, 2 operation authority entries are searched in total, then, the 2 operation authority entries are searched according to the dimension (minor dimension) of the cluster, 1 operation authority entry is searched in total, at this time, all the minor dimensions are selected, and the 1 operation authority entry is determined as the operation authority entry meeting the query condition corresponding to each dimension in each dimension .
If the operation authority entry meeting the query condition corresponding to each dimension in each dimension is not found in the operation authority table, step S103 is executed, and if the operation authority entry meeting the query condition corresponding to each dimension in each dimension is found in the operation authority table, step S107 is executed.
Step S103, judging whether the current query condition on the main dimension exists in an upper-layer query condition according to a preset query condition hierarchy table.
The hierarchical table of the query conditions records the hierarchical relationship of each query condition in the primary dimension. For example, the highest-level query condition of the main dimension may be recorded as a head office, the next highest-level query condition may be recorded as a province company, and the lowest-level query condition may be recorded as a city company.
If the current query condition in the primary dimension exists in the upper-layer query condition, executing step S104, and if the current query condition in the primary dimension does not exist in the upper-layer query condition, executing step S106.
And step S104, determining the upper-layer query condition of the current query condition on the main dimension according to the query condition hierarchy table.
Step S105, replacing the current query condition on the main dimension with the determined upper-layer query condition, and then returning to the step S102.
And step S106, judging that no inquiry result meeting the inquiry condition exists.
And S107, determining the operation authority corresponding to the found operation authority item as a query result.
For example, if the query condition input by the user in the dimension (main dimension) of the organization is "shenzhen city company", the query condition input in the dimension of the channel is "telephone channel", the query condition input in the dimension of the product is "life insurance", the query condition input in the dimension of the individual cluster is "individual", but no operation authority item satisfying the query condition corresponding to each dimension is found in the operation authority table, the upper-layer query condition of "shenzhen city company" is found in the query condition hierarchy table, and "guangdong province company" is found, then the current query condition in the main dimension is replaced by "shenzhen city company", the query condition in the secondary dimension is unchanged, and no operation item satisfying the query condition corresponding to each dimension is found in the operation authority table again, and by analogy, if the query result is not found, replacing the current query condition on the main dimension from the Guangdong province company to the main dimension, keeping the query condition on the secondary dimension unchanged, and finding no operation authority item which meets the query condition corresponding to each dimension on each dimension in the operation authority table until the query result is obtained or the current query condition on the main dimension does not have the upper-layer query condition.
Preferably, before step S101, the operation authority query method may further include a step of merging and simplifying the operation authority table as shown in fig. 3:
step S301, selecting one secondary dimension from the secondary dimensions which are not selected yet as the dimension for currently merging the operation authority items.
Step S302, selecting the operation authority items of which the dimension of the current operation authority item combination is irrelevant to the operation authority of the target operation from the operation authority table, and setting the query conditions on the dimension of the current operation authority item combination to be null in the selected operation authority items.
Preferably, step S302 may specifically include the steps as shown in fig. 4:
and step S3021, traversing combinations of query conditions of other secondary dimensions except the dimension currently subjected to the operation authority entry merging.
For example, if the current dimension for merging the operation authority items is the dimension of the channel, the combinations of the query conditions of other secondary dimensions (the dimension of the product and the dimension of the group) have the following four types:
the first method comprises the following steps: "Life insurance" & "personal";
and the second method comprises the following steps: "car insurance" & "personal";
and the third is that: "Life insurance" & "group";
and fourthly: "car insurance" & "group".
And step S3022, selecting one combination from the combinations which are not selected yet as a current combination.
Step S3023, determining whether the operation permissions corresponding to the current combination found in the operation permission table are all the same.
For example, if the current combination is "car insurance" & "personal", 3 operation authority items are corresponding to the current combination, and the query conditions in the channel dimension are respectively the cases of "telephone channel", "network channel" and "store channel", and then whether the operation authorities corresponding to the 3 operation authority items are all consistent or not is judged.
If the operation authorities corresponding to the current combination are all the same, step S3024 is executed, and if the operation authorities corresponding to the current combination are not the same, step S3024 is not executed again, and step S3025 is directly executed.
And step S3024, selecting the operation authority item corresponding to the current combination.
Step S3025, determine whether all combinations have been selected.
If any combination has not been selected, the process returns to step S3022, and if all combinations have been selected, step S3026 is executed.
Step S3026, in the selected operation authority entry, setting all query conditions in the dimension where the operation authority entry is currently merged to be null.
Step S303, determine whether all secondary dimensions have been selected.
If the secondary dimensions are not selected, the process returns to step S301, and if all the secondary dimensions are selected, the process proceeds to step S304.
And step S304, merging and simplifying the same operation authority items in the operation authority table to obtain a simplified operation authority table.
For example, if the operation authority table has 8 operation authority entries, the operation authority entries are:
item 1: the query condition is 'Shenzhen city company' & 'telephone channel' & 'longevity' & 'person', and the corresponding operation authority is authority 1;
item 2: the query condition is 'Shenzhen city company' & 'telephone channel' & 'longevity insurance' & 'group', and the corresponding operation authority is authority 1;
item 3: the query condition is 'Shenzhen city company' & 'telephone channel' & 'car insurance' & 'personal', and the corresponding operation authority is authority 1;
entry 4: the query condition is 'Shenzhen city company' & 'telephone channel' & 'car insurance' & 'group', and the corresponding operation authority is authority 1;
item 5: the query condition is 'Shenzhen city company' & 'network channel' & 'longevity insurance' & 'individual', and the corresponding operation authority is authority 2;
item 6: the query condition is 'Shenzhen city company' & 'network channel' & 'life insurance' & 'group', and the corresponding operation authority is authority 2;
item 7: the query condition is 'Shenzhen city company' & 'network channel' & 'vehicle insurance' & 'personal', and the corresponding operation authority is authority 2;
entry 8: the query condition is 'Shenzhen city company' & 'network channel' & 'car insurance' & 'group', and the corresponding operation authority is authority 2.
After the step of merging and simplifying the operation authority table as shown in fig. 3, only 2 operation authority entries are obtained in the simplified operation authority table, which are:
item 1: the query condition is ' Shenzhen city company ' & ' telephone channel ' & ' and the corresponding operation authority is authority 1;
item 2: the query condition is ' Shenzhen city company ' & ' network channel ' & ' and the corresponding operation authority is authority 2.
In the 2 operation authority items, the query conditions in the product dimension and the group dimension are both null, which means that the query conditions in the two dimensions are not related to the operation authority of the target operation, that is, under the condition that the query conditions in other dimensions are fixed, the final corresponding operation authority is the same no matter any query condition is selected in the two dimensions.
It is easy to understand that, through the above steps of merging and simplifying the operation authority table, the number of operation authority entries in the operation authority table can be greatly reduced, so as to reduce the storage space, accordingly, when the simplified operation authority table is queried, the number of operation authority entries to be queried is correspondingly reduced, and the querying efficiency is greatly improved.
The operation authority of the target operation in the embodiment of the invention is divided according to more than two preset dimensions (wherein, the more than two dimensions comprise a main dimension), and the operation authority of the target operation in each dimension is recorded in a preset operation authority table, when a user inquires the operation authority of the target operation, firstly, the inquiry condition of the operation authority of the target operation in each dimension input by the user is obtained, then, the operation authority items meeting the inquiry condition corresponding to each dimension in each dimension are searched in the operation authority table, and if the operation authority items are found, the operation authority items corresponding to the found operation authority items are determined as the inquiry result; if the search is not available, replacing the current query condition on the main dimension with the upper-layer query condition to continue the search process. Due to the adoption of the multi-dimensional operation authority query mode, the refinement degree of the query result is improved, and due to the adoption of the upward backtracking query mode based on the main dimension, the corresponding operation authority can be conveniently and orderly searched even under the multi-dimensional environment, and the method can be well adapted to the complex multi-dimensional service scene.
Corresponding to the operation authority query method described in the above embodiment, fig. 5 shows a schematic block diagram of the operation authority query terminal device provided in the embodiment of the present invention, and for convenience of description, only the part related to the embodiment of the present invention is shown.
In this embodiment, the operation authority query terminal device may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The operation authority inquiry terminal device may include: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 51 may be an internal storage unit of the operation authority inquiry terminal device 5, such as a hard disk or a memory of the operation authority inquiry terminal device 5. The memory 51 may also be an external storage device of the operation authority inquiry terminal device 5, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the operation authority inquiry terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the operation authority inquiry terminal device 5. The memory 51 is used for storing the computer program and other programs and data required by the operation right inquiry terminal device 5. The memory 51 may also be used to temporarily store data that has been output or is to be output.
Please refer to fig. 6, which is a block diagram of a computer program 52 according to an embodiment of the present invention. In this embodiment, the computer program 52 may be divided into one or more modules, and the one or more modules are stored in the memory 51 and executed by the processor 50 to implement the present invention. For example, in fig. 6, the computer program 52, that is, the operation authority query program, may be divided into a query condition obtaining module 601, an entry searching module 602, a query result determining module 603, an upper-layer query condition determining module 604, and a query condition replacing module 605. The module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the computer program 52 in the operation authority inquiry terminal device. The following description will specifically describe the functionality of the program modules 601-605.
A query condition obtaining module 601, configured to obtain, when a user queries an operation right of a target operation, a query condition of the operation right of the target operation in each dimension, where the operation right of the target operation is input by the user and is divided according to two or more preset dimensions, where the two or more dimensions include a main dimension;
an entry searching module 602, configured to search, in a preset operation authority table, an operation authority entry that meets the query condition corresponding to each dimension in each dimension, where the operation authority table records operation authority for the target operation in each dimension;
a query result determining module 603, configured to determine, if an operation permission entry meeting the query condition corresponding to each dimension is found in the operation permission table, an operation permission corresponding to the found operation permission entry as a query result;
an upper query condition determining module 604, configured to determine an upper query condition of the current query condition in the main dimension according to a preset query condition hierarchy table if no operation authority entry satisfying the query condition corresponding to each dimension is found in the operation authority table, where a hierarchy relationship of each query condition in the main dimension is recorded in the query condition hierarchy table;
a query condition replacing module 605, configured to replace the current query condition in the main dimension with the determined upper-layer query condition, and then return to execute the step of searching, in a preset operation permission table, the operation permission entry that satisfies the query condition corresponding to each dimension in each dimension until a query result is obtained or the current query condition in the main dimension does not have the upper-layer query condition.
Further, the operation right entry lookup module 602 may include:
a main dimension searching unit, configured to search, in the operation authority table, an operation authority entry that satisfies a query condition corresponding to the main dimension in the main dimension;
a first determining unit, configured to determine that, if no operation permission entry meeting the query condition corresponding to the primary dimension in the primary dimension is found in the operation permission table, no operation permission entry meeting the query condition corresponding to each dimension in each dimension is found in the operation permission table;
an optimal operation authority item determining unit, configured to determine, if an operation authority item satisfying the query condition corresponding to the principal dimension in the principal dimension is found in the operation authority table, the found operation authority item satisfying the query condition corresponding to the principal dimension in the principal dimension as an optimal operation authority item;
a current query dimension selecting unit, configured to select a secondary dimension from secondary dimensions that have not been selected yet as a current query dimension, where the secondary dimension is a dimension of each of the dimensions except for the primary dimension;
a current query dimension searching unit, configured to search, in the preferred operation authority entry, an operation authority entry that satisfies a query condition corresponding to the current query dimension in the current query dimension;
a second determining unit, configured to determine that, if no operation permission entry meeting the query condition corresponding to the current query dimension in the current query dimension is found in the preferred operation permission entry, no operation permission entry meeting the query condition corresponding to each dimension in each dimension is found in the operation permission table;
an entry deleting unit, configured to delete, if an operation permission entry meeting the query condition corresponding to the current query dimension in the current query dimension is found in the preferred operation permission entry, the operation permission entry that does not meet the query condition in the current query dimension from the preferred operation permission entry, and then return to execute the step of selecting one secondary dimension from the secondary dimensions that have not been selected as the current query dimension until all the secondary dimensions are selected, and determine the preferred operation permission entry as the operation permission entry meeting the query condition corresponding to each dimension in each dimension.
Further, the current query dimension lookup unit may include:
the first searching subunit is configured to search, in the preferred operation authority entry, an operation authority entry that is consistent with the query condition corresponding to the current query dimension in the current query dimension;
and the second searching subunit is used for searching the operation authority item with the empty query condition in the current query dimension in the preferred operation authority item, wherein the empty query condition indicates that the query condition in the current query dimension is irrelevant to the operation authority of the target operation.
Further, the computer program 52 may further include:
a merging dimension selection module, configured to select a secondary dimension from secondary dimensions that have not been selected yet as a dimension for currently merging operation permission items, where the secondary dimension is a dimension of each of the dimensions except for the primary dimension;
a merged item selecting module, configured to select, from the operation authority table, an operation authority item whose dimension of currently performing operation authority item merging is unrelated to the operation authority of the target operation;
the query condition setting module is used for setting query conditions on the dimension for currently merging the operation authority items in the selected operation authority items to be null;
and the item merging module is used for merging and simplifying the same operation authority items in the operation authority table to obtain a simplified operation authority table.
Further, the merged item selecting module may further include:
the combined traversing unit is used for traversing the combination of the query conditions of other secondary dimensions except the dimension currently subjected to the operation authority entry merging;
a current combination selecting unit for selecting one combination from the combinations that have not been selected as a current combination;
the combined authority searching unit is used for searching the operation authority corresponding to the current combination in the operation authority table;
and the current combination item selecting unit is used for selecting the operation authority item corresponding to the current combination if the operation authorities corresponding to the current combination are consistent.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the modules, elements, and/or method steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An operation authority query method is characterized by comprising the following steps:
when a user inquires the operation authority of a target operation, acquiring inquiry conditions of the operation authority of the target operation in each dimension, which are input by the user, wherein the operation authority of the target operation is divided according to more than two preset dimensions, the more than two dimensions comprise a main dimension and more than one secondary dimension, the main dimension is the dimension of an organization, the secondary dimensions comprise the dimension of a channel, the dimension of a product and the dimension of a group, the operation authority of the target operation is divided into a head company, a province company and a city company according to the dimension of the organization, is divided into a telephone channel, a network channel and a store channel according to the dimension of the channel, is divided into life insurance and car insurance according to the dimension of the product, and is divided into individuals and the group according to the dimension of the group;
searching operation authority items meeting the query conditions corresponding to the dimensions in each dimension in a preset operation authority table, wherein the operation authority table records the operation authority of the target operation in each dimension;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are found in the operation authority table, determining the operation authority corresponding to the found operation authority items as query results;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are not found in the operation authority table, determining upper-layer query conditions of the current query conditions on the main dimension according to a preset query condition hierarchy table, wherein the hierarchy relationship of the query conditions on the main dimension is recorded in the query condition hierarchy table, namely the highest-layer query condition of the main dimension is recorded as a head company, the next-higher-layer query condition is recorded as a province company, and the lowest-layer query condition is recorded as a city company;
and replacing the current query condition on the main dimension with the determined upper-layer query condition, and then returning to the step of searching the operation authority items which meet the query condition corresponding to each dimension in the preset operation authority table until a query result is obtained or the current query condition on the main dimension does not have the upper-layer query condition.
2. The method for querying operation authority according to claim 1, wherein the searching for the operation authority entry satisfying the query condition corresponding to each dimension in the preset operation authority table comprises:
searching an operation authority item which meets the query condition corresponding to the main dimension in the operation authority table;
if the operation authority item which meets the query condition corresponding to the main dimension in the main dimension is not found in the operation authority table, judging that the operation authority item which meets the query condition corresponding to each dimension in each dimension is not found in the operation authority table;
if the operation authority item meeting the query condition corresponding to the main dimension on the main dimension is found in the operation authority table, determining the found operation authority item meeting the query condition corresponding to the main dimension on the main dimension as an optimal operation authority item;
selecting a secondary dimension from secondary dimensions which are not selected yet as a current query dimension, wherein the secondary dimension is a dimension except the primary dimension in each dimension;
searching for an operation authority item which meets the query condition corresponding to the current query dimension in the preferred operation authority item;
if the operation authority item which meets the query condition corresponding to the current query dimension in the current query dimension is not found in the preferred operation authority item, judging that the operation authority item which meets the query condition corresponding to each dimension in each dimension is not found in the operation authority table;
if the operation authority items meeting the query conditions corresponding to the current query dimension in the current query dimension are found in the preferred operation authority items, deleting the operation authority items not meeting the query conditions in the current query dimension from the preferred operation authority items, and then returning to execute the step of selecting one secondary dimension from the secondary dimensions which are not selected as the current query dimension until all the secondary dimensions are selected, and determining the preferred operation authority items as the operation authority items meeting the query conditions corresponding to all the dimensions in all the dimensions.
3. The method for querying operation authority according to claim 2, wherein the searching for the operation authority entry satisfying the query condition corresponding to the current query dimension in the preferred operation authority entry comprises:
searching for an operation authority item which is consistent with the query condition corresponding to the current query dimension in the preferred operation authority item;
and
and searching for an operation authority item with an empty query condition in the current query dimension in the preferred operation authority item, wherein the empty query condition indicates that the query condition in the current query dimension is not related to the operation authority of the target operation.
4. The operation authority query method according to any one of claims 1 to 3, further comprising, before obtaining the query condition of the operation authority input by the user for the target operation in each dimension:
selecting one secondary dimension from the secondary dimensions which are not selected yet as the dimension for currently merging the operation authority items, wherein the secondary dimension is the dimension except the primary dimension in each dimension;
selecting the operation authority items of which the dimension for currently merging the operation authority items is irrelevant to the operation authority of the target operation from the operation authority table, and setting the query conditions on the dimension for currently merging the operation authority items to be null in the selected operation authority items;
returning to execute the step of selecting one secondary dimension from the secondary dimensions which are not selected yet as the dimension for currently merging the operation authority items until all the secondary dimensions are selected;
and merging and simplifying the same operation authority items in the operation authority table to obtain a simplified operation authority table.
5. The method for querying operation authority according to claim 4, wherein the selecting the operation authority entry having the dimension of the currently merged operation authority entry independent of the operation authority of the target operation from the operation authority table comprises:
traversing the combination of the query conditions of other secondary dimensions except the dimension currently subjected to the operation authority entry merging;
selecting one combination from the combinations which are not selected as a current combination;
searching the operation authority corresponding to the current combination in the operation authority table;
if the operation authorities corresponding to the current combination are consistent, selecting the operation authority items corresponding to the current combination;
and returning to execute the selection of one combination from the combinations which are not selected yet as the current combination until all the combinations are selected.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the operating right querying method according to one of claims 1 to 5.
7. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
when a user inquires the operation authority of a target operation, acquiring inquiry conditions of the operation authority of the target operation in each dimension, which are input by the user, wherein the operation authority of the target operation is divided according to more than two preset dimensions, the more than two dimensions comprise a main dimension and more than one secondary dimension, the main dimension is the dimension of an organization, the secondary dimensions comprise the dimension of a channel, the dimension of a product and the dimension of a group, the operation authority of the target operation is divided into a head company, a province company and a city company according to the dimension of the organization, is divided into a telephone channel, a network channel and a store channel according to the dimension of the channel, is divided into life insurance and car insurance according to the dimension of the product, and is divided into individuals and the group according to the dimension of the group;
searching operation authority items meeting the query conditions corresponding to the dimensions in each dimension in a preset operation authority table, wherein the operation authority table records the operation authority of the target operation in each dimension;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are found in the operation authority table, determining the operation authority corresponding to the found operation authority items as query results;
if the operation authority items meeting the query conditions corresponding to the dimensions on the dimensions are not found in the operation authority table, determining upper-layer query conditions of the current query conditions on the main dimension according to a preset query condition hierarchy table, wherein the hierarchy relationship of the query conditions on the main dimension is recorded in the query condition hierarchy table, namely the highest-layer query condition of the main dimension is recorded as a head company, the next-higher-layer query condition is recorded as a province company, and the lowest-layer query condition is recorded as a city company;
and replacing the current query condition on the main dimension with the determined upper-layer query condition, and then returning to the step of searching the operation authority items which meet the query condition corresponding to each dimension in the preset operation authority table until a query result is obtained or the current query condition on the main dimension does not have the upper-layer query condition.
8. The terminal device according to claim 7, wherein the searching for the operation right entry satisfying the query condition corresponding to each dimension in the preset operation right table comprises:
searching an operation authority item which meets the query condition corresponding to the main dimension in the operation authority table;
if the operation authority item which meets the query condition corresponding to the main dimension in the main dimension is not found in the operation authority table, judging that the operation authority item which meets the query condition corresponding to each dimension in each dimension is not found in the operation authority table;
if the operation authority item meeting the query condition corresponding to the main dimension on the main dimension is found in the operation authority table, determining the found operation authority item meeting the query condition corresponding to the main dimension on the main dimension as an optimal operation authority item;
selecting a secondary dimension from secondary dimensions which are not selected yet as a current query dimension, wherein the secondary dimension is a dimension except the primary dimension in each dimension;
searching for an operation authority item which meets the query condition corresponding to the current query dimension in the preferred operation authority item;
if the operation authority item which meets the query condition corresponding to the current query dimension in the current query dimension is not found in the preferred operation authority item, judging that the operation authority item which meets the query condition corresponding to each dimension in each dimension is not found in the operation authority table;
if the operation authority items meeting the query conditions corresponding to the current query dimension in the current query dimension are found in the preferred operation authority items, deleting the operation authority items not meeting the query conditions in the current query dimension from the preferred operation authority items, and then returning to execute the step of selecting one secondary dimension from the secondary dimensions which are not selected as the current query dimension until all the secondary dimensions are selected, and determining the preferred operation authority items as the operation authority items meeting the query conditions corresponding to all the dimensions in all the dimensions.
9. The terminal device according to claim 8, wherein the searching for the operation right entry satisfying the query condition corresponding to the current query dimension in the preferred operation right entry comprises:
searching for an operation authority item which is consistent with the query condition corresponding to the current query dimension in the preferred operation authority item;
and
and searching for an operation authority item with an empty query condition in the current query dimension in the preferred operation authority item, wherein the empty query condition indicates that the query condition in the current query dimension is not related to the operation authority of the target operation.
10. The terminal device according to any one of claims 7 to 9, further comprising, before acquiring the query condition of the operation authority for the target operation in each dimension input by the user, a step of:
selecting one secondary dimension from the secondary dimensions which are not selected yet as the dimension for currently merging the operation authority items, wherein the secondary dimension is the dimension except the primary dimension in each dimension;
selecting the operation authority items of which the dimension for currently merging the operation authority items is irrelevant to the operation authority of the target operation from the operation authority table, and setting the query conditions on the dimension for currently merging the operation authority items to be null in the selected operation authority items;
returning to execute the step of selecting one secondary dimension from the secondary dimensions which are not selected yet as the dimension for currently merging the operation authority items until all the secondary dimensions are selected;
and merging and simplifying the same operation authority items in the operation authority table to obtain a simplified operation authority table.
CN201710945921.9A 2017-10-12 2017-10-12 Operation authority query method and terminal device Active CN107784091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710945921.9A CN107784091B (en) 2017-10-12 2017-10-12 Operation authority query method and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710945921.9A CN107784091B (en) 2017-10-12 2017-10-12 Operation authority query method and terminal device

Publications (2)

Publication Number Publication Date
CN107784091A CN107784091A (en) 2018-03-09
CN107784091B true CN107784091B (en) 2020-05-29

Family

ID=61434435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710945921.9A Active CN107784091B (en) 2017-10-12 2017-10-12 Operation authority query method and terminal device

Country Status (1)

Country Link
CN (1) CN107784091B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110109946B (en) * 2019-04-23 2021-09-14 北京小米移动软件有限公司 Question query method and device
CN110445775B (en) * 2019-07-24 2021-08-20 创新先进技术有限公司 Method and apparatus for account management
US10798094B2 (en) 2019-07-24 2020-10-06 Alibaba Group Holding Limited Blockchain-based account management

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819557A (en) * 2012-06-28 2012-12-12 用友软件股份有限公司 Data inquiry processing device and data inquiry processing method
CN103702236A (en) * 2013-12-17 2014-04-02 北京九华互联科技有限公司 Broadcast control authority control method
CN105117456A (en) * 2015-08-19 2015-12-02 焦点科技股份有限公司 Method for extracting entity information
CN105224534A (en) * 2014-05-29 2016-01-06 腾讯科技(深圳)有限公司 A kind of method and device of asking response
CN106682180A (en) * 2016-12-29 2017-05-17 广州华多网络科技有限公司 Data inquiry method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819557A (en) * 2012-06-28 2012-12-12 用友软件股份有限公司 Data inquiry processing device and data inquiry processing method
CN103702236A (en) * 2013-12-17 2014-04-02 北京九华互联科技有限公司 Broadcast control authority control method
CN105224534A (en) * 2014-05-29 2016-01-06 腾讯科技(深圳)有限公司 A kind of method and device of asking response
CN105117456A (en) * 2015-08-19 2015-12-02 焦点科技股份有限公司 Method for extracting entity information
CN106682180A (en) * 2016-12-29 2017-05-17 广州华多网络科技有限公司 Data inquiry method and device

Also Published As

Publication number Publication date
CN107784091A (en) 2018-03-09

Similar Documents

Publication Publication Date Title
CN109254966B (en) Data table query method, device, computer equipment and storage medium
CN102402605B (en) Mixed distribution model for search engine indexing
CN107798038B (en) Data response method and data response equipment
US20180285596A1 (en) System and method for managing sensitive data
CN107784091B (en) Operation authority query method and terminal device
CN103064933A (en) Data query method and system
CN105630847A (en) Data storage method as well as data query method, apparatus and system
CN105989076A (en) Data statistical method and device
WO2021208762A1 (en) Data storage and query
CN105550270B (en) Data base query method and device
CN106855861A (en) File merging method and device and electronic equipment
CN111625561B (en) Data query method and device
US11868310B2 (en) Composite storage of objects in multi-tenant devices
WO2024027328A1 (en) Data processing method based on zero-trust data access control system
CN109271564A (en) Declaration form querying method and equipment
CN110837511B (en) Data processing method, system and related equipment
CN108897729A (en) A kind of trading template sharing method, device, electronic equipment and storage medium
US20230281240A1 (en) Dynamic query adjustment based on data protection configurations
CN107169115A (en) Add the method and device of self-defined participle
US9852166B2 (en) Task handling in a multisystem environment
US9811669B1 (en) Method and apparatus for privacy audit support via provenance-aware systems
CN107357853A (en) A kind of operating method, device and the computer system of REDIS consoles
CN111190964B (en) Data docking method, device, equipment and storage medium
CN109582720B (en) Data storage method, device and storage medium
CN109582718A (en) Data processing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant