CN109582380A - A kind of Node Processing Method and device, storage medium, processor - Google Patents
A kind of Node Processing Method and device, storage medium, processor Download PDFInfo
- Publication number
- CN109582380A CN109582380A CN201710882262.9A CN201710882262A CN109582380A CN 109582380 A CN109582380 A CN 109582380A CN 201710882262 A CN201710882262 A CN 201710882262A CN 109582380 A CN109582380 A CN 109582380A
- Authority
- CN
- China
- Prior art keywords
- node
- flag
- loaded
- current level
- visibility region
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Abstract
The invention discloses a kind of Node Processing Method and device, storage medium, processor, method includes: initialization visibility region, loads M node of current level;Wherein, the visibility region is the region for showing Tree control;Judge the current level with the presence or absence of node to be loaded;If it exists, in the additional flag node in the node end of the current level;When meeting loading environment, judge in the visibility region with the presence or absence of the flag node;If it exists, the N number of node for belonging to same level with the flag node is loaded;It can be seen that the present invention can realize that the on-demand loading of node reduces resource consumption, improve system performance without disposably loading all child nodes for belonging to same father node based on flag node.
Description
Technical field
The present invention relates to field of computer technology, more particularly relate to a kind of Node Processing Method and device, storage medium,
Processor.
Background technique
Currently, many showing for interface data are all made of Tree control to realize, such as had using Tree control to show
The browser data of hierarchical relationship.Tree control is before display data, the load of the advanced row data of need, and traditional loading method
Disposably to load all nodes, with increasing for data volume, when the number of nodes of a Tree control reaches up to ten thousand even more
When more, traditional loading method can seriously consume resource, thus phenomena such as causing page Caton.
To solve the above-mentioned problems, in the prior art, Tree control realizes the load of node using the method for lazyness load,
Specifically, first load all father nodes, when needing using child node under father node, all sons under the father node are reloaded
Node, thus to reduce the interstitial content disposably loaded.
But it doesn't solve the problem fundamentally for the above method, it, still can be serious when the number of nodes of same level is excessive
System resource is consumed, to reduce system performance.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind
State a kind of Node Processing Method and device, storage medium, processor of problem.
A kind of Node Processing Method, comprising:
Visibility region is initialized, M node of current level is loaded;Wherein, the visibility region is tree-like for showing
The region of control;
Judge the current level with the presence or absence of node to be loaded;
If it exists, in the additional flag node in the node end of the current level;
When meeting loading environment, judge in the visibility region with the presence or absence of the flag node;
If it exists, the N number of node for belonging to same level with the flag node is loaded.
Preferably, the load belongs to after N number of node of same level with the flag node, further includes:
Return to the step of judgement current level is with the presence or absence of node to be loaded.
It is preferably, described to meet loading environment, comprising:
Receive the scroll operation of user's triggering.
Preferably, the load is N number of belongs to before the node of same level with the flag node, further includes:
Remove the flag node.
Preferably, it whether there is flag node in the judgement visibility region, comprising:
Traverse flag node list;
Flag node in judge mark node listing whether there is in the visibility region.
A kind of node processing device, comprising:
First loading unit loads M node of current level for initializing visibility region;Wherein, the visual field
Domain is the region for showing Tree control;
First judging unit, for judging the current level with the presence or absence of node to be loaded;
First additional unit, for adding label at the node end of the current level when there are node to be loaded
Node;
Second judgment unit, for when meeting loading environment, judging in the visibility region with the presence or absence of the label
Node;
Second loading unit, for when there are flag node, load to belong to the N number of of same level with the flag node
Node.
Preferably, further includes:
First trigger unit belongs to the N of same level for working as second loading unit load and the flag node
After a node, triggers first judging unit and judge the current level with the presence or absence of node to be loaded.
Preferably, further includes:
First removes unit, for when there are flag node, removing the flag node.
A kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein transported in described program
Equipment where controlling the storage medium when row executes a kind of as above described in any item Node Processing Methods.
A kind of processor, which is characterized in that the processor is for running program, wherein described program executes when running
Described in any item a kind of Node Processing Methods as above.
By above-mentioned technical proposal, the present invention provides a kind of Node Processing Methods, comprising: initialization visibility region adds
Carry M node of current level;Current level is judged with the presence or absence of node to be loaded, when it is present, in the node of current level
End adds flag node;When meeting loading environment, judge visibility region with the presence or absence of flag node, and if it exists, load with
The flag node belongs to N number of node of same level, it can be seen that, the present invention can realize the on-demand of node based on flag node
Load, without disposably loading all child nodes for belonging to same father node, reduces resource consumption, improves system performance.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow diagram of Node Processing Method provided by one embodiment of the present invention;
Fig. 2 shows another embodiment of the present invention provides a kind of Node Processing Method flow diagram;
Fig. 3 shows a kind of flow diagram of Node Processing Method of further embodiment of this invention offer;
A kind of structure that Fig. 4 a shows display first nodes and two-level node that one application example of the present invention provides is shown
It is intended to;
Fig. 4 b shows another structure of display first nodes and two-level node that one application example of the present invention provides
Schematic diagram;
Fig. 4 c shows the schematic diagram that the visibility region that one application example of the present invention provides shows node;
Fig. 5 shows a kind of structural schematic diagram of node processing device provided by one embodiment of the present invention;
Fig. 6 show another embodiment of the present invention provides a kind of node processing device structural schematic diagram;
Fig. 7 shows a kind of structural schematic diagram of node processing device of further embodiment of this invention offer.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
One embodiment of the invention discloses a kind of Node Processing Method, as shown in Figure 1, method includes the following steps:
Step 101: initialization visibility region loads M node of current level;
Wherein, which is the region for showing Tree control, specifically, can pass through initialization HTML's
DIV element realizes the initialization of visibility region.After initializing visibility region, the M of current level is obtained from back-end server
A node, and be loaded into Tree control.
It should be noted that M node of current level is referred to as belonging to M child node of same father node.
Level is expressed as the place hierarchical position of some node.For example, the first level indicates in Tree control under root node
All child nodes, the second level indicates the child node of first level some node, and so on.
The M value is positive integer, can specifically be preset, and under normal circumstances, M, which is less than, belongs to same father positioned at current level
The child node sum of node, such as M=10.Certainly, which can also be determined based on the size of visibility region, specifically, can
The length on the direction for showing node to obtain visibility region, based on the occupied length computation of each node and the length
Spend matched number of nodes M.
That is, no matter determining the number of nodes M of load using which kind of above-mentioned mode, what the present invention was realized is not one
All child nodes under secondary property load father node, but the part child node under father node is loaded, and the son node number loaded
Amount M can be determined based on different situations.
Step 102: judging the current level with the presence or absence of node to be loaded, if so, entering step 103;If it is not, terminating
Process;
After being loaded with M node of current level, judge whether there is also to be loaded for the affiliated father node of M node
Node, the node to be loaded are load not yet, and belong to the child node of same father node with the M node.
If node to be loaded is not present in current level, illustrate the child node negligible amounts under the affiliated father node of M node, nothing
Need repeated loading.
Step 103: in the additional flag node in the node end of the current level;
When there are node to be loaded, in the additional flag node in the node end of current level, which plays finger
Show the subsequent effect for continuing to load node.It is understood that the flag node and node to be loaded belong to same father node, and
It is located on the same floor grade.
It should be noted that the form of expression present invention of the flag node is without limitation, as long as guaranteeing that the flag node is distinguished
In normal node.
Step 104: when meeting loading environment, judge with the presence or absence of flag node in the visibility region, if so, into
Step 105;If it is not, terminating process;
The loading environment is the trigger condition for continuing to load the node of current level, specifically, the loading environment can be
The scroll operation of user's triggering.That is, meeting loading environment, comprising: receive the scroll operation of user's triggering.
When user triggers scroll operation, it is seen that shown node will change in region, in order to guarantee not by
The node of load can be smoothly shown in visibility region, be needed to judge in visibility region with the presence or absence of mark node;Specifically
, it can safeguard a flag node list, when being added with flag node in Tree control, i.e., add the flag node
Into flag node list, which includes node identification, such as node ID, determines flag node based on the node identification
Coordinate information, judge whether the flag node is in visibility region by the coordinate information of flag node.Specifically, judgement
Visibility region whether there is flag node, comprising:
(1) flag node list is traversed;
(2) flag node in judge mark node listing whether there is in visibility region.
Specifically, the label section as a kind of implementation, in the flag node and Tree control in flag node list
Point is consistent, i.e., when Tree control increases flag node, the increased flag node of record institute in flag node list;When tree-like control
Part removes flag node (for details, refer to the subsequent embodiments), and flag node list also removes corresponding flag node, this feelings
Under condition, the coordinate information of flag node can be obtained based on the node identification of flag node in flag node list, passes through mark
The coordinate information of node is remembered to judge whether the flag node is in visibility region.Alternatively, as another implementation, mark
Note node listing in flag node will not Tree control remove flag node when be removed, in this case under, need to sentence
Whether there is the flag node in disconnected Tree control, when determining has the flag node, determines the coordinate of the flag node, simultaneously
Whether the coordinate of the coordinates regional based on visibility region, judge mark node is located in the coordinates regional of visibility region.Step
105: load belongs to N number of node of same level with flag node.
It should be noted that the N number of node for belonging to same level with flag node is referred to as belonging to same father with flag node
N number of child node of node, N number of node can be a part of all child nodes of the affiliated father node of flag node.
The value of the N be positive integer, can specifically preset, if using predetermined pattern, the N value can with it is upper
It is equal to state M value.Under normal circumstances, N, which is less than, is located at the child node sum that current level belongs to same father node, such as N=10.The N
Value can also be determined based on the size of visibility region, specifically, the side for being used to show node of available visibility region
Upward length, based on the occupied length computation of each node and the matched number of nodes N of the length.
It should be noted that if the number of remaining node to be loaded is less, such as less than default value when, then be loaded directly into
All remaining nodes, i.e., N at this time are the numerical value of remaining node to be loaded.
It is understood that N number of node of load may be entirely located in visibility region, it is also possible to partially be located at visual field
In domain, another part is located in invisible area, and N number of node of load can be saved in the display position of Tree control by label
The node identification of point is determined.
Specifically, by sending the number of nodes N that need to be loaded the father node of node and need to load to server, and receive clothes
The N number of node for belonging to same father node with flag node that business device returns, it is possible to understand that, the father node mark of node need to be loaded
Know, as father node ID can be determined by the node identification of flag node.Certainly flag node can also be sent to server
Affiliated level, so that the affiliated level of node that server need to be loaded based on the affiliated level determination of flag node, wherein label
The affiliated level of node can be determined by the node identification of flag node.
It can be seen that the present invention provides a kind of Node Processing Methods, comprising: initialization visibility region loads current layer
M node of grade;Judge that current level with the presence or absence of node to be loaded, when it is present, adds at the node end of current level
Flag node;When meeting loading environment, judge visibility region with the presence or absence of flag node, and if it exists, load and the label section
Point belongs to N number of node of same level, i.e. the present invention can realize the on-demand loading of node based on flag node, without disposable
Load belongs to all child nodes of same father node, reduces resource consumption, improves system performance.
Another embodiment of the present invention discloses a kind of Node Processing Method, as shown in Fig. 2, method includes the following steps:
Step 201: initialization visibility region loads M node of current level;
Step 202: judging the current level with the presence or absence of node to be loaded, if so, entering step 203;If it is not, terminating
Process;
Step 203: in the additional flag node in the node end of the current level;
Step 204: when meeting loading environment, judging in the visibility region with the presence or absence of flag node, and if it exists, into
Enter step 205;If it does not exist, terminate process;
Step 205: load belongs to N number of node of same level with flag node;
Step 206: after loaded, returning to the step 202.
That is, being not disposably to load all remain when loading remaining node to be loaded based on flag node
Remaining node to be loaded, but load is conducted batch-wise, the number for loading node every time is N, after loaded, return step
202, continue to judge current level whether there is also nodes to be loaded, if it is present additional at the node end of current level
Flag node, when meeting loading environment again, to continue to load node to be loaded based on the flag node.
It can be seen that the present invention provides a kind of Node Processing Methods, comprising: initialization visibility region loads current layer
M node of grade;Judge that current level with the presence or absence of node to be loaded, when it is present, adds at the node end of current level
Flag node;When meeting loading environment, judge visibility region with the presence or absence of flag node, and if it exists, load and the label section
Point belongs to N number of node of same level, i.e. the present invention can realize the on-demand loading of node based on flag node, without disposable
Load belongs to all child nodes of same father node, reduces resource consumption, improves system performance.
Further embodiment of this invention discloses a kind of Node Processing Method, as shown in figure 3, this method comprises:
Step 301: initialization visibility region loads M node of current level;
Step 302: judging the current level with the presence or absence of node to be loaded, if so, entering step 103;If it is not, terminating
Process;
Step 303: in the additional flag node in the node end of the current level;
Step 304: when meeting loading environment, judge with the presence or absence of flag node in the visibility region, if so, into
Step 305;If it is not, terminating process;
Step 305: removing the flag node;
Before load belongs to N number of node of same level with flag node, first the flag node added is removed, to prevent
Only the flag node influences other nodes in Tree control.
Step 306: load belongs to N number of node of same level with flag node.
It can be seen that the present invention provides a kind of Node Processing Methods, comprising: initialization visibility region loads current layer
M node of grade;Judge that current level with the presence or absence of node to be loaded, when it is present, adds at the node end of current level
Flag node;When meeting loading environment, judge visibility region with the presence or absence of flag node, and if it exists, load and the label section
Point belongs to N number of node of same level, i.e. the present invention can realize the on-demand loading of node based on flag node, without disposable
Load belongs to all child nodes of same father node, reduces resource consumption, improves system performance.
In order to make it easy to understand, the present invention is illustrated with a specific example, as shown in Fig. 4 a, Fig. 4 b, 4c, S1 is visual field
Domain, S2 are invisible area, and first nodes and two-level node are the node under Tree control, and first nodes 1 are lower to have multiple two
Grade node first loads 10 two-level nodes after initializing visibility region, i.e. load two-level node 1-10, is also deposited due to subsequent
In node to be loaded, therefore, the additional flag node after two-level node 10.When receiving the scroll operation of user's triggering, base
Continue to load two-level node in the flag node, i.e. load two-level node 11-14, since first nodes 1 are lower without more sons
Node needs to load, then, after being loaded into two-level node 14, without continuing additional flag node below.In this application reality
In example, the flag node under first nodes 1 is removed, and since grey parts user is invisible, then in fact, visible
The node shown in region is as illustrated in fig. 4 c.
It is corresponding with a kind of above-mentioned Node Processing Method, the invention also discloses a kind of node processing device, below by way of
Several embodiments are illustrated:
One embodiment of the invention discloses a kind of node processing device, as shown in figure 5, the device includes: the first load
The additional unit 503 of unit 501, the first judging unit 502, first, second judgment unit 504 and the second loading unit 505;Its
In:
First loading unit 501 loads M node of current level for initializing visibility region;
Wherein, which is the region for showing Tree control, specifically, the first loading unit can be used for leading to
The DIV element of initialization HTML is crossed to realize that the initialization of visibility region obtains after initializing visibility region from back-end server
M node of current level is taken, and is loaded into Tree control.
It should be noted that M node of current level is referred to as belonging to M child node of same father node.
Level is expressed as the place hierarchical position of some node.For example, the first level indicates in Tree control under root node
All child nodes, the second level indicates the child node of first level some node, and so on.
The M value is positive integer, can specifically be preset, and under normal circumstances, M, which is less than, belongs to same father positioned at current level
The child node sum of node, such as M=10.Certainly, which can also be determined based on the size of visibility region, specifically, the
The available visibility region of one loading unit is used to show the length on the direction of node, based on the occupied length of each node
Degree calculates and the matched number of nodes M of the length, to load M node of current level.
That is, no matter determining the number of nodes M of load using which kind of above-mentioned mode, what the present invention was realized is not one
All child nodes under secondary property load father node, but the part child node under father node is loaded, and the son node number loaded
Amount M can be determined based on different situations.
First judging unit 502, for judging the current level with the presence or absence of node to be loaded;
After being loaded with M node of current level, the first judging unit is for judging the affiliated father node of M node
Whether there is also node to be loaded, which is load not yet, and belongs to same father node with the M node
Child node.
If node to be loaded is not present in current level, illustrate the child node negligible amounts under the affiliated father node of M node, nothing
Need repeated loading.
First additional unit 503, for adding mark at the node end of the current level when there are node to be loaded
Remember node;
When there are node to be loaded, the first additional unit is in the additional flag node in the node end of current level, the mark
Note node play the role of instruction it is subsequent continue load node.
It should be noted that the form of expression present invention of the flag node is without limitation, as long as guaranteeing that the flag node is distinguished
In normal node.
Second judgment unit 504, for when meeting loading environment, judging in the visibility region with the presence or absence of the mark
Remember node;
The loading environment is the trigger condition for continuing to load the node of current level, specifically, the loading environment can be
The scroll operation of user's triggering.That is, second judgment unit judges institute when specifically having the scroll operation for receiving user's triggering
It states in visibility region with the presence or absence of the flag node.
When user triggers scroll operation, it is seen that shown node will change in region, in order to guarantee not by
The node of load can be smoothly shown in visibility region, and second judgment unit needs to judge in visibility region with the presence or absence of mark
Know node;Specifically, the device can also include the first maintenance unit, for safeguarding a flag node list, when tree-like
When being added with flag node in control, i.e., the flag node is added in flag node list, which includes node
Mark, such as node ID are determined the coordinate information of flag node based on the node identification, are sentenced by the coordinate information of flag node
Whether the flag node of breaking is in visibility region.
Specifically, second judgment unit, comprising: the first spider module and first judgment module;Wherein: the first traversal mould
Block, for traversing flag node list when meeting loading environment;First judgment module, in judge mark node listing
Flag node whether there is in the visibility region.
Second loading unit 505, for when there are flag node, load to belong to same level with the flag node
N number of node.
It should be noted that the N number of node for belonging to same level with flag node is referred to as belonging to same father with flag node
N number of child node of node, N number of node can be a part of all child nodes of the affiliated father node of flag node.
The value of the N be positive integer, can specifically preset, if using predetermined pattern, the N value can with it is upper
It is equal to state M value.Under normal circumstances, N, which is less than, is located at the child node sum that current level belongs to same father node, such as N=10.The N
Value can also be determined based on the size of visibility region, specifically, the second loading unit can be used for obtaining visibility region
The length on direction for showing node is based on the occupied length computation of each node and the matched number of nodes N of the length,
To load N number of node.
It should be noted that if the number of remaining node to be loaded is less, such as less than default value when, then be loaded directly into
All remaining nodes, i.e., N at this time are the numerical value of remaining node to be loaded.
It is understood that N number of node of load may be entirely located in visibility region, it is also possible to partially be located at visual field
In domain, another part is located in invisible area, and N number of node of load can be saved in the display position of Tree control by label
The node identification of point is determined.
Specifically, the second loading unit is used to send the node that need to be loaded the father node of node and need to load to server
Number N, and receive the N number of node for belonging to same father node with flag node of server return, it is possible to understand that, node need to be loaded
Father node mark, as father node ID can be determined by the node identification of flag node.Certain second loading unit may be used also
To send the affiliated level of flag node to server, so that server need to be loaded based on the affiliated level determination of flag node
The affiliated level of node, wherein the affiliated level of flag node can be determined by the node identification of flag node.
It can be seen that the present invention provides a kind of Node Processing Methods, comprising: initialization visibility region loads current layer
M node of grade;Judge that current level with the presence or absence of node to be loaded, when it is present, adds at the node end of current level
Flag node;When meeting loading environment, judge visibility region with the presence or absence of flag node, and if it exists, load and the label section
Point belongs to N number of node of same level, i.e. the present invention can realize the on-demand loading of node based on flag node, without disposable
Load belongs to all child nodes of same father node, reduces resource consumption, improves system performance.
Another embodiment of the present invention also discloses a kind of node processing device, as shown in fig. 6, the device include: first plus
The additional unit 603 of carrier unit 601, the first judging unit 602, first, second judgment unit 604, the second loading unit 605 and
First trigger unit 606;Wherein:
First loading unit 601 loads M node of current level for initializing visibility region;Wherein, described can
See that region is the region for showing Tree control;
First judging unit 602, for judging the current level with the presence or absence of node to be loaded;
First additional unit 603, for adding mark at the node end of the current level when there are node to be loaded
Remember node;
Second judgment unit 604, for when meeting loading environment, judging in the visibility region with the presence or absence of the mark
Remember node;
Second loading unit 605, for when there are flag node, load to belong to same level with the flag node
N number of node;
First trigger unit 606, for belonging to same level with the flag node when second loading unit load
N number of node after, trigger first judging unit 602 and judge the current level with the presence or absence of node to be loaded.
That is, being not disposably to load all remain when loading remaining node to be loaded based on flag node
Remaining node to be loaded, but load is conducted batch-wise, the number for loading node every time is N, and after loaded, triggering first is sentenced
Disconnected unit continues to judge the current level with the presence or absence of node to be loaded, if it is present the first additional unit is in current layer
The additional flag node in the node end of grade, with when second judgment unit meets loading environment again, based on the flag node after
Continuous load node to be loaded.
It can be seen that the present invention provides a kind of Node Processing Methods, comprising: initialization visibility region loads current layer
M node of grade;Judge that current level with the presence or absence of node to be loaded, when it is present, adds at the node end of current level
Flag node;When meeting loading environment, judge visibility region with the presence or absence of flag node, and if it exists, load and the label section
Point belongs to N number of node of same level, i.e. the present invention can realize the on-demand loading of node based on flag node, without disposable
Load belongs to all child nodes of same father node, reduces resource consumption, improves system performance.
Further embodiment of this invention also discloses a kind of node processing device, as shown in fig. 7, the device include: first plus
The additional unit 703 of carrier unit 701, the first judging unit 702, first, second judgment unit 704, first remove unit 705, the
Two loading units 706;Wherein:
First loading unit 701 loads M node of current level for initializing visibility region;Wherein, described can
See that region is the region for showing Tree control;
First judging unit 702, for judging the current level with the presence or absence of node to be loaded;
First additional unit 703, for adding mark at the node end of the current level when there are node to be loaded
Remember node;
Second judgment unit 704, for when meeting loading environment, judging in the visibility region with the presence or absence of the mark
Remember node;
First removes unit 705, for when there are flag node, removing the flag node;
Before load belongs to N number of node of same level with flag node, first the flag node added is removed, to prevent
Only the flag node influences other nodes in Tree control.
Second loading unit 706, for loading the N number of node for belonging to same level with the flag node.
It can be seen that the present invention provides a kind of Node Processing Methods, comprising: initialization visibility region loads current layer
M node of grade;Judge that current level with the presence or absence of node to be loaded, when it is present, adds at the node end of current level
Flag node;When meeting loading environment, judge visibility region with the presence or absence of flag node, and if it exists, load and the label section
Point belongs to N number of node of same level, i.e. the present invention can realize the on-demand loading of node based on flag node, without disposable
Load belongs to all child nodes of same father node, reduces resource consumption, improves system performance.
A kind of node processing device includes processor and memory, above-mentioned first loading unit, the first judging unit,
First additional unit, second judgment unit, the second loading unit, the first trigger unit, first remove unit etc. and are used as program
Unit stores in memory, executes above procedure unit stored in memory by processor to realize corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one
Or more, the on-demand loading of node is realized by adjusting kernel parameter, reduces resource consumption, system performance is provided.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include that at least one is deposited
Store up chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor
A kind of existing Node Processing Method.Specifically, storage medium includes the program of storage, wherein run time control in described program
Equipment executes a kind of Node Processing Method where making the storage medium.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation
A kind of Node Processing Method described in Shi Zhihang.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can
The program run on a processor, processor perform the steps of when executing program
Visibility region is initialized, M node of current level is loaded;Wherein, the visibility region is tree-like for showing
The region of control;
Judge the current level with the presence or absence of node to be loaded;
If it exists, in the additional flag node in the node end of the current level;
When meeting loading environment, judge in the visibility region with the presence or absence of the flag node;
If it exists, the N number of node for belonging to same level with the flag node is loaded.
Optionally, processor executes load and belongs to after the program of N number of node of same level with the flag node, also
Following steps may be implemented:
After loaded, the step of judgement current level whether there is node to be loaded is returned.
It is optionally, described to meet loading environment, comprising:
Receive the scroll operation of user's triggering.
Optionally, before processor executes the program for loading N number of node for belonging to same level with the flag node, also
Following steps may be implemented:
Remove the flag node.
Optionally, it whether there is flag node in the judgement visibility region, comprising:
Traverse flag node list;
Flag node in judge mark node listing whether there is in the visibility region.
Equipment herein can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just
The program of beginningization there are as below methods step:
Visibility region is initialized, M node of current level is loaded;Wherein, the visibility region is tree-like for showing
The region of control;
Judge the current level with the presence or absence of node to be loaded;
If it exists, in the additional flag node in the node end of the current level;
When meeting loading environment, judge in the visibility region with the presence or absence of the flag node;
If it exists, the N number of node for belonging to same level with the flag node is loaded.
It optionally, can be with the program of there are as below methods step:
After loaded, the step of judgement current level whether there is node to be loaded is returned.
It is optionally, described to meet loading environment, comprising:
Receive the scroll operation of user's triggering.
It optionally, can be with the program of there are as below methods step:
Remove the flag node.
Optionally, it whether there is flag node in the judgement visibility region, comprising:
Traverse flag node list;
Flag node in judge mark node listing whether there is in the visibility region.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie
The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element
There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,
Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,
Improve etc., it should be included within the scope of the claims of this application.
Claims (10)
1. a kind of Node Processing Method characterized by comprising
Visibility region is initialized, M node of current level is loaded;Wherein, the visibility region is for showing Tree control
Region;
Judge the current level with the presence or absence of node to be loaded;
If it exists, in the additional flag node in the node end of the current level;
When meeting loading environment, judge in the visibility region with the presence or absence of the flag node;
If it exists, the N number of node for belonging to same level with the flag node is loaded.
2. the method according to claim 1, wherein the load belongs to same level with the flag node
After N number of node, further includes:
After loaded, the step of judgement current level whether there is node to be loaded is returned.
3. the method according to claim 1, wherein described meet loading environment, comprising:
Receive the scroll operation of user's triggering.
4. the method according to claim 1, wherein the load is N number of to belong to same layer with the flag node
Before the node of grade, further includes:
Remove the flag node.
5. the method according to claim 1, wherein in the judgement visibility region whether there is flag node,
Include:
Traverse flag node list;
Flag node in judge mark node listing whether there is in the visibility region.
6. a kind of node processing device characterized by comprising
First loading unit loads M node of current level for initializing visibility region;Wherein, the visibility region is
For showing the region of Tree control;
First judging unit, for judging the current level with the presence or absence of node to be loaded;
First additional unit, for adding flag node at the node end of the current level when there are node to be loaded;
Second judgment unit, for when meeting loading environment, judging in the visibility region with the presence or absence of the flag node;
Second loading unit, for when there are flag node, load to belong to N number of section of same level with the flag node
Point.
7. device according to claim 6, which is characterized in that further include:
First trigger unit belongs to N number of section of same level for working as second loading unit load and the flag node
After point, triggers first judging unit and judge the current level with the presence or absence of node to be loaded.
8. device according to claim 6, which is characterized in that further include:
First removes unit, for when there are flag node, removing the flag node.
9. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program
When control the storage medium where equipment execute a kind of Node Processing Method according to any one of claims 1 to 5.
10. a kind of processor, which is characterized in that the processor is for running program, wherein executed such as when described program is run
A kind of Node Processing Method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710882262.9A CN109582380A (en) | 2017-09-26 | 2017-09-26 | A kind of Node Processing Method and device, storage medium, processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710882262.9A CN109582380A (en) | 2017-09-26 | 2017-09-26 | A kind of Node Processing Method and device, storage medium, processor |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109582380A true CN109582380A (en) | 2019-04-05 |
Family
ID=65912313
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710882262.9A Pending CN109582380A (en) | 2017-09-26 | 2017-09-26 | A kind of Node Processing Method and device, storage medium, processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109582380A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021036734A1 (en) * | 2019-08-26 | 2021-03-04 | 北京旷视科技有限公司 | Tree module rendering method and device, data processing equipment and medium |
CN112905858A (en) * | 2021-03-05 | 2021-06-04 | 北京中经惠众科技有限公司 | Node relation graph display method and device, computer equipment and storage medium |
CN113608818A (en) * | 2021-08-19 | 2021-11-05 | 北京字跳网络技术有限公司 | Data processing method, data processing apparatus, electronic device, storage medium, and program product |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101408877A (en) * | 2007-10-10 | 2009-04-15 | 英业达股份有限公司 | System and method for loading tree node |
WO2014036073A2 (en) * | 2012-08-28 | 2014-03-06 | Siemens Aktiengesellschaft | Method and apparatus for browsing large data network topology trees |
CN104346350A (en) * | 2013-07-26 | 2015-02-11 | 南京中兴力维软件有限公司 | Method and system for inquiring tree node of asynchronous tree |
CN105468365A (en) * | 2015-11-20 | 2016-04-06 | 厦门雅迅网络股份有限公司 | Method for solving tree control node quantity restriction |
CN105740407A (en) * | 2016-01-28 | 2016-07-06 | 深圳市佳创视讯技术股份有限公司 | Tree structure generation method and system |
CN106202315A (en) * | 2016-06-30 | 2016-12-07 | 北京奇虎科技有限公司 | The method and device that data process |
-
2017
- 2017-09-26 CN CN201710882262.9A patent/CN109582380A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101408877A (en) * | 2007-10-10 | 2009-04-15 | 英业达股份有限公司 | System and method for loading tree node |
WO2014036073A2 (en) * | 2012-08-28 | 2014-03-06 | Siemens Aktiengesellschaft | Method and apparatus for browsing large data network topology trees |
CN104346350A (en) * | 2013-07-26 | 2015-02-11 | 南京中兴力维软件有限公司 | Method and system for inquiring tree node of asynchronous tree |
CN105468365A (en) * | 2015-11-20 | 2016-04-06 | 厦门雅迅网络股份有限公司 | Method for solving tree control node quantity restriction |
CN105740407A (en) * | 2016-01-28 | 2016-07-06 | 深圳市佳创视讯技术股份有限公司 | Tree structure generation method and system |
CN106202315A (en) * | 2016-06-30 | 2016-12-07 | 北京奇虎科技有限公司 | The method and device that data process |
Non-Patent Citations (2)
Title |
---|
匿名: "如何分批分层的加载树节点", 《HTTP://WWW.VOIDCN.COM/ARTICLE/P-HMGNHACY-V.HTML》 * |
范国雄: "《数字测图技术》", 31 October 2016 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021036734A1 (en) * | 2019-08-26 | 2021-03-04 | 北京旷视科技有限公司 | Tree module rendering method and device, data processing equipment and medium |
CN112905858A (en) * | 2021-03-05 | 2021-06-04 | 北京中经惠众科技有限公司 | Node relation graph display method and device, computer equipment and storage medium |
CN113608818A (en) * | 2021-08-19 | 2021-11-05 | 北京字跳网络技术有限公司 | Data processing method, data processing apparatus, electronic device, storage medium, and program product |
CN113608818B (en) * | 2021-08-19 | 2024-01-16 | 北京字跳网络技术有限公司 | Data processing method, device, electronic equipment, storage medium and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109582380A (en) | A kind of Node Processing Method and device, storage medium, processor | |
CN106251392A (en) | For the method and apparatus performing to interweave | |
CN110768912A (en) | API gateway current limiting method and device | |
CN104603793A (en) | Secure data container for web applications | |
CN104239139A (en) | Method, device and terminal for processing boot-strap self-starting project | |
CN107968810A (en) | A kind of resource regulating method of server cluster, device and system | |
CN111080304A (en) | Credible relationship identification method, device and equipment | |
CN105573595A (en) | Information display method and device | |
CN110333951A (en) | A kind of commodity panic buying request distribution method | |
CN103875032A (en) | Optimizing graph evaluation | |
CN109657427A (en) | The method and device of permission control | |
CN109343793A (en) | Data migration method and device | |
CN109857516A (en) | Cluster moving method and device based on container | |
CN110308835A (en) | Control the method, apparatus and electronic equipment of view control | |
CN109343962A (en) | Data processing method, device and distribution service | |
CN110448895A (en) | Information processing method and device in game | |
CN109614159A (en) | Plan target distribution, introduction method and device | |
CN106610824B (en) | Page height self-adaption method and device | |
CN104657216B (en) | The resource allocation methods and device of a kind of resource pool | |
CN110058904A (en) | Data transfering method, device and server | |
CN109614415B (en) | Data mining and processing method, device, equipment and medium | |
US9230022B1 (en) | Customizable result sets for application program interfaces | |
CN109542401A (en) | A kind of Web development approach, device, storage medium and processor | |
CN110209347A (en) | A kind of retrospective date storage method | |
CN109634812A (en) | Process CPU usage control method, terminal device and the storage medium of linux system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing Applicant after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A Applicant before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190405 |
|
RJ01 | Rejection of invention patent application after publication |