CN117650984A - Equipment upgrading method and device, electronic equipment and storage medium - Google Patents
Equipment upgrading method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN117650984A CN117650984A CN202311498305.5A CN202311498305A CN117650984A CN 117650984 A CN117650984 A CN 117650984A CN 202311498305 A CN202311498305 A CN 202311498305A CN 117650984 A CN117650984 A CN 117650984A
- Authority
- CN
- China
- Prior art keywords
- upgrade
- layer
- data packet
- devices
- upgrade data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0823—Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
- H04L41/0836—Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability to enhance reliability, e.g. reduce downtime
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/085—Retrieval of network configuration; Tracking network configuration history
- H04L41/0853—Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明提供一种设备升级方法、装置、电子设备及存储介质,涉及网络通信技术领域。采用本发明实施例提供的设备升级方法,多层逐层级连接设备中的设备可以进行批量升级,第一设备在获取到升级数据包之后,转发至下一层的设备,并且第一设备在接收到升级数据包之后,可以先进行升级,但是不进行重启,在确定下一层的所有设备成功接收到升级数据包并完成升级重启的情况下之后再进行重启。具体实施时,每一层的设备都在确定下一层的设备成功接收到升级数据包之后再进行重启,则可以保证多层设备中的每一个设备都成功接收到升级数据包并成功完成设备升级,本发明实施例中,逐层设备执行重启,保证了整个网络拓扑设备都成功接收升级数据包并执行升级重启,完成设备的批量升级。
The invention provides an equipment upgrade method, device, electronic equipment and storage medium, and relates to the technical field of network communication. Using the device upgrade method provided by the embodiment of the present invention, devices in multi-layer-by-layer connected devices can be upgraded in batches. After the first device obtains the upgrade data packet, it forwards it to the device on the next layer, and the first device After receiving the upgrade data packet, you can upgrade first, but do not restart. Restart after confirming that all devices on the next layer have successfully received the upgrade data packet and completed the upgrade and restart. During the specific implementation, the devices at each layer will restart after confirming that the device at the next layer has successfully received the upgrade data packet. This can ensure that each device in the multi-layer device successfully receives the upgrade data packet and successfully completes the device upgrade. Upgrade, in the embodiment of the present invention, the devices are restarted layer by layer, ensuring that the entire network topology device successfully receives the upgrade data packet and performs the upgrade restart, completing the batch upgrade of the devices.
Description
技术领域Technical field
本发明实施例涉及网络通信技术领域,具体而言,涉及一种设备升级方法、装置、电子设备及存储介质。Embodiments of the present invention relate to the field of network communication technology, and specifically to an equipment upgrade method, device, electronic equipment and storage medium.
背景技术Background technique
随着网络技术的发展,网络设备通信架构越来越复杂,常常出现多层逐层级连接的设备群,目前针对这种多层逐层级连接的设备群中的设备进行升级常用的方式有单设备升级和多设备批量升级,其中,单设备升级主要步骤为:每个设备获取完整升级数据包后进行升级,如果设备获取到的升级数据包不完整,则重复向上层请求升级数据包,可见,这种方式升级效率较低。多设备批量升级主要步骤为:管理服务器一次性下发批量升级设备所需的升级数据包,由多层逐层级连接设备进行逐层级的数据转发,每个设备在获取到完整的升级数据包之后即可进行升级重启,然而,上层接入的设备完成升级重启后,将会导致与下层级设备的连接中断,如果此时下层级的设备尚未接收完升级数据,就需要重新请求数据包,导致升级效率低下。With the development of network technology, the communication architecture of network equipment is becoming more and more complex, and multi-layer and layer-by-layer connected device groups often appear. Currently, the common methods for upgrading the devices in this multi-layer and layer-by-layer connected device group are: Single device upgrade and multi-device batch upgrade. The main steps of single device upgrade are: each device obtains a complete upgrade data package and then performs the upgrade. If the upgrade data package obtained by the device is incomplete, it repeatedly requests the upgrade data package from the upper layer. It can be seen that the upgrade efficiency of this method is low. The main steps of multi-device batch upgrade are: the management server delivers the upgrade data packets required for batch upgrade of devices at one time, and the devices are connected layer by layer through multiple layers to forward the data layer by layer. Each device obtains the complete upgrade data. After receiving the package, you can upgrade and restart. However, after the upper-layer connected device completes the upgrade and restarts, the connection with the lower-layer device will be interrupted. If the lower-layer device has not received the upgrade data at this time, it needs to request the data package again. This results in inefficient upgrades.
由此可见,目前继续一种新的对多层逐层级连接设备进行升级的方法。It can be seen that a new method of upgrading multi-layer connected devices layer by layer is currently being used.
发明内容Contents of the invention
为解决上述问题,本发明提供一种设备升级方法、装置、电子设备及存储介质。In order to solve the above problems, the present invention provides an equipment upgrade method, device, electronic equipment and storage medium.
本发明实施例第一方面提供一种设备升级方法,所述方法包括:A first aspect of an embodiment of the present invention provides a device upgrade method. The method includes:
第一设备获取升级数据包,并发送所述升级数据包;所述第一设备为多层逐层级连接设备中的非底层设备;The first device obtains the upgrade data packet and sends the upgrade data packet; the first device is a non-bottom device among the multi-layer-by-layer connection devices;
所述第一设备基于MAC拓扑结构确定是否接收到下一层所有设备的升级成功指令;The first device determines whether it has received upgrade success instructions from all devices on the next layer based on the MAC topology;
在接收到下一层所有设备的升级成功指令的情况下,所述第一设备进行重启完成设备升级,并发送升级成功指令至上一层设备。After receiving the upgrade success instructions of all devices on the next layer, the first device restarts to complete the device upgrade, and sends the upgrade success instructions to the devices on the upper layer.
可选地,在所述第一设备为多层逐层级连接设备中最后一层的设备的情况下,所述第一设备基于MAC拓扑结构确定当前设备为多层逐层级连接设备中最后一层的设备;获取升级数据包后进行设备升级,升级完成后进行设备重启,重启成功后确定完成设备升级,发送升级成功指令至上一层设备。Optionally, in the case where the first device is the device of the last layer among the multi-layer connected devices, the first device determines based on the MAC topology structure that the current device is the last device of the multi-layer connected devices. A layer of equipment; upgrade the device after obtaining the upgrade data package, restart the device after the upgrade is completed, confirm that the device upgrade is completed after the restart is successful, and send an upgrade success command to the upper layer device.
可选地,第一设备获取升级数据包,并发送所述升级数据包,包括:Optionally, the first device obtains the upgrade data packet and sends the upgrade data packet, including:
确定第一设备对应的直播通道,所述直播通道是基于设备升级管理服务器至第一设备的传输路径上的各个设备的信息建立的;Determine the live broadcast channel corresponding to the first device, where the live broadcast channel is established based on the information of each device on the transmission path from the device upgrade management server to the first device;
通过所述直播通道接收并发送来自设备升级管理服务器的升级数据包;Receive and send upgrade data packets from the device upgrade management server through the live broadcast channel;
在确定接收到第一设备对应的完整升级数据包的情况下,保存获取到的完整升级数据包。When it is determined that the complete upgrade data package corresponding to the first device is received, the obtained complete upgrade data package is saved.
可选地,第一设备获取升级数据包,并发送所述升级数据包,包括:Optionally, the first device obtains the upgrade data packet and sends the upgrade data packet, including:
所述第一设备接收上一层的设备发送的、来自代理设备的升级数据包;从所述升级数据包中获取并保存第一设备对应的第一升级数据包;The first device receives the upgrade data packet from the proxy device sent by the device at the upper layer; obtains and saves the first upgrade data packet corresponding to the first device from the upgrade data packet;
将所述升级数据包中除开第一升级数据包以外的升级数据包发送至下一层所有设备。Send the upgrade data packets except the first upgrade data packet in the upgrade data packet to all devices on the next layer.
可选地,所述方法还包括:Optionally, the method also includes:
所述多层逐层级连接设备中的每一个设备基于MAC地址学习算法,根据接收和发送的数据帧记录每个MAC地址与端口的对应关系,完成多层逐层级连接设备的拓扑发现,得到MAC拓扑结构。Each of the multi-layer and layer-by-layer connection devices is based on a MAC address learning algorithm and records the corresponding relationship between each MAC address and port according to the received and sent data frames to complete the topology discovery of the multi-layer and layer-by-layer connection devices. Get the MAC topology.
可选地,代理设备为根据MAC拓扑结果确定的多层逐层级连接设备中第一层的设备。Optionally, the proxy device is a first layer device among the multi-layer-by-layer connection devices determined based on the MAC topology result.
本发明实施例第二方面提供一种设备升级装置,所述装置包括:A second aspect of the embodiment of the present invention provides an equipment upgrade device, which includes:
数据传输模块,用于第一设备获取升级数据包,并发送所述升级数据包;所述第一设备为多层逐层级连接设备中的非底层设备;The data transmission module is used for the first device to obtain the upgrade data packet and send the upgrade data packet; the first device is a non-bottom device among the multi-layer and layer-by-layer connection devices;
确定模块,用于所述第一设备基于MAC拓扑结构确定是否接收到下一层所有设备的升级成功指令;Determining module, configured for the first device to determine whether it has received upgrade success instructions from all devices on the next layer based on the MAC topology structure;
重启模块,用于在接收到下一层所有设备的升级成功指令的情况下,所述第一设备进行重启完成设备升级,并发送升级成功指令至上一层设备。The restart module is used to restart the first device to complete the device upgrade when receiving an upgrade success instruction from all devices on the next layer, and send an upgrade success instruction to the device on the upper layer.
可选地,在所述第一设备为多层逐层级连接设备中最后一层的设备的情况下,所述确定模块,用于:所述第一设备基于MAC拓扑结构确定当前设备为多层逐层级连接设备中最后一层的设备;所述重启模块,用于获取升级数据包后进行设备升级,升级完成后进行设备重启,重启成功后确定完成设备升级,发送升级成功指令至上一层设备。Optionally, when the first device is a device of the last layer among multiple layer-by-layer connected devices, the determining module is configured to: the first device determines that the current device is a multi-layer device based on the MAC topology. Connect the equipment at the last layer of the equipment layer by layer; the restart module is used to upgrade the equipment after obtaining the upgrade data packet, restart the equipment after the upgrade is completed, determine the completion of the equipment upgrade after the restart is successful, and send an upgrade success instruction to the previous layer equipment.
可选地,数据传输模块,具体用于:确定第一设备对应的直播通道,所述直播通道是基于设备升级管理服务器至第一设备的传输路径上的各个设备的信息建立的;通过所述直播通道接收并发送来自设备升级管理服务器的升级数据包;在确定接收到第一设备对应的完整升级数据包的情况下,保存获取到的完整升级数据包。Optionally, the data transmission module is specifically configured to: determine the live broadcast channel corresponding to the first device, the live broadcast channel is established based on the information of each device on the transmission path from the device upgrade management server to the first device; through the The live broadcast channel receives and sends the upgrade data packet from the device upgrade management server; when it is determined that the complete upgrade data packet corresponding to the first device is received, the obtained complete upgrade data packet is saved.
可选地,所述数据传输模块,具体用于:所述第一设备接收上一层的设备发送的、来自代理设备的升级数据包;从所述升级数据包中获取并保存第一设备对应的第一升级数据包;将所述升级数据包中除开第一升级数据包以外的升级数据包发送至下一层所有设备。Optionally, the data transmission module is specifically configured to: the first device receive an upgrade data packet from the proxy device sent by the device at the upper layer; obtain and save the corresponding data of the first device from the upgrade data packet. the first upgrade data packet; sending the upgrade data packets in the upgrade data packet except the first upgrade data packet to all devices on the next layer.
可选地,所述装置还包括:Optionally, the device also includes:
拓扑发现模块,用于所述多层逐层级连接设备中的每一个设备基于MAC地址学习算法,根据接收和发送的数据帧记录每个MAC地址与端口的对应关系,完成多层逐层级连接设备的拓扑发现,得到MAC拓扑结构。The topology discovery module is used for each of the multi-layer-by-layer connection devices to record the corresponding relationship between each MAC address and the port based on the received and sent data frames based on the MAC address learning algorithm to complete the multi-layer-by-layer connection. Topology discovery of connected devices, obtaining MAC topology.
可选地,代理设备为根据MAC拓扑结果确定的多层逐层级连接设备中第一层的设备。Optionally, the proxy device is a first layer device among the multi-layer-by-layer connection devices determined based on the MAC topology result.
本发明实施例第三方面提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现本发明第一方面所述的方法的步骤。A third aspect of the embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the first aspect of the present invention is implemented. The steps of the method described in this aspect.
本发明实施例第四方面提供一种可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时,实现如本发明第一方面所述的方法中的步骤。A fourth aspect of the embodiments of the present invention provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method described in the first aspect of the present invention are implemented.
采用本发明实施例提供的设备升级方法,多层逐层级连接设备中的设备可以进行批量升级,第一设备在获取到升级数据包之后,转发至下一层的设备,并且第一设备在接收到升级数据包之后,可以先进行升级,但是不进行重启,在确定下一层的所有设备成功接收到升级数据包并完成升级重启的情况下之后再进行重启。具体实施时,每一层的设备都在确定下一层的设备成功接收到升级数据包之后再进行重启,则可以保证多层设备中的每一个设备都成功接收到升级数据包并成功完成设备升级,本发明实施例中,逐层设备执行重启,保证了整个网络拓扑设备都成功接收升级数据包并执行升级重启,完成设备的批量升级。Using the device upgrade method provided by the embodiment of the present invention, devices in multi-layer-by-layer connected devices can be upgraded in batches. After obtaining the upgrade data packet, the first device forwards it to the device on the next layer, and the first device After receiving the upgrade data packet, you can upgrade first, but do not restart. Restart after confirming that all devices on the next layer have successfully received the upgrade data packet and completed the upgrade and restart. During the specific implementation, the devices at each layer will restart after confirming that the device at the next layer has successfully received the upgrade data packet. This can ensure that each device in the multi-layer device successfully receives the upgrade data packet and successfully completes the device upgrade. Upgrade, in the embodiment of the present invention, the devices are restarted layer by layer, ensuring that the entire network topology device successfully receives the upgrade data packet and performs the upgrade restart, completing the batch upgrade of the devices.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. , for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative labor.
图1是本发明一实施例提出的设备升级方法的流程图;Figure 1 is a flow chart of a device upgrade method proposed by an embodiment of the present invention;
图2是本发明另一实施例提出的设备升级方法的流程图;Figure 2 is a flow chart of a device upgrade method proposed by another embodiment of the present invention;
图3是本发明另一实施例提出的设备升级方法的流程图;Figure 3 is a flow chart of a device upgrade method proposed by another embodiment of the present invention;
图4是本发明一实施例提出的设备升级装置的示意图。Figure 4 is a schematic diagram of an equipment upgrade device proposed by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present invention.
图1是根据一示例性实施例示出的一种设备升级方法的流程图。参照图1,所述方法包括以下步骤:Figure 1 is a flow chart of a device upgrade method according to an exemplary embodiment. Referring to Figure 1, the method includes the following steps:
S101,第一设备获取升级数据包,并发送所述升级数据包。S101. The first device obtains an upgrade data packet and sends the upgrade data packet.
其中,所述第一设备为多层逐层级连接设备中的非底层设备。Wherein, the first device is a non-bottom device among the multi-layer-by-layer connection devices.
S102,所述第一设备基于MAC拓扑结构确定是否接收到下一层所有设备的升级成功指令。S102: The first device determines whether it has received successful upgrade instructions from all devices on the next layer based on the MAC topology structure.
S103,在接收到下一层所有设备的升级成功指令的情况下,所述第一设备进行重启完成设备升级,并发送升级成功指令至上一层设备。S103: After receiving the upgrade success instructions of all devices on the next layer, the first device restarts to complete the device upgrade, and sends the upgrade success instructions to the device on the upper layer.
本发明实施例中,第一设备获取到的升级数据包,可以是由上一层设备转发的来自于设备升级管理服务器或者代理设备的升级数据包。In the embodiment of the present invention, the upgrade data packet obtained by the first device may be an upgrade data packet from the device upgrade management server or proxy device forwarded by the upper layer device.
其中,在视联网场景下,在所述多层逐层级连接设备为视联网设备的情况下,设备升级管理服务器还可以用于首先配置视联设备的MAC地址,保证视联网设备合法化,并对视联网设备的设备升级进行管理。Among them, in the video network scenario, when the multi-layer layer-by-layer connection device is a video network device, the device upgrade management server can also be used to first configure the MAC address of the video network device to ensure the legalization of the video network device. And manage device upgrades of video networking devices.
本发明实施例中,所述多层逐层级连接设备为:包括多个不同层级的设备的设备群,每个层级之间的设备逐层级连接。具体可以为:第一层的设备和设备升级管理服务器通信连接,第一层的设备连接第一数量个第二层的设备,每个第二层的设备连接第二数量个第三层的设备,依此类推。In the embodiment of the present invention, the multi-layer layer-by-layer connection device is: a device group including multiple devices at different levels, and the devices between each layer are connected layer by layer. Specifically, the communication connection between the first-layer device and the device upgrade management server can be as follows: the first-layer device is connected to a first number of second-layer devices, and each second-layer device is connected to a second number of third-layer devices. ,So on and so forth.
本发明实施例中,设备升级管理服务器可以确定每个需要升级的设备、及其升级数据包。其中,每个需要升级的设备的升级数据包可以相同,也可以不同。In the embodiment of the present invention, the device upgrade management server can determine each device that needs to be upgraded and its upgrade data package. Among them, the upgrade data package of each device that needs to be upgraded can be the same or different.
本发明实施例中,在设备升级管理服务器向第一设备发送升级包进行升级之前,还可以先向对应的第一设备发送升级指令,在得到第一设备的回复之后,再进行设备升级控制。In the embodiment of the present invention, before sending the upgrade package to the first device for upgrading, the device upgrade management server may also send an upgrade instruction to the corresponding first device, and then perform device upgrade control after obtaining a reply from the first device.
本发明实施例中,在第一设备进行设备升级之前,需要经由多层逐层级连接设备的通信架构,接收到来自设备升级管理服务器的升级数据包。In the embodiment of the present invention, before the first device performs device upgrade, it needs to receive an upgrade data packet from the device upgrade management server through a multi-layer communication architecture that connects the devices hierarchically.
本发明实施例中,在升级数据包从设备升级管理服务器到各个设备的传输过程中,设备升级管理服务器可以直接发送每个设备的升级数据包到对应的设备,在这个过程中,需要由多层设备逐层级转发升级数据包至目的设备。In the embodiment of the present invention, during the transmission process of the upgrade data packet from the device upgrade management server to each device, the device upgrade management server can directly send the upgrade data packet of each device to the corresponding device. In this process, multiple The layer device forwards the upgrade packet layer by layer to the destination device.
其中,在各个层级对升级数据包的转发过程中,第一设备可以获取到升级数据包,即发送该升级数据包至下一层级的设备,使得下一层级的设备可以及时接收到升级数据包。Among them, during the forwarding process of the upgrade data packet at each level, the first device can obtain the upgrade data packet, that is, send the upgrade data packet to the device at the next level, so that the device at the next level can receive the upgrade data packet in time. .
本发明实施例中,在升级数据包从设备升级管理服务器到各个设备的传输过程中,设备升级管理服务器还可以建立设备升级管理服务器对各个设备的传输通道,设备升级管理服务器通过该传输通道发送所有设备的升级数据包,各个设备可以根据各个升级数据对应的设备标识(例如:MAC地址、视联网号码等)各自下载自身所需的升级数据。其中,在数据传输过程中,各个层级的设备可以以数据流的形式,接收来自上一层级的数据并发送至下一层级的设备,并从接收到的升级数据包中获取自身所需的升级数据包,从而可以使得所有设备均快速获得自身所需的升级数据包,并进行升级重启。In the embodiment of the present invention, during the transmission process of the upgrade data packet from the device upgrade management server to each device, the device upgrade management server can also establish a transmission channel for the device upgrade management server to each device, and the device upgrade management server sends the data through the transmission channel. For the upgrade data packages of all devices, each device can download the upgrade data it needs based on the device identification (such as MAC address, video network number, etc.) corresponding to each upgrade data. Among them, during the data transmission process, devices at each level can receive data from the upper level in the form of data streams and send them to the devices at the next level, and obtain the upgrades they need from the received upgrade data packets. data package, so that all devices can quickly obtain the upgrade data package they need and perform upgrade and restart.
本发明实施例中,在升级数据包从设备升级管理服务器到各个设备的传输过程中,设备升级管理服务器还可以根据多层设备的网络架构确定每个位于第一层的设备对应的所有子设备,将其位于第一层的设备的升级数据以及其所有子设备的升级数据作为升级数据包发送给第一层的设备,以将该第一层的设备作为代理设备对升级数据进行分发。其中,在数据传输过程中,第一层的设备作为代理设备可以在多层逐层级连接设备对应的局域网连接内进行升级数据包分发,即使在设备升级管理服务器之前的连接中断的情况下,也可以实现数据分发,整个数据分发无需设备升级管理服务器的网络带宽的限制。In the embodiment of the present invention, during the transmission process of the upgrade data packet from the device upgrade management server to each device, the device upgrade management server can also determine all sub-devices corresponding to each device located on the first layer according to the network architecture of the multi-layer device. , sending the upgrade data of the device located on the first layer and the upgrade data of all its sub-devices as upgrade data packets to the device on the first layer, so that the device on the first layer serves as a proxy device to distribute the upgrade data. Among them, during the data transmission process, the first-layer device, as a proxy device, can distribute upgrade data packets within the LAN connection corresponding to the multi-layer layer-by-layer connection device, even if the connection before the device upgrade management server is interrupted, Data distribution can also be achieved, and the entire data distribution does not require equipment upgrades and the network bandwidth limitations of the management server.
本发明实施例中,升级成功指令中携带对应设备的MAC地址。第一设备可以基于MAC拓扑结构确定其直接连接的所有下一层的设备,进而确定是否接收到下一层所有设备的升级成功指令。In the embodiment of the present invention, the upgrade success command carries the MAC address of the corresponding device. The first device can determine all devices on the next layer directly connected to it based on the MAC topology, and then determine whether it has received successful upgrade instructions for all devices on the next layer.
本发明实施例中,第一设备还可以将基于接收到的下一层所有设备的升级成功指令,将下一层所有设备的MAC地址添加到升级成功指令中发送至上一层设备。从而,在多层逐层级连接设备中第一层的设备接收到的升级成功指令中,携带了整个多层逐层级连接设备中所有设备的MAC地址。从而第一层设备获取到升级成功指令之后,可以确定所有升级成功的子设备的MAC地址。In the embodiment of the present invention, the first device may also add the MAC addresses of all devices on the next layer to the upgrade success command based on the received upgrade success instructions of all devices on the next layer and send it to the upper layer device. Therefore, the upgrade success instruction received by the device on the first layer among the multi-layer-by-layer connection devices carries the MAC addresses of all devices in the entire multi-layer-by-layer connection device. Therefore, after the first-layer device obtains the upgrade success instruction, it can determine the MAC addresses of all successfully upgraded sub-devices.
本发明实施例中,通过MAC拓扑结构和来自下一层级的设备的升级成功指令,可以确定下一层级的所有设备是否成功接收到升级数据包并完成升级重启。In the embodiment of the present invention, through the MAC topology and the upgrade success command from the device at the next level, it can be determined whether all the devices at the next level have successfully received the upgrade data packet and completed the upgrade and restart.
本发明实施例中,由于多层逐层级连接设备中,不同层级的设备是逐层级串联的,因此,在上层的设备重启的情况下,会造成下层的设备断联,如果在下层的设备尚未接收到完整的数据包的情况下,上层的设备重启将会造成下层的第一设备数据包接收失败。基于此,本发明实施例提出,第一设备在接收到升级数据包之后,在升级过程不影响上下层通信的情况下,可以先进行升级,但是不进行重启,在确定下一层的设备成功接收到升级数据包并升级成功之后再进行重启。在升级过程可能影响上下层通信的情况下,第一设备在接收到升级数据包之后,也不进行升级,在确定下一层的设备成功接收到升级数据包之后并升级重启成功之后再进行升级重启。In the embodiment of the present invention, in multi-layer connected devices layer by layer, devices at different layers are connected in series layer by layer. Therefore, when the upper layer device is restarted, the lower layer device will be disconnected. If the lower layer device is restarted, the lower layer device will be disconnected. When the device has not received the complete data packet, the restart of the upper device will cause the first lower device to fail to receive the data packet. Based on this, the embodiment of the present invention proposes that after receiving the upgrade data packet, the first device can perform the upgrade first without affecting the communication between the upper and lower layers during the upgrade process, but does not restart. After determining that the device at the next layer is successful, Restart after receiving the upgrade packet and the upgrade is successful. In the case where the upgrade process may affect the communication between the upper and lower layers, the first device will not perform the upgrade after receiving the upgrade data packet. It will then perform the upgrade after it is determined that the device at the next layer has successfully received the upgrade data packet and the upgrade has restarted successfully. Restart.
具体实施时,每一层的设备都在确定下一层的设备成功升级之后再进行重启完成设备升级,并发送升级成功指令至上一层设备,则可以保证多层逐层级连接设备中的每一个设备都成功升级。During the specific implementation, the equipment at each layer will restart to complete the device upgrade after confirming that the device at the next layer has been successfully upgraded, and send an upgrade success command to the device at the upper layer. This can ensure that each layer of multi-layer connected devices is connected layer by layer. All devices were successfully upgraded.
在本发明一种可选地实施方式中,在所述第一设备为多层逐层级连接设备中最后一层的设备的情况下,所述第一设备基于MAC拓扑结构确定当前设备为多层逐层级连接设备中最后一层的设备;获取升级数据包后进行设备升级,升级完成后进行设备重启,重启成功后确定完成设备升级,发送升级成功指令至上一层设备。In an optional implementation manner of the present invention, when the first device is a device of the last layer among multiple layer-by-layer connected devices, the first device determines that the current device is a multi-layer device based on the MAC topology. Connect the device at the last layer of the device layer by layer; upgrade the device after obtaining the upgrade data packet, restart the device after the upgrade is completed, confirm the device upgrade is completed after the restart is successful, and send an upgrade success command to the upper layer device.
本发明实施例中,对于最底层的设备,其可以通过查询MAC拓扑结构,确定自身所在的拓扑结构层级,在确定自身为最底层的设备之后,其在接收到升级数据包之后,可以以及进行设备升级,完成升级后可以立即重启,并将升级成功指令发送到其上一层的设备,而位于上一层的设备也可以通过查询MAC拓扑结构,确定其连接的下一层的所有设备,在接收到所有的下一层的设备发送的升级成功指令之后,确下一层的设备的升级数据包接收成功,并升级成功,可以进行重启,完成设备升级,并发送级成功指令至上一层设备。In the embodiment of the present invention, for the lowest-level device, it can determine the topological structure level where it is located by querying the MAC topology structure. After determining that it is the lowest-level device, it can perform the following steps after receiving the upgrade data packet: After the device is upgraded, it can be restarted immediately, and the upgrade success command will be sent to the device on the upper layer. The device on the upper layer can also query the MAC topology to determine all the devices on the lower layer it is connected to. After receiving the upgrade success instructions sent by all the devices on the next layer, confirm that the upgrade data packets of the devices on the next layer are successfully received and the upgrade is successful. You can restart, complete the device upgrade, and send the first-level success command to the upper layer. equipment.
本发明实施例中,所述多层逐层级连接设备中的每一个设备基于MAC地址学习算法,根据接收和发送的数据帧记录每个MAC地址与端口的对应关系,完成多层逐层级连接设备的拓扑发现,得到MAC拓扑结构。In the embodiment of the present invention, each of the multi-layer-by-layer connection devices is based on a MAC address learning algorithm and records the corresponding relationship between each MAC address and port according to the received and sent data frames to complete the multi-layer by-layer connection. Topology discovery of connected devices, obtaining MAC topology.
具体的,多层逐层级连接设备中的各个设备内部可以实现拓扑发现算法,完成网络设备的拓扑发现。本发明实施例中,各个设备的拓扑发现主要是基于MAC地址学习算法,通过记录每个MAC地址与端口的对应关系,构建二层交换网络的MAC地址表,从而确定MAC拓扑结构。Specifically, each device in the multi-layer layer-by-layer connection device can implement a topology discovery algorithm internally to complete the topology discovery of network devices. In the embodiment of the present invention, the topology discovery of each device is mainly based on the MAC address learning algorithm. By recording the corresponding relationship between each MAC address and the port, a MAC address table of the layer 2 switching network is constructed, thereby determining the MAC topology structure.
具体的,第一设备在端口上接收来自其他设备(如主机、路由器等)的MAC帧,通过读取帧中的源MAC地址和目的MAC地址,以及一些其他信息(如VLAN标签等)来构建MAC地址表。当第一设备收到一个未知目的MAC地址的帧时,会在除源端口外的其他所有端口上广播这个帧,以寻找目的设备。如果目的设备在接收到广播帧后向第一设备回复一个帧,第一设备就会将源MAC地址、目的MAC地址和接收端口的组合添加到MAC地址表中。通过这种方式,第一设备可以逐渐学习到整个网络的拓扑结构,并构建出MAC地址表,进而确定出自身连接的上一层和/或下一层的第一设备的MAC地址。从而可以根据接收到的升级成功指令中携带的MAC地址和网络拓扑结构确定下一层的第一设备的升级数据包是否接收成功,并在升级重启成功后,根据网络拓扑结构向上一层的第一设备发送升级成功指令,以使上一层的第一设备可以确定升级数据包接收状态。Specifically, the first device receives MAC frames from other devices (such as hosts, routers, etc.) on the port, and constructs the frame by reading the source MAC address and destination MAC address in the frame, as well as some other information (such as VLAN tags, etc.) MAC address table. When the first device receives a frame with an unknown destination MAC address, it broadcasts the frame on all ports except the source port to find the destination device. If the destination device replies with a frame to the first device after receiving the broadcast frame, the first device adds the combination of source MAC address, destination MAC address, and receiving port to the MAC address table. In this way, the first device can gradually learn the topology structure of the entire network, build a MAC address table, and then determine the MAC addresses of the first device at the upper layer and/or lower layer to which it is connected. Therefore, it can be determined based on the MAC address and network topology carried in the received upgrade success command whether the upgrade data packet of the first device on the next layer is received successfully, and after the upgrade is restarted successfully, the upgrade data packet of the first device on the next layer can be determined based on the network topology. A device sends an upgrade success command so that the first device at the upper layer can determine the upgrade data packet reception status.
在实际应用中,在所述方法应用于视联网场景的情况下,视联网设备可以根据MAC拓扑结构确定本设备所处层级,升级完毕后,离设备升级管理服务器最远的最底层设备优先执行升级并重启,发送升级成功指令给上一层视联网设备,该升级成功指令携带其MAC地址,然后上一层设备收到下一层设备的升级成功指令,执行重启,并发送升级成功指令至再上一层设备,然后逐层设备执行重启,保证了整个网络拓扑设备都成功接收升级数据包并执行升级重启,完成设备的批量升级。In practical applications, when the method is applied to a video network scenario, the video network device can determine the level of the device based on the MAC topology. After the upgrade is completed, the bottom device that is farthest from the device upgrade management server will be executed first. Upgrade and restart, and send an upgrade success command to the upper-layer visual networking device. The upgrade success command carries its MAC address. Then the upper-layer device receives the upgrade success command from the next-layer device, performs a restart, and sends an upgrade success command to Move up one layer of equipment, and then restart the equipment layer by layer to ensure that the entire network topology device successfully receives the upgrade data packet and performs the upgrade restart, completing the batch upgrade of the equipment.
本发明实施例中,在所述设备为视联网设备的情况下,视联网设备在接入视联网后,可以获取到自身的视联网号码和连接的子设备的视联网号码。基于此,升级成功指令中还可以携带自身的视联网号码,从而上一层设备可以根据接收到的升级成功指令中携带的视联网号码和自身连接的子设备的视联网号码确定下一层的设备是否完整设备升级。In the embodiment of the present invention, when the device is a visual network device, the visual network device can obtain its own visual network number and the visual network number of the connected sub-device after accessing the visual network. Based on this, the upgrade success command can also carry its own visual network number, so that the upper layer device can determine the next layer based on the visual network number carried in the received upgrade success command and the visual network number of its connected sub-device. Whether the equipment is completely upgraded.
图2是根据另一示例性实施例示出的一种设备升级方法的流程图,参照图2,所述方法包括以下步骤:Figure 2 is a flow chart of a device upgrade method according to another exemplary embodiment. Referring to Figure 2, the method includes the following steps:
S201,确定第一设备对应的直播通道,所述直播通道是基于设备升级管理服务器至第一设备的传输路径上的各个设备的信息建立的。S201. Determine the live broadcast channel corresponding to the first device. The live broadcast channel is established based on the information of each device on the transmission path from the device upgrade management server to the first device.
S202,通过所述直播通道接收并发送来自设备升级管理服务器的升级数据包。S202: Receive and send the upgrade data packet from the device upgrade management server through the live broadcast channel.
S203,在确定接收到第一设备对应的完整升级数据包的情况下,保存获取到的完整升级数据包。S203: When it is determined that the complete upgrade data package corresponding to the first device has been received, save the obtained complete upgrade data package.
S204,所述第一设备基于MAC拓扑结构确定是否接收到下一层所有设备的升级成功指令。S204: The first device determines whether it has received upgrade success instructions from all devices on the next layer based on the MAC topology structure.
S205,在接收到下一层所有设备的升级成功指令的情况下,所述第一设备进行重启完成设备升级,并发送升级成功指令至上一层设备。S205: After receiving the upgrade success instructions of all devices on the next layer, the first device restarts to complete the device upgrade, and sends the upgrade success instructions to the device on the upper layer.
为了便于理解,以多层逐层级连接设备为视联网设备为例进行解释说明:In order to facilitate understanding, the explanation will be given by taking the multi-layer layer-by-layer connection device as a visual networking device as an example:
本发明实施例中,视联网设备在接入视联网后,可以获取到自身的视联网号码和连接的子设备的视联网号码。本发明实施例中,第一层的视联网设备可以通过视联网直接和设备升级管理服务器通信连接,从而可以通过来自设备升级管理服务器的心跳数据获取到设备升级管理服务器的视联网号码,然后把自身的视联网号码和子设备的视联网号码通过SNMP协议封装上传至设备升级管理服务器。设备升级管理服务器获取到设备信息进行SNMP解析,提取该第一层的视联网设备的视联网号码及子设备的视联网号码,对各个视联网设备的设备状态和设备信息进行管理。In the embodiment of the present invention, after the video network device accesses the video network, it can obtain its own video network number and the video network number of the connected sub-device. In the embodiment of the present invention, the first-layer video network device can communicate directly with the device upgrade management server through the video network, so that the video network number of the device upgrade management server can be obtained through the heartbeat data from the device upgrade management server, and then the video network number of the device upgrade management server can be obtained. The own video network number and the video network number of the sub-device are encapsulated and uploaded to the device upgrade management server through the SNMP protocol. The device upgrade management server obtains the device information and performs SNMP analysis, extracts the video network number of the first-layer video network device and the video network number of the sub-device, and manages the device status and device information of each video network device.
具体的,本发明实施例中,在设备升级管理服务器确定视联网设备需要升级的情况下,设备升级管理服务器下发升级指令,视联网设备收到升级指令,提取设备升级管理服务器的视联网号码,基于该视联网号码发送升级包下载请求,该升级包下载请求携带各个视联网设备的视联网号码,设备升级管理服务器收到升级包下载请求后,基于设备升级管理服务器至该视联网设备的传输路径上的各个视联网设备的视联网号码创建直播通道,并发送对应的直播通道号给视联网设备。视联网设备接收到直播通道号后,基于对应的直播通道等待接收数据。Specifically, in the embodiment of the present invention, when the device upgrade management server determines that the video network device needs to be upgraded, the device upgrade management server issues an upgrade instruction, and the video network device receives the upgrade instruction and extracts the video network number of the device upgrade management server. , send an upgrade package download request based on the video network number. The upgrade package download request carries the video network number of each video network device. After the device upgrade management server receives the upgrade package download request, it sends a request from the device upgrade management server to the video network device based on the video network number. The video network number of each video network device on the transmission path creates a live broadcast channel, and sends the corresponding live broadcast channel number to the video network device. After receiving the live broadcast channel number, the video networking device waits to receive data based on the corresponding live broadcast channel.
本发明实施例中,直播通道是基于设备升级管理服务器至第一设备的传输路径上的各个设备的信息建立的,因此,多层逐层级连接设备中的各个设备可以逐层级以数据流的形式对数据进行接收与转发,使得所有设备均快速过去到升级数据包。In the embodiment of the present invention, the live broadcast channel is established based on the information of each device on the transmission path from the device upgrade management server to the first device. Therefore, each device in the multi-layer-by-layer connection devices can use data streams layer by layer. The data is received and forwarded in a form so that all devices can quickly receive the upgrade data packet.
具体的,设备升级管理服务器可以基于发布直播的方式在该直播通道内传输所有视联网设备的升级数据包。各个视联网设备接收并转发设备升级管理服务器发送的升级数据包,在整个数据传输的过程中,获取并保存各自的升级数据。各个视联网设备接收数据完毕,并检查数据完整后,然后查看网络拓扑位置,等着下一层视联网设备发送的升级成功指令,获取到下一层视联网设备的升级成功指令后进行重启完成设备升级,重启成功后,发送升级成功指令至上一层第一设备。Specifically, the device upgrade management server can transmit the upgrade data packets of all video network devices in the live broadcast channel based on the method of publishing live broadcast. Each video network device receives and forwards the upgrade data packet sent by the device upgrade management server, and obtains and saves its own upgrade data during the entire data transmission process. After each video network device has received the data and checked that the data is complete, then check the network topology location, wait for the upgrade success command sent by the next layer of video network equipment, and restart after obtaining the upgrade success command of the next layer of video network device. After the device is upgraded and restarted successfully, the upgrade success command is sent to the first device on the upper layer.
本发明实施例中,在通过直播通道获取升级数据的过程中,设备升级管理服务器可以持续发送所有视联网设备所需的升级数据包,则每个设备都可以通过该直播通道等待获取到自身所需的完整升级数据包,提高升级成功率。In the embodiment of the present invention, during the process of obtaining upgrade data through the live broadcast channel, the device upgrade management server can continuously send the upgrade data packets required by all video network devices, and each device can wait to obtain all the upgrade data it needs through the live broadcast channel. The required complete upgrade data package is required to improve the upgrade success rate.
图3是根据另一示例性实施例示出的一种设备升级方法的流程图,参照图3,所述方法包括以下步骤:Figure 3 is a flow chart of a device upgrade method according to another exemplary embodiment. Referring to Figure 3, the method includes the following steps:
S301,所述第一设备接收上一层的设备发送的、来自代理设备的升级数据包;从所述升级数据包中获取并保存第一设备对应的第一升级数据包。S301: The first device receives an upgrade data packet from the proxy device sent by the device at the upper layer; obtains and saves the first upgrade data packet corresponding to the first device from the upgrade data packet.
S302,将所述升级数据包中除开第一升级数据包以外的升级数据包发送至下一层所有设备。S302: Send the upgrade data packets except the first upgrade data packet in the upgrade data packet to all devices on the next layer.
S303,所述第一设备基于MAC拓扑结构确定是否接收到下一层所有设备的升级成功指令。S303: The first device determines whether it has received successful upgrade instructions from all devices on the next layer based on the MAC topology structure.
S304,在接收到下一层所有设备的升级成功指令的情况下,所述第一设备进行重启完成设备升级,并发送升级成功指令至上一层设备。S304: After receiving the upgrade success instructions of all devices on the next layer, the first device restarts to complete the device upgrade, and sends the upgrade success instructions to the device on the upper layer.
本发明实施例中,通过设备升级管理服务器对视联网设备进行设备升级的情况下,需要设备升级管理服务器针对每个视联网设备进行数据传输,要求设备升级管理服务器数据处理性能高,数据传输占用带宽大,对设备升级管理服务器的硬件和软件要求都高。In the embodiment of the present invention, when the device upgrade management server is used to upgrade the video network device, the device upgrade management server is required to perform data transmission for each video network device. The device upgrade management server is required to have high data processing performance and data transmission occupancy. The bandwidth is large and the hardware and software requirements for the device upgrade management server are high.
本发明实施例中还提出,以第一层的视联网设备为代理,从设备升级管理服务器获取升级数据包,然后以该第一层的视联网设备以及网络拓扑结构,对下层视联网子设备分发升级数据包,完成下层设备的升级。The embodiment of the present invention also proposes to use the first-layer visual networking device as a proxy to obtain the upgrade data package from the device upgrade management server, and then use the first-layer visual networking device and the network topology structure to update the lower-layer visual networking sub-devices. Distribute upgrade data packages to complete the upgrade of lower-layer devices.
具体的,在这种情况下,设备升级管理服务器可以根据网络拓扑结构,将第一层的设备设置为代理设备。设备升级管理服务器可以下发批量升级指令给该代理设备,代理设备可以提取设备升级管理服务器标识,申请接收升级数据,发送下载开始请求至设备升级管理服务器,并发送升级指令给自身连接的子设备,第二层至第N层的子设备收到升级指令进行等待。Specifically, in this case, the device upgrade management server can set the first-layer device as a proxy device according to the network topology. The device upgrade management server can issue batch upgrade instructions to the agent device. The agent device can extract the device upgrade management server identifier, apply to receive upgrade data, send a download start request to the device upgrade management server, and send upgrade instructions to its connected sub-devices. , the sub-devices from the second to the Nth layer receive the upgrade instruction and wait.
本发明实施例中,还可以由技术人员查看多层逐层级连接设备的网络拓扑结构,确定第一层的设备并设置为代理设备,将该代理设备的所有子设备的升级数据包上传至该代理设备。In the embodiment of the present invention, technicians can also check the network topology of multi-layer connected devices layer by layer, determine the first layer device and set it as a proxy device, and upload the upgrade data packets of all sub-devices of the proxy device to The agent device.
本发明实施例中,采用代理设备的形式分发升级数据包,可以完成多层逐层级连接设备架构内的批量离线升级。In the embodiment of the present invention, the upgrade data package is distributed in the form of a proxy device, so that batch offline upgrades within a multi-layer layer-by-layer connection device architecture can be completed.
本发明实施例中,设备升级管理服务器收到下载请求后,创建与第一层的设备之间的连接,发送第一层的设备及其所有子设备的升级包数据给第一层的设备,第一层的设备接收到数据进行保存。第一层的设备可以获取到自身所需的升级数据,并将其他数据包下发给下一层的设备,下一层的设备也可以获取到自身所需的升级数据,并将其他数据包下发给下一层的设备,以此类推,完成所有子设备的升级数据的分发。本发明实施例中,在升级数据包在代理设备的子设备中逐层级转发的过程中,升级数据包的数据量也可以逐层级减小,提高数据分发效率。In the embodiment of the present invention, after receiving the download request, the device upgrade management server creates a connection with the first-layer device, and sends the upgrade package data of the first-layer device and all its sub-devices to the first-layer device. The first-layer device receives the data and saves it. The devices at the first layer can obtain the upgrade data they need and send other data packets to the devices at the next layer. The devices at the next layer can also obtain the upgrade data they need and send other data packets to them. Send it to the device at the next level, and so on, to complete the distribution of upgrade data for all sub-devices. In the embodiment of the present invention, during the process of forwarding the upgrade data packet layer by layer among the sub-devices of the proxy device, the data volume of the upgrade data packet can also be reduced layer by layer, thereby improving data distribution efficiency.
本发明实施例中,每个设备在获取到对应的升级数据之后,还可以对升级数据进行检查,在确定升级数据完整的情况下,进行升级,在升级数据不完整的情况下,向上一层设备重新请求升级数据。In the embodiment of the present invention, after each device obtains the corresponding upgrade data, it can also check the upgrade data. If it is determined that the upgrade data is complete, it will perform the upgrade. If the upgrade data is incomplete, it will proceed to the next level. The device re-requests upgrade data.
本发明实施例中,即使在没有设备升级管理服务器的情况下,也可以通过多层设备的局域网完成设备批量升级,将网络拓扑结构中第一层的设备指定为代理设备,将升级数据包上传至该代理设备,由该多层设备中的各个设备根据网络拓扑结构,逐层级下发升级包,完成下层设备批量升级。In the embodiment of the present invention, even if there is no device upgrade management server, batch upgrades of devices can be completed through a local area network of multi-layer devices. The devices on the first layer in the network topology are designated as proxy devices and the upgrade data packets are uploaded. To the agent device, each device in the multi-layer device delivers upgrade packages layer by layer according to the network topology, completing batch upgrades of lower-layer devices.
在本发明一种可选地实施方式中,上述任意实施例中提供的设备升级方法中,在所述第一设备为多层逐层级连接设备中的第一层的设备的情况下,所述方法还包括还可以包括:In an optional implementation manner of the present invention, in the device upgrade method provided in any of the above embodiments, in the case where the first device is a device on the first layer among multiple layer-by-layer connection devices, the The above methods may also include:
所述第一设备重启成功后发送升级状态更新指令;所述升级状态更新指令携带所述第一设备的MAC地址,以使所述第一设备设备升级管理服务器根据所述第一设备的MAC地址、多层逐层级连接设备的网络拓扑关系,对所述第一设备的所有子设备的升级状态进行更新。After the first device restarts successfully, it sends an upgrade status update instruction; the upgrade status update instruction carries the MAC address of the first device, so that the first device upgrade management server , the network topology relationship of multi-layer connected devices layer by layer, and the upgrade status of all sub-devices of the first device is updated.
本发明实施例中,在第一层的视联网设备获取到升级成功指令,并进行重启后,发送升级成功指令至设备升级管理服务器,该升级成功指令可以携带其所连接的所有子设备的mac地址和/或视联网号码,以使设备升级管理服务器对各个设备进行设备状态更新。In the embodiment of the present invention, the video network device on the first layer obtains the upgrade success command, and after restarting, sends the upgrade success command to the device upgrade management server. The upgrade success command can carry the mac of all sub-devices connected to it. Address and/or video network number, so that the device upgrade management server can update the device status of each device.
基于同一发明构思,本发明一实施例提供一种设备升级装置。参考图4,图4是本发明一实施例提供的设备升级装置400的示意图。如图4所示,所述装置包括:Based on the same inventive concept, an embodiment of the present invention provides an equipment upgrade device. Referring to Figure 4, Figure 4 is a schematic diagram of an equipment upgrade device 400 provided by an embodiment of the present invention. As shown in Figure 4, the device includes:
数据传输模块401,用于第一设备获取升级数据包,并发送所述升级数据包;所述第一设备为多层逐层级连接设备中的非底层设备;The data transmission module 401 is used for the first device to obtain the upgrade data packet and send the upgrade data packet; the first device is a non-bottom device in a multi-layer layer-by-layer connection device;
确定模块402,用于所述第一设备基于MAC拓扑结构确定是否接收到下一层所有设备的升级成功指令;Determining module 402, configured for the first device to determine whether it has received upgrade success instructions from all devices in the next layer based on the MAC topology;
重启模块403,用于在接收到下一层所有设备的升级成功指令的情况下,所述第一设备进行重启完成设备升级,并发送升级成功指令至上一层设备。The restart module 403 is configured to restart the first device to complete the device upgrade when receiving an upgrade success instruction from all devices on the next layer, and send an upgrade success instruction to the device on the upper layer.
可选地,在所述第一设备为多层逐层级连接设备中最后一层的设备的情况下,所述确定模块402,用于:所述第一设备基于MAC拓扑结构确定当前设备为多层逐层级连接设备中最后一层的设备;所述重启模块403,用于获取升级数据包后进行设备升级,升级完成后进行设备重启,重启成功后确定完成设备升级,发送升级成功指令至上一层设备。Optionally, in the case where the first device is a device of the last layer among multiple layer-by-layer connected devices, the determining module 402 is configured to: the first device determines that the current device is based on the MAC topology structure. The last layer of devices in the multi-layer connected devices layer by layer; the restart module 403 is used to upgrade the device after obtaining the upgrade data packet. After the upgrade is completed, restart the device. After the restart is successful, it is determined that the device upgrade is completed and an upgrade success instruction is sent. The highest level of equipment.
可选地,数据传输模块401,具体用于:确定第一设备对应的直播通道,所述直播通道是基于设备升级管理服务器至第一设备的传输路径上的各个设备的信息建立的;通过所述直播通道接收并发送来自设备升级管理服务器的升级数据包;在确定接收到第一设备对应的完整升级数据包的情况下,保存获取到的完整升级数据包。Optionally, the data transmission module 401 is specifically used to: determine the live broadcast channel corresponding to the first device, the live broadcast channel is established based on the information of each device on the transmission path from the device upgrade management server to the first device; The live broadcast channel receives and sends the upgrade data packet from the device upgrade management server; when it is determined that the complete upgrade data packet corresponding to the first device is received, the obtained complete upgrade data packet is saved.
可选地,所述数据传输模块401,具体用于:所述第一设备接收上一层的设备发送的、来自代理设备的升级数据包;从所述升级数据包中获取并保存第一设备对应的第一升级数据包;将所述升级数据包中除开第一升级数据包以外的升级数据包发送至下一层所有设备。Optionally, the data transmission module 401 is specifically configured to: the first device receive an upgrade data packet from the proxy device sent by the device at the upper layer; obtain and save the first device from the upgrade data packet. The corresponding first upgrade data packet; sending the upgrade data packets in the upgrade data packet except the first upgrade data packet to all devices on the next layer.
可选地,所述装置还包括:Optionally, the device also includes:
拓扑发现模块,用于所述多层逐层级连接设备中的每一个设备基于MAC地址学习算法,根据接收和发送的数据帧记录每个MAC地址与端口的对应关系,完成多层逐层级连接设备的拓扑发现,得到MAC拓扑结构。The topology discovery module is used for each of the multi-layer-by-layer connection devices to record the corresponding relationship between each MAC address and the port based on the received and sent data frames based on the MAC address learning algorithm to complete the multi-layer-by-layer connection. Topology discovery of connected devices, obtaining MAC topology.
可选地,代理设备为根据MAC拓扑结果确定的多层逐层级连接设备中第一层的设备。Optionally, the proxy device is a first layer device among the multi-layer-by-layer connection devices determined based on the MAC topology result.
基于同一发明构思,本发明另一实施例提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行时实现本发明上述任一实施例所述的设备升级方法中的步骤。Based on the same inventive concept, another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes, any one of the above aspects of the present invention is implemented. Steps in the device upgrade method described in the embodiment.
基于同一发明构思,本发明另一实施例提供一种可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明上述任一实施例所述的设备升级方法中的步骤。Based on the same inventive concept, another embodiment of the present invention provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the device upgrade method as described in any of the above embodiments of the present invention is implemented. step.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on its differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.
本领域内的技术人员应明白,本发明实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Thus, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本发明实施例是参照根据本发明实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the invention are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine such that the instructions are executed by the processor of the computer or other programmable data processing terminal device. Means are generated for implementing the functions specified in the process or processes of the flowchart diagrams and/or the block or blocks of the block diagrams.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing terminal equipment to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the The instruction means implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, so that a series of operating steps are performed on the computer or other programmable terminal equipment to produce computer-implemented processing, thereby causing the computer or other programmable terminal equipment to perform a computer-implemented process. The instructions executed on provide steps for implementing the functions specified in a process or processes of the flow diagrams and/or a block or blocks of the block diagrams.
尽管已描述了本发明实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所有变更和修改。Although preferred embodiments of the embodiments of the present invention have been described, those skilled in the art will be able to make additional changes and modifications to these embodiments once the basic inventive concepts are apparent. Therefore, it is intended that the appended claims be construed to include the preferred embodiments and all changes and modifications that fall within the scope of embodiments of the invention.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or any such actual relationship or sequence between operations. Furthermore, the terms "comprises," "comprises," or any other variation thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or end device that includes a list of elements includes not only those elements, but also elements not expressly listed or other elements inherent to such process, method, article or terminal equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or terminal device including the stated element.
以上对本发明所提供的一种设备升级方法、装置、系统、设备及存储介质,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The above is a detailed introduction to an equipment upgrade method, device, system, equipment and storage medium provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only It is used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the field, there will be changes in the specific implementation and application scope according to the idea of the present invention. In summary, this The content of the description should not be construed as limiting the invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311498305.5A CN117650984A (en) | 2023-11-10 | 2023-11-10 | Equipment upgrading method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311498305.5A CN117650984A (en) | 2023-11-10 | 2023-11-10 | Equipment upgrading method and device, electronic equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117650984A true CN117650984A (en) | 2024-03-05 |
Family
ID=90046944
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311498305.5A Pending CN117650984A (en) | 2023-11-10 | 2023-11-10 | Equipment upgrading method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117650984A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118677772A (en) * | 2024-06-04 | 2024-09-20 | 鄂尔多斯市星汉新能源有限公司 | A photovoltaic gateway device upgrade method |
| CN119420710A (en) * | 2024-12-31 | 2025-02-11 | 杭州海康威视系统技术有限公司 | Equipment upgrading method, device and equipment |
-
2023
- 2023-11-10 CN CN202311498305.5A patent/CN117650984A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118677772A (en) * | 2024-06-04 | 2024-09-20 | 鄂尔多斯市星汉新能源有限公司 | A photovoltaic gateway device upgrade method |
| CN119420710A (en) * | 2024-12-31 | 2025-02-11 | 杭州海康威视系统技术有限公司 | Equipment upgrading method, device and equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11487690B2 (en) | Universal host and non-volatile memory express storage domain discovery for non-volatile memory express over fabrics | |
| US11575592B2 (en) | Message processing method and apparatus, control-plane device, and computer storage medium | |
| JP6656612B2 (en) | Network service configuration method and network management device | |
| US20150248298A1 (en) | Rebooting infiniband clusters | |
| CN111638891B (en) | Device upgrade method, device, terminal device and storage medium | |
| CN117650984A (en) | Equipment upgrading method and device, electronic equipment and storage medium | |
| CN114710549B (en) | A dynamic management method, system and business node for network cards in a container platform | |
| CN115811465A (en) | Network configuration method, agent component, controller, electronic device, and storage medium | |
| US12041688B2 (en) | Screen projection method and system | |
| US12323293B2 (en) | Method, apparatus, and system for sending control request based on key value configuration | |
| CN112702441A (en) | Container-based access data processing method, device and system and storage medium | |
| WO2021203384A1 (en) | Device upgrade method and apparatus, and storage medium | |
| CN114297083B (en) | Proxy testing method, device, electronic device and readable medium | |
| CN110661896B (en) | Method for determining mapping address of data stream and server | |
| US9083732B2 (en) | Establishing communication between entities in a shared network | |
| WO2025241347A1 (en) | Bus communication method and apparatus, and computer device and readable storage medium | |
| US11973649B2 (en) | Network configuration method, apparatus, and computer-readable storage medium | |
| CN106230980A (en) | A kind of address configuration method, Apparatus and system | |
| WO2024021896A1 (en) | Data transmission method, slice relationship mapping method, electronic device, and medium | |
| WO2023174341A1 (en) | Data read-write method, and device, storage node and storage medium | |
| CN115943616B (en) | Attribute subscription method, device and equipment for Zigbee equipment | |
| CN115277625A (en) | Communication management method, electronic device, storage medium and system | |
| CN117795934A (en) | Method and system for providing time-critical services using a flow control environment | |
| CN116980286A (en) | Device configuration method, device control method, storage medium and terminal | |
| CN119484659A (en) | Remote direct memory access processing method, device, electronic device and storage medium |
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 |