CN103425654A - Method, device and system for reproducing permission tree in linkage manner - Google Patents

Method, device and system for reproducing permission tree in linkage manner Download PDF

Info

Publication number
CN103425654A
CN103425654A CN2012101511895A CN201210151189A CN103425654A CN 103425654 A CN103425654 A CN 103425654A CN 2012101511895 A CN2012101511895 A CN 2012101511895A CN 201210151189 A CN201210151189 A CN 201210151189A CN 103425654 A CN103425654 A CN 103425654A
Authority
CN
China
Prior art keywords
node
state
choose
search
child
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.)
Granted
Application number
CN2012101511895A
Other languages
Chinese (zh)
Other versions
CN103425654B (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
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method, a device and a system for reproducing a permission tree in a linkage manner. The method includes acquiring area permission logical data or function permission logical data of users from a server; displaying a user permission three-state tree according to the area permission logical data or the function permission logical data, starting traversing from a root node, and sequentially setting states of nodes. A process for setting the states of the nodes includes judging whether a current node is a leaf node or not, judging whether the current node is a selected node or not if the current node is the leaf node, setting the current node into a selected state if the current node is the selected node, and setting the current node into an unselected state if the current node is not the selected node; setting a state of the current node according to state conditions of child nodes of the current node if the current node is not the leaf node. Compared with an exiting method for determining states of nodes in a three-state tree from bottom to top in the prior art, the method, the device and the system have the advantages that the node state determining efficiency is improved to a certain extent, and the three-state tree reproducing efficiency is improved.

Description

A kind of authority tree interlock replay method, Apparatus and system
Technical field
The present invention relates to the System right management technical field, in particular to a kind of authority tree interlock replay method, Apparatus and system, the zone permission that it has according to different user and function privilege reappear to the user with the form of tri-state tree.
Background technology
In the network management systems such as gate inhibition's monitoring, power and environmental monitoring, video monitoring, as long as relate to the rights management of system, just need to process the demonstration of some hierarchical structure objects, the guarded region authority had such as the user, the function privilege of system etc.In rights management, different users has different zone permission and function privilege, when the user with user authority management function need to check zone permission that certain user has and function privilege, zone permission tree and function privilege tree reappear and show with the form of tri-state tree, the authority that can certain user be had like this is presented in the user at the moment simple and clearly, wherein, described tri-state tree refers to that each node of a tree structure comprises and chooses, partly chooses and non-ly choose three kinds of states.
The tri-state tree that Chinese patent CN200510098664.7 discloses Network element object in a kind of network optimization system presents and localization method, and it presents the tri-state tree for can be good at, and its principal character is as follows:
If all child nodes of 1 one nodes are all selected, this node is just in " selected state ";
If it is selected that all child nodes of 2 one nodes all do not have, this node is just in " non-choosing " state so;
If have at least a child node selected in all child nodes of 3 one nodes, have at least a child node not have selected simultaneously, this node is just in partly choosing state so;
If 4 choose certain father node, all child nodes of this father node will all be chosen;
If 5 choose certain node in middle layer, all child nodes in this middle layer are all chosen; Travel through all brotghers of node in this middle layer, if all brotghers of node in this middle layer are selected state, the father node of this middle layer node is selected state; If have one in the brotgher of node of this middle layer node at least for " non-choosing " state, the father node of this middle layer node, for partly choosing state, is then found the father node of the father node of this middle layer node, until root node.
Above-mentioned technical characterictic 1,2,3 for the prior art, Network element object is being carried out to tri-state tree presents and during the state of the definite some nodes of needs, the state of having searched for all child nodes of this node carrys out its definite state of ability afterwards, presents efficiency lower.
For the above-mentioned technical characterictic 5 of the prior art, Network element object is being carried out to during tri-state tree presents, first search from the top down leaf node, then from leaf node, upwards search for successively, determine the state of father node according to the state of the brotgher of node, this also has much room for improvement aspect efficiency.
For the above-mentioned technical characterictic 4 of the prior art, it is used in the user authority management aspect, can have authority diffusion problem.
For example, as shown in Figure 1, suppose that the user test of user admin management has the AAA zone permission, its corresponding tri-state tree construction as shown in Figure 1.
When user test login system, create the user test-a that it can be managed, and authorized zone permission as shown in Figure 2 to user test-a.
When user admin logs in, while checking the authority that user test-a has, if reappear with the described method interlock of the above-mentioned technical characterictic 4 of the prior art, the result that presents of its tri-state tree will be as shown in Figure 3, and in actual applications, when user admin checks the authority of user test-a, presenting of its tri-state tree be consistent with Fig. 1, yet, the technical scheme provided by the prior art, the problem that has occurred the user right diffusion when user admin checks the zone permission of user test-a, thereby can bring fascination to the user to a certain extent, reduced user's experience.
In addition, for user authority management, in actual application, the user may increase or delete certain zone permission or function privilege newly, correspondingly, the state of the node object in the tri-state tree also can redefine the state of node in tree, when solving this technical problem, for above-mentioned prior art scheme, there is the problem of user right diffusion equally in it.As shown in Figure 4, for example, user test-a has following zone permission:
If login user has been added the AAAC zone, because AAAC is the zone increased newly, obviously there is no authority for this zone user test-a, as shown in Figure 5, when adopting the described method of above-mentioned technical characterictic 4 of the prior art to reappear the tri-state tree, the AAAC node is also in selected state, thereby produced the authority diffusion.
Simultaneously, increase the situation of Area Node for this kind, for example on the basis based on Fig. 4, increase regional AAAC, if adopt the described method of technical characterictic 5 of above-mentioned prior art scheme, as shown in Figure 6, when carrying out the reproduction of Network element object tri-state tree, because the interpolation of AAAC node causes the state of former AAA node to become by selected state the state of partly choosing, and, node center, A, AA partly choose state, but occur it being selected state, so, caused occurring that the tri-state authority sets chaotic situation.
Summary of the invention
Reappear chaotic problem in order to overcome when existing techniques in realizing tri-state tree reappears the authority diffusion, the tri-state that cause, the object of the present invention is to provide a kind of authority tree interlock replay method, Apparatus and system.
In order to reach purpose of the present invention, the present invention realizes by the following technical solutions:
A kind of authority tree interlock replay method comprises:
Obtain user's zone permission logical data or function privilege logical data from server end;
Present user right tri-state tree according to described zone permission logical data or function privilege logical data, and start to travel through and set gradually the state of node from root node, wherein, the step that node state is set comprises:
Judging whether present node is leaf node, if leaf node judges whether this node is to choose node, if choose node, is selected state by this Node configuration, if not choosing node, by this Node configuration, is non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node.
Preferably, if this node is not leaf node, the disposal route that according to the state status of its child node the state of this node is set comprises:
If the child node under present node is all to choose node, the downward unchecked node of search, do not choose node just to exit search if search, and the state that this node is set is for partly choosing state, otherwise the state that this node is set is selected state;
If the child node of present node is not to choose node, continue to search for downwards to the child node of this present node, if search, choose node just to exit search, and the state that this present node is set is for partly choosing state; Do not choose node if search, the state that this node is set 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 this present node, the state of this present node is set for partly choosing state.
Preferably, when the user increases or deleted section object or functional object, also comprise the steps:
Judging whether this node is leaf node, if leaf node judges whether this node is to choose node, if choose node, is selected state by this Node configuration, if not choosing node, by this Node configuration, is non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node:
If the child node under this node is all to choose node, the downward unchecked node of search, do not choose node just to exit search if search, and the state that this node is set is for partly choosing state, otherwise the state that this node is set is selected state;
If the child node of this node is not to choose node, continue to search for downwards to the child node of this node, if search, choose node just to exit search, and the state that this node is set is for partly choosing state; Do not choose node if search, the state that this node is set is non-selected state;
If exist in the child node under this node and choose node, and number is less than the child node number of this node, the state of this node is set for partly choosing state.
Preferably, the user's who obtains from server end zone permission logical data or function privilege logical data are stored among the database of server end, and have only stored the node ID of choosing in database.
A kind of authority tree interlock reproducer comprises:
Acquisition module, for zone permission logical data or the function privilege logical data that obtains the user from server end;
Present module, for present user right tri-state tree according to described zone permission logical data or function privilege logical data, and start to travel through and set gradually the state of node from root node, wherein, presenting the step that module arranges node state comprises: judge whether present node is leaf node, if leaf node, judge whether this node is to choose node, if choose node, by this Node configuration, be selected state, if not choosing node, by this Node configuration, be non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node.
Preferably, if this node is not leaf node, presents the disposal route that module arranges the state of this node according to the state status of its child node and comprise:
If the child node under present node is all to choose node, the downward unchecked node of search, do not choose node just to exit search if search, and the state that this node is set is for partly choosing state, otherwise the state that this node is set is selected state;
If the child node of present node is not to choose node, continue to search for downwards to the child node of this present node, if search, choose node just to exit search, and the state that this present node is set is for partly choosing state; Do not choose node if search, the state that this node is set 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 this present node, the state of this present node is set for partly choosing state.
Preferably, described authority tree interlock reproducer also comprises:
Whether judge module, increase or deleted section object or functional object for judging the user, when judge module is judged user's increase or deleted section object or functional object, presents module also for the state of this node is set, and comprises following treatment step:
When judging whether this node is leaf node, if leaf node judges whether this node is to choose node, if choose node, by this Node configuration, be selected state, if not choosing node, by this Node configuration, be non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node:
If the child node under this node is all to choose node, the downward unchecked node of search, do not choose node just to exit search if search, and the state that this node is set is for partly choosing state, otherwise the state that this node is set is selected state;
If the child node of this node is not to choose node, continue to search for downwards to the child node of this node, if search, choose node just to exit search, and the state that this node is set is for partly choosing state; Do not choose node if search, the state that this node is set is non-selected state;
If exist in the child node under this node and choose node, and number is less than the child node number of this node, the state of this node is set for partly choosing state.
Preferably, the user's that acquisition module obtains from server end zone permission logical data or function privilege logical data are stored among the database of server end, and have only stored the node ID of choosing in database.
A kind of authority tree interlock playback system, comprise server, also comprises authority tree interlock reproducer as above, and described device comprises:
Acquisition module, for zone permission logical data or the function privilege logical data that obtains the user from server end;
Present module, for present user right tri-state tree according to described zone permission logical data or function privilege logical data, and start to travel through and set gradually the state of node from root node, wherein, presenting the step that module arranges node state comprises: judge whether present node is leaf node, if leaf node, judge whether this node is to choose node, if choose node, by this Node configuration, be selected state, if not choosing node, by this Node configuration, be non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node.
Adopt the present invention, compare with the method for determining from the bottom up node state in the tri-state tree in prior art, improve to some extent on the efficiency of determining node state, improved the efficiency that the tri-state tree reappears.Solve the authority diffusion problem that prior art is caused for the authority tree, solved the tri-state problem of after the additions and deletions node, reappearing tree simultaneously.
The accompanying drawing explanation
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 that in existing tri-state tree rendering method, the tri-state tree presents structural representation;
Fig. 4 is authority schematic diagram in existing tri-state tree rendering method;
The schematic diagram of authority diffusion appears in Fig. 5 in existing tri-state tree rendering method;
Fig. 6 occurs in existing tri-state tree rendering method that the tri-state authority sets chaotic schematic diagram;
Fig. 7 is that the tri-state tree when not increasing section object that the embodiment of the present invention provides reappears algorithm flow chart;
Fig. 8 is that the tri-state tree when increasing section object that the embodiment of the present invention provides reappears algorithm flow chart;
Fig. 9 is that the tri-state that the embodiment of the present invention provides is set tri-state tree construction schematic diagram in rendering method;
Figure 10 is that the tri-state that the embodiment of the present invention provides is set tri-state tree construction schematic diagram in rendering method;
Figure 11 is that the tri-state that the embodiment of the present invention provides is set tri-state tree construction schematic diagram in rendering method;
Figure 12 is that the tri-state that the embodiment of the present invention provides is set tri-state tree construction schematic diagram in rendering method;
Figure 13 is that the tri-state that the embodiment of the present invention provides is set tri-state tree construction schematic diagram in rendering method;
Figure 14 is the authority tree interlock playback system structural representation that the embodiment of the present invention provides.
The realization of the object of the invention, functional characteristics and excellent effect, be described further below in conjunction with specific embodiment and accompanying drawing.
Embodiment
Below in conjunction with the drawings and specific embodiments, technical scheme of the present invention is described in further detail, can be implemented so that those skilled in the art can better understand the present invention also, but illustrated embodiment is not as a limitation of the invention.
Authority that the embodiment of the present invention provides tree interlock replay method is mainly in the reconstruction processes of tri-state tree, realizes that search from top to bottom determines the state of each node in tree (choose, partly choose, non-choosing), is below set forth respectively.
One, the tri-state of Adding Area object or functional object tree does not reappear disposal route
Step 1, from server end, obtain zone permission or the function privilege that the user has, in actual applications, the user right obtained from server end obtains from database, usually in database, has only preserved the node ID of choosing.
Step 2, start to travel through and set gradually the state of node from root node.The state of node is divided into " choosing ", " partly choosing ", " non-choosing " three kinds of states.The state of each root node depends on the state of the child node of this node, without the state of all child nodes according under this root node, is judged.Because when giving user's granted rights, node in " choosing " state all is kept at the user right tables of data and has suffered (node in " half selected " and " not selecting " is not saved in tables of data), if certain node is " choosing " node, its all child node must be in selected state so.So determine the state of certain root node, only need to judge whether the child node of this root node is all to choose node to determine.Determine that the method for the state of this root node divides following two steps to be processed:
A, judging whether present node is leaf node, wherein, while under this node, child node being arranged, is not leaf node; While under this node, there is no child node, it is leaf node.If leaf node judges whether this node is " choosing " node, if " choosing " node is " choosing " state by this Node configuration; If not " choosing " node, by this Node configuration, be " non-choosing " state.If this node is not leaf node, enter following treatment step;
B, determine the state of nonleaf node.The state of nonleaf node is determined the state that depends primarily on its child node, so, before the state of determining present node, first judge the situation of choosing of the child node of this node, for example in embodiments of the present invention, disposal route specifically comprises the steps:
If the child node under 1 present node is all " choosing " node, rreturn value is " 1 ", according to this rreturn value, determines that the state of this node is " choosing " state;
(not it should be noted that in embodiments of the present invention, in the process of reappearing the authority tree state, will " partly choose " node to be used as the node processing of " non-choosing " yet if the lower child node of 2 present nodes is not " choosing " node.), rreturn value is " 0 ", continues the child node search to this node child node, as long as search " choosing " node, just exits search, the state that can determine this node is " partly choosing " state; If do not search " choosing node " the state of this node is " non-choosing " state;
If in the child node under 3 present nodes, there is " choosing " node, and number is less than the child node number of this node, and rreturn value is " 2 ", according to this rreturn value, determines that the state of this node is " partly choosing " state.
Two, add the tri-state behind the zone and reappeared Processing Algorithm
Increased the problem of node in the authority tree newly for the user, disposal route is as follows:
A, judge whether the user increases or deleted section object or functional object, if additions and deletions section object or functional object, enter following treatment step B;
B, judge whether this node is leaf node, and whether child node arranged under present node.If leaf node judges whether present node is " choosing " node, if " choosing " node, present node is set to " choosing " state; If not " choosing " node, present node is set to " non-choosing " state.If present node is not leaf node, enter following treatment step C;
C, mainly be the state of determining nonleaf node.The state of nonleaf node is determined the state that depends primarily on its child node, so, before the state of determining present node, first judge the situation of choosing of the child node of this node, the disposal route that the embodiment of the present invention adopts specifically comprises the steps:
If the child node under 1 present node is all " choosing " node, rreturn value is " 1 ", and then to look in the child node of child node be the node that has " non-choosing " to recurrence, as long as find, exit search, the state of determining present node is " choosing " state;
If the lower child node of 2 present nodes is not " choosing " node, rreturn value is " 0 ", continue the child node search to this node child node, as long as search " choosing " node, just exit search, the state that can determine this node is " partly choosing " state; If do not search " choosing node " the state of this node is " non-choosing " state;
If in the child node under 3 present nodes, there is " choosing " node, and number is less than the child node number of this node, and rreturn value is " 2 ", according to this rreturn value, determines that the state of present node is " partly choosing " state.
As shown in Figure 7, it reappears algorithm flow chart for the tri-state tree when not increasing section object that the embodiment of the present invention provides, and its idiographic flow is as follows:
Step 1, from the application server end, obtain zone permission that the user has or function privilege to the internal memory list.The zone permission that the user has and function privilege are corresponding to the node in " choosing " state in the tri-state tree.
Step 2, judge whether system has increased Area Node newly.
Step 3, from root node, start traversal, start from top to bottom traversal the state of each node in tree is set.This traversal step mainly is divided into following 3 steps:
1, judge whether present node is leaf node, if leaf node judges in the internal memory list, whether this node is to choose node, if so, it is " choosing " state that this node is set; If not, it is " non-choosing " state that this node is set;
If 2 present nodes are not leaf nodes, according to the child node of this node, determine the state of this node, its concrete grammar is:
1), if the child node of present node can find in the internal memory list, can determine that this node is " choosing " state.As shown in Figure 9, the user does not increase zone, and for the A node, its child node AA, AB, AC choose node, and these choose node all can be kept in the internal memory list, therefore can determine that by AA, AB, AC the A node is " choosing " state.
2) if the child node of this node only have part can be in the internal memory list less than, can determine that this node is " partly choosing " state.As shown in figure 10, for " this node of " center " can only find the A node in the internal memory list, and the B node is not choose node, can determine that " this node of " center " is " partly choosing " state.
3) if the child node of present node can not find in the internal memory list, recurrence is searched for this child node downwards, as long as can find the node of " choosing " in all child nodes of this node, this present node can be set to " partly choosing " state, returns lower node is set; If can not find the node of " choosing " in all child nodes of this node, present node can be set to " non-choosing " state.As shown in figure 11, for " for this node of " center ", its child node A and B can not find in the internal memory list; continue search downwards; an AB is arranged in the child node that searches A in the internal memory list, exit search, determine that the A node is " partly choosing " state.As shown in figure 12, for the AA node, its child node AAA, AAB, AAC can not find in the internal memory list, determine that the AA node is " non-choosing " state.
3, recurrence arranges the state of all nodes in tree.
As shown in Figure 8, it reappears algorithm flow chart for tri-state tree when increasing section object that the embodiment of the present invention provides, and it is the same that its key step and the tri-state of Adding Area are not reappeared Processing Algorithm, just in traversal step difference slightly.For example, if the user has increased the AAD zone under the AA node, now, on authority, the AAD zone is not had by user test-a, but, the list memory of the authority of obtaining from server, subregion AA, the AB of A, AC choose " node ", but can not determine that the state of A is " choosing " state at this point, need to continue search downwards and find unchecked node, do not choose node as long as find, just exit search, determine that the A node is " partly choosing " state.Otherwise, can determine that the A node is " choosing " state, the tri-state tree construction that it presents is as shown in figure 13.
Correspondingly, the embodiment of the present invention also provides a kind of authority tree interlock reproducer 20, as shown in figure 14, comprising:
Acquisition module 201, for obtaining user's zone permission logical data or function privilege logical data from server end 10; Preferably, the user's that acquisition module 201 obtains from server end 10 zone permission logical data or function privilege logical data are stored among the database of server end 10, and have only stored the node ID of choosing in database.
Present module 203, for present user right tri-state tree according to described zone permission logical data or function privilege logical data, and start to travel through and set gradually the state of node from root node, wherein, presenting the step that module 203 arranges node state comprises: judge whether present node is leaf node, if leaf node, judge whether this node is to choose node, if choose node, by this Node configuration, be selected state, if not choosing node, by this Node configuration, be non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node.
In a kind of preferred implementation, if this node is not leaf node, presents the disposal route that module 20 arranges the state of this node according to the state status of its child node and comprise:
If the child node under 1 present node is all to choose node, the state that this node is set is selected state;
If the child node of 2 present nodes is not to choose node, continue to search for downwards to the child node of this present node, if search, choose node just to exit search, and the state that this present node is set is for partly choosing state; Do not choose node if search, the state that this node is set is non-selected state;
If exist in the child node under 3 present nodes and choose node, and number is less than the child node number of this present node, the state of this present node is set for partly choosing state.
Under preferred implementation, described authority tree interlock reproducer also comprises:
Judge module 202, for judging whether the user increases or deleted section object or functional object, when judge module 202 is judged user's increase or has been deleted section object or functional object, present module 203 also for the state of this node is set, comprise following treatment step:
1, when judging whether this node is leaf node, if leaf node judges whether this node is to choose node, if choose node, by this Node configuration, be selected state, if not choosing node, by this Node configuration, be non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node:
If the child node under 2 these nodes is all to choose node, the downward unchecked node of search, do not choose node just to exit search if search, and the state that this node is set is for partly choosing state, otherwise the state that this node is set is selected state;
If the child node of 3 these nodes is not to choose node, continue to search for downwards to the child node of this node, if search, choose node just to exit search, and the state that this node is set is for partly choosing state; Do not choose node if search, the state that this node is set is non-selected state;
If exist in the child node under 4 these nodes and choose node, and number is less than the child node number of this node, the state of this node is set for partly choosing state.
Correspondingly, continue with reference to Figure 14, the embodiment of the present invention also provides a kind of authority tree interlock playback system, comprises server 10, also comprises authority tree interlock reproducer 20 as above, and described device 20 comprises:
Acquisition module 201, for obtaining user's zone permission logical data or function privilege logical data from server end 10;
Present module 203, for present user right tri-state tree according to described zone permission logical data or function privilege logical data, and start to travel through and set gradually the state of node from root node, wherein, presenting the step that module 203 arranges node state comprises: judge whether present node is leaf node, if leaf node, judge whether this node is to choose node, if choose node, by this Node configuration, be selected state, if not choosing node, by this Node configuration, be non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node.
The detailed introduction of described authority tree interlock reproducer 20 can be participated in mentioned above, no longer it is repeated to repeat herein.
The foregoing is only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in scope of patent protection of the present invention.

Claims (9)

1. an authority tree interlock replay method, is characterized in that, comprising:
Obtain user's zone permission logical data or function privilege logical data from server end;
Present user right tri-state tree according to described zone permission logical data or function privilege logical data, and start to travel through and set gradually the state of node from root node, wherein, the step that node state is set comprises:
Judging whether present node is leaf node, if leaf node judges whether this node is to choose node, if choose node, is selected state by this Node configuration, if not choosing node, by this Node configuration, is non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node.
2. authority as claimed in claim 1 tree interlock replay method, is characterized in that, if this node is not leaf node, the disposal route that according to the state status of its child node the state of this node is set comprises:
If the child node under present node is all to choose node, the downward unchecked node of search, do not choose node just to exit search if search, and the state that this node is set is for partly choosing state, otherwise the state that this node is set is selected state;
If the child node of present node is not to choose node, continue to search for downwards to the child node of this present node, if search, choose node just to exit search, and the state that this present node is set is for partly choosing state; Do not choose node if search, the state that this node is set 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 this present node, the state of this present node is set for partly choosing state.
3. authority tree interlock replay method as claimed in claim 1 or 2, is characterized in that, when the user increases or deleted section object or functional object, also comprises the steps:
Judging whether this node is leaf node, if leaf node judges whether this node is to choose node, if choose node, is selected state by this Node configuration, if not choosing node, by this Node configuration, is non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node:
If the child node under this node is all to choose node, the downward unchecked node of search, do not choose node just to exit search if search, and the state that this node is set is for partly choosing state, otherwise the state that this node is set is selected state;
If the child node of this node is not to choose node, continue to search for downwards to the child node of this node, if search, choose node just to exit search, and the state that this node is set is for partly choosing state; Do not choose node if search, the state that this node is set is non-selected state;
If exist in the child node under this node and choose node, and number is less than the child node number of this node, the state of this node is set for partly choosing state.
4. authority as claimed in claim 1 or 2 is set the interlock replay method, it is characterized in that, the user's who obtains from server end zone permission logical data or function privilege logical data are stored among the database of server end, and have only stored the node ID of choosing in database.
5. an authority tree interlock reproducer, is characterized in that, comprising:
Acquisition module, for zone permission logical data or the function privilege logical data that obtains the user from server end;
Present module, for present user right tri-state tree according to described zone permission logical data or function privilege logical data, and start to travel through and set gradually the state of node from root node, wherein, presenting the step that module arranges node state comprises: judge whether present node is leaf node, if leaf node, judge whether this node is to choose node, if choose node, by this Node configuration, be selected state, if not choosing node, by this Node configuration, be non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node.
6. authority as claimed in claim 5 tree interlock reproducer, is characterized in that, if this node is not leaf node, presents the disposal route that module arranges the state of this node according to the state status of its child node and comprise:
If the child node under present node is all to choose node, the downward unchecked node of search, do not choose node just to exit search if search, and the state that this node is set is for partly choosing state, otherwise the state that this node is set is selected state;
If the child node of present node is not to choose node, continue to search for downwards to the child node of this present node, if search, choose node just to exit search, and the state that this present node is set is for partly choosing state; Do not choose node if search, the state that this node is set 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 this present node, the state of this present node is set for partly choosing state.
7. authority tree interlock reproducer as described as claim 5 or 6, is characterized in that, also comprises:
Whether judge module, increase or deleted section object or functional object for judging the user, when judge module is judged user's increase or deleted section object or functional object, presents module also for the state of this node is set, and comprises following treatment step:
When judging whether this node is leaf node, if leaf node judges whether this node is to choose node, if choose node, by this Node configuration, be selected state, if not choosing node, by this Node configuration, be non-selected state; If this node is not leaf node, the state of this node is set according to the state status of its child node:
If the child node under this node is all to choose node, the downward unchecked node of search, do not choose node just to exit search if search, and the state that this node is set is for partly choosing state, otherwise the state that this node is set is selected state;
If the child node of this node is not to choose node, continue to search for downwards to the child node of this node, if search, choose node just to exit search, and the state that this node is set is for partly choosing state; Do not choose node if search, the state that this node is set is non-selected state;
If exist in the child node under this node and choose node, and number is less than the child node number of this node, the state of this node is set for partly choosing state.
8. authority as described as claim 5 or 6 is set the interlock reproducer, it is characterized in that, the user's that acquisition module obtains from server end zone permission logical data or function privilege logical data are stored among the database of server end, and have only stored the node ID of choosing in database.
9. an authority tree interlock playback system, comprise server, it is characterized in that, also comprises the described authority tree of claim as arbitrary as claim 5-8 interlock reproducer.
CN201210151189.5A 2012-05-16 2012-05-16 A kind of authority tree linkage replay method, apparatus and system Active 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 true CN103425654A (en) 2013-12-04
CN103425654B CN103425654B (en) 2017-07-28

Family

ID=49650413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210151189.5A Active 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)

Cited By (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
CN108804678A (en) * 2018-06-12 2018-11-13 深圳市茁壮网络股份有限公司 A kind of 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
CN112860692A (en) * 2021-01-29 2021-05-28 城云科技(中国)有限公司 Database table structure conversion method and device and electronic equipment thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020184517A1 (en) * 2001-05-31 2002-12-05 Bijan Tadayon Method and apparatus for hierarchical assignment of rights to documents and documents having such rights
US20060235817A1 (en) * 2005-04-14 2006-10-19 Microsoft Corporation Computer input control for specifying scope with explicit exclusions
CN1929393A (en) * 2005-09-07 2007-03-14 中兴通讯股份有限公司 Tri-state tree representing and location method of network element object in network optimization system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020184517A1 (en) * 2001-05-31 2002-12-05 Bijan Tadayon Method and apparatus for hierarchical assignment of rights to documents and documents having such rights
US20060235817A1 (en) * 2005-04-14 2006-10-19 Microsoft Corporation Computer input control for specifying scope with explicit exclusions
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
JN_NIAN: ""ExtJS中树形结构级联选中(三态)"", 《HTTP://JN-NIAN.ITEYE.COM/BLOG/1459217 》 *
MENGXIANGYING504: ""三态树的实现"", 《HTTP://BLOG.CSDN.NET/MENGXIANGYING504/ARTICLE/DETAILS/4621234 》 *
王佳豪: ""三态选择树实现终结者"", 《HTTP://WWW.BIANCENG.CN/PROGRAMMING/VC/200710/4680.HTM 》 *

Cited By (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
CN108804678A (en) * 2018-06-12 2018-11-13 深圳市茁壮网络股份有限公司 A kind of 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
CN112860692A (en) * 2021-01-29 2021-05-28 城云科技(中国)有限公司 Database table structure conversion method and device and electronic equipment thereof

Also Published As

Publication number Publication date
CN103425654B (en) 2017-07-28

Similar Documents

Publication Publication Date Title
CN110597943B (en) Interest point processing method and device based on artificial intelligence and electronic equipment
CN103425654A (en) Method, device and system for reproducing permission tree in linkage manner
CN105095211B (en) The acquisition methods and device of multi-medium data
CN109474640B (en) Malicious crawler detection method and device, electronic equipment and storage medium
CN110311902A (en) A kind of recognition methods of abnormal behaviour, device and electronic equipment
US9996224B2 (en) Methods, systems, and media for creating and updating a group of media content items
CN104021176B (en) There is the advertising matches method and system of highly scalable
CN109729044B (en) Universal internet data acquisition reverse-crawling system and method
CN103885993A (en) Public opinion monitoring method and device for microblog
CN106302862B (en) A kind of collection method and system of DNS recursion server
CN109040073A (en) A kind of detection method, device, medium and the equipment of the access of WWW abnormal behaviour
CN102520933A (en) Method and device for establishing tree menu based on user right
CN104021140A (en) Network video processing method and device
CN109660878A (en) Living broadcast interactive method, storage medium, electronic equipment and system based on barrage
CN107590016A (en) Power-down rebooting recognition methods and device
CN102253948B (en) Method and device for searching information in multi-source information system
CN107491463A (en) The optimization method and system of data query
CN103473361A (en) Searching method and searching device
CN110333990A (en) Data processing method and device
CN107807793B (en) The storage of data copy isomery and access method in distributed computer storage system
CN110175437A (en) It is a kind of for access terminal authorization control method, apparatus and host terminal
CN104598580B (en) The method for digging and device of IP geolocation datas
Zhao et al. Sportsense: Real-time detection of NFL game events from Twitter
CN112507341A (en) Vulnerability scanning method, device, equipment and storage medium based on web crawler
CN105245506A (en) Network attack defense method and equipment

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