CN103425654B - A kind of authority tree linkage replay method, apparatus and system - Google Patents

A kind of authority tree linkage replay method, apparatus and system Download PDF

Info

Publication number
CN103425654B
CN103425654B CN201210151189.5A CN201210151189A CN103425654B CN 103425654 B CN103425654 B CN 103425654B CN 201210151189 A CN201210151189 A CN 201210151189A CN 103425654 B CN103425654 B CN 103425654B
Authority
CN
China
Prior art keywords
node
state
choose
child
tree
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.)
Expired - Fee Related
Application number
CN201210151189.5A
Other languages
Chinese (zh)
Other versions
CN103425654A (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.)
Shenzhen ZTE Netview Technology Co Ltd
Original Assignee
Shenzhen ZTE Netview Technology Co 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 Shenzhen ZTE Netview Technology Co Ltd filed Critical Shenzhen ZTE Netview Technology Co Ltd
Priority to CN201210151189.5A priority Critical patent/CN103425654B/en
Publication of CN103425654A publication Critical patent/CN103425654A/en
Application granted granted Critical
Publication of CN103425654B publication Critical patent/CN103425654B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a kind of authority tree linkage replay method, apparatus and system, methods described includes obtaining the zone permission logical data or function privilege logical data of user from server end;According to the zone permission logical data or function privilege logical data presentation user authority tri-state tree, and the state of node is begun stepping through and set gradually from root node, wherein, the step of setting node state includes:Whether be leaf node, if leaf node if judging present node, then whether judge the node is to choose node, if choosing node, then the node is set into selected state, if not node is chosen, then the node is set into non-selected state;If the node is not leaf node, the state status according to its child node sets the state of the node.Using the present invention, compared with determining the method for tri-state tree interior joint state from the bottom up in the prior art, it is determined that improved to some extent in the efficiency of node state, the efficiency that tri-state tree reappears is improved.

Description

