CN108804678B - List node management method and device - Google Patents
List node management method and device Download PDFInfo
- Publication number
- CN108804678B CN108804678B CN201810602116.0A CN201810602116A CN108804678B CN 108804678 B CN108804678 B CN 108804678B CN 201810602116 A CN201810602116 A CN 201810602116A CN 108804678 B CN108804678 B CN 108804678B
- Authority
- CN
- China
- Prior art keywords
- node
- list
- state
- list node
- message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The list node management method and the device provided by the embodiment of the invention are applied to the technical field of computers, the method utilizes node information to realize state information transmission among all list nodes, after a first list node receives node information sent by a second list node, the state of the first list node is maintained according to the node information and the node relation between the first list node and the second list node, further, the first list node generates and sends the node information, and the transmission of the current state of the first list node is realized through the node information of the first list node, so that the linkage management of the list nodes is realized.
Description
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a list node management method and device.
Background
In practical applications, many application scenarios require the use of lists to represent membership between different levels. For example, the personnel department embodies the organization and management architecture of the company through a list; a collapsible book catalog is created in the e-book by a list, and so on.
Referring to fig. 1, it can be seen that the list shown in fig. 1 includes five levels of list nodes, a plurality of sub-list nodes are respectively arranged below each level, and each level of list nodes has an interaction relationship, for example, a level four list node 1 is selected by a user, and all the next level list nodes corresponding to the level four list node 1, that is, a level five list node 1 to a level five list node 3, are automatically selected similarly; for another example, the four-level list node 1 and the four-level list node 2 are all selected by the user, and correspondingly, the three-level list node 1 is automatically changed into the selected state. Linkage management among all levels of lists in the lists can effectively improve the operation efficiency of the lists by users, so that the users can obtain good use feeling, and the method is a key point in the list setting process.
In order to realize linkage management among lists at all levels in the list, a node management layer is mostly independently arranged in practical application, and the state of each list node in the list is sorted step by step through the node management layer so as to realize the management of each list node in the list. In the prior art, no other mature list node management method can be applied, and for developers, the implementation method of linkage management among all levels of list nodes in a list is single, and no other selection space exists.
Disclosure of Invention
In view of this, the present invention aims to provide a list node management method and apparatus, which enrich the implementation manner of linkage management among the list nodes at all levels in the list and enable developers to have more choices, and the specific scheme is as follows:
in a first aspect, the present invention provides a list node management method, including:
acquiring a node message received by a first list node, wherein the node message at least indicates the state of a second list node which sends the node message;
and maintaining the state of the first list node in the state of the second list node according to the node relation between the first list node and the second list node.
Optionally, before the maintaining the state of the first list node in the state of the second list node according to the node relationship between the first list node and the second list node, the list node management method provided in the first aspect of the present invention further includes:
and judging whether the node message is valid, if so, executing the step of maintaining the state of the first list node in the state of the second list node according to the node relation between the first list node and the second list node.
Optionally, the maintaining the state of the first list node in the state of the second list node according to the node relationship between the first list node and the second list node includes:
reading a message type and a node attribute contained in the node message of the second list node, wherein the message type records the state of the list node, and the node attribute records the identification information of the list node;
determining the node relation between the first list node and the second list node according to the node attribute;
and maintaining the state of the first list node by combining the message type and the node relation.
Optionally, the determining the node relationship between the first list node and the second list node according to the node attribute includes:
if the node identification number of the first list node corresponds to the father node identification number of the second list node, the first list node is the father node of the second list node;
if the father node identification number of the first list node corresponds to the node identification number of the second list node, the first list node is a child node of the second list node;
and if the parent node identification number of the first list node corresponds to the parent node identification number of the second list node, the first list node is a brother node of the second list node.
Optionally, the method for managing any list node provided in the first aspect of the present invention further includes:
and if the brother nodes of the first list node and the second list node are the node messages reporting the state of the second list node, controlling the first list node to discard the node messages.
In a second aspect, the present invention provides another list node management method, including:
generating a node message, wherein the node message indicates at least a state of a first list node;
causing the first list node to broadcast the node message to a second list node to maintain a state of the second list node in a state of the first list node according to a node relationship of the first list node and the second list node.
Optionally, the generating a node message includes:
acquiring a click operation instruction of a user;
updating the state of the first list node according to the click operation instruction;
and generating a node message according to the updated state of the first list node.
Optionally, the generating a node message includes:
when a first list node receives a node message indicating update of the state of a brother list node, determining the current state of the first list node;
and generating a node message according to the current state of the first list node.
In a third aspect, the present invention provides a list node management apparatus, including:
an obtaining unit, configured to obtain a node message received by a first list node, where the node message at least indicates a state of a second list node that sends the node message;
and the first maintenance unit is used for maintaining the state of the first list node in the state of the second list node according to the node relationship between the first list node and the second list node.
In a fourth aspect, the present invention provides another list node management apparatus, including:
a generating unit configured to generate a node message, wherein the node message indicates at least a state of a first list node;
and the second maintenance unit is used for enabling the first list node to broadcast the node message to a second list node so as to maintain the state of the second list node in the state of the first list node according to the node relation of the first list node and the second list node.
Based on the technical scheme, the list node management method provided by the invention realizes the transmission of state information among all list nodes by using node information, maintains the state of a first list node according to the node information and the node relation between the first list node and a second list node after a first list node receives the node information sent by the second list node, further enables the first list node to generate and send the node information, and realizes the transmission of the current state of the first list node through the node information of the first list node, thereby realizing the linkage management of the list nodes.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a list structure according to an embodiment of the present invention;
fig. 2 is a flowchart of a list node management method according to an embodiment of the present invention;
fig. 3 is a flowchart of another list node management method provided in an embodiment of the present invention;
fig. 4 is a flowchart of another list node management method according to an embodiment of the present invention;
fig. 5 is a block diagram illustrating a structure of a list node management apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram of another list node management apparatus according to an embodiment of the present invention;
fig. 7 is a block diagram illustrating a structure of another list node management apparatus according to an embodiment of the present invention;
fig. 8 is a block diagram of a structure of another list node management apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 2, a flowchart of a list node management method according to an embodiment of the present invention is provided, where the method may be applied to an electronic device, and the electronic device may be a user device having data processing capability and program running capability, such as a notebook computer, a smart phone, a PC (personal computer), and the like, and obviously, the electronic device may also be implemented by using a server on a network side in some cases; referring to fig. 2, a list node management method provided in an embodiment of the present invention may include:
step S100, a node message received by the first list node is acquired.
Optionally, in order to improve the universality of the list node management method provided in the embodiment of the present invention and the reproducibility of the method itself, the list nodes related to the embodiment of the present invention are all provided with node attributes of the same format, and different list nodes are distinguished by different node attribute values. Further, the node messages transmitted between the list nodes also have the same composition format, and for any node message, in addition to the content of the identity information identifying the message itself, the node message also includes the node attribute of the list node which generates and transmits the node message, that is, the node attribute of the list node is one of the composition parts of the node message.
Specifically, the node attributes of the list node mainly include the following:
node identification number: the node identification numbers can uniquely represent the list nodes, each list node corresponds to one node identification number in the setting process, and further, the setting of the node identification numbers is mostly finished at the beginning of the list establishment so as to ensure the one-to-one correspondence between the node identification numbers and the list nodes.
Parent node identification number: in order to establish the above-mentioned node relationship, the setting of the father node identification number often needs to be set corresponding to the node identification number of the list node, for example, the node identification number of the previous-level list node can be set as the father node identification number of the list node, so that the father list node of the list node can be uniquely determined by inquiring the father node identification number of the list node, and it is conceivable that if two list nodes have the same father node identification number, the two list nodes are the brother nodes. The setting of the father node identification number plays an important role in establishing the node relation among the list nodes and realizing the linkage management of the list nodes.
And (3) node name: the node names are mainly used for enhancing the identification degree of the list nodes and enhancing the readability of file codes, so that developers can identify the list nodes more conveniently.
State features: the state characteristics of the list nodes at least comprise selection, expansion and hiding, and when a user clicks the state characteristics corresponding to the list nodes, the state characteristics of the list nodes are updated according to the selection of the user, or the state characteristics of the list nodes are updated according to node messages sent by other list nodes.
It should be noted that the node attribute of the list node includes, but is not limited to, the above content, and a developer may also add other content according to needs, so that more information content related to the list node may be obtained through the node attribute, and any extension of other content belongs to the protection scope of the embodiment of the present invention.
For the composition of the node message, the following contents may be included:
message identification number: similar to the node identification number, the message identification number may uniquely represent a node message, and a node message corresponds to a message identification number.
Message type: the message type is an extremely important component in the node message, and mainly includes state updating, state reporting and node removal. When the state characteristics of the list nodes are changed, the message types corresponding to the node messages sent by the list nodes are state updates; when the list node receives the node message of the state updating type of the brother node, the self state needs to be reported to the father list node, and the node message of the state reporting type is needed at the moment; when any node is removed by the user, other list nodes are informed by sending a node message of node removal. Further, in the embodiment of the present invention, for the state update class node message, the parent list node, the child list node, and the sibling list node all need to be processed; for the state reporting type node message, only father list nodes need to process; for the node removal class node message, both the parent list node and the child list node need to be processed.
And (4) node attribute: the node message carrying the node attribute can play a variety of roles, for example, identifying the list node sending the node message through the node attribute, determining the node relationship among the list nodes through the father node identification number contained in the node attribute, determining the state corresponding to the list node through the state feature content, and the like.
It should be further noted that, the structure of the node message, including but not limited to the above-mentioned contents, any other information that can be transmitted through the node message can be set in the node message, and also fall within the scope of the present invention.
And acquiring a node message received by the first list node, wherein the node message is sent by the second list node, and according to the above contents, the node message received by the first list node at least indicates the state of the second list node, and certainly, all related information carried in the node message is also included.
Step S110, according to the node relation between the first list node and the second list node, maintaining the state of the first list node in the state of the second list node.
After the node message sent by the second list node is obtained, the message type and the node attribute information contained in the node message are read, and the node relationship between the first list node and the second list node can be determined according to the node attribute of the first list node and the node attribute of the second list.
Specifically, the node identification number and the parent node identification number contained in the node message of the second list node are read, and the node relationship between the first list node and the second list node can be determined by comparing the node identification numbers of the first list node and the second list node with the parent node identification number.
The determination of the node relationship may include:
comparing the node identification number of the first list node with the father node identification number of the second list node, and if the node identification number of the first list node is consistent with the father node identification number of the second list node, judging that the first list node is the father node of the second list node;
comparing the father node identification number of the first list node with the node identification number of the second list node, and if the father node identification number of the first list node is consistent with the node identification number of the second list node, judging that the first list node is a child node of the second list node;
and comparing the parent node identification number of the first list node with the parent node identification number of the second list node, and if the parent node identification number of the first list node is consistent with the parent node identification number of the second list node, judging that the first list node is a brother node of the second list node.
It should be noted that, if the first list node and the second list node are neither in a parent-child relationship nor in a sibling relationship, the first list node and the second list node may be considered to be from different branches and have no direct contact, and for a node message from a list node from a different branch and having no direct contact, the node message may be directly discarded without further processing.
After the node relation between the first list node and the second list node is determined, the state of the first list node is maintained by combining the message type contained in the node message sent by the second list node.
Specifically, taking the first list node as the child list node of the second list node as an example, the node message sent by the second list node is a status update type message, and the node attribute shows that the status of the second list node is selected, and on the premise that the parent node list, that is, the second list node, is selected, the child list node and the first list node are also updated to the selected status.
The list node management method provided by the embodiment of the invention is characterized in that node attributes with uniform formats are set for each list node, information transmission among all list nodes is realized by utilizing node messages, after a first list node receives the node message of a second list node, maintaining the state of the first list node according to the information such as the message type and the node attribute recorded in the node message and the node relationship between the first list node and the second list node, further, after updating the state of the first list node, repeating the above process to make the first list node send the node message, and so on, the list node management method provided by the embodiment of the invention can realize the linkage management of the list nodes, and provides a new management method for developers, so that the developers have more selection spaces.
Optionally, referring to fig. 3, a flowchart of another list node management method provided in the embodiment of the present invention is shown, and on the basis of the embodiment shown in fig. 2, the list node management method provided in the embodiment of the present invention may further include:
step S200, determining whether the node message is valid, if yes, performing step S110, and if not, performing step S210.
By judging whether the node message received by the first list node is effective or not, the filtering and screening of the node message can be realized.
Optionally, as mentioned above, if it is determined that the first list node and the second list node are neither in a parent-child relationship nor in a sibling relationship, the first list node and the second list node may be considered to be from different branches and not directly associated, and a node message sent from such a list node may be considered as an invalid message.
Further, the node message that is repeatedly received may also be determined to be an invalid message, and specifically, whether a certain node message is a repeatedly received message may be determined by the message identification number of the node message. After receiving a node message at a list node, recording the message identification number of the node message, and when receiving the node message with the same message identification number again, determining that the node message received again is the node message received repeatedly.
Step S210, abandoning the invalid node message.
And (4) directly discarding invalid node messages received by the list nodes without processing.
By the list node management method provided by the embodiment, invalid node messages can be effectively removed and filtered, the number of the node messages needing to be processed is reduced, node message flooding is avoided, and the stability of system operation is improved.
Further, an embodiment of the present invention further provides a list node management method capable of effectively preventing node message flooding, where if a sibling node of a first list node and a second list node is a node message in which the second list node reports its own state to a parent list node, the first list node is controlled to discard the node message, and no processing is performed.
In summary, the list node management methods provided in the embodiments shown in fig. 2 and fig. 3 provide a method for implementing linkage management of list nodes according to the obtained node messages received by the list nodes, and it is conceivable that, correspondingly, the list nodes may also be controlled to send node messages, and the state changes of the list nodes are transmitted by using the node messages, and further, linkage management of the list nodes is implemented. The control of the list nodes to send or receive the node messages is complementary, and for any list node, the state of the list node can be managed in a linkage mode according to the received node messages, and similarly, the list nodes can be controlled to send the node messages after the state changes, and the states of other list nodes are further maintained according to the node messages. Based on the foregoing, referring to fig. 4, a flowchart of a list node management method provided in an embodiment of the present invention may include:
step S300, generating a node message.
The list node management method provided by the embodiment of the invention can generate the node message of the first list node under at least two conditions, wherein one condition is that the state of the first list node is changed, and the other condition is that the first list node receives the state update message of the brother list node.
Optionally, a click operation instruction of the user is obtained, and the state of the first list node is updated according to the instruction content, for example, the user clicks a check box of the first list node, selects the state of the first list node as a selected state, and generates a node message in which the current state of the first list node is recorded according to the updated state of the first list node, that is, the selected state.
Optionally, after the state of the first list node is updated according to the node message received by the first list node, for example, the state update message from the parent list node, the first list node needs to be controlled to generate the node message of the state report type.
Further, when the first list node receives the state update message of the brother list node, it needs to determine the current state of the first list node, and after determining the current state of the first list node, generates a node message of the reporting state class of the first list node.
It should be noted that the node message of the list node may also be generated in other necessary situations, and is not limited to the above situations given in the embodiments of the present invention.
Step S310, the first list node broadcasts a node message to the second list node, so as to maintain the state of the second list node in the state of the first list node according to the node relationship between the first list node and the second list node.
And after the node message of the first list node is generated, controlling the first list node to broadcast the node message to the second list node so as to maintain the state of the second list node in the state of the first list node according to the node relation of the first list node and the second list node. The foregoing details have been introduced in detail, and are not repeated herein, for the process of maintaining the state of the list node according to the node message received by the list node.
It should be noted that all list nodes in the list may acquire the node messages broadcast by other list nodes, and the node messages are not sent with clear directionality.
As described above, the list node management method provided by the embodiment of the present invention can implement linkage management of list nodes, and provide a new management method for developers, so that the developers have more selection spaces.
Due to the fact that different node relationships exist among the list nodes, each list node is in a different state, and node messages transmitted among the list nodes are of multiple message types, linkage management of the list nodes has multiple application scenarios. However, for any application scenario, the node messages received by the list nodes are acquired, the message types and the node attributes are read from the node messages, and the execution processes of determining the node relationships of the list nodes according to the node attributes are consistent, so in the following description of the application scenario of the list node management method provided in the embodiment of the present invention, the linkage change process of the list nodes will be mainly described, the same execution steps before the linkage change will not be described, and the specific execution process may refer to the relevant contents in the embodiments shown in fig. 2 to 4. The application scenario of the list node management method provided by the embodiment of the invention at least comprises the following steps:
the parent list node updates the state (to selected, expanded or hidden), and the child list nodes controlling the parent list node are all updated to the state corresponding to the parent list node.
After the state of all the child list nodes is updated, the state of the parent list node is controlled to be updated to the state corresponding to all the child list nodes, optionally, an array can be set for the parent list node and used for recording the current state of each child list node, when the state of any child list node is changed, the state record of the child list node with the changed state in the array is refreshed, and when the state record of all the child list nodes is changed, the state of the parent list node is updated.
It should be noted that the parent-child relationship between the list nodes has relativity, and the linkage management of the parent-child relationship nodes is only performed between two adjacent levels of list nodes, that is, the node message of the parent list node is only valid for its child list node, and the next level list node of the child list node does not process the node message, that is, the node message of the list node without direct relationship described in the foregoing content is not processed.
When receiving the state update class node message of the brother list node, controlling the list node to send a state report class node message so as to enable the father list node to maintain the state record of each child list node according to the state report class node message; meanwhile, if the state reporting type information of the brother list node is received, the information is abandoned and is not processed, and the information is prevented from flooding.
Acquiring a node removal instruction of a user, removing a designated list node, generating a node message of a node removal class aiming at the state change, releasing memory resources occupied by the list node after broadcasting the node removal message, destroying the list node, and destroying all sub-list nodes under the list node.
And for the node removal class node message sent by the child list node, controlling the parent list node to delete the state record of the child list node, and updating the state record of the parent list node, so as to ensure that the parent list node can record the latest state of all the child list nodes.
The list node management apparatus provided in the embodiment of the present invention is introduced below, and the list node management apparatus described below may be regarded as a functional module architecture that needs to be set in the central device to implement the list node management method provided in the embodiment of the present invention; the following description may be cross-referenced with the above.
Fig. 5 is a block diagram of a list node management apparatus according to an embodiment of the present invention, and referring to fig. 5, the apparatus may include:
an obtaining unit 10, configured to obtain a node message received by a first list node, where the node message at least indicates a state of a second list node that sends the node message;
a first maintenance unit 20, configured to maintain the state of the first list node in the state of the second list node according to the node relationship between the first list node and the second list node.
Optionally, the first maintenance unit 20 is configured to maintain the state of the first list node in the state of the second list node according to the node relationship between the first list node and the second list node, and specifically includes:
reading a message type and a node attribute contained in the node message of the second list node, wherein the message type records the state of the list node, and the node attribute records the identification information of the list node;
determining the node relation between the first list node and the second list node according to the node attribute;
and maintaining the state of the first list node by combining the message type and the node relation.
Optionally, the node attribute includes a node identification number and a parent node identification number of a list node, and the first maintenance unit 20 is configured to, when determining the node relationship between the first list node and the second list node according to the node attribute, specifically include:
if the node identification number of the first list node corresponds to the father node identification number of the second list node, the first list node is the father node of the second list node;
if the father node identification number of the first list node corresponds to the node identification number of the second list node, the first list node is a child node of the second list node;
and if the parent node identification number of the first list node corresponds to the parent node identification number of the second list node, the first list node is a brother node of the second list node.
Optionally, referring to fig. 6, a block diagram of another list node management apparatus provided in the embodiment of the present invention is shown, and on the basis of the embodiment shown in fig. 5, the apparatus may further include:
a determining unit 30, configured to determine whether the node message is valid, and when the node message is valid, trigger the first maintenance unit 20 to maintain the state of the first list node in the state of the second list node according to the node relationship between the first list node and the second list node.
Optionally, referring to fig. 7, a block diagram of a structure of a further list node management apparatus according to an embodiment of the present invention is shown in fig. 5 and fig. 6, where the apparatus may further include:
a control unit 40, configured to control the first list node to discard the node message if the first list node and the second list node are sibling nodes and the node message is a node message that reports a state of the second list node.
Fig. 8 is a block diagram of a structure of another list node management apparatus according to an embodiment of the present invention, and referring to fig. 8, the apparatus may include:
a generating unit 50 for generating a node message, wherein the node message indicates at least a status of the first list node;
a second maintenance unit 60, configured to enable the first list node to broadcast the node message to a second list node, so as to maintain the state of the second list node in the state of the first list node according to the node relationship between the first list node and the second list node.
Optionally, the generating unit 50 is configured to generate a node message, and specifically includes:
acquiring a click operation instruction of a user;
updating the state of the first list node according to the click operation instruction;
and generating a node message according to the updated state of the first list node.
Optionally, the generating unit 50 is configured to generate a node message, and specifically includes:
when a first list node receives a node message indicating update of the state of a brother list node, determining the current state of the first list node;
and generating a node message according to the current state of the first list node.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (9)
1. A list node management method, characterized in that,
acquiring a node message received by a first list node, wherein the node message at least indicates the state of a second list node which sends the node message;
maintaining the state of the first list node in the state of the second list node according to the node relation between the first list node and the second list node;
maintaining the state of the first list node in the state of the second list node according to the node relationship between the first list node and the second list node, including:
reading a message type and a node attribute contained in the node message of the second list node, wherein the message type comprises state updating, state reporting and node removing;
determining the node relation between the first list node and the second list node according to the node attribute; the node attributes comprise node identification numbers, father node identification numbers, node names and state characteristics of the list nodes;
and maintaining the state of the first list node by combining the message type, the node relation and the state characteristics in the node attribute.
2. The list node management method of claim 1, wherein before said maintaining the state of the first list node in the state of the second list node according to the node relationship of the first list node and the second list node, the method further comprises:
and judging whether the node message is valid, if so, executing the step of maintaining the state of the first list node in the state of the second list node according to the node relation between the first list node and the second list node.
3. The list node management method of claim 1, wherein said determining a node relationship between the first list node and the second list node based on the node attribute comprises:
if the node identification number of the first list node corresponds to the father node identification number of the second list node, the first list node is the father node of the second list node;
if the father node identification number of the first list node corresponds to the node identification number of the second list node, the first list node is a child node of the second list node;
and if the parent node identification number of the first list node corresponds to the parent node identification number of the second list node, the first list node is a brother node of the second list node.
4. The list node management method of any of claims 1-3, wherein the method further comprises:
and if the brother nodes of the first list node and the second list node are the node messages reporting the state of the second list node, controlling the first list node to discard the node messages.
5. A list node management method, comprising:
generating a node message, wherein the node message indicates at least a state of a first list node;
causing the first list node to broadcast the node message to a second list node to maintain a state of the second list node in a state of the first list node according to a node relationship of the first list node and the second list node;
maintaining the state of the second list node with the state of the first list node according to the node relationship between the first list node and the second list node, including:
reading a message type and a node attribute contained in a node message of the first list node, wherein the message type comprises state updating, state reporting and node removing;
determining the node relation between the first list node and the second list node according to the node attribute; the node attributes comprise node identification numbers, father node identification numbers, node names and state characteristics of the list nodes;
and maintaining the state of the second list node by combining the message type, the node relation and the state characteristics in the node attribute.
6. The list node management method of claim 5, wherein the generating a node message comprises:
acquiring a click operation instruction of a user;
updating the state of the first list node according to the click operation instruction;
and generating a node message according to the updated state of the first list node.
7. The list node management method of claim 5, wherein the generating a node message comprises:
when a first list node receives a node message indicating update of the state of a brother list node, determining the current state of the first list node;
and generating a node message according to the current state of the first list node.
8. A list node management apparatus, comprising:
an obtaining unit, configured to obtain a node message received by a first list node, where the node message at least indicates a state of a second list node that sends the node message;
a first maintenance unit, configured to maintain a state of the first list node in a state of the second list node according to a node relationship between the first list node and the second list node;
the first maintenance unit is configured to maintain the state of the first list node in the state of the second list node according to the node relationship between the first list node and the second list node, and specifically includes:
reading a message type and a node attribute contained in the node message of the second list node, wherein the message type comprises state updating, state reporting and node removing;
determining the node relation between the first list node and the second list node according to the node attribute; the node attributes comprise node identification numbers, father node identification numbers, node names and state characteristics of the list nodes;
and maintaining the state of the first list node by combining the message type, the node relation and the state characteristics in the node attribute.
9. A list node management apparatus, comprising:
a generating unit configured to generate a node message, wherein the node message indicates at least a state of a first list node;
a second maintenance unit, configured to enable the first list node to broadcast the node message to a second list node, so as to maintain a state of the second list node in a state of the first list node according to a node relationship between the first list node and the second list node;
the second maintenance unit is configured to maintain the state of the second list node in the state of the first list node according to the node relationship between the first list node and the second list node, and specifically includes:
reading a message type and a node attribute contained in a node message of the first list node, wherein the message type comprises state updating, state reporting and node removing;
determining the node relation between the first list node and the second list node according to the node attribute; the node attributes comprise node identification numbers, father node identification numbers, node names and state characteristics of the list nodes;
and maintaining the state of the second list node by combining the message type, the node relation and the state characteristics in the node attribute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810602116.0A CN108804678B (en) | 2018-06-12 | 2018-06-12 | List node management method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810602116.0A CN108804678B (en) | 2018-06-12 | 2018-06-12 | List node management method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108804678A CN108804678A (en) | 2018-11-13 |
CN108804678B true CN108804678B (en) | 2022-04-15 |
Family
ID=64085190
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810602116.0A Active CN108804678B (en) | 2018-06-12 | 2018-06-12 | List node management method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804678B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113485606A (en) * | 2021-06-28 | 2021-10-08 | 北京金堤征信服务有限公司 | Method and device for realizing multi-list joint rolling |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1929393A (en) * | 2005-09-07 | 2007-03-14 | 中兴通讯股份有限公司 | Tri-state tree representing and location method of network element object in network optimization system |
CN100456728C (en) * | 2006-05-10 | 2009-01-28 | 华为技术有限公司 | Construction and operation for wireless self-organizing network |
CN101217410B (en) * | 2008-01-07 | 2010-08-25 | 杭州华三通信技术有限公司 | A network topological structure exhibition method and device |
CN101639845A (en) * | 2009-08-12 | 2010-02-03 | 东软集团股份有限公司 | Tree-node displaying method and device |
CN103425654B (en) * | 2012-05-16 | 2017-07-28 | 深圳中兴力维技术有限公司 | A kind of authority tree linkage replay method, apparatus and system |
CN103532741B (en) * | 2013-09-27 | 2016-09-07 | 瑞斯康达科技发展股份有限公司 | A kind of access level network topology management method and system |
CN105515853B (en) * | 2015-12-03 | 2019-01-11 | 泰凌微电子(上海)有限公司 | The node and its state updating method of wireless network |
CN106845175B (en) * | 2015-12-04 | 2021-03-30 | 方正国际软件(北京)有限公司 | Method and device for setting data permission |
CN107659497A (en) * | 2017-11-03 | 2018-02-02 | 深圳天珑无线科技有限公司 | Method for repairing route and device |
-
2018
- 2018-06-12 CN CN201810602116.0A patent/CN108804678B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108804678A (en) | 2018-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8219666B2 (en) | Generating an update status alert in a device | |
US8396932B2 (en) | Apparatus and method for efficiently managing data in a social networking service | |
CN101061688B (en) | Network management apparatus and method based on simple network management protocol | |
KR101120687B1 (en) | Differential update for data broadcasting | |
CN100428233C (en) | Method and apparatus for search | |
CN110535928B (en) | Event pushing method for JAVA intelligent contract of block chain | |
JP2009504041A (en) | Automatic management of mobile device capabilities | |
SG182486A1 (en) | Method, system and server for collecting version of software | |
CN107733786B (en) | Friend recommendation method and device | |
CN112511580B (en) | Message pushing method, device, storage medium and equipment | |
US20120151362A1 (en) | Network management system supporting customizable groups | |
CN111538763A (en) | Method for determining main node in cluster, electronic equipment and storage medium | |
CN111209256A (en) | File monitoring method and device, electronic equipment and storage medium | |
CN111460038A (en) | Quasi-real-time data synchronization method and device | |
CN111078430A (en) | Message notification processing method, device and storage medium | |
CN108804678B (en) | List node management method and device | |
CN116204438A (en) | Test case generation method, automatic test method and related device | |
CN113608842B (en) | Container cluster and component management method, device, system and storage medium | |
CA3065729A1 (en) | Business rules processing framework | |
EP1122933A2 (en) | Transmitting apparatus, receiving apparatus, transmitting-receiving system, transmitting method, and receiving method | |
US20220269682A1 (en) | Method for loading data and electronic apparatus therefor | |
CN115617781A (en) | Digital object creating and data management method and device | |
CN111953580B (en) | Method, device and storage medium for sending and acquiring session | |
CN112235367B (en) | Method, system, terminal and storage medium for subscribing entity behavior relation message | |
CN110110081B (en) | Hierarchical classification processing method and system for mobile internet mass monitoring data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |