WO2014078992A1 - 一种升级方法和节点设备 - Google Patents

一种升级方法和节点设备 Download PDF

Info

Publication number
WO2014078992A1
WO2014078992A1 PCT/CN2012/084915 CN2012084915W WO2014078992A1 WO 2014078992 A1 WO2014078992 A1 WO 2014078992A1 CN 2012084915 W CN2012084915 W CN 2012084915W WO 2014078992 A1 WO2014078992 A1 WO 2014078992A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
node
nodes
group
instruction
Prior art date
Application number
PCT/CN2012/084915
Other languages
English (en)
French (fr)
Inventor
张进毅
许利霞
张羽
Original Assignee
杭州华为数字技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州华为数字技术有限公司 filed Critical 杭州华为数字技术有限公司
Priority to PCT/CN2012/084915 priority Critical patent/WO2014078992A1/zh
Priority to CN201280002739.5A priority patent/CN104471894B/zh
Publication of WO2014078992A1 publication Critical patent/WO2014078992A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present invention relates to the field of communications, and in particular, to an upgrade method and a node device.
  • the software or firmware upgrade method in the server generally has the following types: 1. Manually upgrade all nodes; 2. Directly connect to the upgrade website to automatically upgrade; 3. Unifiedly manage the upgraded nodes by the unified management software.
  • manual upgrade of all nodes requires the administrator to manually upgrade the nodes one by one, and the upgrade efficiency is very low. If you use the automatic upgrade method to connect to the upgrade site, not all nodes can connect to the upgrade site due to security reasons, etc., so nodes that cannot connect to the upgrade site cannot be upgraded.
  • the managed node is upgraded by the unified management software, the node needs to maintain a connection with the unified management software. If the connection is disconnected due to network problems, the upgrade fails.
  • Several existing software upgrade methods fail to meet the efficiency and success rate requirements of software upgrades.
  • the embodiment of the present invention provides an upgrade method and a node device, so that the upgraded node only needs to have a path with the initial upgrade node to complete the upgrade, thereby improving the success rate of the upgrade, and implementing parallel upgrade of multiple nodes, thereby improving Upgrade efficiency.
  • an upgrade method including:
  • the first node receives the first upgrade instruction
  • the first node downloads the upgrade package according to the first upgrade instruction, and saves the upgrade package;
  • the first node divides all the adjacent nodes of the first node into one or more upgrade groups; the first node sends a second upgrade instruction and a priority upgrade of the upgrade group to the first node in each upgrade group. queue; The first node in each upgrade group upgrades the nodes in the upgrade group according to the second upgrade instruction and the priority upgrade queue of the upgrade group;
  • Each node except the first node scans its own neighboring nodes after it has been upgraded, and upgrades the nodes that need to be upgraded in the neighboring nodes according to the upgrade package.
  • the first node upgrades according to the first upgrade instruction, and saves the upgrade package, including:
  • the first node determines whether the upgrade condition is met according to the load of the first node; when the upgrade condition is met, the first node downloads the upgrade package according to the first upgrade instruction, performs upgrade, and saves the upgrade package;
  • the first node determines whether the upgrade condition is satisfied according to its own load, until the upgrade condition is met, and the upgrade package is downloaded according to the first upgrade instruction, and the upgrade package is saved.
  • the first node divides all neighboring nodes of the first node into one or more upgrade groups, including The first node divides each of the adjacent nodes of the first node into an upgrade group.
  • the first node divides all neighboring nodes of the first node into one or more according to a node grouping algorithm Upgrade group, including:
  • the first node shields a link between the first node and all neighboring nodes of the first node in a topology map; after shielding the link, the first node compares a node with the most links among all adjacent nodes
  • the neighboring node of the node with the most number of links is divided into an upgrade group, and the priority upgrade queue of the upgrade group is determined, wherein the node with the largest number of links is the first node of the upgrade group, and the priority upgrade is performed.
  • the queue is an upgrade sequence of the remaining nodes of the upgrade group after the upgrade of the first node of the upgrade group is completed;
  • the node with the largest number of links among the remaining nodes except the grouped node is divided into an upgrade group, and the priority upgrade queue of the upgrade group is determined, until all the neighbor nodes except the group node of all the neighbor nodes of the first node are An isolated node; each of the remaining isolated nodes is divided into an upgrade group.
  • the first node sends the first node to each of the upgrade groups
  • the second upgrade command and the priority upgrade queue of the upgrade group include: the first node in the group sends the second upgrade command and the priority upgrade queue of the upgrade group.
  • the first node in each upgrade group is according to the first level, Includes:
  • each node except the first node scans its own neighboring node after it has been upgraded, including:
  • Each node except the first node is upgraded according to the received subsequent upgrade instruction, where the subsequent upgrade instruction is any one of the second upgrade instruction, the third upgrade instruction, and the fourth upgrade instruction.
  • Each node except the first node scans its own neighboring node after it has been upgraded, and obtains an upgrade condition of its neighboring node, and according to the upgrade status of the adjacent node to the neighboring node of the neighboring node.
  • the node that needs to be upgraded sends the fourth upgrade instruction, so that the node that needs to be upgraded is upgraded according to the fourth upgrade instruction.
  • each node except the first node performs an upgrade package according to the received subsequent upgrade instruction.
  • each node except the first node determines whether it needs to be upgraded; when it needs to upgrade, obtains the upgrade package from the previous node that sends the subsequent upgrade instruction; Whether the load determines whether the upgrade condition is met;
  • the upgrade is performed according to the subsequent upgrade instruction, and the upgrade package is saved;
  • the method further includes: each node except the first node completes its own After the upgrade, the upgrade status of the neighboring node is reported to the first node, and the first node determines whether there is a node that fails to upgrade according to the upgrade status of all the received nodes, and if there is a node that fails to upgrade, re-execute Divide all adjacent nodes into one or more upgrade groups and subsequent upgrade processes until all nodes complete the upgrade.
  • a node device including: a receiving unit, configured to receive a first upgrade instruction when the node device is a first node, and to receive a subsequent upgrade instruction when the node device is not a first node And the subsequent upgrade instruction is one of the second upgrade instruction and the third upgrade instruction; the upgrade unit is configured to: if the node device needs to be upgraded, according to the first upgrade instruction or subsequent upgrade received by the receiving unit The instruction downloads the upgrade package to upgrade, and saves the upgrade package;
  • the scanning node is configured to scan the neighboring node of the self, and obtain the upgrade status of the neighboring node of the node when the node device is not the first node;
  • a grouping unit configured to, when the node device is the first node, divide all adjacent nodes of the first node into one or more upgrade groups according to a scan result of the scan node; a sending unit, configured to send, when the node device is the first node, the second upgrade instruction and the priority upgrade of the upgrade group to the first node in each upgrade group according to the grouping result of the grouping unit Queue, so that the first node upgrades the node in the upgrade group according to the second upgrade instruction sent by the first node and the priority upgrade queue; and is further used when the node device is not the first node, And sending, according to the upgrade situation of the neighboring node that is obtained by the scan node, the third upgrade instruction to the node that needs to be upgraded in the neighboring node.
  • the upgrading unit is specifically configured to: determine, according to its own load, whether an upgrade condition is met;
  • the upgrade package is downloaded according to the first upgrade instruction or the subsequent upgrade instruction received by the receiving unit, and the upgrade package is saved; when the upgrade condition is not met, the load is again according to the load. Determining whether the upgrade condition is met, until the upgrade condition is met, and the upgrade package is downloaded according to the first upgrade instruction or the subsequent upgrade instruction received by the receiving unit, and the upgrade package is saved.
  • the grouping unit is specifically configured to:
  • each of the adjacent nodes is divided into an upgrade group according to the scan result of the scan node.
  • the grouping unit includes:
  • a link masking subunit configured to, when the node device is the first node, block a link between the head node and all neighboring nodes of the head node according to a scan result of the scan node unit, in a topology map, And sending the number of links of each node after the shielding to the grouping subunit;
  • the grouping subunit configured to: when the node device is the head node, after the link masking subunit blocks the link, the node with the most links among all the neighboring nodes and the node with the most number of links
  • the neighboring node is divided into an upgrade group, and the priority upgrade queue of the upgrade group is determined, wherein the node with the largest number of links is the first node of the upgrade group, and the priority upgrade queue is located at the upgrade group.
  • the upgrade order of the remaining nodes of the upgrade group if there are non-isolated nodes among the remaining nodes of the neighboring nodes except the grouped node, the node with the largest number of links among the remaining nodes except the grouped node.
  • the adjacent node of the node with the largest number of links among the remaining nodes is divided into an upgrade group, and the priority upgrade queue of the upgrade group is determined, until all the neighbor nodes except the group node of all the neighbor nodes of the first node are An isolated node; each of the remaining isolated nodes is divided into an upgrade group.
  • the sending unit when the node device is used as a first node, Sending, according to the grouping result of the grouping unit, the second upgrade instruction and the priority upgrade queue of the upgrade group to the first node in each upgrade group, specifically:
  • the sending unit is configured to: when the node device is the first node, send the second upgrade instruction and the priority upgrade queue of the upgrade group according to the first node in the group of groups.
  • the upgrading unit is further configured to: when the node device is not the first node When the upgrade is completed, the upgrade status of the neighboring node is reported to the first node; when the node device is the first node, it is determined whether there is a node that fails to upgrade according to the upgrade status of all the accepted nodes. If there is a node that fails to be upgraded, re-execute the process of dividing all adjacent nodes into one or more upgrade groups and subsequent upgrade processes until all nodes complete the upgrade.
  • a node device including: a processor and a memory, where the memory stores an execution instruction, when the node device is running, the processor executes the execution instruction to cause the node device to perform the following method : receiving, when the node device is the first node, a first upgrade instruction;
  • All the neighboring nodes of the first node are divided into one or more upgrade groups; sending a second upgrade instruction and the superiority of the upgrade group to the first node in each of the upgrade groups Upgrading the queue first; when used as the first node in each of the upgrade groups, according to the second upgrade instruction
  • the downloading the upgrade package according to the first upgrade instruction to perform the upgrade, and saving the upgrade package includes: determining, according to its own load, whether the upgrade condition is met; When the upgrade condition is performed, the upgrade package is downloaded according to the first upgrade instruction, and the upgrade package is saved; when the upgrade condition is not met, it is determined according to the load thereof whether the upgrade condition is met, until the upgrade condition is met and according to the upgrade condition.
  • the first upgrade instruction downloads the upgrade package for upgrading, and saves the upgrade package.
  • the dividing the neighboring nodes of the first node into one or more upgrade groups includes:
  • Each of the adjacent nodes of the head node is divided into an upgrade group.
  • the determining, by the first node, all the neighboring nodes of the first node into one or more upgrade groups including:
  • the node with the largest number of links among all the adjacent nodes and the adjacent node of the node with the largest number of links are divided into one upgrade group, and the priority upgrade queue of the upgrade group is determined, where the number of links The node that is the most is the first node of the upgrade group, and the priority upgrade queue is an upgrade sequence of the remaining nodes of the upgrade group after the first node of the upgrade group completes the upgrade;
  • the node with the largest number of links among the remaining nodes except the grouped node is divided into an upgrade group, and the priority upgrade queue of the upgrade group is determined, until all the neighbor nodes except the group node of all the neighbor nodes of the first node are An isolated node; each of the remaining isolated nodes is divided into an upgrade group.
  • the sending, by the first node in each upgrade group, the second The upgrade order and the priority upgrade queue of this upgrade group include:
  • the node sends the second upgrade instruction and the priority upgrade queue of the upgrade group.
  • the second upgrade instruction and the priority of the upgrade group are The upgrade queue is used to upgrade the nodes in the upgrade group, including: if the first node needs to be upgraded, downloading the upgrade package from the first node according to the second upgrade instruction, upgrading, and saving the upgrade package;
  • the scanning the neighboring node after the upgrade of the third aspect includes: Upgrading according to the received subsequent upgrade instruction, where the subsequent upgrade instruction is any one of the second upgrade instruction, the third upgrade instruction, and the fourth upgrade instruction;
  • the neighboring node scans to obtain the upgrade status of the neighboring node, and sends the fourth upgrade instruction to the node that needs to be upgraded in the neighboring node according to the upgrade status of the neighboring node, so that the node that needs to be upgraded is based on The fourth upgrade instruction is upgraded.
  • the performing the upgrading according to the received upgrade command sent by the previous node includes:
  • the upgrade package is obtained from the previous node that sends the subsequent upgrade instruction; whether the upgrade condition is met according to the load of the user;
  • the upgrade is performed according to the subsequent upgrade instruction, and the upgrade package is saved;
  • the upgrade condition is not met, it is determined again whether the upgrade condition is met, and after the upgrade condition is met, the upgrade is performed according to the upgrade instruction sent by the previous node, and the upgrade package is saved.
  • the processor is further configured to execute the execution instruction, so that the node device Performing the following method: when each node except the first node completes its own upgrade, reports the upgrade status of the neighboring node to the first node; when it is the first node, according to the received If all nodes are upgraded, determine whether there is a node that fails to upgrade. If there is a node that fails to upgrade, re-establish all adjacent nodes into one or more upgrade groups and subsequent upgrade processes until all nodes complete the upgrade.
  • An embodiment of the present invention provides an upgrade method and a node device.
  • the first node groups its neighbor nodes and sends an upgrade command to the first node of each group.
  • the first node of each group upgrades the nodes in the group.
  • the nodes other than the first node scan the upgrade status of the nodes connected to them after the upgrade, and upgrade the nodes to be upgraded.
  • the upgraded node only needs to have access to the initial upgrade node.
  • the upgrade can be completed, thereby improving the success rate of the upgrade, and achieving parallel upgrade of multiple nodes, improving the upgrade efficiency.
  • FIG. 1 is a schematic flowchart of an upgrade method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an upgrade method according to another embodiment of the present invention
  • FIG. 1 is a schematic flowchart of an upgrade method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an upgrade method according to another embodiment of the present invention
  • FIG. 4 is a schematic diagram 2 of a node grouping according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram 3 of a node grouping according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a node device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of another node device according to an embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of a node device according to another embodiment of the present invention.
  • An embodiment of the present invention provides an upgrade method. As shown in FIG. 1, the method includes:
  • the first node receives the first upgrade instruction.
  • the first node may be any one of all nodes, and a first node may be specified in each node in a random manner or according to a configuration, or may be automatically or manually selected by the system, and may be specified by using an existing method. The invention is not limited thereto.
  • the head node then receives the upgrade command.
  • the first node downloads the upgrade package according to the first upgrade instruction, and saves the upgrade package.
  • the first node first determines whether it has been upgraded after receiving the first upgrade instruction, and directly executes S 103 if the upgrade is performed; if the first node needs to be upgraded, downloads the upgrade package to upgrade, and saves the upgrade package.
  • the first node divides all adjacent nodes of the first node into one or more upgrade groups.
  • S104 The first node sends a second upgrade command and a priority upgrade queue of the upgrade group to the first node in each upgrade group, so that the first node upgrades the queue according to the second upgrade command and the priority upgrade queue. Upgrade the nodes in this upgrade group.
  • the first node in each upgrade group upgrades the nodes in the upgrade group according to the second upgrade instruction and the priority upgrade queue of the upgrade group.
  • each node except the first node upgrades itself, it scans its neighboring nodes, and upgrades the nodes that need to be upgraded in the neighboring nodes according to the upgrade package.
  • each group is upgraded group by group according to the priority of each group.
  • Each group is also upgraded according to the priority of the node according to the priority of the node.
  • Point upgrade It should be noted that the priority here may be automatically determined according to the time sequence of generating the packet, that is, the first generated packet has the highest priority, and the last generated packet has the lowest priority, and of course, other methods may be used to determine.
  • each group for example, is determined by the number of nodes in the upgrade group, and the number of upgrade groups has a high priority to speed up the upgrade, which is not limited by the present invention.
  • Each node in the group also scans its neighboring nodes after completing the upgrade, and upgrades the nodes in the adjacent nodes that need to be upgraded, thus achieving parallel upgrade of multiple nodes.
  • each node except the first node scans its own neighboring nodes after it has been upgraded, and upgrades the nodes in its neighboring nodes that need to be upgraded according to the upgrade package.
  • each node saves the upgrade package after the upgrade is completed, so that the upgrade package is passed to the next node when the next node is upgraded.
  • each node only needs to have a path with the first node to complete the upgrade.
  • the above node may be a server.
  • An embodiment of the present invention provides a method for upgrading.
  • the first node groups its neighbor nodes and sends an upgrade instruction to the first node of each group.
  • Priority upgrade list the first node of each group upgrades the nodes in the group according to the upgrade order priority upgrade list.
  • the nodes other than the first node scan the upgrade status of the nodes connected to them and upgrade the nodes to be upgraded.
  • the upgrade node only needs to have the path with the initial upgrade node to complete the upgrade, thereby improving the success rate of the upgrade, and implementing parallel upgrade of multiple nodes, improving the upgrade efficiency.
  • Another embodiment of the present invention provides a method for upgrading. As shown in FIG. 2, the method includes:
  • the first node receives the first upgrade instruction.
  • the selecting the first node may be completed by the upgrade management system. Specifically, a first section may be specified in each node in a random manner or according to a configuration or manually selected method.
  • the upgrade management system can be a software platform and run in a node device, the device can be an embedded device, the network can refer to a local area network, and the node can be a server.
  • the node can be a server.
  • the data center network can select any one server as the first node of the upgrade.
  • the upgrade management system can issue an upgrade instruction to the first node.
  • the first node determines whether it needs to be upgraded. When the first node does not need to be upgraded, S204 is performed; when the first node needs to be upgraded, S203 is performed. The first node determines whether it needs to be upgraded according to the criteria set by the user. If it needs to be upgraded, it executes S203; if it does not need to be upgraded, the first node does not upgrade.
  • the upgrade standard set by the administrator is to automatically connect to the Microsoft official website to detect whether the system patch of Windows Server 2008 is updated at 8:00 am every Monday. If the system patch is detected, the version number is higher than the installed patch in the server. For the version number, perform the upgrade procedure according to S2032. If the version number of the system patch is not higher than the patch version number installed in the server, the upgrade step is not performed.
  • the first node upgrades according to the upgrade package and saves the upgrade package.
  • the method for upgrading the node may include the following steps:
  • the first node determines whether the load of the first node is allowed to be upgraded. If the load allows the first node to upgrade, execute S2032; if the load does not allow the first node to upgrade, execute S2031 again until the load of the first node is allowed to be upgraded, and execute and execute S2032.
  • the first node downloads the upgrade package, upgrades according to the upgrade package, and saves the upgrade package.
  • the first node divides all adjacent nodes of the first node into one or more upgrade groups. Specifically, there are several implementation methods:
  • the head node can divide each of its neighbor nodes into a group. For example, suppose that there are 10 nodes in the network from 1 to 10, where node 1 is the first node, nodes 2 to 9 are adjacent nodes of node 1, and are directly connected to node 1, and node 10 is the adjacent node of node 5, as shown in the figure. 3 is shown. According to the above method, each of the nodes 2 to 9 can be divided into one group, and a total of 8 groups are obtained, and the nodes 10 are not grouped.
  • the second method includes:
  • the first node shields all the adjacent nodes of the first node and the first node in the topology map. Links between.
  • the first node divides the node with the largest number of links among all adjacent nodes and the adjacent node of the node with the largest number of links into one upgrade group, and determines the priority upgrade queue of the group, wherein the number of links is the largest.
  • the node is the first node of the upgrade group
  • the priority upgrade queue is the upgrade sequence of the remaining nodes of the upgrade group after the upgrade of the first node of the upgrade group. If the remaining nodes except the grouped nodes are isolated nodes, the first node divides each of the isolated nodes into a group.
  • the node with the largest number of links among the remaining nodes except the grouped node and the neighboring node of the node with the largest number of links among the remaining nodes are divided into An upgrade group, and determine the priority upgrade queue of the upgrade group, until all the neighbor nodes of the first node except the grouped node are isolated nodes, and each of the remaining isolated nodes is divided into an upgrade. group.
  • the 10 nodes may first mask the link between the node 1 and the adjacent node of the node 1, that is, the link between the node 1 and the node 2 to the node 9, and block the result of the link.
  • the node with the largest number of links after the link between the node 1 and the adjacent node of the node 1 is masked is selected, and the node 4, the node 2, the node 5, the node 6, and the node 4 and the node are selected.
  • the adjacent nodes of 4 are divided into one group, that is, node 4, node 3, node 5, and node 6 are divided into one group, labeled as group A, and then all nodes in group A are shielded, and the result after deletion is shown in FIG. 5, and then The nodes with the most links among the remaining nodes, namely node 8 and node 9, are grouped into one group, which is marked as group B, so that the remaining isolated nodes 2 and 7 each constitute a group, and are marked as group C and group D due to Node 10 is not directly connected to node 1, so there is no packet of node 10 here.
  • a data mining algorithm such as a K-means algorithm
  • a typical distance-based clustering algorithm may be used according to actual requirements. Not limited.
  • the first node sends a second upgrade instruction and a priority upgrade queue of the upgrade group to the first node in each upgrade group. Specifically, after the grouping is completed, the head node may be in accordance with the priority order of each upgrade group. And sending the second upgrade instruction and the priority upgrade queue of the upgrade group to the first node in each upgrade group.
  • the priority here may be automatically determined according to the time sequence of generating the packet, that is, the first generated packet has the highest priority, and the last generated packet has the lowest priority. Of course, other methods may be used to determine the priority of each group. For example, by determining the number of nodes in the upgrade group, a large number of upgrade groups have a high priority to speed up the upgrade, and the present invention is not limited thereto.
  • the first node of each upgrade group upgrades the nodes in the upgrade group according to the second upgrade instruction and the priority upgrade queue of the upgrade group. After receiving the second upgrade command sent by the first node, the first node of each upgrade group determines whether it needs to be upgraded. If the upgrade is required, the first node downloads the upgrade from the first node according to the second upgrade command. The package is upgraded, and the upgrade package is saved. The first node sends a third upgrade instruction to the other nodes in the upgrade group according to the received priority upgrade queue of the upgrade group according to the second upgrade instruction, so that other nodes can The upgrade instructions received are upgraded.
  • each node except the first node After each node except the first node upgrades itself, it scans its neighbor nodes and upgrades the nodes that need to be upgraded in its neighbor nodes. Specifically, each node except the first node is upgraded according to the received subsequent upgrade instruction, where the subsequent upgrade instruction refers to a second upgrade instruction that is sent by the first node to the first node in each upgrade group, and each first The third upgrade instruction sent by the node to the other nodes in the upgrade group, and the upgrade instruction sent by each node to the fourth upgrade instruction of the other nodes in the searched neighboring nodes that need to be upgraded; After each node has been upgraded, it scans its neighbors and obtains the upgrade status of its neighbors. It sends a fourth upgrade command to the node that needs to be upgraded according to the upgrade status of its neighbors. The node is upgraded according to the fourth upgrade instruction.
  • each node except the first node can first determine whether it needs to be upgraded.
  • it sends the subsequent upgrade command to its previous node to obtain the upgrade package, and according to The load of the own determines whether the upgrade condition is met.
  • the upgrade condition is met, the upgrade is performed according to the subsequent upgrade instructions, and the upgrade package is saved. If the upgrade condition is not met, the upgrade condition is determined again. After the upgrade condition is met, the upgrade is performed according to the received subsequent upgrade command, and the save is obtained. Upgrade package.
  • the first node in the group with the highest priority is the node that needs to be upgraded, which is referred to as the current node.
  • the current node After the current node receives the upper-level node, that is, the upgrade command sent by the first node and the upgrade queue of the group node, the current node determines whether it has been upgraded. When the current node has been upgraded, the current node scans its neighboring nodes to obtain the upgrade status of its neighboring nodes. Then, the current node sends a third upgrade command to its neighbors according to the priority upgrade queue of the node, so that the current node is adjacency. The point is upgraded according to the priority upgrade queue and the upgrade package of the node. If the current node needs to be upgraded, the current node obtains the upgrade package from the previous node, that is, the first node.
  • the current node determines whether the upgrade condition is met according to its own load; if the upgrade condition is met, the current node upgrades according to the upgrade package and saves the upgrade package; if the current node does not meet the upgrade condition, the current node determines whether the upgrade condition is met again. Until the current node meets the upgrade conditions and upgrades according to the upgrade package, and saves the upgrade package. After the upgrade is completed, the current node needs to report its previous node, which refers to the first node. After the current node completes the upgrade, the third upgrade instruction is sent to the next node specified in the node's upgrade queue, so that the next node performs the upgrade, and the current node also scans its neighbor node to find its neighbor node. The node that needs to be upgraded, and sends a fourth upgrade instruction to the node that needs to be upgraded in its neighboring node, so that the nodes that need to be upgraded are upgraded.
  • Each node that receives the third upgrade command or the fourth upgrade command scans its neighbor nodes after completing its own upgrade, finds the nodes that need to be upgraded in its neighbor nodes, and needs to upgrade to its own neighbor nodes.
  • the node sends a fourth upgrade command to upgrade the nodes that need to be upgraded.
  • the first node After all the nodes in the group with the highest priority are upgraded, the first node sends a second upgrade command and a priority upgrade queue of the node to the first node of the second highest priority group, so that the nodes in the group are followed.
  • the priority upgrade queue of the node is upgraded.
  • the method is the same as that of the node in the highest priority group, and is not mentioned here.
  • nodes 1 there are 10 nodes in the network from 1 to 10, wherein node 1 is the first node, nodes 2 to 9 are adjacent nodes of node 1, and are directly connected to node 1, and node 10 is the adjacent node of node 5.
  • the first grouping method in S204 is used for grouping, it is divided into 8 groups, and each group has one node, which is node 2 to node 9, respectively, and node 10 is not grouped.
  • Node 1 first sends an upgrade command to the first group, that is, first upgrades node 2, and node 2 reports to node 1 after completing the upgrade, node 1 sends an upgrade command to the second group, that is, upgrade node 3, and node 2 scans to its neighbor.
  • the node 6 needs to be upgraded, so the node 2 sends an upgrade command to the node 6, and the node 6 is also upgraded.
  • the node 3 and the node 6 are simultaneously upgraded, and the node 3 is reported to the node 1 after the upgrade is completed, and the node 6 is upgraded. It is not a task that is sent by the node 1. Therefore, after the node 6 is upgraded, it is not reported to the node 1, but is reported to the node 2, and of course, it can be reported by the node 2 to the node node 1 again. Then node 1 sends an upgrade command to the third group, that is, upgrades node 4, and node 6 scans to its neighbor node 7 after upgrading to complete the upgrade, so node 6 sends an upgrade command to node 7, and node 7 is also upgraded.
  • the node 4 and the node 7 are upgraded at the same time, and the node 4 is reported to the node 1 after the upgrade is completed, and since the node 7 is not upgraded by the node 1, the node 7 does not report to the node 1 after the upgrade. However, it is reported to the node 6, and can also be reported by the node 6 to the node node 2 to the upper node. Then, node 1 sends an upgrade command to the fourth group, that is, upgrades node 5, and node 5 reports to node 1 after completing the upgrade, and node 1 finds that node 5 of the fifth group and node 7 of the sixth group have been upgraded. In this case, the node may receive the related upgrade situation information obtained by the step-by-step reporting of each node.
  • the node 1 may scan the neighboring node to obtain the related upgrade information, or the node 1 to the fifth group.
  • the node 7 and the node 7 of the sixth group send the upgrade command, it is found that the nodes 6, 7 have completed the upgrade, and the present invention is not limited thereto. Therefore, the node 1 sends an upgrade command to the seventh group, that is, upgrades the node 8, and after the node 5 needs to be upgraded after scanning to the neighboring node 10, the node 5 sends an upgrade command to the node 10 to upgrade the node 10, thus implementing the node 8 and the node.
  • node 8 is reported to the node 1 after the upgrade is completed, and since the node 10 is not upgraded by the node 1, the node 10 is not reported to the node 1 after the upgrade.
  • node 1 sends an upgrade command to the eighth group to upgrade node 9. This completes the upgrade of all nodes. It can be seen that Node 3 and Node 6, Node 4 and Node 7, Node 8 and Node 10 are upgraded at the same time, saving upgrade time.
  • group A includes: node 4, node 3, node 5, and node 6, group B includes node 8, node 9, and node C 2, group D includes node 7, and group E includes node 10.
  • node 1 After completing the grouping, node 1 first sends an upgrade command to node 4 of group A, so that node 4 is upgraded, node 4 completes the upgrade and reports node 1, and then node 4 follows the priority upgrade queue of group A to the next node, that is, node 3. Send an upgrade command to upgrade node 3, node 4 After the scan to the neighboring node 5 needs to be upgraded, the upgrade command is sent to the node 5, and the node 5 is upgraded. Thus, the node 3 and the node 5 are upgraded at the same time, and after the node 3 and the node 5 complete the upgrade, the node 4 is reported to the node. 4 is reported to node 1.
  • the node 4 sends an upgrade command to the node 6 according to the priority upgrade list of the node, so that the node 6 is upgraded, and after the node 5 scans to the neighboring node 10 that needs to be upgraded, the node 10 is sent an upgrade command to upgrade the node 10, thereby implementing the upgrade.
  • Node 6 and node 10 are upgraded at the same time. Node 6 is reported to node 4 after the upgrade is completed, so that node 4 reports to node 1, and since node 10 is not upgraded by node 1, the node 10 is upgraded and Not reported to node 4.
  • the upgrade of the A group is completed, so the node 1 sends an upgrade command to the node 8 of the B group, so that the node 8 is upgraded, and the node 6 scans to its neighbor node 2 and the adjacent node 7 needs to be upgraded, therefore, at the node
  • the node 6 sends an instruction to the node 2, so that the node 8 and the node 2 are simultaneously upgraded. Since the node 2 is not the task delivered by the node 1, the node 6 does not report to the node 4.
  • the node 6 sends an upgrade command to the adjacent node 7, and the node 8 sends an upgrade command to the next node 9 according to the priority upgrade queue of the B group, thereby realizing the simultaneous upgrade of the node 7 and the node 9, since the node 9 is upgraded to the node 1 to the node.
  • the task that is delivered by the node 8 reports the upgrade of the node 9 to the node 1.
  • the node 1 sends the upgrade command to the group C node 2 and the node D node and the group E node 10 in turn, it is found that all the nodes have been upgraded, and the current round of the upgrade is completed.
  • the first node checks the upgrade status of all nodes, and determines whether there is a node that fails to upgrade. If there is a node that fails to upgrade, re-execute S204 ⁇ S207 until all nodes complete the upgrade; if there is no upgrade failed node, the upgrade ends.
  • the first node determines whether there is a node that fails to upgrade according to the reported upgrade status. For example, it can be implemented as follows: After each node completes the upgrade, it scans its own neighboring nodes and generates an adjacency list (the adjacency table is used to store the upgrade status of the adjacent nodes), and each node sends the adjacency list to the first node after generating the adjacency list.
  • the first node After all the nodes have performed an upgrade, the first node obtains the adjacency list reported by all the nodes, and then the first node can check the upgrade status of all nodes according to the adjacency list to determine whether there is a node that fails to upgrade.
  • An embodiment of the present invention provides a method for upgrading.
  • the first node groups the scanned nodes and sends a priority upgrade list to the first node of each group.
  • the first node of each group upgrades the nodes in the group according to the priority upgrade list.
  • the nodes in the group need to scan the node upgrades connected to them and upgrade the nodes to be upgraded.
  • the upgraded node only needs to be upgraded with the initial node.
  • the upgrade can be completed by the existence of the path, thereby improving the success rate of the upgrade, and implementing parallel upgrade of multiple nodes, thereby improving the upgrade efficiency.
  • a further embodiment of the present invention provides a node device 01, as shown in FIG. 6, comprising: a receiving unit 01 1, configured to receive a first upgrade instruction when the node device is the first node; When the node device is not the first node, the subsequent upgrade command is accepted, and the subsequent upgrade command is one of the second upgrade command and the third upgrade command.
  • the upgrade unit 012 is configured to receive, according to the receiving unit 01 1 , the node device needs to be upgraded.
  • the first upgrade instruction or the subsequent upgrade instruction downloads the upgrade package to upgrade, and saves the upgrade package;
  • the scan node unit 013 is configured to scan the neighboring node of the node, and when the node device is not the first node, obtain the upgrade of the adjacent node. happening;
  • a grouping unit 014 configured to, when the node device is the first node, divide all neighboring nodes of the first node into one or more upgrade groups according to the scan result of the scanning node unit 013;
  • the sending unit 015 is configured to: when the node device is the first node, send a second upgrade instruction and a priority upgrade queue of the upgrade group to the first node in each upgrade group according to the grouping result of the grouping unit 014, so that the first The node upgrades the node in the upgrade group according to the second upgrade command and the priority upgrade queue sent by the first node.
  • the node device is not the first node, according to the upgrade status of the neighbor node obtained by the scan node unit 013, The node that needs to be upgraded in its own neighboring node sends a third upgrade instruction.
  • the upgrading unit 012 may be specifically configured to: determine, according to its own load, whether the upgrade condition is met;
  • the grouping unit 014 may be specifically configured to: when the node device is the first node, divide each of its neighboring nodes into an upgrade group according to the scan result of the scanning node unit 013. Or further, as shown in FIG. 7, the grouping unit 014 may include:
  • the link masking subunit 0141 is configured to: when the node device is the first node, block the link between the first node and all the neighboring nodes of the first node according to the scan result of the scan node unit 013, and block each of the blocked nodes.
  • the number of links of the node is sent to the packet subunit 0142; the packet subunit 0142 is configured to: when the node device is the first node, after the link mask subunit blocks the link, the node with the most links among all the adjacent nodes and the number of links
  • the adjacent nodes of the most upgraded nodes are divided into one upgrade group, and the priority upgrade queue of the upgrade group is determined.
  • the node with the largest number of links is the first node of the upgrade group, and the priority upgrade queue is the first node of the upgrade group.
  • the upgrade order of the remaining nodes of the upgrade group if there are non-isolated nodes among the remaining nodes of the neighboring nodes except the grouped node, the node with the largest number of links among the remaining nodes except the grouped node
  • Adjacent nodes with the most connected nodes in the remaining nodes are divided into one upgrade group And determining all the nodes adjacent to the priority queue group upgraded upgrade until the ingress node in addition to the remaining nodes of the node are grouped isolated node; and each remaining isolated nodes are divided into a group upgrade.
  • the sending unit 015 is configured to: when the node device is the first node, send the second upgrade instruction and the priority upgrade queue of the upgrade group to the first node in each upgrade group according to the grouping result of the grouping unit 014. Specifically, the sending unit 015 is configured to: when the node device is the first node, send, according to the grouping result of the grouping unit 014, the second upgrade instruction to the first node in each upgrade group according to the priority order of the upgrade group. Upgrade the priority upgrade queue of the group.
  • the upgrading unit 012 may be specifically configured to: when the node device is not the first node, report the upgrade status of the neighboring node to the first node after completing the upgrade; and when the node device is the first node, according to all the nodes
  • the upgrade status determines whether there is a node that fails to upgrade. If there is a node that fails to upgrade, re-execute the process of dividing all adjacent nodes into one or more upgrade groups and subsequent upgrade processes until all The node completes the upgrade.
  • An embodiment of the present invention provides a node device. In a node network that needs to be upgraded, the node device, as the first node, groups all the adjacent nodes after receiving the upgrade instruction, and sends a priority upgrade to the first node of each group.
  • the node as the first node of each group, upgrades the nodes in the group according to the priority upgrade list
  • the node device as the other node other than the first node, scans the node upgrades connected to it after upgrading itself, and upgrades the node to be upgraded.
  • the upgraded node only needs to have the path with the initial upgrade node to complete the upgrade, thereby improving the success rate of the upgrade, and achieving parallel upgrade of multiple nodes, improving the upgrade efficiency.
  • the embodiment of the present invention further provides another node device 02, which includes a processor 024 and a memory 023, as shown in FIG. 8.
  • the device may further include a receiving device 021 and a transmitting device 022, which is not limited by the present invention.
  • a memory 023, configured to store an execution instruction
  • the processor 024 is configured to: when the node device is running, execute the execution instruction to cause the node device to perform the following method:
  • the first node receives the first upgrade instruction
  • the first node needs to be upgraded, download the upgrade package according to the first upgrade instruction to upgrade, and save the upgrade package; divide all adjacent nodes of the first node into one or more upgrade groups;
  • a second upgrade instruction and a priority upgrade queue of the upgrade group are sent to the first node in each upgrade group.
  • the node device is the first node of each upgrade group, according to the second upgrade instruction and the present
  • the node device acts as a node other than the first node, it is used to scan its own neighboring nodes after it has been upgraded, and upgrade the nodes that need to be upgraded in its neighboring nodes according to the upgrade package. Further, when the node device is the first node, downloading the upgrade package according to the first upgrade instruction The upgrade is performed, and the upgrade package is saved, including: determining whether the upgrade condition is met according to the load; when the upgrade condition is met, downloading the upgrade package according to the first upgrade instruction to upgrade, and saving the upgrade package; when the upgrade condition is not met Then, according to its own load, it is judged whether the upgrade condition is satisfied, until the upgrade condition is met, and the upgrade package is downloaded according to the first upgrade instruction to be upgraded, and the upgrade package is saved.
  • all the neighboring nodes of the first node are divided into one or more upgrade groups, including: dividing each adjacent node of the first node into an upgrade group.
  • all the neighboring nodes of the first node are divided into one or more upgrade groups, including: shielding the link between the first node and all neighboring nodes of the first node in the topology map; After that, the node with the largest number of links among all the adjacent nodes and the adjacent node of the node with the largest number of links are divided into one upgrade group, and the priority upgrade queue of the upgrade group is determined, wherein the node with the largest number of links is the first of the upgrade group.
  • the priority upgrade queue is an upgrade sequence of the remaining nodes of the upgrade group after the upgrade of the first node of the upgrade group; if the remaining nodes of the neighbor nodes of the first node except the grouped node have non-isolated nodes, Dividing the node with the largest number of links among the remaining nodes except the grouped node and the neighboring node of the node with the largest number of links among the remaining nodes into one upgrade group, and determining the priority upgrade queue of the upgrade group until all adjacent nodes of the first node
  • the remaining nodes except the grouped nodes are all isolated nodes; Isolated nodes were divided into a group upgrade.
  • the second upgrade command and the priority upgrade queue of the upgrade group are sent to the first node in each upgrade group, including: a second upgrade command and a priority upgrade queue of the upgrade group.
  • the node device is the first node of each upgrade group, according to the second liter If the first node needs to be upgraded, download the upgrade package from the first node according to the second upgrade instruction to upgrade, and save the upgrade package; the other one; send the third upgrade instruction. ''' °
  • scanning the neighboring node after the node device is upgraded includes: upgrading according to the received subsequent upgrade instruction, where the subsequent upgrade command includes the first node
  • the upgrading according to the received subsequent upgrade instruction includes: after receiving the subsequent upgrade instruction sent by the previous node, determining whether it needs to be upgraded; When it needs to be upgraded, it obtains the upgrade package from the previous node that sends the subsequent upgrade command; determines whether the upgrade condition is met according to its own load;
  • the processor 024 is further configured to execute the execution instruction, so that the node device performs the following method: when each node except the first node completes its own upgrade, reports the upgrade status of the neighboring node to the first node. ;
  • An embodiment of the present invention provides a node device, in a node network that needs to be upgraded, after receiving an upgrade instruction as a first node, grouping its neighbor nodes, and issuing an upgrade instruction to the first node of each group. Priority upgrade list. When the first node of each group is used, the nodes in the group are upgraded according to the upgrade command and the priority upgrade list.
  • the node upgrade status is scanned after the upgrade. If the upgraded node needs to be upgraded, the upgraded node only needs to have a path with the initial upgraded node to complete the upgrade, thereby improving the success rate of the upgrade, and implementing parallel upgrade of multiple nodes to improve the upgrade efficiency.
  • the disclosed methods and apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of cells is only a logical function partition, and the actual implementation may have another partition mode, or some features may be ignored or not executed.
  • the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a USB flash drive, a removable hard disk, and a read only memory (Read-Only Memory, Jane) It is called ROM), Random Access Memory (RAM), disk or optical disk, and other media that can store program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明的实施例提供一种升级方法和节点设备,涉及通信领域,其方法为:在需要升级的节点网络中,首节点在接收到第一升级指令后,将所有邻接节点分组,并向各分组的第一个节点发送第二升级指令和优先升级列表,各分组的第一个节点根据第二升级指令及优先升级列表将组内节点升级,除首节点外的每个节点在自身升级后扫描邻接节点升级情况并对需要升级节点进行升级,被升级节点只需要和初始升级节点存在通路就可以完成升级,从而提高了升级的成功率,而且实现了多个节点并行升级,提高了升级效率。本发明实施例用于网络中节点的快速升级。

Description

一种升级方法和节点设备 技术领域
本发明涉及通信领域, 尤其涉及一种升级方法和节点设备。
背景技术
目前数据中心的服务器中的软件升级已成为非常频繁的现象。 在现 有技术中, 服务器中软件或者固件的升级方式一般有以下几种: 一、 手 动升级所有节点; 二、 直接连接到升级网站自动升级; 三、 由统一管理 软件统一升级被管理的节点。 其中,手动升级所有节点需要管理人员手动将节点一个一个的升级, 升级效率非常低。 若采用连接到升级网站自动升级的方式, 由于安全等 原因, 并不是所有节点都可以连接到升级网站, 因此无法连接到升级网 站的节点就无法升级。 而采用统一管理软件升级被管理节点时, 需要节 点与该统一管理软件保持连接, 若由于网络问题连接断开就会导致升级 失败。 现有的几种软件升级方式都无法满足软件升级对效率和成功率的 要求。
发明内容
本发明的实施例提供一种升级方法和节点设备, 使被升级节点只需 要和初始升级节点存在通路就可以完成升级, 从而提高了升级的成功率, 而且实现了多个节点并行升级, 提高了升级效率。
为达到上述目的, 本发明的实施例采用如下技术方案: 第一方面, 提供一种升级方法, 包括:
首节点接收第一升级指令;
若所述首节点需要升级, 所述首节点根据所述第一升级指令下载升 级包进行升级, 并保存所述升级包;
所述首节点将所述首节点的所有邻接节点分为一个或多个升级组; 所述首节点向所述每个升级组中的第一节点发送第二升级指令及本 升级组的优先升级队列; 所述每个升级组中的第一节点根据所述第二升级指令及所述本升级 组的优先升级队列对本升级组中的节点进行升级;
除首节点外的每个节点在自身已升级后, 对自身的邻接节点进行扫 描, 并将所述自身的邻接节点中需要升级的节点根据所述升级包进行升 级。 在第一种可能的实现方式中, 所述首节点根据所述第一升级指令下 载升级包进行升级, 并保存所述升级包包括:
所述首节点根据自身的负载判断是否满足升级条件; 当满足升级条件时, 所述首节点根据所述第一升级指令下载所述升 级包进行升级, 并保存所述升级包;
当不满足升级条件时, 所述首节点再次根据自身的负载判断是否满 足升级条件, 直至满足升级条件并根据所述第一升级指令下载所述升级 包进行升级, 保存所述升级包。
结合第一方面或第一方面的第一种可能的实现方式, 在第二种可能 的实现方式中, 所述首节点将所述首节点的所有邻接节点分为一个或多 个升级组, 包括: 所述首节点将自身的所述每个邻接节点分别划分为一个升级组。 结合第一方面或第一方面的第一种可能的实现方式, 在第三种可能 的实现方式中, 所述首节点根据节点分组算法将所述首节点的所有邻接 节点分为一个或多个升级组, 包括:
所述首节点在拓朴图中屏蔽所述首节点与所述首节点的所有邻接节 点之间的链接; 在屏蔽所述链接之后, 所述首节点将所有邻接节点中链接数目最多 的节点与所述链接数目最多的节点的邻接节点分为一个升级组, 并确定 该升级组的优先升级队列, 其中, 所述链接数目最多的节点为该升级组 的所述第一节点, 所述优先升级队列为在该升级组的所述第一节点完成 升级后, 该升级组其余节点的升级顺序;
若所述首节点的所有邻接节点中除已分组节点外的剩余节点存在非 孤立节点, 则将所述除已分组节点外的剩余节点中链接数目最多的节点 与所述剩余节点中链接数目最多的节点的邻接节点分为一个升级组, 并 确定该升级组的优先升级队列, 直至所述首节点的所有邻接节点中除已 分组节点外的剩余节点都为孤立节点; 将所述剩余的每个孤立节点分别划分为一个升级组。
结合第一方面或第一方面的第一种至第三种任一可能的实现方式, 在第四种可能的实现方式中, 所述首节点向所述每个升级组中的第一节 点发送第二升级指令及本升级组的优先升级队列包括: 组中的第一节点发送所述第二升级指令及本升级组的优先升级队列。 结合第一方面或第一方面的第一种至第四种任一可能的实现方式, 在第五种可能的实现方式中, 所述每个升级组中的第一节点根据所述第 级, 包括:
若所述第一节点需要升级, 所述第一节点根据所述第二升级指令从 所述首节点下载所述升级包进行升级, 并保存所述升级包; 所述第一节点根据所述第二升级指令, 按照所述本升级组的优先升 级队列依次向本升级组中的其他节点发送第三升级指令。 结合第一方面的第五种可能的实现方式, 在第六种可能的实现方式 中, 所述除首节点外的每个节点在自身已升级后, 对自身的邻接节点进 行扫描包括:
所述除首节点外的每个节点根据所接收的后续升级指令进行升级, 其中所述后续升级指令为所述第二升级指令、 所述第三升级指令、 第四 升级指令中的任一升级指令; 所述除首节点外的每个节点在自身已升级后, 对自身的邻接节点进 行扫描, 得到自身的邻接节点的升级情况, 根据所述邻接节点的升级情 况向所述自身的邻接节点中需要升级的节点发送所述第四升级指令以便 所述需要升级的节点根据所述第四升级指令进行升级。
结合第一方面的第六种可能的实现方式, 在第七种可能的实现方式 中, 所述除首节点外的每个节点根据所接收的后续升级指令进行升级包 括:
所述除首节点外的每个节点接收到所述后续升级指令后, 判断自身 是否需要升级; 当自身需要升级时, 从发送所述后续升级指令的上一节点获取所述 升级包; 根据自身的负载判断是否满足升级条件;
当满足升级条件时, 根据所述后续升级指令进行升级, 并保存所述 升级包;
当不满足升级条件时, 再次判断是否满足升级条件, 直至满足升级 条件后, 根据所述后续升级指令进行升级, 且保存所述升级包。 结合第一方面或第一方面的第一种至第七种任一可能的实现方式, 在第八种可能的实现方式中, 所述方法还包括: 除首节点外的每个节点完成自身的升级后, 向所述首节点上报所述 自身的邻接节点的升级情况, 所述首节点根据接收到的所有节点的升级 情况判断是否有升级失败的节点, 如果有升级失败的节点, 则重新执行 将所有邻接节点分为一个或多个升级组及后续的升级流程, 直至所有节 点完成升级。
第二方面, 提供一种节点设备, 包括: 接收单元, 用于当所述节点设备作为首节点时, 接收第一升级指令; 还用于当所述节点设备不是首节点时, 接受后续升级指令, 所述后续升 级指令为第二升级指令、 第三升级指令中的一种; 升级单元, 用于若所述节点设备需要升级, 根据所述接收单元接收 的所述第一升级指令或后续升级指令下载升级包进行升级, 并保存所述 升级包;
扫描节点, 用于对自身的邻接节点进行扫描, 当所述节点设备不是 首节点时, 获取所述自身的邻接节点的升级情况;
分组单元, 用于当所述节点设备作为首节点时, 根据所述扫描节点 的扫描结果将所述首节点的所有邻接节点分为一个或多个升级组; 发送单元, 用于当所述节点设备作为首节点时, 根据所述分组单元 的分组结果, 向所述每个升级组中的第一节点发送所述第二升级指令及 该升级组的优先升级队列, 以使所述第一节点根据所述首节点发送的所 述第二升级指令及所述优先升级队列对本升级组中的节点进行升级; 还 用于当所述节点设备不是首节点时, 根据扫描节点获取的所述自身的邻 接节点的升级情况, 向所述自身的邻接节点中需要升级的节点发送所述 第三升级指令。 在第二方面的第一种可能的实现方式中, 所述升级单元, 具体用于: 根据自身的负载判断是否满足升级条件;
当满足升级条件时, 根据所述接收单元接收的所述第一升级指令或 后续升级指令下载所述升级包进行升级, 并保存所述升级包; 当不满足升级条件时,再次根据自身的负载判断是否满足升级条件, 直至满足升级条件并根据所述接收单元接收的所述第一升级指令或后续 升级指令下载所述升级包进行升级, 并保存所述升级包。
结合第二方面或第二方面的第一种可能的实现方式, 在第二种可能 的实现方式中, 所述分组单元具体用于:
当所述节点设备作为首节点时, 根据所述扫描节点的扫描结果将自 身的所述每个邻接节点分别划分为一个升级组。
结合第二方面或第二方面的第一种可能的实现方式, 在第三种可能 的实现方式中, 所述分组单元包括:
链接屏蔽子单元, 用于当所述节点设备作为首节点时, 根据所述扫 描节点单元的扫描结果在拓朴图中屏蔽所述首节点与所述首节点的所有 邻接节点之间的链接, 并将屏蔽后的各个节点的链接数发送至分组子单 元;
所述分组子单元, 用于当所述节点设备作为首节点时, 在所述链接 屏蔽子单元屏蔽所述链接之后, 将所有邻接节点中链接数目最多的节点 与所述链接数目最多的节点的邻接节点分为一个升级组, 并确定该升级 组的优先升级队列, 其中, 所述链接数目最多的节点为该升级组的所述 第一节点, 所述优先升级队列为在该升级组的所述第一节点完成升级后, 该升级组其余节点的升级顺序; 若所述首节点的所有邻接节点中除已分 组节点外的剩余节点存在非孤立节点, 则将所述除已分组节点外的剩余 节点中链接数目最多的节点与所述剩余节点中链接数目最多的节点的邻 接节点分为一个升级组, 并确定该升级组的优先升级队列, 直至所述首 节点的所有邻接节点中除已分组节点外的剩余节点都为孤立节点; 将所 述剩余的每个孤立节点分别划分为一个升级组。
结合第二方面或第二方面的第一种至第三种任一可能的实现方式, 在第四种可能的实现方式中, 所述发送单元, 用于当所述节点设备作为 首节点时, 根据所述分组单元的分组结果, 向所述每个升级组中的第一 节点发送所述第二升级指令及该升级组的优先升级队列, 具体为:
所述发送单元, 用于当所述节点设备作为首节点时, 根据所述分组 级组中的第一节点发送所述第二升级指令及该升级组的优先升级队列。
结合第二方面或第二方面的第一种至第四种任一可能的实现方式, 在第五种可能的实现方式中, 所述升级单元, 还用于: 当所述节点设备不是首节点时, 在完成自身的升级后, 向所述首节 点上报所述自身的邻接节点的升级情况; 当所述节点设备为首节点时, 根据接受的所有节点的升级情况判断是否有升级失败的节点, 如果有升 级失败的节点, 则重新执行将所有邻接节点分为一个或多个升级组及后 续的升级流程, 直至所有节点完成升级。
第三方面, 提供一种节点设备, 包括: 处理器和存储器, 所述存储器存储执行指令, 当所述节点设备运行 时, 所述处理器执行所述执行指令使得所述节点设备执行如下的方法: 当所述节点设备作为首节点时, 接收第一升级指令;
若所述首节点需要升级, 根据所述第一升级指令下载升级包进行升 级, 并保存所述升级包;
将所述首节点的所有邻接节点分为一个或多个升级组; 向每个所述升级组中的第一节点发送第二升级指令及本升级组的优 先升级队列; 当作用于所述每个升级组中的第一节点时, 根据所述第二升级指令
当作为除首节点以外的其他节点时, 在自身已升级后, 对自身的邻 接节点进行扫描, 并将所述自身的邻接节点中需要升级的节点根据所述 升级包进行升级。
在第三方面的第一种可能的实现方式中, 所述根据所述第一升级指 令下载升级包进行升级, 并保存所述升级包, 包括: 根据自身的负载判断是否满足升级条件; 当满足升级条件时, 根据 所述第一升级指令下载所述升级包进行升级, 并保存所述升级包; 当不满足升级条件时,再次根据自身的负载判断是否满足升级条件, 直至满足升级条件并根据所述第一升级指令下载所述升级包进行升级, 保存所述升级包。
结合第三方面或第三方面的第一种可能的实现方式, 在第二种可能 的实现方式中, 所述将所述首节点的所有邻接节点分为一个或多个升级 组, 包括:
将所述首节点的所述每个邻接节点分别划分为一个升级组。
结合第三方面或第三方面的第一种可能的实现方式, 在第三种可能 的实现方式中, 所述将所述首节点的所有邻接节点分为一个或多个升级 组, 包括:
在拓朴图中屏蔽所述首节点与所述首节点的所有邻接节点之间的链 接;
在屏蔽所述链接之后, 将所有邻接节点中链接数目最多的节点与所 述链接数目最多的节点的邻接节点分为一个升级组, 并确定该升级组的 优先升级队列, 其中, 所述链接数目最多的节点为该升级组的所述第一 节点, 所述优先升级队列为在该升级组的所述第一节点完成升级后, 该 升级组其余节点的升级顺序;
若所述首节点的所有邻接节点中除已分组节点外的剩余节点存在非 孤立节点, 则将所述除已分组节点外的剩余节点中链接数目最多的节点 与所述剩余节点中链接数目最多的节点的邻接节点分为一个升级组, 并 确定该升级组的优先升级队列, 直至所述首节点的所有邻接节点中除已 分组节点外的剩余节点都为孤立节点; 将所述每个剩余的孤立节点分别划分为一个升级组。
结合第三方面或第三方面的第一种至第三种任一可能的实现方式, 在第四种可能的实现方式中, 所述向所述每个升级组中的第一节点发送 第二升级指令及本升级组的优先升级队列包括:
节点发送所述第二升级指令及本升级组的优先升级队列。
结合第三方面或第三方面的第一种至第四种任一可能的实现方式, 在第五种可能的实现方式中, 所述根据所述第二升级指令及所述本升级 组的优先升级队列对本升级组中的节点进行升级, 包括: 若所述第一节点需要升级, 根据所述第二升级指令从所述首节点下 载所述升级包进行升级, 并保存所述升级包;
根据所述第二升级指令, 按照所述本升级组的优先升级队列依次向 本升级组中的其他节点发送第三升级指令。
结合第三方面或第三方面的第一种至第五种任一可能的实现方式, 在第六种可能的实现方式中, 所述在自身已升级后对自身的邻接节点进 行扫描, 包括: 根据所接收的后续升级指令进行升级, 其中所述后续升级指令为所 述第二升级指令、 所述第三升级指令、 第四升级指令中的任一升级指令; 在自身已升级后, 对自身的邻接节点进行扫描, 得到自身的邻接节 点的升级情况, 根据所述邻接节点的升级情况向所述自身的邻接节点中 需要升级的节点发送所述第四升级指令以便所述需要升级的节点根据所 述第四升级指令进行升级。
结合第三方面的第六种可能的实现方式, 在第七种可能的实现方式 中, 所述根据所接收的上一节点发送的升级指令进行升级包括:
接收到所述后续升级指令后, 判断自身是否需要升级; 当自身需要升级时, 从发送所述后续升级指令的上一节点获取所述 升级包; 根据自身的负载判断是否满足升级条件;
当满足升级条件时, 根据所述后续升级指令进行升级, 并保存所述 升级包;
当不满足升级条件时, 再次判断是否满足升级条件, 直至满足升级 条件后, 根据所述上一节点发送的升级指令进行升级, 且保存所述升级 包。
结合第三方面或第三方面的第一种至第七种任一可能的实现方式, 在第八种可能的实现方式中, 所述处理器还用于执行所述执行指令使得 所述节点设备执行如下的方法: 当作为除首节点外的每个节点时, 完成自身的升级后, 向所述首节 点上报所述自身的邻接节点的升级情况; 当作为所述首节点时, 根据接收到的所有节点的升级情况, 判断是 否有升级失败的节点, 如果有升级失败的节点, 则重新执将所有邻接节 点分为一个或多个升级组及后续的升级流程, 直至所有节点完成升级。 本发明的实施例提供一种升级方法和节点设备, 在需要升级的节点 网络中, 首节点在接收到升级指令后, 将自身相邻节点分组, 并向各分 组的第一个节点下达升级指令, 各分组的第一个节点将组内节点升级, 除首节点外的节点在自身升级后扫描与其相连的节点升级情况并对需要 升级节点进行升级, 被升级节点只需要和初始升级节点存在通路就可以 完成升级, 从而提高了升级的成功率, 而且实现了多个节点并行升级, 提高了升级效率。
附图说明
对实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见 地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技 术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得 其他的附图。 图 1为本发明实施例提供的一种升级方法的流程示意图; 图 2为本发明另一实施例提供的一种升级方法的流程示意图; 图 3为本发明实施例提供的节点分组示意图一;
图 4为本发明实施例提供的节点分组示意图二; 图 5为本发明实施例提供的节点分组示意图三;
图 6为本发明实施例提供的一种节点设备的结构示意图;
图 7为本发明实施例提供的另一种节点设备的结构示意图; 图 8为本发明另一实施例提供的一种节点设备的结构示意图。
具体实施方式 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案 进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实 施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术 人员在没有作出创造性劳动前提下所获得的所有其他实施例, 都属于本 发明保护的范围。 本发明实施例提供一种升级方法, 如图 1所示, 该方法包括:
5101、 首节点接收第一升级指令。 具体的, 该首节点可以是所有节点中的任意一个节点, 可以采用随 机方式或按照配置在各个节点中指定一个首节点, 也可以由系统自动或 人工来进行选取, 可以采用现有方法来指定, 本发明对此并不限制。 而 后, 首节点接收升级指令。
5102、 若首节点需要升级, 首节点根据第一升级指令下载升级包进 行升级, 并保存升级包。
具体的,首节点在接收到第一升级指令首先判断自身是否已经升级, 若升级则直接执行 S 103 ; 若首节点需要升级, 则下载升级包进行升级, 并保存升级包。
5103、 首节点将首节点的所有邻接节点分为一个或多个升级组。
5104、 首节点向每个升级组中的第一节点发送第二升级指令及本升 级组的优先升级队列, 以使第一节点根据第二升级指令及优先升级队列 对本升级组中的节点进行升级。
S 105、 每个升级组中的第一节点根据第二升级指令及本升级组的优 先升级队列对本升级组中的节点进行升级。
S 106、 除首节点外的每个节点在自身已升级后, 对自身的邻接节点 进行扫描, 并将自身的邻接节点中需要升级的节点根据升级包进行升级。 示例性的, 在完成分组后, 按照各组的优先级由高到低地将各组进 行逐组升级, 每个组在升级组内的节点时也要按照节点的优先级由高到 低地进行逐点升级。 需要说明的是, 这里的优先级可以是按照生成分组 的时间先后自动决定的, 即首先生成的分组具有最高的优先级, 最后生 成的分组具有最低的优先级, 当然也可以采用其他的方法确定各组的优 先级, 例如, 通过升级组中节点的数量来确定, 数量多的升级组优先级 高, 以加快升级的速度, 本发明对此并不限制。 组内每个节点在完成升 级后还要扫描自身的邻接节点, 并将邻接节点中需要升级的节点进行升 级, 这样就实现了多个节点的并行升级。 并且, 除首节点外的每个节点 在自身已升级后, 都会对自身的邻接节点进行扫描, 并将自身的邻接节 点中需要升级的节点根据升级包进行升级。 而且, 每个节点在升级完成 后都会保存升级包, 以便在下一个节点升级时将该升级包传给下一个节 点, 因此, 各节点只需要和首节点存在通路就可以完成升级。 其中, 上 述节点可以是服务器。 本发明的实施例提供一种升级的方法, 在需要升级的节点网络中, 首节点在接收到升级指令后, 将自身的相邻节点分组, 并向各分组的第 一个节点下达升级指令和优先升级列表, 各分组的第一个节点根据升级 指令优先升级列表将组内节点升级, 除首节点外的节点在自身升级后要 扫描与其相连的节点升级情况并对需要升级节点进行升级, 被升级节点 只需要和初始升级节点存在通路就可以完成升级, 从而提高了升级的成 功率, 而且实现了多个节点并行升级, 提高了升级效率。 本发明另一实施例提供一种升级的方法, 如图 2所示, 该方法包括:
S201、 首节点接收第一升级指令。 其中, 选择首节点可以由升级管理系统来完成, 具体的, 可以采用 随机方式或按照配置或由人工选取的方法在各个节点中指定一个首节 点, 这里升级管理系统可以是一个软件平台并运行在一种节点设备中, 该设备可以是一种嵌入式设备, 网络可以指局域网, 节点可以是服务器。 例如, 在数据中心的网络中, 有多台服务器需要升级软件或者固件, 该 数据中心的网络可以选择任意一台服务器作为升级的首节点。 在确定首 节点后, 升级管理系统就可以向该首节点下发升级指令。
5202、 首节点在接收第一升级指令后, 首节点判断自身是否需要升 级,当首节点不需要升级时,执行 S204;当首节点需要升级时,执行 S203。 首节点根据用户设定的标准判断自身是否需要升级,如果需要升级, 则执行 S203 ; 如果不需要升级, 则首节点不进行升级。 示例性的, 假设管理员设定的升级标准为在每周一上午 8点自动连 接 Microsoft官网检测 Windows Server 2008的系统补丁有无更新, 如果 检测到系统补丁的版本号高于服务器中已安装的补丁版本号, 则按照执 行 S2032进行升级步骤, 如果检测到系统补丁的版本号不高于服务器中 已安装的补丁版本号, 则不执行升级步骤。
5203、 首节点根据升级包进行升级并保存该升级包。 具体的, 节点 升级的方法可以包括以下步骤:
52031 , 首节点判断自身的负载是否允许升级, 如果负载允许首节点 升级, 则执行 S2032; 如果负载不允许首节点升级, 则再次执行 S2031 , 直至首节点的负载允许升级时为止, 并执行则执行 S2032。
52032、 首节点下载升级包, 根据升级包进行升级, 并保存升级包。
5204、 首节点将首节点的所有邻接节点分为一个或多个升级组。 具体的, 可以有以下几种实现方法:
第一种, 首节点可以将自身的每一个邻接节点分为一个组。 例如, 假设网络中有 1〜10共 10个节点, 其中节点 1为首节点, 节点 2〜节点 9 为节点 1的邻接节点, 与节点 1直接相连, 而节点 10为节点 5的邻接节 点, 如图 3所示。 根据上述方法可以将节点 2〜节点 9中每个节点分为一 组, 共得到 8个组, 而节点 10不分组。
或者, 第二种方法包括:
第一步, 首节点在拓朴图中屏蔽首节点与首节点的所有邻接节点之 间的链接。
第二步, 在屏蔽链接之后, 首节点将所有邻接节点中链接数目最多 的节点与链接数目最多的节点的邻接节点分为一个升级组, 并确定该组 的优先升级队列, 其中, 链接数目最多的节点为该升级组的第一节点, 优先升级队列为在该升级组的第一节点完成升级后, 该升级组其余节点 的升级顺序。 若除已分组节点外的剩余节点都为孤立节点, 则令首节点把每个孤 立节点分为一个组。 若首节点的所有邻接节点中除已分组节点外的剩余节点存在非孤立 节点, 则将除已分组节点外的剩余节点中链接数目最多的节点与剩余节 点中链接数目最多的节点的邻接节点分为一个升级组, 并确定该升级组 的优先升级队列, 直至首节点的所有邻接节点中除已分组节点外的剩余 节点都为孤立节点为止, 并将剩余的每个孤立节点分别划分为一个升级 组。
例如, 如图 3所示的 10个节点, 可以首先将节点 1与节点 1的邻接 节点之间的链接屏蔽掉, 即节点 1与节点 2〜节点 9之间的链接, 屏蔽掉 链接后的结果如图 4所示, 选出在将节点 1与节点 1 的邻接节点之间的 链接屏蔽掉后链接个数最多的节点, 有节点 4、 节点 2、 节点 5、 节点 6 , 将节点 4及节点 4的邻接节点分为一个组, 即将节点 4、 节点 3、 节点 5、 节点 6分为一个组, 标记为 A组, 而后屏蔽 A组内所有的节点, 删除后 的结果图 5所示, 而后将剩余的节点中链接最多的节点, 即节点 8和节 点 9分为一个组, 标记为 B组, 令剩余的孤立节点 2、 节点 7各自构成 一个组, 并标记为 C组、 D组, 由于节点 10不直接与节点 1相连, 因此, 此处不存在节点 10的分组。
或者, 还可以采用其他的算法进行分组, 例如还可以采用数据挖掘 算法, 例如 K-means算法这种典型的基于距离的聚类算法, 具体采用何 种算法可以根据实际需求来设置, 本实施例不做限定。
S205、 首节点向每个升级组中的第一节点发送第二升级指令及本升 级组的优先升级队列。 具体的, 在完成分组后, 首节点可以根据每个升级组的优先级顺序 依次向所述每个升级组中的第一节点发送所述第二升级指令及本升级组 的优先升级队列。 这里的优先级可以是按照生成分组的时间先后自动决 定的, 即首先生成的分组具有最高的优先级, 最后生成的分组具有最低 的优先级, 当然也可以采用其他的方法确定各组的优先级, 例如, 通过 升级组中节点的数量来确定, 数量多的升级组优先级高, 以加快升级的 速度, 本发明对此并不限制。
5206 , 每个升级组的第一节点根据第二升级指令及本升级组的优先 升级队列对本升级组中的节点进行升级。 各升级组的第一节点接收到第一节点发送的第二升级指令后, 判断 自身是否需要升级, 若需要升级, 则第一节点根据所述第二升级指令从 所述首节点下载所述升级包进行升级, 并保存所述升级包; 第一节点根据第二升级指令, 按照所接收的本升级组的优先升级队 列依次向本升级组中的其他节点发送第三升级指令, 以便其他节点根据 接收的升级指令进行升级。
5207、 除首节点外的每个节点在自身已升级后, 对自身的邻接节点 进行扫描, 并将自身的邻接节点中需要升级的节点进行升级。 具体的, 除首节点外的每个节点根据所接收的后续升级指令进行升 级, 这里的后续升级指令是指包括首节点发送给各升级组中的第一节点 的第二升级指令、 各第一节点发送给本升级组内的其他节点的第三升级 指令、 各节点发送给所搜索到的自身的邻接节点中需要升级的其他节点 的第四升级指令中的任一种升级指令; 除首节点外的每个节点在自身已 升级后, 对自身的邻接节点进行扫描, 得到自身的邻接节点的升级情况, 根据自身的邻接节点的升级情况向其中需要升级的节点发送第四升级指 令以便需要升级的节点根据第四升级指令进行升级。
当然, 除首节点外的每个节点在接收到后续升级指令后, 也可以先 判断自身是否需要升级, 当自身需要升级时, 从发送后续升级指令给自 己的上一个节点获取升级包, 并根据自身的负载判断是否满足升级条件。 当满足升级条件时, 根据后续升级指令进行升级, 并保存升级包; 当不 满足升级条件时, 再次判断是否满足升级条件, 直至满足升级条件后, 根据接收的后续升级指令进行升级, 且保存获取的升级包。 例如, 优先级最高的组内的第一节点为当前需要升级的节点, 简称 当前节点。 该当前节点在接收到上一级节点, 也就是首节点发送的升级 指令和本组节点的升级队列后, 该当前节点判断自身是否已升级。 当前 节点已升级时, 当前节点就扫描自身的邻接节点, 得到自身的邻接节点 的升级情况, 而后, 当前节点按照节点的优先升级队列向自身的邻接点 发送第三升级指令, 令当前节点的邻接点根据节点的优先升级队列和升 级包进行升级; 若当前节点需要升级时, 当前节点从上一节点, 即首节 点获取升级包。 而后, 当前节点根据自身的负载判断是否满足升级条件; 若满足升级条件, 则当前节点根据升级包进行升级, 并保存升级包; 若 当前节点不满足升级条件, 则当前节点再次判断是否满足升级条件, 直 至当前节点满足升级条件且根据升级包进行升级, 并保存升级包。 在完 成升级后, 当前节点需要上报其上一节点, 这里指首节点。 当当前节点完成升级后, 向节点的升级队列中规定的下一个节点发 送第三升级指令, 以便该下一个节点进行升级, 同时当前节点还要对自 身的邻接节点进行扫描, 查找自身的邻接节点中需要升级的节点, 并向 自身的邻接节点中需要升级的节点发送第四升级指令, 使这些需要升级 的节点进行升级。
接收到第三升级指令或第四升级指令的各节点, 在完成自身的升级 后, 对自身的邻接节点进行扫描, 查找自身的邻接节点中需要升级的节 点, 并向自身的邻接节点中需要升级的节点发送第四升级指令, 使这些 需要升级的节点进行升级。 当上述优先级最高的组内的所有节点升级完成后, 首节点向优先级 第二高的组的第一个节点发送第二升级指令和节点的优先升级队列, 使 该组内的节, 按照节点的优先升级队列进行升级, 具体方法与上述优先 级最高的组内的节点的升级方法完全相同, 不再贅述。
示例性的, 假设网络中有 1〜10共 10个节点, 其中节点 1为首节点, 节点 2〜节点 9为节点 1的邻接节点, 与节点 1直接相连, 而节点 10为节 点 5的邻接节点。
若分组时采用的是 S204中的第一种分组方法, 则分为 8个组, 每个 组内有一个节点, 分别为节点 2〜节点 9 , 节点 10不分组。 在完成分组后, 节点 1先向第一组发送升级指令, 即先升级节点 2 , 节点 2在完成升级后 上报给节点 1 , 节点 1向第二组发送升级指令, 即升级节点 3 , 同时节点 2扫描到其邻接节点 6需要升级, 所以节点 2向节点 6发送升级指令, 令 节点 6也升级, 这样就实现了节点 3与节点 6同时升级, 节点 3在完成 升级后上报给节点 1 , 而由于节点 6的升级并不是由节点 1下发的任务, 因此, 节点 6升级完后并不向节点 1上报, 而是向节点 2上报, 当然可 以再由节点 2向上级节点节点 1上报。 而后节点 1 向第三组发送升级指 令, 即升级节点 4 , 同时节点 6在完成升级后扫描到其邻接节点 7需要升 级, 所以节点 6向节点 7发送升级指令, 令节点 7也升级, 这样就实现 了节点 4与节点 7同时升级, 节点 4在完成升级后上报给节点 1 , 而由于 节点 7的升级并不是由节点 1 下发的任务, 因此, 节点 7升级完后并不 向节点 1上报, 而是向节点 6上报, 也可以由节点 6再向上级节点节点 2 上报。 而后节点 1向第四组发送升级指令, 即升级节点 5 , 节点 5在完成 升级后上报给节点 1 , 而此时节点 1发现第五组的节点 6和第六组的节 点 7 已完成升级, 此时, 可以是节点接收各节点逐级上报的结果得到的 相关升级情况信息, 当然, 也可以采用节点 1 自己扫描相邻节点的方法 获取相关升级情况信息, 或者是节点 1 向第五组的节点 6和第六组的节 点 7发送升级命令时发现节点 6、 7已完成了升级,本发明对此并不限制。 故节点 1向第七组发送升级指令, 即升级节点 8 , 同时节点 5在扫描到其 邻接节点 10需要升级后, 向节点 10发送升级指令, 令节点 10升级, 这 样就实现了节点 8与节点 10同时升级, 节点 8在完成升级后上报给节点 1 , 而由于节点 10的升级并不是由节点 1下发的任务, 因此, 节点 10升 级完后并不向节点 1 上报。 最后, 节点 1 向第八组发送升级指令, 令节 点 9升级。 这样就完成了所有节点的升级, 可以看出, 节点 3和节点 6、 节点 4和节点 7、 节点 8和节点 10是同时升级的, 节省了升级时间。
若分组时采用的是 S204中的第二种分组方法, 则分为 5个组, A组 包括: 节点 4、 节点 3、 节点 5和节点 6 , B组包括节点 8、 节点 9 , C包 括节点 2 , D组包括节点 7 , E组包括节点 10。
在完成分组后, 节点 1先向 A组的节点 4发送升级指令, 令节点 4 升级, 节点 4完成升级后上报节点 1 , 而后节点 4按照 A组的优先升级 队列向下一个节点, 即节点 3发送升级指令, 令节点 3升级, 同时节点 4 在扫描到其邻接节点 5 需要升级后, 向节点 5发送升级指令, 令节点 5 升级, 这样就实现了节点 3和节点 5 同时升级, 在节点 3和节点 5完成 升级后上报给节点 4以便节点 4上报给节点 1。 而后节点 4按照节点的优 先升级列表向节点 6发送升级指令, 令节点 6升级, 同时节点 5扫描到 其邻接节点 10需要升级后, 向节点 10发送升级指令, 令节点 10升级, 这样就实现了节点 6和节点 10同时升级, 节点 6在完成升级后上报给节 点 4以便节点 4上报给节点 1 , 而由于节点 10的升级并不是由节点 1下 发的任务, 因此, 节点 10升级完后并不向节点 4上报。 此时, 就完成了 A组的升级, 故节点 1向 B组的节点 8发送升级指令, 令节点 8升级, 同时节点 6在扫描到其邻接节点 2和邻接节点 7需要升级, 因此, 在节 点 8升级时, 节点 6向节点 2发送指令, 这样实现了节点 8和节点 2的 同时升级, 由于节点 2并不是节点 1下发的任务, 所以节点 6不向节点 4 上报。 节点 6向邻接节点 7发送升级指令, 同时节点 8根据 B组的优先 升级队列向下一个节点 9发送升级指令, 实现了节点 7与节点 9 的同时 升级, 由于节点 9的升级是节点 1给节点 8下发的任务, 节点 8 向节点 1上报节点 9 的升级情况。 节点 1依次向 C组节点 2和 D节点 Ί以及 E 组节点 10 下发升级指令时发现三个节点均已完成升级,从而本轮升级结 束。
这样就完成了所有节点的升级, 可以看出, 节点 3和节点 5、 节点 6 和节点 10、 节点 7和节点 9是同时升级的, 节省了升级时间。
S208、 首节点检查所有节点的升级情况, 判断是否有升级失败的节 点, 如果有升级失败的节点, 则重新执行 S204〜S207 , 直至所有节点完 成升级; 如果没有升级失败的节点则升级结束。
由于在除首节点外的每个节点完成升级后, 都会向首节点上报升级 情况, 首节点根据上报的升级情况判断是否有升级失败的节点。 例如, 可以通过以下方式实现: 每个节点完成升级后扫描自身的邻 接节点并生成邻接表 (该邻接表用于存储邻接节点的升级情况) , 每个 节点在生成邻接表后发送给首节点, 当所有节点执行过一次升级后, 首 节点也就得到了所有节点上报的邻接表, 而后首节点根据这些邻接表就 可以检查所有节点的升级情况, 从而判断出是否存在升级失败的节点。 本发明的实施例提供一种升级的方法, 在需要升级的节点网络中, 首节点在接收到升级指令后, 将扫描到的节点分组, 并向各分组的第一 个节点下达优先升级列表, 各分组的第一个节点根据优先升级列表将组 内节点升级, 分组内的节点在自身升级后要扫描与其相连的节点升级情 况并对需要升级节点进行升级, 被升级节点只需要和初始升级节点存在 通路就可以完成升级, 从而提高了升级的成功率, 而且实现了多个节点 并行升级, 提高了升级效率。
本发明又一实施例提供一种节点设备 01 , 如图 6所示, 包括: 接收单元 01 1 , 用于当所述节点设备作为首节点时, 接收第一升级 指令; 还用于当所述节点设备不是首节点时, 接受后续升级指令, 所述 后续升级指令为第二升级指令、 第三升级指令中的一种; 升级单元 012 , 用于若节点设备需要升级, 根据接收单元 01 1 接收 的第一升级指令或后续升级指令下载升级包进行升级, 并保存升级包; 扫描节点单元 013 , 用于对自身的邻接节点进行扫描, 当节点设备 不是首节点时, 获取自身的邻接节点的升级情况;
分组单元 014 , 用于当节点设备作为首节点时, 根据扫描节点单元 013的扫描结果将首节点的所有邻接节点分为一个或多个升级组;
发送单元 015 , 用于当节点设备作为首节点时, 根据分组单元 014 的分组结果, 向每个升级组中的第一节点发送第二升级指令及该升级组 的优先升级队列, 以使第一节点根据首节点发送的第二升级指令及优先 升级队列对本升级组中的节点进行升级; 还用于当节点设备不是首节点 时, 根据扫描节点单元 013 获取的自身的邻接节点的升级情况, 向自身 的邻接节点中需要升级的节点发送第三升级指令。
进一步的, 升级单元 012可以具体用于: 根据自身的负载判断是否满足升级条件;
当满足升级条件时, 根据接收单元 01 1接收的第一升级指令或后续 升级指令下载升级包进行升级, 并保存升级包; 当不满足升级条件时,再次根据自身的负载判断是否满足升级条件, 直至满足升级条件并根据接收单元 01 1 接收的第一升级指令或后续升级 指令下载升级包进行升级, 并保存升级包。 分组单元 014可以具体用于: 当节点设备作为首节点时, 根据扫描节点单元 013 的扫描结果将自 身的每个邻接节点分别划分为一个升级组。 或者进一步的, 如图 7所示, 分组单元 014可以包括:
链接屏蔽子单元 0141 , 用于当节点设备作为首节点时, 根据扫描节 点单元 013 的扫描结果在拓朴图中屏蔽首节点与首节点的所有邻接节点 之间的链接, 并将屏蔽后的各个节点的链接数发送至分组子单元 0142; 所述分组子单元 0142 , 用于当节点设备作为首节点时, 在链接屏蔽 子单元屏蔽链接之后, 将所有邻接节点中链接数目最多的节点与链接数 目最多的节点的邻接节点分为一个升级组, 并确定该升级组的优先升级 队列, 其中, 链接数目最多的节点为该升级组的第一节点, 优先升级队 列为在该升级组的第一节点完成升级后, 该升级组其余节点的升级顺序; 若首节点的所有邻接节点中除已分组节点外的剩余节点存在非孤立节 点, 则将除已分组节点外的剩余节点中链接数目最多的节点与剩余节点 中链接数目最多的节点的邻接节点分为一个升级组, 并确定该升级组的 优先升级队列, 直至首节点的所有邻接节点中除已分组节点外的剩余节 点都为孤立节点; 将所剩余的每个孤立节点分别划分为一个升级组。 再进一步的, 发送单元 015 , 用于当节点设备作为首节点时, 根据 分组单元 014 的分组结果, 向每个升级组中的第一节点发送第二升级指 令及该升级组的优先升级队列, 具体为: 发送单元 015 , 用于当节点设备作为首节点时, 根据分组单元 014 的分组结果, 根据升级组的优先级顺序依次向每个升级组中的第一节点 发送第二升级指令及该升级组的优先升级队列。
更进一步的, 升级单元 012还可以具体用于: 当节点设备不是首节点时, 在完成自身的升级后, 向首节点上报自 身的邻接节点的升级情况; 当节点设备为首节点时, 根据所有节点的升 级情况判断是否有升级失败的节点, 如果有升级失败的节点, 则重新执 行将所有邻接节点分为一个或多个升级组及后续的升级流程, 直至所有 节点完成升级。 本发明的实施例提供一种节点设备, 在需要升级的节点网络中, 节 点设备作为首节点在接收到升级指令后, 将所有邻接的节点分组, 并向 各分组的第一个节点下达优先升级列表, 节点设备作为各分组的第一个 节点根据优先升级列表将组内节点升级, 节点设备作为首节点以外的其 他节点在自身升级后扫描与其相连的节点升级情况并对需要升级节点进 行升级, 被升级节点只需要和初始升级节点存在通路就可以完成升级, 从而提高了升级的成功率, 而且实现了多个节点并行升级, 提高了升级 效率。 本发明实施例还提供另一种节点设备 02 , 包括处理器 024和存储器 023 ,如图 8所示, 当然,该设备还可以包括接收装置 021、发送装置 022 , 本发明对此并不限制。
存储器 023 , 用于存储执行指令;
处理器 024 , 用于当节点设备运行时, 执行所述执行指令使得节点 设备执行如下的方法:
当所述节点设备作为首节点时, 首节点接收第一升级指令;
若首节点需要升级, 根据第一升级指令下载升级包进行升级, 并保 存升级包; 将首节点的所有邻接节点分为一个或多个升级组;
向每个升级组中的第一节点发送第二升级指令及本升级组的优先升 级队列。 当节点设备作为每个升级组的第一节点时, 根据第二升级指令及本
当节点设备作为除首节点以外的其他节点时,用于在自身已升级后, 对自身的邻接节点进行扫描, 并将自身的邻接节点中需要升级的节点根 据升级包进行升级。 进一步的, 节点设备作为首节点时, 根据第一升级指令下载升级包 进行升级, 并保存所述升级包, 包括: 根据自身的负载判断是否满足升级条件; 当满足升级条件时, 根据 第一升级指令下载升级包进行升级, 并保存升级包; 当不满足升级条件时,再次根据自身的负载判断是否满足升级条件, 直至满足升级条件并根据第一升级指令下载升级包进行升级, 保存升级 包。
再进一步的, 节点设备作为首节点时, 将首节点的所有邻接节点分 为一个或多个升级组, 包括: 将自身的每个邻接节点分别划分为一个升级组。
或者, 节点设备作为首节点时, 将首节点的所有邻接节点分为一个 或多个升级组, 包括: 在拓朴图中屏蔽首节点与首节点的所有邻接节点之间的链接; 在屏蔽链接之后, 将所有邻接节点中链接数目最多的节点与链接数 目最多的节点的邻接节点分为一个升级组, 并确定该升级组的优先升级 队列, 其中, 链接数目最多的节点为该升级组的第一节点, 优先升级队 列为在该升级组的第一节点完成升级后, 该升级组其余节点的升级顺序; 若首节点的所有邻接节点中除已分组节点外的剩余节点存在非孤立 节点, 则将除已分组节点外的剩余节点中链接数目最多的节点与剩余节 点中链接数目最多的节点的邻接节点分为一个升级组, 并确定该升级组 的优先升级队列, 直至首节点的所有邻接节点中除已分组节点外的剩余 节点都为孤立节点; 将剩余的每个孤立节点分别划分为一个升级组。
再进一步的, 节点设备作为首节点时, 向每个升级组中的第一节点 发送第二升级指令及本升级组的优先升级队列, 包括: 第二升级指令及该升级组的优先升级队列。 更进一步的, 节点设备作为每个升级组的第一节点时, 根据第二升 若第一节点需要升级, 根据第二升级指令从首节点下载升级包进行 升级, 并保存升级包; 中的其他;点发送第三升级指令。 ' ' ' °
再进一步的, 当节点设备作为除首节点以外的其他节点时, 在自身 已升级后对自身的邻接节点进行扫描, 包括: 根据所接收的后续升级指令进行升级, 其中后续升级指令为包括首 节点发送给各升级组中的第一节点的第二升级指令、 各第一节点发送给 本升级组内的其他节点的第三升级指令、 各节点发送给所搜索到的自身 的邻接节点中需要升级的其他节点的第四升级指令中的任一种升级指 令;
在自身已升级后, 对自身的邻接节点进行扫描, 得到自身的邻接节 点的升级情况, 根据邻接节点的升级情况向自身的邻接节点中需要升级 的节点发送第四升级指令以便需要升级的节点根据第四升级指令进行升 级。
更进一步的, 当节点设备作为除首节点以外的其他节点时, 所述根 据所接收的后续升级指令进行升级, 包括: 接收到上一节点发送的后续升级指令后, 判断自身是否需要升级; 当自身需要升级时, 从发送后续升级指令的上一节点获取升级包; 根据自身的负载判断是否满足升级条件;
当满足升级条件时, 根据后续升级指令进行升级, 并保存升级包; 当不满足升级条件时, 再次判断是否满足升级条件, 直至满足升级 条件后, 根据后续升级指令进行升级, 且保存升级包。
再进一步的, 处理器 024还用于执行执行指令使得节点设备执行如 下的方法: 当作为除首节点外的每个节点时, 完成自身的升级后, 向首节点上 报自身的邻接节点的升级情况;
当作为首节点时, 根据接收到的所有节点的升级情况, 判断是否有 升级失败的节点, 如果有升级失败的节点, 则重新执将所有邻接节点分 为一个或多个升级组及后续的升级流程, 直至所有节点完成升级。 本发明的实施例提供一种节点设备, 在需要升级的节点网络中, 在 作为首节点接收到升级指令后, 将自身的相邻节点分组, 并向各分组的 第一个节点下达升级指令和优先升级列表, 在作为各分组的第一个节点 时, 根据升级指令和优先升级列表将组内节点升级, 在作为除首节点以 外的节点时, 在自身升级后扫描与其相连的节点升级情况并对需要升级 节点进行升级, 被升级节点只需要和初始升级节点存在通路就可以完成 升级, 从而提高了升级的成功率, 而且实现了多个节点并行升级, 提高 了升级效率。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的方法和装 置, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是 示意性的, 例如, 单元的划分, 仅仅为一种逻辑功能划分, 实际实现时 可以有另外的划分方式, 或一些特征可以忽略, 或不执行。 另一点, 所 显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接 口, 装置或单元的间接耦合或通信连接, 可以是电性, 机械或其它的形 式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开 的, 作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于 一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选 择其中的部分或者全部单元来实现本实施例方案的目的。 另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单 元中, 也可以是各个单元单独物理包括, 也可以两个或两个以上单元集 成在一个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以 采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元, 可以存储在一个计 算机可读取存储介质中。 上述软件功能单元存储在一个存储介质中, 包 括若干指令用以使得一台计算机设备 (可以是个人计算机, 服务器, 或 者网络设备等) 执行本发明各个实施例所述方法的部分步骤。 而前述的 存储介质包括: U盘、 移动硬盘、 只读存储器 (Read-Only Memory, 简 称 ROM ) 、 随机存取存储器 ( Random Access Memory, 简称 RAM ) 、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不 局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本 发明的保护范围应以所述权利要求的保护范围为准。

Claims

权 利 要 求 书
1、 一种升级方法, 其特征在于, 包括:
首节点接收第一升级指令;
若所述首节点需要升级, 所述首节点根据所述第一升级指令下 载升级包进行升级, 并保存所述升级包;
所述首节点将所述首节点的所有邻接节点分为一个或多个升级 组;
所述首节点向所述每个升级组中的第一节点发送第二升级指令及 本升级组的优先升级队列;
所述每个升级组中的第一节点根据所述第二升级指令及所述本升级 组的优先升级队列对本升级组中的节点进行升级;
除首节点外的每个节点在自身已升级后, 对自身的邻接节点进行 扫描, 并将所述自身的邻接节点中需要升级的节点根据所述升级包 进行升级。
2、 根据权利要求 1所述的方法, 其特征在于, 所述首节点根据所述 第一升级指令下载升级包进行升级, 并保存所述升级包, 包括:
所述首节点根据自身的负载判断是否满足升级条件;
当满足升级条件时, 所述首节点根据所述第一升级指令下载所述升 级包进行升级, 并保存所述升级包;
当不满足升级条件时, 所述首节点再次根据自身的负载判断是否满 足升级条件, 直至满足升级条件并根据所述第一升级指令下载所述升级 包进行升级, 保存所述升级包。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述首节点将所 述首节点的所有邻接节点分为一个或多个升级组, 包括:
所述首节点将自身的所述每个邻接节点分别划分为一个升级组。
4、 根据权利要求 1或 2所述的方法, 其特征在于, 所述首节点将所 述首节点的所有邻接节点分为一个或多个升级组, 包括:
所述首节点在拓朴图中屏蔽所述首节点与所述首节点的所有邻接节 点之间的链接;
在屏蔽所述链接之后, 所述首节点将所有邻接节点中链接数目最多 的节点与所述链接数目最多的节点的邻接节点分为一个升级组, 并确定 该升级组的优先升级队列, 其中, 所述链接数目最多的节点为该升级组 的所述第一节点, 所述优先升级队列为在该升级组的所述第一节点完成 升级后, 该升级组其余节点的升级顺序;
若所述首节点的所有邻接节点中除已分组节点外的剩余节点存在非 孤立节点, 则将所述除已分组节点外的剩余节点中链接数目最多的节点 与所述剩余节点中链接数目最多的节点的邻接节点分为一个升级组, 并 确定该升级组的优先升级队列, 直至所述首节点的所有邻接节点中除已 分组节点外的剩余节点都为孤立节点;
将所述剩余的每个孤立节点分别划分为一个升级组。
5、 根据权利要求 1至 4任意一项所述的方法, 其特征在于, 所述首 节点向所述每个升级组中的第一节点发送第二升级指令及本升级组的优 先升级队列包括: 组中的第一节点发送所述第二升级指令及本升级组的优先升级队列。
6、 根据权利要求 1至 5任意一项所述的方法, 其特征在于, 所述每 个升级组中的第一节点根据所述第二升级指令及所述本升级组的优先升 级队列对本升级组中的节点进行升级, 包括:
若所述第一节点需要升级, 所述第一节点根据所述第二升级指令从 所述首节点下载所述升级包进行升级, 并保存所述升级包;
所述第一节点根据所述第二升级指令, 按照所述本升级组的优先升 级队列依次向本升级组中的其他节点发送第三升级指令。
7、 根据权利要求 1至 6任意一项所述的方法, 其特征在于, 所述除 首节点外的每个节点在自身已升级后, 对自身的邻接节点进行扫描包括: 所述除首节点外的每个节点根据所接收的后续升级指令进行升级, 其中所述后续升级指令为所述第二升级指令、 所述第三升级指令、 第四 升级指令中的任一升级指令;
所述除首节点外的每个节点在自身已升级后, 对自身的邻接节点进 行扫描, 得到自身的邻接节点的升级情况, 根据所述邻接节点的升级情 况向所述自身的邻接节点中需要升级的节点发送所述第四升级指令以便 所述需要升级的节点根据所述第四升级指令进行升级。
8、 根据权利要求 7所述的方法, 其特征在于, 所述除首节点外的每 个节点根据所接收的后续升级指令进行升级包括:
所述除首节点外的每个节点接收到所述后续升级指令后, 判断自身 是否需要升级;
当自身需要升级时, 从发送所述后续升级指令的上一节点获取所述 升级包;
根据自身的负载判断是否满足升级条件;
当满足升级条件时, 根据所述后续升级指令进行升级, 并保存所述 升级包;
当不满足升级条件时, 再次判断是否满足升级条件, 直至满足升级 条件后, 根据所述后续升级指令进行升级, 且保存所述升级包。
9、 根据权利要求 1至 8任意一项所述的方法, 其特征在于, 所述方 法还包括:
除首节点外的每个节点完成自身的升级后, 向所述首节点上报所述 自身的邻接节点的升级情况, 所述首节点根据接收到的所有节点的升级 情况判断是否有升级失败的节点, 如果有升级失败的节点, 则重新执行 将所有邻接节点分为一个或多个升级组及后续的升级流程, 直至所有节 点完成升级。
10、 一种节点设备, 其特征在于, 包括:
接收单元, 用于当所述节点设备作为首节点时, 接收第一升级指令; 还用于当所述节点设备不是首节点时, 接受后续升级指令, 所述后续升 级指令为第二升级指令、 第三升级指令中的一种;
升级单元, 用于若所述节点设备需要升级, 根据所述接收单元接收 的所述第一升级指令或后续升级指令下载升级包进行升级, 并保存所述 升级包;
扫描节点单元, 用于对自身的邻接节点进行扫描, 当所述节点设备 不是首节点时, 获取所述自身的邻接节点的升级情况;
分组单元, 用于当所述节点设备作为首节点时, 根据所述扫描节点 单元的扫描结果将所述首节点的所有邻接节点分为一个或多个升级组; 发送单元, 用于当所述节点设备作为首节点时, 根据所述分组单元 的分组结果, 向所述每个升级组中的第一节点发送所述第二升级指令及 该升级组的优先升级队列, 以使所述第一节点根据所述首节点发送的所 述第二升级指令及所述优先升级队列对本升级组中的节点进行升级; 还 用于当所述节点设备不是首节点时, 根据扫描节点单元获取的所述自身 的邻接节点的升级情况, 向所述自身的邻接节点中需要升级的节点发送 所述第三升级指令。
1 1、根据权利要求 10所述的节点设备, 其特征在于, 所述升级单元, 具体用于:
根据自身的负载判断是否满足升级条件;
当满足升级条件时, 根据所述接收单元接收的所述第一升级指令或 后续升级指令下载所述升级包进行升级, 并保存所述升级包;
当不满足升级条件时, 再次根据自身的负载判断是否满足升级条件, 直至满足升级条件并根据所述接收单元接收的所述第一升级指令或后续 升级指令下载所述升级包进行升级, 并保存所述升级包。
12、 根据权利要求 10或 1 1 所述的节点设备, 其特征在于, 所述分 组单元具体用于:
当所述节点设备作为首节点时, 根据所述扫描节点单元的扫描结果 将自身的所述每个邻接节点分别划分为一个升级组。
13、 根据权利要求 10或 1 1 所述的节点设备, 其特征在于, 所述分 组单元包括:
链接屏蔽子单元, 用于当所述节点设备作为首节点时, 根据所述扫 描节点单元的扫描结果在拓朴图中屏蔽所述首节点与所述首节点的所有 邻接节点之间的链接, 并将屏蔽后的各个节点的链接数发送至分组子单 元;
所述分组子单元, 用于当所述节点设备作为首节点时, 在所述链接 屏蔽子单元屏蔽所述链接之后, 将所有邻接节点中链接数目最多的节点 与所述链接数目最多的节点的邻接节点分为一个升级组, 并确定该升级 组的优先升级队列, 其中, 所述链接数目最多的节点为该升级组的所述 第一节点, 所述优先升级队列为在该升级组的所述第一节点完成升级后, 该升级组其余节点的升级顺序; 若所述首节点的所有邻接节点中除已分 组节点外的剩余节点存在非孤立节点, 则将所述除已分组节点外的剩余 节点中链接数目最多的节点与所述剩余节点中链接数目最多的节点的邻 接节点分为一个升级组, 并确定该升级组的优先升级队列, 直至所述首 节点的所有邻接节点中除已分组节点外的剩余节点都为孤立节点; 将所 述剩余的每个孤立节点分别划分为一个升级组。
14、 根据权利要求 10至 13任意一项所述的节点设备, 其特征在于, 所述发送单元, 用于当所述节点设备作为首节点时, 根据所述分组单元 的分组结果, 向所述每个升级组中的第一节点发送所述第二升级指令及 该升级组的优先升级队列, 具体为:
所述发送单元, 用于当所述节点设备作为首节点时, 根据所述分组 级组中的第一节点发送所述第二升级指令及该升级组的优先升级队列。
15、 根据权利要求 10至 14任意一项所述的节点设备, 其特征在于, 所述升级单元还用于:
当所述节点设备不是首节点时, 在完成自身的升级后, 向所述首节 点上报所述自身的邻接节点的升级情况; 当所述节点设备为首节点时, 根据接收的所有节点的升级情况判断是否有升级失败的节点, 如果有升 级失败的节点, 则重新执行将所有邻接节点分为一个或多个升级组及后 续的升级流程, 直至所有节点完成升级。
16、 一种节点设备, 其特征在于, 包括:
处理器和存储器, 所述存储器用于存储执行指令, 当所述节点设备 运行时, 所述处理器用于执行所述执行指令使得所述节点设备执行如下 的方法:
当所述节点设备作为首节点时,
接收第一升级指令;
若所述首节点需要升级, 根据所述第一升级指令下载升级包进行升 级, 并保存所述升级包;
将所述首节点的所有邻接节点分为一个或多个升级组;
向每个所述升级组中的第一节点发送第二升级指令及本升级组的优 先升级队列;
当所述节点设备作为所述每个升级组中的第一节点时, 根据所述第 级; 、' 、 ' 、 、
当所述节点设备作为除首节点以外的其他节点时, 在自身已升级后, 对自身的邻接节点进行扫描, 并将所述自身的邻接节点中需要升级的节 点根据所述升级包进行升级。
17、 根据权利要求 16所述的节点设备, 其特征在于, 所述根据所述 第一升级指令下载升级包进行升级, 并保存所述升级包, 包括:
根据自身的负载判断是否满足升级条件; 当满足升级条件时, 根据 所述第一升级指令下载所述升级包进行升级, 并保存所述升级包; 当不满足升级条件时, 再次根据自身的负载判断是否满足升级条件, 直至满足升级条件并根据所述第一升级指令下载所述升级包进行升级, 保存所述升级包。
18、 根据权利要求 16或 17所述的节点设备, 其特征在于, 所述将 所述首节点的所有邻接节点分为一个或多个升级组, 包括:
将所述首节点的所述每个邻接节点分别划分为一个升级组。
19、 根据权利要求 16或 17所述的节点设备, 其特征在于, 所述将 所述首节点的所有邻接节点分为一个或多个升级组, 包括:
在拓朴图中屏蔽所述首节点与所述首节点的所有邻接节点之间的链 接;
在屏蔽所述链接之后, 将所有邻接节点中链接数目最多的节点与所 述链接数目最多的节点的邻接节点分为一个升级组, 并确定该升级组的 优先升级队列, 其中, 所述链接数目最多的节点为该升级组的所述第一 节点, 所述优先升级队列为在该升级组的所述第一节点完成升级后, 该 升级组其余节点的升级顺序;
若所述首节点的所有邻接节点中除已分组节点外的剩余节点存在非 孤立节点, 则将所述除已分组节点外的剩余节点中链接数目最多的节点 与所述剩余节点中链接数目最多的节点的邻接节点分为一个升级组, 并 确定该升级组的优先升级队列, 直至所述首节点的所有邻接节点中除已 分组节点外的剩余节点都为孤立节点;
将所述剩余的每个孤立节点分别划分为一个升级组。
20、 根据权利要求 16至 19任意一项所述的节点设备, 其特征在于, 所述向所述每个升级组中的第一节点发送第二升级指令及本升级组的优 先升级队列包括: 节点发送所述第二升级指令及本升级组的优先升级队列。
21、 根据权利要求 16至 20任意一项所述的节点设备, 其特征在于, 中的节点进行升级, 包括:
若所述第一节点需要升级, 根据所述第二升级指令从所述首节点下 载所述升级包进行升级, 并保存所述升级包; 根据所述第二升级指令, 按照所述本升级组的优先升级队列依次向 本升级组中的其他节点发送第三升级指令。
22、 根据权利要求 16至 21任意一项所述的节点设备, 其特征在于, 所述在自身已升级后对自身的邻接节点进行扫描, 包括:
根据所接收的后续升级指令进行升级, 其中所述后续升级指令为所 述第二升级指令、 所述第三升级指令、 第四升级指令中的任一升级指令; 在自身已升级后, 对自身的邻接节点进行扫描, 得到自身的邻接节 点的升级情况, 根据所述邻接节点的升级情况向所述自身的邻接节点中 需要升级的节点发送所述第四升级指令以便所述需要升级的节点根据所 述第四升级指令进行升级。
23、 根据权利要求 22所述的节点设备, 其特征在于, 所述根据所接 收的后续升级指令进行升级包括:
接收到所述后续升级指令后, 判断自身是否需要升级;
当自身需要升级时, 从发送所述后续升级指令的上一节点获取所述 升级包;
根据自身的负载判断是否满足升级条件;
当满足升级条件时, 根据所述后续升级指令进行升级, 并保存所述 升级包;
当不满足升级条件时, 再次判断是否满足升级条件, 直至满足升级 条件后, 根据所述后续升级指令进行升级, 且保存所述升级包。
24、 根据权利要求 16至 23任意一项所述的节点设备, 其特征在于, 所述处理器还用于执行所述执行指令使得所述节点设备执行如下的方 法:
当作为除首节点外的每个节点时, 完成自身的升级后, 向所述首节 点上报所述自身的邻接节点的升级情况;
当作为所述首节点时, 根据接收到的所有节点的升级情况, 判断是 否有升级失败的节点, 如果有升级失败的节点, 则重新执行将所有邻接 节点分为一个或多个升级组及后续的升级流程, 直至所有节点完成升级。
PCT/CN2012/084915 2012-11-20 2012-11-20 一种升级方法和节点设备 WO2014078992A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2012/084915 WO2014078992A1 (zh) 2012-11-20 2012-11-20 一种升级方法和节点设备
CN201280002739.5A CN104471894B (zh) 2012-11-20 2012-11-20 一种升级方法和节点设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/084915 WO2014078992A1 (zh) 2012-11-20 2012-11-20 一种升级方法和节点设备

Publications (1)

Publication Number Publication Date
WO2014078992A1 true WO2014078992A1 (zh) 2014-05-30

Family

ID=50775378

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/084915 WO2014078992A1 (zh) 2012-11-20 2012-11-20 一种升级方法和节点设备

Country Status (2)

Country Link
CN (1) CN104471894B (zh)
WO (1) WO2014078992A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019245884A1 (en) * 2018-06-21 2019-12-26 Microsoft Technology Licensing, Llc Memory-efficient upgrade staging

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107589956B (zh) * 2017-10-24 2023-08-22 杨鲲 一种分布式优先级镜像页ota固件升级方法及系统
CN110737453A (zh) * 2019-10-17 2020-01-31 北京智芯微电子科技有限公司 安全芯片的升级方法、装置及安全芯片
CN111124451A (zh) * 2019-12-24 2020-05-08 山东有人信息技术有限公司 一种分布式备份升级方法
CN113055216B (zh) * 2019-12-27 2022-06-03 广东博智林机器人有限公司 网状网络升级方法及系统、计算机装置及存储介质
CN112905215A (zh) * 2020-03-31 2021-06-04 国网浙江省电力有限公司电力科学研究院 一种基于双模通信的软件升级方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1668009A (zh) * 2004-03-12 2005-09-14 微软公司 用于分发软件的更新分发系统的体系结构和方法
US7139780B2 (en) * 2002-10-04 2006-11-21 Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. System and method for synchronizing files in multiple nodes
CN101060427A (zh) * 2006-04-19 2007-10-24 华为技术有限公司 实现远程软件升级的系统及方法
CN102025756A (zh) * 2009-09-09 2011-04-20 中兴通讯股份有限公司 分布式系统及其数据同步方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7139780B2 (en) * 2002-10-04 2006-11-21 Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. System and method for synchronizing files in multiple nodes
CN1668009A (zh) * 2004-03-12 2005-09-14 微软公司 用于分发软件的更新分发系统的体系结构和方法
CN101060427A (zh) * 2006-04-19 2007-10-24 华为技术有限公司 实现远程软件升级的系统及方法
CN102025756A (zh) * 2009-09-09 2011-04-20 中兴通讯股份有限公司 分布式系统及其数据同步方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019245884A1 (en) * 2018-06-21 2019-12-26 Microsoft Technology Licensing, Llc Memory-efficient upgrade staging
US10860302B2 (en) 2018-06-21 2020-12-08 Microsoft Technology Licensing, Llc Memory-efficient upgrade staging
CN112313617A (zh) * 2018-06-21 2021-02-02 微软技术许可有限责任公司 存储器高效的升级暂存

Also Published As

Publication number Publication date
CN104471894A (zh) 2015-03-25
CN104471894B (zh) 2018-02-09

Similar Documents

Publication Publication Date Title
WO2014078992A1 (zh) 一种升级方法和节点设备
US11153148B2 (en) Resource state monitoring method, device and communication network
US10382283B2 (en) Network topology estimation based on event correlation
JP5128708B2 (ja) 持続型ポートコンフィギュレーションを備えたsasコントローラ
WO2019028992A1 (zh) 多模块版本依赖关系构建方法、装置、服务器和存储介质
CN112470119B (zh) 一种分布式系统中的业务升级方法、装置及分布式系统
US8305934B2 (en) Computer program, apparatus, and method for managing network
EP2800306B1 (en) Rule set arrangement processing method and apparatus, and trunking data system
CN106657167B (zh) 管理服务器、服务器集群、以及管理方法
CN109981405B (zh) 节点管理方法、装置及计算机可读存储介质
CN106302569A (zh) 处理虚拟机集群的方法和计算机系统
WO2018137520A1 (zh) 一种业务恢复方法及装置
EP4024765A1 (en) Method and apparatus for extracting fault propagation condition, and storage medium
JP5617304B2 (ja) スイッチング装置、情報処理装置および障害通知制御プログラム
US9515886B2 (en) Rule set orchestration processing method and apparatus, and cluster data system
WO2020010906A1 (zh) 操作系统os批量安装方法、装置和网络设备
CN111277628A (zh) 服务器配置方法、装置及业务服务器
CN107463390B (zh) 一种软件升级方法及升级服务器
CN115001990A (zh) 一种基于声明式API的跨地域openstack集群管理方法及系统
CN107995047A (zh) 一种数据中心的拓扑组网方法及装置
US11881997B1 (en) Determining reorder commands for remote reordering of policy rules
US11119753B2 (en) Distributed autonomous patching system
US11411829B1 (en) Provisioning managed network nodes and/or managing network nodes
JP2019508975A (ja) ハイパースケール環境における近隣監視
CN108170577B (zh) 服务器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12888634

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC OF 101115

122 Ep: pct application non-entry in european phase

Ref document number: 12888634

Country of ref document: EP

Kind code of ref document: A1