Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows the disclosure
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should be by embodiments set forth here
Limited.On the contrary, it is provided that these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure
Complete conveys to those skilled in the art.
The problem expending time length for solving existing node tree load mode, embodiments provides at a kind of data
The method of reason, as it is shown in figure 1, the method includes:
101, scroll control positional information is obtained.
Firstly the need of explanation, the present embodiment relates to a display module of managing customer end.This assembly is by all
Client forms what node tree carried out showing.In display interface, comprise node tree viewing area, be i.e. used for showing node
Region, the present embodiment is referred to as target area, also includes scrolling bar region, scrolling bar region for the movement of scroll control,
Owing to target area is limited, and need the nodes shown a lot, it is therefore desirable to control target area by setting scroll control
The display of territory interior joint, it is achieved viewed the effect of all of node by scroll control.
Obtain the positional information of scroll control, i.e. obtain scroll control positional information in scrolling bar, if scrolling bar is
Longitudinal, then obtain the value of scroll control Y direction, if scrolling bar is horizontal, then obtain the value of scroll control X-direction.
The i.e. positional information of scroll control changes with the direction of scrolling bar.The positional information obtaining scroll control is to determine target for follow-up
The necessary preparation of node.
102, the value range of target area is obtained.
Target area is the node tree interior joint related in step display 101, obtains the value range of target area
I.e. determine the size of target area, if the concrete node longitudinal arrangement in the target area that sets shows, the most only need to determine
The longitudinal size of target area, if the most transversely arranged display of the node that sets up an office, the most only need to determine the horizontal stroke of target area
To size.The size determining target area is also the necessary preparation for determining destination node.
103, determine according to the value range of scroll control positional information and target area corresponding with control location information
Destination node.
Owing to the length of scrolling bar has corresponding relation with total display length of all nodes that will show, however, it is determined that
The current position of scroll control, it is possible to obtain corresponding position in total display length, and then determine total display
The node that in length, correspondence position is corresponding, using this node as the start node of display in target area, then according to target area
The value range in territory and the display height value of node or width value calculate the number of nodes that can show, then from start node
Play the sequential search node to corresponding node quantity, and it is finally determined the target joint of corresponding scroll control in target area
Point.
It should be noted that the node of sequential search corresponding node quantity is the node listing from record node DISPLAY ORDER
Middle lookup, send acquisition request to server when wherein node listing obtains for the first time, can be buffered in after acquisition
In local cache, directly can obtain from local cache so that follow-up, save the time of acquisition.
104, loaded targets node, to show destination node in target area.
After determining destination node, loaded targets node, and destination node is shown in target area.
Further, after the position of scroll control is moved, it is right that continuation shows according to the step of above-mentioned steps 101 to 104
Answer the destination node that the scroll control behind shift position is corresponding, it can be seen that when the node checked and show in node tree, only
The destination node every time loading correspondence according to the position of scroll control is needed to show, without every time by all of node
Load, this eliminate the data volume of loading every time, therefore can save the time of display, and it is also ensured that check
To all of node.
Further, during loaded targets node, first load from local cache, if not having (to add first in local cache
Situation about carrying), then send request to server and obtain from server, after obtaining from server, be cached to local cache
In, for follow-up use, the time every time obtained from server can be saved, can further save that node shows time
Between.
Further, for the display mode of above-mentioned node tree interior joint any first nodes aobvious be applicable to node tree
Show.
The method that the data that the present embodiment provides process, it is possible to first obtain scroll control positional information, scroll control is used
In the display of control target area interior joint, node is the node in node tree;Secondly the value range of target area is obtained;According to
Scroll control positional information and value range determine the destination node corresponding with control location information;Last loaded targets node,
So that destination node is shown in target area.Compared with prior art, the present embodiment can be according to the positional information of scroll control
And the value range of target area determines the destination node in the node tree needing display, then loaded targets node by target
Node shows in target area, it can be seen that the node every time loaded is the part of nodes that currently may be displayed on target area,
Therefore more disposable than in prior art load complete node tree and save the data volume of loading, therefore can save loading time
Between, and then improve the efficiency of management and control.
Further, as to the refinement of method shown in Fig. 1 and extension, another embodiment of the present invention gives a kind of number
According to the method processed.As in figure 2 it is shown, the method includes:
201, scroll control positional information is obtained.
The implementation of this step is identical with being achieved in that of Fig. 1 step 101, and here is omitted.
202, the value range of target area is obtained.
The implementation of this step is identical with being achieved in that of Fig. 1 step 102, and here is omitted.
203, positional information and value range according to scroll control determine initial target node corresponding in target area.
Owing to the length of scrolling bar has corresponding relation with total display length of all nodes that will show, however, it is determined that
The current position of scroll control, it is possible to obtain corresponding position in total display length, and then determine total display
The node that in length, correspondence position is corresponding, using this node as the initial target node of display in target area.Be given concrete
Example illustrates, if the total length of scrolling bar is 10 centimetres, and a length of 100 centimetres total of the display of all nodes, currently roll
The position of dynamic control is 5 centimetres, then may determine that in total display length, correspondence position is 50 centimetres, then from all nodes
The display height of first node, starts to add up, when cumulative height meets or exceeds 50 centimetres, by cumulative last
Node is as initial target node.Wherein it should be noted that the height value of all nodes can get, if local slow
Can get in depositing and just obtain from local cache, if not, obtain to server, after acquisition and be saved in local cache
In in case next time use.
204, the number of nodes of destination node is determined according to the size of destination node and the value range of target area.
After determining initial target node, according to the display height value of destination node or width value size and visual object
The value range in region calculates the number of nodes that may be displayed in target area.If node presses longitudinal arrangement side in target area
Formula shows, then use the display height value of destination node, shows if node pacifies horizontal mode in the target area, then uses
The display width value of destination node.The concrete example that is given illustrates: with node in the target area by longitudinal arrangement mode
As a example by display, if the longitudinal extent value of target area is 10 centimetres, the display of node is highly 0.5 centimetre, then can calculate
Going out the number of nodes that may be displayed in target area is 20.If the display of node is the most different, showing node the most in order
Showing and highly add up, the number of nodes work determined during by accumulated value less than or equal to 10 centimetres can show in the target area
Number of nodes.It is the order in the node listing according to record node DISPLAY ORDER the most in order.It is further to note that
The height value of all nodes can get, and just obtains from local cache if can get in local cache, if not having
Have then to server obtain, after acquisition and be saved in local cache in case next time use.
205, with initial target node for starting point sequential search number of nodes node in node listing, target joint is obtained
Point.
After determining the number of nodes of display, the node of sequential search corresponding node quantity from initial target node, and will
The all nodes found its finally determine in target area the destination node of corresponding scroll control.It should be noted that order
The node searching corresponding node quantity is to search from the node listing of record node DISPLAY ORDER.
206, all father nodes of destination node are obtained.
Owing to node is to show with the structure of node tree, in order to the membership of its one-level one-level is presented, so needing
The all of father node of destination node is shown, therefore firstly the need of all father nodes obtaining destination node.Specifically
Acquisition process be: judge whether local cache comprises all father nodes, the most whether record the corresponding father of destination node
The information of node;If local cache comprises the information of all father nodes, then obtain from local cache;If in local cache not
Comprise the information of all father nodes, then obtain to corresponding server, and the information of the father node got is saved with target
The relation correspondence of point is buffered in local cache, in case follow-up use.
207, all father nodes and destination node correspondence are shown in target area.
Further, as to the refinement of method shown in Fig. 1 and Fig. 2 and extension, another embodiment of the present invention gives
A kind of method that data process.As it is shown on figure 3, the method includes:
301, search instruction is received.
Owing to node tree interior joint is a lot, the mode of scroll control is only used to remove to position the node wanting to check, efficiency ratio
Relatively low, therefore would generally design the search box of correspondence.Therefore receive the search instruction of outside, be in reception search node tree and appoint
The instruction of one node
302, any node and all father nodes of correspondence are obtained according to search instruction.
Owing to node is to show with the structure of node tree, in order to the membership of its one-level one-level is presented, so needing
The all of father node of any node corresponding for search instruction is shown, therefore corresponding firstly the need of obtaining search instruction
All father nodes of any node.Concrete acquisition process is: judges whether to comprise in local cache all father nodes, is i.e.
No record has the information of all father nodes of any node that search instruction is corresponding;If local cache comprises all father nodes
Information, then obtain from local cache;If local cache does not comprise the information of all father nodes, then to corresponding server
Obtain, and by the information of the father node got and the relation of destination node is corresponding is buffered in local cache, make in case follow-up
With.
303, any node is shown with corresponding all father nodes.
Further, as the realization to the various embodiments described above, another embodiment of the embodiment of the present invention additionally provides one
Plant the device that data process, for realizing the method described in above-mentioned Fig. 1, Fig. 2 and Fig. 3.As shown in Figure 4, this device includes: position
Put acquiring unit 41, scope acquiring unit 42, determine unit 43 and loading unit 44.
Position acquisition unit 41, is used for obtaining scroll control positional information, and scroll control is used for controlling to save in target area
The display of point, node is the node in node tree;
Scope acquiring unit 42, for obtaining the value range of target area;
Determine unit 43, corresponding with control location information for determining according to scroll control positional information and value range
Destination node;
Loading unit 44, for loaded targets node, to show destination node in target area.
Further, as it is shown in figure 5, determine unit 43, including:
First determines module 431, and it is right to determine in target area for the positional information according to scroll control and value range
The initial target node answered;
Second determines module 432, for determining that target saves according to the size of destination node and the value range of target area
The number of nodes of point;
Search module 433, for initial target node for starting point sequential search number of nodes joint in node listing
Point, obtains destination node.
Further, as it is shown in figure 5, device farther includes:
Node acquiring unit 45, for obtaining all father nodes of destination node;
Display unit 46, for showing all father nodes and destination node correspondence in target area.
Further, as it is shown in figure 5, device farther includes:
Receiving unit 47, be used for receiving search instruction, search instruction is the instruction of any node in search node tree;
Node acquiring unit 45, is additionally operable to obtain any node and all father nodes of correspondence according to search instruction;
Display unit 46, is additionally operable to show any node with corresponding all father nodes.
Further, as it is shown in figure 5, node acquiring unit 45 includes:
Judge module 451, is used for judging whether to comprise in local cache all father nodes;
First acquisition module 452, if comprising all father nodes in local cache, then obtains from local cache;
Second acquisition module 453, if not comprising all father nodes in local cache, then obtains to corresponding server
Take;
Cache module 454, for being buffered in all father node correspondences got from server in local cache.
The device that the data that the present embodiment provides process, it is possible to first obtain scroll control positional information, scroll control is used
In the display of control target area interior joint, node is the node in node tree;Secondly the value range of target area is obtained;According to
Scroll control positional information and value range determine the destination node corresponding with control location information;Last loaded targets node,
So that destination node is shown in target area.Compared with prior art, the present embodiment can be according to the positional information of scroll control
And the value range of target area determines the destination node in the node tree needing display, then loaded targets node by target
Node shows in target area, it can be seen that the node every time loaded is the part of nodes that currently may be displayed on target area,
Therefore more disposable than in prior art load complete node tree and save the data volume of loading, therefore can save loading time
Between, and then improve the efficiency of management and control.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not has the portion described in detail in certain embodiment
Point, may refer to the associated description of other embodiments.
It is understood that the correlated characteristic in said method and device can mutually reference.It addition, in above-described embodiment
" first ", " second " etc. be for distinguishing each embodiment, and do not represent the quality of each embodiment.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, and the system of foregoing description,
The specific works process of device and unit, is referred to the corresponding process in preceding method embodiment, does not repeats them here.
Algorithm and display are not intrinsic to any certain computer, virtual system or miscellaneous equipment relevant provided herein.
Various general-purpose systems can also be used together with based on teaching in this.As described above, construct required by this kind of system
Structure be apparent from.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use various
Programming language realizes the content of invention described herein, and the description done language-specific above is to disclose this
Bright preferred forms.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that the enforcement of the present invention
Example can be put into practice in the case of not having these details.In some instances, it is not shown specifically known method, structure
And technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that one or more in order to simplify that the disclosure helping understands in each inventive aspect, exist
Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes
In example, figure or descriptions thereof.But, the method for the disclosure should not be construed to reflect an intention that i.e. required guarantor
The application claims feature more more than the feature being expressly recited in each claim protected.More precisely, as following
Claims reflected as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
The claims following detailed description of the invention are thus expressly incorporated in this detailed description of the invention, the most each claim itself
All as the independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment adaptively
Change and they are arranged in one or more equipment different from this embodiment.Can be the module in embodiment or list
Unit or assembly are combined into a module or unit or assembly, and can put them in addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit excludes each other, can use any
Combine all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed appoint
Where method or all processes of equipment or unit are combined.Unless expressly stated otherwise, this specification (includes adjoint power
Profit requires, summary and accompanying drawing) disclosed in each feature can be carried out generation by providing identical, equivalent or the alternative features of similar purpose
Replace.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include other embodiments
Some feature included by rather than further feature, but the combination of the feature of different embodiment means to be in the present invention's
Within the scope of and form different embodiments.Such as, in the following claims, embodiment required for protection appoint
One of meaning can mode use in any combination.
The all parts embodiment of the present invention can realize with hardware, or to run on one or more processor
Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that and can use in practice
Microprocessor or digital signal processor (DSP) realize denomination of invention according to embodiments of the present invention (as data process
Device) in the some or all functions of some or all parts.The present invention is also implemented as performing institute here
Part or all equipment of the method described or device program (such as, computer program and computer program product
Product).The program of such present invention of realization can store on a computer-readable medium, or can have one or more
The form of signal.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or to appoint
What his form provides.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference marks that should not will be located between bracket is configured to limitations on claims.Word " comprises " and does not excludes the presence of not
Arrange element in the claims or step.Word "a" or "an" before being positioned at element does not excludes the presence of multiple such
Element.The present invention and can come real by means of including the hardware of some different elements by means of properly programmed computer
Existing.If in the unit claim listing equipment for drying, several in these devices can be by same hardware branch
Specifically embody.Word first, second and third use do not indicate that any order.These word explanations can be run after fame
Claim.