A kind of authority tree linkage replay method, apparatus and system
Technical field
The present invention relates to System right management technical field, in particular to a kind of authority tree linkage replay method, dress Put and system, its zone permission possessed according to different user and function privilege are reappeared to user in the form of tri-state tree.
Background technology
In the network management system such as gate inhibition's monitoring, power and environmental monitoring, video monitoring, as long as being related to the authority pipe of system Reason, it is necessary to handle the display of some hierarchical structure objects, monitor area authority that such as user is possessed, the function of system power Limit etc..In rights management, different users is to possess different zone permission and function privilege, when with user right pipe When the user of reason function needs to check zone permission and the function privilege that some user is possessed, zone permission tree and function privilege Tree reappears display in the form of tri-state tree, so the authority that certain user is possessed can be presented in into user's eye with simple and clear Before, wherein, the tri-state tree refers to that each node of a tree includes choosing, partly choosing and non-selected three kinds of shapes State.
The tri-state tree that Chinese patent CN200510098664.7 discloses Network element object in a kind of network optimization system is presented And localization method, it is for can be good at that tri-state tree is presented, and its principal character is as follows:
If the 1, all child nodes of a node are all selected, this node is at " selected state ";
If the 2, all child nodes of a node are not all selected, then this node is at " non-selected " shape State;
If the 3, at least one child node is selected in all child nodes of a node, while at least one sub- section Point is without selected, then this node is at half selected state;
If the 4, choosing some father node, all child nodes of the father node will all be chosen;
If the 5, choosing some node in intermediate layer, all child nodes in the intermediate layer are all chosen;Travel through in the middle of this All brotghers of node of layer, if all brotghers of node in the intermediate layer are selected state, father's section of the middle layer node Point is selected state;If at least one in the brotgher of node of the middle layer node is " non-selected " state, the intermediate layer The father node of node is half selected state, the father node of the father node of the middle layer node is then looked for, until root node.
For the above-mentioned technical characteristic 1,2,3 of the prior art, the presentation of tri-state tree is being carried out to Network element object and is being needed true During the state of some fixed node, the state of its determination of the ability later of state of all child nodes of the node has been searched for, Present less efficient.
For the above-mentioned technical characteristic 5 of the prior art, in the presentation of tri-state tree is carried out to Network element object, elder generation is from the top down Leaf node is searched, then since leaf node, search upwards, the shape of father node is determined according to the state of the brotgher of node successively State, this is also what is had much room for improvement in terms of efficiency.
For the above-mentioned technical characteristic 4 of the prior art, in terms of it is used in user authority management, there can be authority diffusion and ask Topic.
For example, as shown in Figure 1, it is assumed that the user test of user admin management possesses AAA zone permissions, and its corresponding three State tree construction is as shown in Figure 1.
When user's test login systems, its user test-a that can be managed is created, and be granted by such as Fig. 2 to user test-a Shown zone permission.
When user admin is logged in, and checks the authority that user test-a possesses, if with the above-mentioned technology of the prior art Method linkage described in feature 4 reappears, the presentation result of its tri-state tree general as shown in figure 3, and in actual applications, user When admin checks user test-a authority, the presentation of its tri-state tree should be consistent with Fig. 1, however, passing through the existing skill The technical scheme that art is provided, asking for user right diffusion is occurred in that when user admin checks user test-a zone permission Topic, so as to can bring fascination to user to a certain extent, reduces Consumer's Experience.
In addition, for user authority management, in actual application, user may increase newly or delete some Zone permission or function privilege, correspondingly, the state of the node object in tri-state tree can also redefine the state of tree interior joint, When solving the technical problem, for above-mentioned prior art, it equally exists the problem of user right spreads.Such as Fig. 4 institutes Show, for example, user test-a possesses following region authority:
If login user with the addition of AAAC regions, because AAAC is newly-increased region, it is clear that for zone user test- A is no authority, as shown in figure 5, when using the method reproduction tri-state tree described in above-mentioned technical characteristic 4 of the prior art When, AAAC nodes are also at selected state, so as to generate authority diffusion.
Simultaneously for the situation of such a increase Area Node, such as increase region AAAC on the basis of based on Fig. 4, such as Fruit is using the method described in the technical characteristic 5 of above-mentioned prior art, as shown in fig. 6, carrying out Network element object tri-state tree weight Now, because the addition of AAAC nodes causes the states of former AAA nodes to become half selected state, also, node by selected state Center, A, AA should be half selected states, but occur being selected state, so, cause to occur in that tri-state authority tree mixes Random situation.
The content of the invention
The problem of caused authority diffusion, tri-state reappear chaotic during in order to overcome prior art to realize that tri-state tree reappears, this The purpose of invention is to provide a kind of authority tree linkage replay method, apparatus and system.
In order to reach the purpose of the present invention, the present invention is realized using following technical scheme:
A kind of authority tree linkage replay method, including:
The zone permission logical data or function privilege logical data of user is obtained from server end;
According to the zone permission logical data or function privilege logical data presentation user authority tri-state tree, and from root section Point begins stepping through and set gradually the state of node, wherein, the step of setting node state includes:
Whether be leaf node, if leaf node if judging present node, then whether judge the node is to choose node, if It is to choose node, then the node is set to selected state, if not node is chosen, then the node is set to non-selected shape State;If the node is not leaf node, the state status according to its child node sets the state of the node.
Preferably, if the node is not leaf node, the state status according to its child node sets the state of the node Processing method include:
If the child node under present node is all to choose node, unchecked node is searched for downwards, if searching not Choose node just to exit search, and the state of the node is set for half selected state, otherwise, then it is choosing to set the state of the node Middle state;
If the child node of present node is not to choose node, continue to search downwards to the child node of the present node Rope, chooses node just to exit search, and set the state of the present node for half selected state if searching;If not searching Node is chosen, then the state for setting the node is non-selected state;
If existed in the child node under present node and choose node, and number would be less than the child node of the present node Number, the then state for setting the present node is half selected state.
Preferably, when user increases or deletes section object or functional object, also comprise the following steps:
Whether be leaf node, if leaf node if judging the node, then whether judge the node is to choose node, if Node is chosen, then the node is set to selected state, if not node is chosen, then the node non-selected shape is set to State;If the node is not leaf node, the state status according to its child node sets the state of the node:
If the child node under the node is all to choose node, unchecked node is searched for downwards, if searching unselected Interior joint just exits search, and sets the state of the node for half selected state, otherwise, then sets the state of the node to choose State;
If the child node of the node is not to choose node, continue to search for downwards to the child node of the node, if searching Rope is to choosing node just to exit search, and it is half selected state to set the state of the node;If not searching and choosing node, The state for setting the node is non-selected state;
If existed in the child node under the node and choose node, and number would be less than the child node number of the node, then sets The state for putting the node is half selected state.
Preferably, the zone permission logical data or function privilege logical data of the user obtained from server end is stored in Among the database of server end, and the node ID chosen only is stored in database.
A kind of authority tree linkage reproducer, including:
Acquisition module, zone permission logical data or function privilege logical data for obtaining user from server end;
Module is presented, for according to the zone permission logical data or function privilege logical data presentation user authority three State tree, and the state of node is begun stepping through and set gradually from root node, wherein, the step of module sets node state is presented and wraps Include:Whether be leaf node, if leaf node if judging present node, then whether judge the node is to choose node, if choosing Interior joint, then be set to selected state by the node, if not node is chosen, then the node is set into non-selected state; If the node is not leaf node, the state status according to its child node sets the state of the node.
Preferably, if the node is not leaf node, module is presented the node is set according to the state status of its child node The processing method of state include:
If the child node under present node is all to choose node, unchecked node is searched for downwards, if searching not Choose node just to exit search, and the state of the node is set for half selected state, otherwise, then it is choosing to set the state of the node Middle state;
If the child node of present node is not to choose node, continue to search downwards to the child node of the present node Rope, chooses node just to exit search, and set the state of the present node for half selected state if searching;If not searching Node is chosen, then the state for setting the node is non-selected state;
If existed in the child node under present node and choose node, and number would be less than the child node of the present node Number, the then state for setting the present node is half selected state.
Preferably, the authority tree linkage reproducer also includes:
Judge module, for judging whether user increases or delete section object or functional object, when judge module is sentenced Break and user's increase or when deleting section object or functional object, the state that module is additionally operable to set the node is presented, including Following process step:
When judging whether the node is leaf node, whether if leaf node, then it is to choose node to judge the node, if It is to choose node, then the node is set to selected state, if not node is chosen, then the node is set to non-selected shape State;If the node is not leaf node, the state status according to its child node sets the state of the node:
If the child node under the node is all to choose node, unchecked node is searched for downwards, if searching unselected Interior joint just exits search, and sets the state of the node for half selected state, otherwise, then sets the state of the node to choose State;
If the child node of the node is not to choose node, continue to search for downwards to the child node of the node, if searching Rope is to choosing node just to exit search, and it is half selected state to set the state of the node;If not searching and choosing node, The state for setting the node is non-selected state;
If existed in the child node under the node and choose node, and number would be less than the child node number of the node, then sets The state for putting the node is half selected state.
Preferably, the zone permission logical data or function privilege logical number for the user that acquisition module is obtained from server end According to being stored among the database of server end, and the node ID chosen only is stored in database.
A kind of authority tree linkage playback system, including server, in addition to authority tree as described above linkage reproducer, Described device includes:
Acquisition module, zone permission logical data or function privilege logical data for obtaining user from server end;
Module is presented, for according to the zone permission logical data or function privilege logical data presentation user authority three State tree, and the state of node is begun stepping through and set gradually from root node, wherein, the step of module sets node state is presented and wraps Include:Whether be leaf node, if leaf node if judging present node, then whether judge the node is to choose node, if choosing Interior joint, then be set to selected state by the node, if not node is chosen, then the node is set into non-selected state; If the node is not leaf node, the state status according to its child node sets the state of the node.
Using the present invention, compared with determining the method for tri-state tree interior joint state from the bottom up in the prior art, it is determined that Improved to some extent in the efficiency of node state, improve the efficiency of tri-state tree reproduction.Solving is used for prior art in authority tree Caused authority diffusion problem, while solving the problems, such as to reappear the tri-state of tree after additions and deletions node.
Brief description of the drawings
Fig. 1 is tri-state tree construction schematic diagram in existing tri-state tree rendering method;
Fig. 2 is authority schematic diagram in existing tri-state tree rendering method;
Fig. 3 is tri-state tree presentation structural representation in existing tri-state tree rendering method;
Fig. 4 is authority schematic diagram in existing tri-state tree rendering method;
Fig. 5 is the schematic diagram for occurring authority diffusion in existing tri-state tree rendering method;
Fig. 6 is that occur the chaotic schematic diagram of tri-state authority tree in existing tri-state tree rendering method;
Fig. 7 is that the tri-state tree provided in an embodiment of the present invention when not increasing section object reappears algorithm flow chart;
Fig. 8 is that the tri-state tree provided in an embodiment of the present invention when increasing section object reappears algorithm flow chart;
Fig. 9 is tri-state tree construction schematic diagram in tri-state tree rendering method provided in an embodiment of the present invention;
Figure 10 is tri-state tree construction schematic diagram in tri-state tree rendering method provided in an embodiment of the present invention;
Figure 11 is tri-state tree construction schematic diagram in tri-state tree rendering method provided in an embodiment of the present invention;
Figure 12 is tri-state tree construction schematic diagram in tri-state tree rendering method provided in an embodiment of the present invention;
Figure 13 is tri-state tree construction schematic diagram in tri-state tree rendering method provided in an embodiment of the present invention;
Figure 14 is authority tree linkage playback system structural representation provided in an embodiment of the present invention.
The realization, functional characteristics and excellent effect of the object of the invention, below in conjunction with specific embodiment and accompanying drawing do into The explanation of one step.
Embodiment
Technical scheme of the present invention is described in further detail with specific embodiment below in conjunction with the accompanying drawings, so that this The technical staff in field can be better understood from the present invention and can be practiced, but illustrated embodiment is not as the limit to the present invention It is fixed.
Authority tree provided in an embodiment of the present invention linkage replay method mainly in the reconstruction processes of tri-state tree, realization from The search of top to bottm determines the state of each node in tree(Choose, partly choose, it is non-selected), illustrated separately below.
First, the tri-state tree for being not added with section object or functional object reappears processing method
Step 1: zone permission or the function privilege that user is possessed are obtained from server end, in actual applications, from clothes The user right that business device end is obtained is obtained from database, and the node ID chosen only is saved in usual database.
Step 2: the state of node is begun stepping through and set gradually from root node.The state of node is divided into " choosing ", " half Choose ", " non-selected " three kinds of states.The state of each root node depends on the state of the child node of the node, should without basis The state of all child nodes under root node is judged.Because being prescribed a time limit to user's gift, the section in " choosing " state Point is all stored in user right tables of data and suffered(Node in " half selected " and " not selecting " is not saved in tables of data)If, certain Individual node is " choosing " node, then its all child node must be in selected state.So to determine some root node State, need to only judge whether the child node of the root node is all to choose node to can determine that.Determine the state of the root node Method is divided to following two steps to be handled:
A, judge whether present node is leaf node, wherein, it is not leaf node when having child node under the node;When this It is leaf node when not having child node under node.Whether if leaf node, then it is " choosing " node to judge the node, if " choosing " node, then be set to " choosing " state by the node;If not " choosing " node, then the node is set to " non- Choose " state.If the node is not leaf node, into following process step;
B, the state for determining nonleaf node.The state determination of nonleaf node depends primarily on the state of its child node, so Situation is chosen it is determined that before the state of present node, first judge the child node of the node, for example in embodiments of the present invention, place Reason method specifically includes following steps:
If the 1, the child node under present node is all " choosing " node, return value is " 1 ", is determined according to the return value The state of the node is " choosing " state;
If the 2, the lower child node of present node is not " choosing " node(It is worth noting that, in the embodiment of the present invention In, it " will partly choose " node processing of node also as " non-selected " during authority tree state is reappeared.), then return value For " 0 ", then continue the child node search to the node child node, then can be true as long as searching " choosing " node just exits search The state of the fixed node is " partly choosing " state;The state of the node is " non-selected " if " choosing node " is not searched State;
If the 3rd, in the child node under present node, there is " choosing " node, and number would be less than the child node of the node Number, then return value is " 2 ", determines that the state of the node is " partly choosing " state according to the return value.
2nd, it with the addition of the tri-state behind region and reappear Processing Algorithm
The problem of having increased node newly in authority tree for user, processing method is as follows:
A, judge whether user increases or delete section object or functional object, if additions and deletions section object or function Object, then into following process step B;
B, judge whether the node is leaf node, i.e., whether have child node under present node.If leaf node, then judge Whether present node is " choosing " node, if " choosing " node, then present node is set into " choosing " state;If no It is " choosing " node, then present node is set to " non-selected " state.If present node is not leaf node, into following Process step C;
C, the main state for being to determine nonleaf node.The state of nonleaf node determines to depend primarily on the shape of its child node State, so it is determined that before the state of present node, first judging the situation of choosing of the child node of the node, the embodiment of the present invention is used Processing method specifically include following steps:
If the 1, the child node under present node is all " choosing " node, return value is " 1 ", and then recurrence looks into child node Child node in be node in the presence of " non-selected ", as long as finding, then exit search, determine the state of present node for " choosing " State;
If the 2, the lower child node of present node is not " choosing " node, return value is " 0 ", then continues to the node The child node search of child node, as long as searching " choosing " node just exits search, then the state that can determine that the node is " half selected In " state;The state of the node is " non-selected " state if " choosing node " is not searched;
If the 3rd, in the child node under present node, there is " choosing " node, and number would be less than the child node of the node Number, then return value is " 2 ", determines that the state of present node is " partly choosing " state according to the return value.
As shown in fig. 7, it reappears algorithm stream for the tri-state tree provided in an embodiment of the present invention when not increasing section object Cheng Tu, its idiographic flow is as follows:
Step 1, the zone permission possessed from application server end acquisition user or function privilege are into internal memory list.With The zone permission and function privilege that family possesses correspond in tri-state tree the node for being in " choosing " state.
Step 2, judge whether system has increased Area Node newly.
Step 3, begin stepping through from root node, the state that each node in tree is set is begun stepping through from top to bottom.The traversal Step is broadly divided into following 3 step:
Whether be leaf node, if leaf node if the 1, judging present node, then judge in internal memory list the node whether be Node is chosen, if it is, setting the node to be " choosing " state;If it is not, then setting the node to be " non-selected " state;
If the 2, present node is not leaf node, the state of the node is determined according to the child node of the node, its is specific Method is:
1)If the child node of present node can be found in internal memory list, can determine that the node is " choosing " shape State.As shown in figure 9, user does not increase region, for A nodes, its child node AA, AB, AC are to choose node, and these are chosen Node can be all stored in internal memory list, therefore is that can determine that A nodes are " choosing " state by AA, AB, AC.
2)If the child node of the node only has part can be in internal memory list less than it is " half selected for can determine that the node In " state.As shown in Figure 10, for " this node of " center ", is only able to find A nodes in internal memory list, and B node is unselected Node, then can determine that " this node of " center " is " partly choosing " state.
3)If the child node of present node can not find in internal memory list, recurrence searches for downwards the child node, as long as The node of " choosing " can be found in all child nodes of the node, then the present node can be set to " partly choosing " state, Return and lower node is set;If can not find the node of " choosing " in all child nodes of the node, present node can be set It is set to " non-selected " state.As shown in figure 11, for " for this node of " center ", its child node A and B can not be in internal memories Found in list, then continue search downwards, when there is an AB to exit search in internal memory list, then in the child node for search A, It is " partly choosing " state to determine A nodes.As shown in figure 12, for AA nodes, AAA, AAB, AAC are in rank for its child node All it can not find in table, it is determined that AA nodes are " non-selected " state.
3rd, recurrence sets the state of all nodes in tree.
As shown in figure 8, it reappears algorithm flow for the tri-state tree provided in an embodiment of the present invention when increasing section object Figure, its key step is reappeared as Processing Algorithm with being not added with the tri-state in region, is simply slightly different in traversal step.For example, If user adds AAD regions under AA nodes, now, in authority for, AAD regions are not gathered around by user test-a Have, but in the list memory of the authority obtained from server, A subregion AA, AB, AC, which are still, chooses " node ", but simultaneously Can not be that " choosing " state finds unchecked node, it is necessary to continue search downwards with regard to this determination A state, as long as finding unselected Interior joint, just exits search, and it is " partly choosing " state to determine A nodes.Otherwise, it may be determined that A nodes are " choosing " state, and it is in Existing tri-state tree construction is as shown in figure 13.
Correspondingly, the embodiment of the present invention additionally provides a kind of authority tree linkage reproducer 20, as shown in figure 14, including:
Acquisition module 201, zone permission logical data or function privilege logic for obtaining user from server end 10 Data;Preferably, the zone permission logical data or function privilege logic for the user that acquisition module 201 is obtained from server end 10 Data storage only stores the node ID chosen among the database of server end 10 in database.
Module 203 is presented, for according to the zone permission logical data or function privilege logical data presentation user power Tri-state tree is limited, and the state of node is begun stepping through and set gradually from root node, wherein, module 203 is presented node state is set The step of include:Whether be leaf node, if leaf node if judging present node, then whether judge the node is to choose node, If choosing node, then the node is set to selected state, if not node is chosen, then the node is set to non-choosing Middle state;If the node is not leaf node, the state status according to its child node sets the state of the node.
In a preferred embodiment, if the node is not leaf node, shape of the module 20 according to its child node is presented State situation sets the processing method of the state of the node to include:
If the 1, the child node under present node is all to choose node, the state for setting the node is selected state;
If the 2, the child node of present node is not to choose node, continue to search downwards to the child node of the present node Rope, chooses node just to exit search, and set the state of the present node for half selected state if searching;If not searching Node is chosen, then the state for setting the node is non-selected state;
If the 3rd, existed in the child node under present node and choose node, and number would be less than the child node of the present node Number, the then state for setting the present node is half selected state.
Under preferred embodiment, the authority tree linkage reproducer also includes:
Judge module 202, for judging whether user increases or delete section object or functional object, works as judge module 202 judge user's increase or when deleting section object or functional object, and the shape that module 203 is additionally operable to set the node is presented State, including following process step:
1st, when judging whether the node is leaf node, if leaf node, then whether be choose node, such as if judging the node Fruit is to choose node, then the node is set into selected state, if not node is chosen, be then set to the node non-selected State;If the node is not leaf node, the state status according to its child node sets the state of the node:
If the 2, the child node under the node is all to choose node, unchecked node is searched for downwards, if searching not Choose node just to exit search, and the state of the node is set for half selected state, otherwise, then it is choosing to set the state of the node Middle state;
If the 3, the child node of the node is not to choose node, continue to search for downwards to the child node of the node, if Search and choose node just to exit search, and the state of the node is set for half selected state;If not searching and choosing node, The state for then setting the node is non-selected state;
If the 4th, exist in the child node under the node and choose node, and number is less than the child node number of the node, then The state for setting the node is half selected state.
Correspondingly, with continued reference to Figure 14, the embodiment of the present invention additionally provides a kind of authority tree linkage playback system, including clothes Business device 10, in addition to authority tree as described above linkage reproducer 20, described device 20 include:
Acquisition module 201, zone permission logical data or function privilege logic for obtaining user from server end 10 Data;
Module 203 is presented, for according to the zone permission logical data or function privilege logical data presentation user power Tri-state tree is limited, and the state of node is begun stepping through and set gradually from root node, wherein, module 203 is presented node state is set The step of include:Whether be leaf node, if leaf node if judging present node, then whether judge the node is to choose node, If choosing node, then the node is set to selected state, if not node is chosen, then the node is set to non-choosing Middle state;If the node is not leaf node, the state status according to its child node sets the state of the node.
Being discussed in detail for reproducer 20 of authority tree linkage can participate in described above, no longer repeat superfluous to it herein State.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize Equivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlations Technical field, be included within the scope of the present invention.

Claims (7)

  1. The replay method 1. a kind of authority tree is linked, it is characterised in that including:
    The zone permission logical data or function privilege logical data of user is obtained from server end;
    According to the zone permission logical data or function privilege logical data presentation user authority tri-state tree, and opened from root node The traversal that begins and the state for setting gradually node, wherein, the step of setting node state includes:
    Whether be leaf node, if leaf node if judging present node, then whether judge the node is to choose node, if choosing Interior joint, then be set to selected state by the node, if not node is chosen, then the node is set into non-selected state; If the node is not leaf node, the state status according to its child node sets the state of the node;
    When user increases or deletes section object or functional object, also comprise the following steps:
    Whether be leaf node, if leaf node if judging the node, then whether be to choose node, if choosing if judging the node Node, then be set to selected state by the node, if not node is chosen, then the node is set into non-selected state;Such as Really the node is not leaf node, then the state status according to its child node sets the state of the node:
    If the child node under the node is all to choose node, unchecked node is searched for downwards, if searching unselected section Point just exits search, and sets the state of the node for half selected state, otherwise, then sets the state of the node to choose shape State;
    If the child node of the node is not to choose node, continue to search for downwards to the child node of the node, if searching Choose node just to exit search, and the state of the node is set for half selected state;If not searching and choosing node, set The state of the node is non-selected state;
    If exist in the child node under the node and choose node, and number is less than the child node number of the node, then setting should The state of node is half selected state.
  2. The replay method 2. authority tree as claimed in claim 1 is linked, it is characterised in that if the node is not leaf node, State status according to its child node sets the processing method of the state of the node to include:
    If the child node under present node is all to choose node, unchecked node is searched for downwards, if searching unselected Node just exits search, and sets the state of the node for half selected state, otherwise, then sets the state of the node to choose shape State;
    If the child node of present node is not to choose node, continue to search for downwards to the child node of the present node, if Search and choose node just to exit search, and the state of the present node is set for half selected state;Chosen if not searching Node, the then state for setting the node is non-selected state;
    If exist in the child node under present node and choose node, and number is less than the child node number of the present node, then The state for setting the present node is half selected state.
  3. The replay method 3. authority tree as claimed in claim 1 or 2 is linked, it is characterised in that the user obtained from server end Zone permission logical data or function privilege logical data be stored among the database of server end, and only deposited in database The node ID chosen is stored up.
  4. The reproducer 4. a kind of authority tree is linked, it is characterised in that including:
    Acquisition module, zone permission logical data or function privilege logical data for obtaining user from server end;
    Module is presented, for according to the zone permission logical data or function privilege logical data presentation user's authority tri-state Tree, and the state of node is begun stepping through and set gradually from root node, wherein, the step of module sets node state is presented and wraps Include:Whether be leaf node, if leaf node if judging present node, then whether judge the node is to choose node, if choosing Interior joint, then be set to selected state by the node, if not node is chosen, then the node is set into non-selected state; If the node is not leaf node, the state status according to its child node sets the state of the node;
    The authority tree linkage reproducer also includes:
    Judge module, for judging whether user increases or delete section object or functional object, when judge module is judged When user increases or deletes section object or functional object, the state that module is additionally operable to set the node is presented, including it is as follows Process step:
    When judging whether the node is leaf node, whether if leaf node, then it is to choose node to judge the node, if choosing Interior joint, then be set to selected state by the node, if not node is chosen, then the node is set into non-selected state; If the node is not leaf node, the state status according to its child node sets the state of the node:
    If the child node under the node is all to choose node, unchecked node is searched for downwards, if searching unselected section Point just exits search, and sets the state of the node for half selected state, otherwise, then sets the state of the node to choose shape State;
    If the child node of the node is not to choose node, continue to search for downwards to the child node of the node, if searching Choose node just to exit search, and the state of the node is set for half selected state;If not searching and choosing node, set The state of the node is non-selected state;
    If exist in the child node under the node and choose node, and number is less than the child node number of the node, then setting should The state of node is half selected state.
  5. The reproducer 5. authority tree as claimed in claim 4 is linked, it is characterised in that if the node is not leaf node, be in Existing module sets the processing method of the state of the node to include according to the state status of its child node:
    If the child node under present node is all to choose node, unchecked node is searched for downwards, if searching unselected Node just exits search, and sets the state of the node for half selected state, otherwise, then sets the state of the node to choose shape State;
    If the child node of present node is not to choose node, continue to search for downwards to the child node of the present node, if Search and choose node just to exit search, and the state of the present node is set for half selected state;Chosen if not searching Node, the then state for setting the node is non-selected state;
    If exist in the child node under present node and choose node, and number is less than the child node number of the present node, then The state for setting the present node is half selected state.
  6. 6. the authority tree linkage reproducer as described in claim 4 or 5, it is characterised in that acquisition module is obtained from server end The zone permission logical data or function privilege logical data of the user taken is stored among the database of server end, and data The node ID chosen only is stored in storehouse.
  7. The playback system 7. a kind of authority tree is linked, including server, it is characterised in that also including any power of such as claim 4-6 Profit requires described authority tree linkage reproducer.
CN201210151189.5A 2012-05-16 2012-05-16 A kind of authority tree linkage replay method, apparatus and system Expired - Fee Related CN103425654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210151189.5A CN103425654B (en) 2012-05-16 2012-05-16 A kind of authority tree linkage replay method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210151189.5A CN103425654B (en) 2012-05-16 2012-05-16 A kind of authority tree linkage replay method, apparatus and system

Publications (2)

Publication Number Publication Date
CN103425654A CN103425654A (en) 2013-12-04
CN103425654B true CN103425654B (en) 2017-07-28

Family

ID=49650413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210151189.5A Expired - Fee Related CN103425654B (en) 2012-05-16 2012-05-16 A kind of authority tree linkage replay method, apparatus and system

Country Status (1)

Country Link
CN (1) CN103425654B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653982A (en) * 2015-12-31 2016-06-08 中国建设银行股份有限公司 Method and system used for data permission control
CN108804678B (en) * 2018-06-12 2022-04-15 深圳市茁壮网络股份有限公司 List node management method and device
CN112150687A (en) * 2020-09-24 2020-12-29 深圳市万睿智能科技有限公司 User passage authority management method in residential scene and related components thereof
CN112685606A (en) * 2020-12-31 2021-04-20 上海氪邦智能技术有限公司 Authority rule configuration/management method, system, computer medium and terminal
CN112860692B (en) * 2021-01-29 2023-07-25 城云科技(中国)有限公司 Database table structure conversion method and device and electronic equipment thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1929393A (en) * 2005-09-07 2007-03-14 中兴通讯股份有限公司 Tri-state tree representing and location method of network element object in network optimization system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6895503B2 (en) * 2001-05-31 2005-05-17 Contentguard Holdings, Inc. Method and apparatus for hierarchical assignment of rights to documents and documents having such rights
US7644374B2 (en) * 2005-04-14 2010-01-05 Microsoft Corporation Computer input control for specifying scope with explicit exclusions

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1929393A (en) * 2005-09-07 2007-03-14 中兴通讯股份有限公司 Tri-state tree representing and location method of network element object in network optimization system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"ExtJS中树形结构级联选中(三态)";jn_nian;《http://jn-nian.iteye.com/blog/1459217 》;20120320;第1-4页 *
"三态树的实现";mengxiangying504;《http://blog.csdn.net/mengxiangying504/article/details/4621234 》;20090930;第1-6页 *
"三态选择树实现终结者";王佳豪;《http://www.bianceng.cn/Programming/vc/200710/4680.htm 》;20071006;第1-10页 *

Also Published As

Publication number Publication date
CN103425654A (en) 2013-12-04

Similar Documents

Publication Publication Date Title
CN103425654B (en) A kind of authority tree linkage replay method, apparatus and system
CN106294614B (en) Method and apparatus for accessing business
CN106126669B (en) User collaborative filtering content recommendation method and device based on label
CN109862018A (en) Anti- crawler method and system based on user access activity
CN103761276B (en) Methods of exhibiting and device that a kind of tree structure data compares
CN106454431B (en) TV programme suggesting method and system
TW201507486A (en) Method for supplying information
JP2017534952A (en) Content interface layout construction
CN103631769B (en) Method and device for judging consistency between file content and title
CN102520933A (en) Method and device for establishing tree menu based on user right
Fan et al. Critical nodes identification for vulnerability analysis of power communication networks
CN104615716B (en) Distributed social network information acquisition method and system based on priority sequence
CN106156230A (en) A kind of method and device generating interior chain
CN106227870A (en) A kind of video website recommends method and device
CN103354518A (en) Web log mining-based intelligent household gateway and web log mining-based intelligent household system
CN105574030A (en) Information search method and device
CN103678138A (en) Method and device for generating state conversion test samples
CN102982034B (en) The searching method and search system of Internet website information
CN105608158A (en) Method and apparatus for displaying picture in waterfall flow manner
CN105022797A (en) Resource topic processing method and apparatus
CN105045868B (en) A kind of method and device for searching for hot ticket
CN104010218B (en) A kind of sorting technique of television channel, lookup method, sorter and playback equipment
CN109902219A (en) A kind of search aggregation engine
CN107807793A (en) The storage of data trnascription isomery and access method in distributed computer storage system
CN101339568A (en) Method and device for constructing data tree

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170728

CF01 Termination of patent right due to non-payment of annual fee