CN112003717B - Equipment upgrade method, network equipment, server, electronic equipment and storage medium - Google Patents
Equipment upgrade method, network equipment, server, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112003717B CN112003717B CN202010642988.7A CN202010642988A CN112003717B CN 112003717 B CN112003717 B CN 112003717B CN 202010642988 A CN202010642988 A CN 202010642988A CN 112003717 B CN112003717 B CN 112003717B
- Authority
- CN
- China
- Prior art keywords
- information
- management
- upgrade
- communication link
- control server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
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/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
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- 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)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
技术领域technical field
本发明涉及数据处理技术领域,特别是涉及一种设备升级方法、网络设备、服务端、电子设备及存储介质。The invention relates to the technical field of data processing, in particular to a device upgrading method, network device, server, electronic device and storage medium.
背景技术Background technique
网络设备是连接到网络中的物理实体。网络设备的种类繁多,且与日俱增。网络设备通常分布在局域网中,该局域网内还配置管控服务端,由管控服务端管理该局域网内的网络设备。A network device is a physical entity connected to a network. There are many types of network devices and they are increasing day by day. Network devices are usually distributed in a local area network, and a management and control server is also configured in the local area network, and the management and control server manages the network devices in the local area network.
在实际应用中,通常需要对这些网络设备进行升级,以便排除网络设备存在的问题,提升网络设备的性能等。目前,通常要在同一局域网内对网络设备进行升级,也即通过该局域网内的管控服务端对该局域网内的网络设备进行升级。In practical applications, these network devices usually need to be upgraded in order to eliminate problems existing in the network devices and improve the performance of the network devices. At present, it is usually necessary to upgrade the network equipment in the same local area network, that is, to upgrade the network equipment in the local area network through the management and control server in the local area network.
随着业务需求的不断提升,出现了利用某个局域网内的管控服务端对其他局域网内的网络设备进行远程升级的需求。但是,目前的升级方法无法实现上述远程升级。With the continuous improvement of business requirements, there is a need to use the management and control server in a certain LAN to remotely upgrade network devices in other LANs. However, the current upgrading method cannot realize the above-mentioned remote upgrading.
发明内容Contents of the invention
鉴于上述问题,提出了本发明实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种设备升级方法、网络设备、服务端、电子设备及存储介质。In view of the above problems, embodiments of the present invention are proposed to provide a device upgrade method, network device, server, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.
第一方面,本发明实施例公开了一种设备升级方法,应用于连接服务端,所述方法包括:In the first aspect, the embodiment of the present invention discloses a device upgrading method, which is applied to the connection server, and the method includes:
定时获取并存储网络设备的通信链路信息和管控服务端的通信链路信息;所述网络设备与所述管控服务端位于不同的局域网中;regularly acquire and store the communication link information of the network equipment and the communication link information of the management and control server; the network equipment and the management and control server are located in different local area networks;
接收到所述网络设备发送的设备信息后,依据所述设备信息查找所述管控服务端的通信链路信息,基于所述管控服务端的通信链路信息,将所述设备信息发送至所述管控服务端;After receiving the device information sent by the network device, search for the communication link information of the management and control server according to the device information, and send the device information to the management and control service based on the communication link information of the management and control server end;
接收到所述管控服务端依据所述设备信息发送的升级信息后,依据所述升级信息查找所述网络设备的通信链路信息,基于所述网络设备的通信链路信息,将所述升级信息发送至所述网络设备;所述升级信息作为所述网络设备从所述管控服务端下载升级文件进行升级的依据。After receiving the upgrade information sent by the management and control server according to the device information, search for the communication link information of the network device according to the upgrade information, and update the upgrade information based on the communication link information of the network device sent to the network device; the upgrade information is used as the basis for the network device to download the upgrade file from the management and control server for upgrade.
可选地,所述定时获取并存储网络设备的通信链路信息和管控服务端的通信链路信息,包括:接收所述网络设备定时发送的第一心跳消息,获取所述第一心跳消息对应的第一通信链路信息,将所述第一通信链路信息作为所述网络设备的通信链路信息进行存储;接收所述管控服务端定时发送的第二心跳消息,获取所述第二心跳消息对应的第二通信链路信息,将所述第二通信链路信息作为所述管控服务端的通信链路信息进行存储。Optionally, the regularly acquiring and storing the communication link information of the network device and the communication link information of the management and control server includes: receiving a first heartbeat message regularly sent by the network device, and acquiring the corresponding First communication link information, storing the first communication link information as the communication link information of the network device; receiving a second heartbeat message regularly sent by the management and control server, and obtaining the second heartbeat message For the corresponding second communication link information, store the second communication link information as the communication link information of the management and control server.
可选地,所述管控服务端的通信链路信息与所述管控服务端的MAC地址关联存储;所述依据所述设备信息查找所述管控服务端的通信链路信息,包括:获取所述设备信息对应的第一目的MAC地址;;查找所述第一目的MAC地址对应的通信链路信息,作为所述管控服务端的通信链路信息。Optionally, the communication link information of the management and control server is stored in association with the MAC address of the management and control server; the searching for the communication link information of the management and control server according to the device information includes: obtaining the corresponding The first destination MAC address;; Find the communication link information corresponding to the first destination MAC address as the communication link information of the management and control server.
可选地,所述网络设备的通信链路信息与所述网络设备的MAC地址关联存储;所述依据所述升级信息查找所述网络设备的通信链路信息,包括:获取所述升级信息对应的第二目的MAC地址;查找所述第二目的MAC地址对应的通信链路信息,作为所述网络设备的通信链路信息。Optionally, the communication link information of the network device is stored in association with the MAC address of the network device; the searching for the communication link information of the network device according to the upgrade information includes: obtaining the upgrade information corresponding to The second destination MAC address; find the communication link information corresponding to the second destination MAC address as the communication link information of the network device.
第二方面,本发明实施例公开了一种设备升级方法,应用于管控服务端,所述方法包括:In the second aspect, the embodiment of the present invention discloses a device upgrade method, which is applied to the management and control server, and the method includes:
定时向连接服务端传输所述管控服务端的通信链路信息;regularly transmit the communication link information of the control server to the connection server;
接收到所述连接服务端基于所述管控服务端的通信链路信息发送的,网络设备的设备信息后,存储所述设备信息;所述网络设备与所述管控服务端位于不同的局域网中;After receiving the device information of the network device sent by the connection server based on the communication link information of the management and control server, storing the device information; the network device and the management and control server are located in different local area networks;
接收到对所述网络设备的升级指令后,获取所述网络设备的设备信息和升级信息,依据所述网络设备的设备信息,向所述连接服务端发送所述升级信息;After receiving the upgrade instruction for the network device, obtain the device information and upgrade information of the network device, and send the upgrade information to the connection server according to the device information of the network device;
接收到所述网络设备依据所述升级信息发送的升级请求后,将所述升级信息对应的升级文件发送至所述网络设备。After receiving the upgrade request sent by the network device according to the upgrade information, the upgrade file corresponding to the upgrade information is sent to the network device.
第三方面,本发明实施例公开了一种设备升级方法,应用于网络设备,所述方法包括:In the third aspect, the embodiment of the present invention discloses a method for upgrading equipment, which is applied to network equipment, and the method includes:
定时向连接服务端传输所述网络设备的通信链路信息;regularly transmit the communication link information of the network device to the connection server;
向所述连接服务端发送所述网络设备的设备信息;sending the device information of the network device to the connection server;
接收到所述连接服务端基于所述网络设备的通信链路信息发送的升级信息后,依据所述升级信息向管控服务端发送升级请求;所述网络设备与所述管控服务端位于不同的局域网中;After receiving the upgrade information sent by the connection server based on the communication link information of the network device, send an upgrade request to the management and control server according to the upgrade information; the network device and the management and control server are located in different local area networks middle;
接收到所述管控服务端发送的升级文件后,利用所述升级文件进行升级。After receiving the upgrade file sent by the management and control server, use the upgrade file to upgrade.
第四方面,本发明实施例公开了一种连接服务端,所述连接服务包括:In the fourth aspect, the embodiment of the present invention discloses a connection server, and the connection service includes:
获取模块,用于定时获取并存储网络设备的通信链路信息和管控服务端的通信链路信息;所述网络设备与所述管控服务端位于不同的局域网中;An acquisition module, configured to regularly acquire and store the communication link information of the network equipment and the communication link information of the management and control server; the network equipment and the management and control server are located in different local area networks;
第一转发模块,用于接收到所述网络设备发送的设备信息后,依据所述设备信息查找所述管控服务端的通信链路信,基于所述管控服务端的通信链路信息,将所述设备信息发送至所述管控服务端;The first forwarding module is configured to, after receiving the device information sent by the network device, search for the communication link information of the management and control server according to the device information, and forward the device based on the communication link information of the management and control server The information is sent to the control server;
第二转发模块,用于接收到所述管控服务端依据所述设备信息发送的升级信息后,依据所述升级信息查找所述网络设备的通信链路信息,基于所述网络设备的通信链路信息,将所述升级信息发送至所述网络设备;所述升级信息作为所述网络设备从所述管控服务端下载升级文件进行升级的依据。The second forwarding module is configured to search for the communication link information of the network device according to the upgrade information after receiving the upgrade information sent by the management and control server according to the device information, based on the communication link of the network device Information, sending the upgrade information to the network device; the upgrade information is used as the basis for the network device to download the upgrade file from the management and control server for upgrade.
可选地,所述获取模块包括:第一获取单元,用于接收所述网络设备定时发送的第一心跳消息,获取所述第一心跳消息对应的第一通信链路信息,将所述第一通信链路信息作为所述网络设备的通信链路信息进行存储;第二获取单元,用于接收所述管控服务端定时发送的第二心跳消息,获取所述第二心跳消息对应的第二通信链路信息,将所述第二通信链路信息作为所述管控服务端的通信链路信息进行存储。Optionally, the obtaining module includes: a first obtaining unit, configured to receive a first heartbeat message regularly sent by the network device, obtain first communication link information corresponding to the first heartbeat message, and transfer the first heartbeat message to A communication link information is stored as the communication link information of the network device; the second acquisition unit is configured to receive the second heartbeat message regularly sent by the management and control server, and acquire the second heartbeat message corresponding to the second heartbeat message. The communication link information stores the second communication link information as the communication link information of the management and control server.
可选地,所述管控服务端的通信链路信息与所述管控服务端的MAC地址关联存储;所述第一转发模块包括:第三获取单元,用于获取所述设备信息对应的第一目的MAC地址;第一查找单元,用于查找所述第一目的MAC地址对应的通信链路信息,作为所述管控服务端的通信链路信息。Optionally, the communication link information of the management and control server is stored in association with the MAC address of the management and control server; the first forwarding module includes: a third obtaining unit, configured to obtain the first destination MAC address corresponding to the device information address; a first search unit, configured to search for communication link information corresponding to the first destination MAC address as communication link information of the management and control server.
可选地,所述网络设备的通信链路信息与所述网络设备的MAC地址关联存储;所述第二转发模块包括:第四获取单元,用于获取所述升级信息对应的第二目的MAC地址;第二查找单元,用于查找所述第二目的MAC地址对应的通信链路信息,作为所述网络设备的通信链路信息。Optionally, the communication link information of the network device is stored in association with the MAC address of the network device; the second forwarding module includes: a fourth obtaining unit, configured to obtain a second destination MAC address corresponding to the upgrade information address; a second search unit, configured to search for communication link information corresponding to the second destination MAC address as the communication link information of the network device.
第五方面,本发明实施例公开了一种管控服务端,所述管控服务端包括:In the fifth aspect, the embodiment of the present invention discloses a management and control server, and the management and control server includes:
第一传输模块,用于定时向连接服务端传输所述管控服务端的通信链路信息;The first transmission module is used to periodically transmit the communication link information of the management and control server to the connection server;
存储模块,用于接收到所述连接服务端基于所述管控服务端的通信链路信息发送的,网络设备的设备信息后,存储所述设备信息;所述网络设备与所述管控服务端位于不同的局域网中;A storage module, configured to store the device information after receiving the device information of the network device sent by the connection server based on the communication link information of the management server; the network device and the management server are located in different in the local area network;
第一发送模块,用于接收到对所述网络设备的升级指令后,获取所述网络设备的设备信息和升级信息,依据所述网络设备的设备信息,向所述连接服务端发送所述升级信息;The first sending module is configured to obtain the device information and upgrade information of the network device after receiving the upgrade instruction for the network device, and send the upgrade to the connection server according to the device information of the network device information;
第二发送模块,用于接收到所述网络设备依据所述升级信息发送的升级请求后,将所述升级信息对应的升级文件发送至所述网络设备。The second sending module is configured to send an upgrade file corresponding to the upgrade information to the network device after receiving the upgrade request sent by the network device according to the upgrade information.
第六方面,本发明实施例公开了一种网络设备,所述网络设备包括:In a sixth aspect, the embodiment of the present invention discloses a network device, and the network device includes:
第二传输模块,用于定时向连接服务端传输所述网络设备的通信链路信息;The second transmission module is used to periodically transmit the communication link information of the network device to the connection server;
第三发送模块,用于向所述连接服务端发送所述网络设备的设备信息;A third sending module, configured to send the device information of the network device to the connection server;
第四发送模块,用于接收到所述连接服务端基于所述网络设备的通信链路信息发送的升级信息后,依据所述升级信息向管控服务端发送升级请求;所述网络设备与所述管控服务端位于不同的局域网中;The fourth sending module is configured to send an upgrade request to the management and control server according to the upgrade information after receiving the upgrade information sent by the connection server based on the communication link information of the network device; The control server is located in a different LAN;
升级模块,用于接收到所述管控服务端发送的升级文件后,利用所述升级文件进行升级。The upgrade module is configured to use the upgrade file to upgrade after receiving the upgrade file sent by the management and control server.
第七方面,本发明实施例公开了一种电子设备,包括:一个或多个处理器;和其上存储有指令的一个或多个机器可读介质;当所述指令由所述一个或多个处理器执行时,使得所述处理器执行如上任一项由连接服务端执行的设备升级方法,或者,执行如上任一项由管控服务端执行的设备升级方法,或者,执行如上任一项由网络设备执行的设备升级方法。In the seventh aspect, the embodiment of the present invention discloses an electronic device, including: one or more processors; and one or more machine-readable media with instructions stored thereon; when the instructions are executed by the one or more When a processor is executed, the processor is made to execute any one of the above device upgrade methods executed by the connection server, or execute any of the above device upgrade methods executed by the management server, or execute any of the above A device upgrade method performed by a network device.
第八方面,本发明实施例公开了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上任一项由连接服务端执行的设备升级方法,或者,实现如上任一项由管控服务端执行的设备升级方法,或者,实现如上任一项由网络设备执行的设备升级方法。In the eighth aspect, the embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, any one of the above device upgrade methods performed by the connection server is implemented, or, The device upgrade method performed by the management and control server as in any one of the above items, or implement the device upgrade method performed by a network device in any of the above items.
本发明实施例中,连接服务端定时获取并存储网络设备的通信链路信息和管控服务端的通信链路信息,网络设备与管控服务端位于不同的局域网中;连接服务端接收到所述网络设备发送的设备信息后,依据所述设备信息查找所述管控服务端的通信链路信息,基于所述管控服务端的通信链路信息,将所述设备信息发送至所述管控服务端;连接服务端接收到所述管控服务端依据所述设备信息发送的升级信息后,依据所述升级信息查找所述网络设备的通信链路信息,基于所述网络设备的通信链路信息,将所述升级信息发送至所述网络设备,所述升级信息作为所述网络设备从所述管控服务端下载升级文件进行升级的依据。由此可知,本发明实施例中,连接服务端基于定时获取的网络设备的通信链路信息与网络设备进行通信,基于定时获取的管控服务端的通信链路信息与管控服务端进行通信,因此连接服务端能够在网络设备与管控服务端之间转发与设备升级相关的信息,实现管控服务端对与该管控服务端位于不同局域网中的网络设备进行远程升级。In the embodiment of the present invention, the connection server regularly acquires and stores the communication link information of the network device and the communication link information of the management and control server, and the network device and the management and control server are located in different local area networks; the connection server receives the network device After sending the device information, search for the communication link information of the management and control server according to the device information, and send the device information to the management and control server based on the communication link information of the management and control server; the connection server receives After the upgrade information sent by the management and control server according to the device information, search for the communication link information of the network device according to the upgrade information, and send the upgrade information based on the communication link information of the network device To the network device, the upgrade information is used as a basis for the network device to download an upgrade file from the management and control server for upgrade. It can be seen that, in the embodiment of the present invention, the connection server communicates with the network device based on the communication link information of the network device obtained regularly, and communicates with the management server based on the communication link information of the management server obtained regularly. Therefore, the connection The server can forward information related to equipment upgrade between the network device and the management and control server, so that the management and control server can remotely upgrade the network equipment that is located in a different local area network from the management and control server.
附图说明Description of drawings
图1是本发明实施例一的一种设备升级方法的步骤流程图。FIG. 1 is a flowchart of steps of a device upgrading method according to Embodiment 1 of the present invention.
图2是本发明实施例二的一种设备升级方法的步骤流程图。FIG. 2 is a flow chart of steps of a device upgrading method according to
图3是本发明实施例三的一种设备升级方法的步骤流程图。Fig. 3 is a flow chart of steps of a device upgrading method according to
图4是本发明实施例四的一种设备升级方法的流程示意图。Fig. 4 is a schematic flowchart of a device upgrading method according to Embodiment 4 of the present invention.
图5是本发明实施例五的一种连接服务端的结构框图。FIG. 5 is a structural block diagram of a connection server according to
图6是本发明实施例六的一种管控服务端的结构框图。FIG. 6 is a structural block diagram of a management and control server according to Embodiment 6 of the present invention.
图7是本发明实施例七的一种网络设备的结构框图。FIG. 7 is a structural block diagram of a network device according to Embodiment 7 of the present invention.
具体实施方式Detailed ways
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
本发明实施例中,通过连接服务端在网络设备与管控服务端之间转发与设备升级相关的信息,实现管控服务端对与该管控服务端位于不同局域网中的网络设备进行远程升级。In the embodiment of the present invention, the information related to equipment upgrade is forwarded between the network device and the management and control server by connecting the server, so that the management and control server can remotely upgrade the network equipment located in a different local area network from the management and control server.
网络设备可以包括个人计算机、服务器、交换机、网桥、路由器、接入设备,等等。比如,在视联网中,网络设备可以为用于连接视联网与互联网的设备(比如vhub),该设备的功能类似于交换机,等等。Network devices may include personal computers, servers, switches, bridges, routers, access devices, and the like. For example, in the Internet of Vision, the network device may be a device (such as a vhub) for connecting the Internet of Vision and the Internet, and the function of this device is similar to a switch, and so on.
连接服务端和管控服务端可以位于同一管控平台。管控平台可以包括管控前端、管控服务端(也可称为管控后端)、连接服务端、数据库(Data Base,DB)等部分。管控前端可以为Web(网页)端,管控前端可以提供用户交互界面等。管控服务端可以对网络设备进行管理控制,比如控制网络设备升级等。连接服务端可以为SNMP(Simple Network ManagementProtocol,简单网络管理协议)-TCP(Transmission Control Protocol,传输控制协议)服务,连接服务端可以分别与位于不同局域网中的管控服务端和网络设备进行通信,实现信息转发等操作。The connection server and the management and control server can be located on the same management and control platform. The management and control platform may include the management and control front-end, the management and control server (also called the management and control back-end), the connection server, the database (Data Base, DB) and other parts. The management and control front end may be a Web (webpage) terminal, and the management and control front end may provide a user interaction interface and the like. The management and control server can manage and control network devices, such as controlling network device upgrades. The connection server can be SNMP (Simple Network Management Protocol, Simple Network Management Protocol)-TCP (Transmission Control Protocol, Transmission Control Protocol) service, and the connection server can communicate with the management and control server and network equipment in different local area networks respectively to realize Information forwarding and other operations.
以下各实施例中,网络设备与管控服务端均位于不同的局域网中。In the following embodiments, the network device and the management and control server are located in different local area networks.
实施例一Embodiment one
参照图1,示出了本发明实施例一的一种设备升级方法的步骤流程图。本发明实施例的设备升级方法可以应用于连接服务端。Referring to FIG. 1 , it shows a flowchart of steps of a device upgrading method according to Embodiment 1 of the present invention. The device upgrading method in the embodiment of the present invention can be applied to a connection server.
如图1所示,设备升级方法可以包括以下步骤:As shown in Figure 1, the device upgrade method may include the following steps:
步骤101,定时获取并存储网络设备的通信链路信息和管控服务端的通信链路信息。
连接服务端分别存储网络设备的通信链路信息和管控服务端的通信链路信息,以便后续基于网络设备的通信链路信息向网络设备转发信息,基于管控服务端的通信链路信息向管控服务端转发信息。The connection server stores the communication link information of the network equipment and the communication link information of the management and control server respectively, so that the subsequent information can be forwarded to the network equipment based on the communication link information of the network equipment, and forwarded to the management and control server based on the communication link information of the management and control server. information.
由于公网上对应网络设备的端口是随机分配的,端口会随时发生变化,因此网络设备的通信链路信息也会发生变化,因此连接服务端要定时获取并存储网络设备的通信链路信息,以便保证网络设备的通信链路信息的准确性。由于管控服务端上与连接服务端交互的端口是随机分配的,端口会随时发生变化,因此管控服务端的通信链路信息也会发生变化,因此连接服务端要定时获取并存储管控服务端的通信链路信息,以便保证管控服务端的通信链路信息的准确性。Since the ports corresponding to the network devices on the public network are randomly allocated, the ports will change at any time, so the communication link information of the network devices will also change. Therefore, the connection server must regularly obtain and store the communication link information of the network devices, so that Ensure the accuracy of communication link information of network devices. Since the port on the control server interacting with the connection server is randomly assigned, the port will change at any time, so the communication link information of the control server will also change, so the connection server must regularly obtain and store the communication link of the control server In order to ensure the accuracy of the communication link information of the control server.
本发明实施例中,对于定时时间的具体数值,可以根据实际经验设置任意适用的数值。比如,可以设置定时时间为1秒、2秒、3秒、5秒,等等,本发明实施例对此不做限制。In the embodiment of the present invention, for the specific numerical value of the timing time, any applicable numerical value may be set according to actual experience. For example, the timing can be set to 1 second, 2 seconds, 3 seconds, 5 seconds, etc., which is not limited in this embodiment of the present invention.
步骤102,接收到所述网络设备发送的设备信息后,依据所述设备信息查找所述管控服务端的通信链路信息,基于所述管控服务端的通信链路信息,将所述设备信息发送至所述管控服务端。Step 102: After receiving the device information sent by the network device, search for the communication link information of the management and control server based on the device information, and send the device information to the control server.
网络设备与连接服务端建立连接后,网络设备会将自身对应的设备信息发送给连接服务端。连接服务端接收到网络设备发送的设备信息后,依据该设备信息查找管控服务端的通信链路信息。连接服务端基于管控服务端的通信链路信息,将网络设备的设备信息发送至管控服务端。After the network device establishes a connection with the connection server, the network device will send its corresponding device information to the connection server. After the connection server receives the device information sent by the network device, it searches for the communication link information of the control server according to the device information. The connection server sends the device information of the network device to the management and control server based on the communication link information of the management and control server.
网络设备的设备信息可以包括网络设备的MAC(Media Access Control,媒体访问控制)地址、IP(Internet Protocol,互联网协议)地址、版本号、设备名称、设备型号、设备类型,等等。The device information of the network device may include a MAC (Media Access Control, Media Access Control) address, an IP (Internet Protocol, Internet Protocol) address, a version number, a device name, a device model, a device type, and the like of the network device.
步骤103,接收到所述管控服务端依据所述设备信息发送的升级信息后,依据所述升级信息查找所述网络设备的通信链路信息,基于所述网络设备的通信链路信息,将所述升级信息发送至所述网络设备。Step 103: After receiving the upgrade information sent by the management and control server according to the device information, search for the communication link information of the network device according to the upgrade information, and based on the communication link information of the network device, update the The upgrade information is sent to the network device.
当需要对网络设备进行升级时,管控服务端可以依据网络设备的设备信息,获取该网络设备对应的升级信息。管控服务端将升级信息发送给连接服务端。连接服务端接收到管控服务端发送的升级信息后,依据该升级信息查找网络设备的通信链路信息。连接服务端基于网络设备的通信链路信息,将升级信息发送至网络设备。该升级信息作为网络设备从管控服务端下载升级文件,并利用升级文件进行升级的依据。When the network device needs to be upgraded, the management and control server can obtain the upgrade information corresponding to the network device according to the device information of the network device. The control server sends the upgrade information to the connection server. After the connection server receives the upgrade information sent by the control server, it searches for the communication link information of the network device according to the upgrade information. The connection server sends the upgrade information to the network device based on the communication link information of the network device. The upgrade information is used as a basis for the network device to download the upgrade file from the management and control server and use the upgrade file to perform the upgrade.
实施例二Embodiment two
参照图2,示出了本发明实施例二的一种设备升级方法的步骤流程图。本发明实施例的设备升级方法可以应用于管控服务端。Referring to FIG. 2 , it shows a flow chart of steps of a device upgrading method according to
如图2所示,设备升级方法可以包括以下步骤:As shown in Figure 2, the device upgrade method may include the following steps:
步骤201,定时向连接服务端传输所述管控服务端的通信链路信息。
由于管控服务端的通信链路信息会发生变化,因此,管控服务端定时向连接服务端传输该管控服务端的通信链路信息。比如,管控服务端可以通过向连接服务端发送心跳消息等方式,定时向连接服务端传输管控服务端的通信链路信息。Since the communication link information of the management and control server will change, the management and control server regularly transmits the communication link information of the management and control server to the connection server. For example, the management and control server can regularly transmit the communication link information of the management and control server to the connection server by sending a heartbeat message to the connection server.
步骤202,接收到所述连接服务端基于所述管控服务端的通信链路信息发送的,网络设备的设备信息后,存储所述设备信息。Step 202: After receiving the device information of the network device sent by the connection server based on the communication link information of the management server, the device information is stored.
连接服务端在接收到网络设备发送的设备信息后,基于管控服务端的通信链路信息,将网络设备的设备信息发送至管控服务端。管控服务端接收到网络设备的设备信息后,存储该设备信息。After receiving the device information sent by the network device, the connection server sends the device information of the network device to the management and control server based on the communication link information of the management and control server. After receiving the device information of the network device, the control server stores the device information.
步骤203,接收到对所述网络设备的升级指令后,获取所述网络设备的设备信息和升级信息,依据所述网络设备的设备信息,向所述连接服务端发送所述升级信息。Step 203: After receiving the upgrade instruction for the network device, obtain the device information and upgrade information of the network device, and send the upgrade information to the connection server according to the device information of the network device.
当需要对网络设备进行升级时,用户可以在管控前端执行相应操作,比如,选定网络设备,选择升级操作等,以便触发对网络设备的升级指令。管控服务端接收到对网络设备的升级指令后,获取网络设备的设备信息和升级信息,依据网络设备的设备信息,向连接服务端发送对网络设备的升级信息。由连接服务端将升级信息转发给网络设备。When the network device needs to be upgraded, the user can perform corresponding operations on the management and control front end, such as selecting a network device, selecting an upgrade operation, etc., so as to trigger an upgrade command for the network device. After receiving the upgrade instruction for the network device, the control server obtains the device information and upgrade information of the network device, and sends the upgrade information of the network device to the connection server according to the device information of the network device. The upgrade information is forwarded to the network device by the connection server.
步骤204,接收到所述网络设备依据所述升级信息发送的升级请求后,将所述升级信息对应的升级文件发送至所述网络设备。Step 204: After receiving the upgrade request sent by the network device according to the upgrade information, send the upgrade file corresponding to the upgrade information to the network device.
网络设备在接收到升级信息后,依据升级信息生成升级请求,向管控服务端发送升级请求。管控服务端接收到网络设备发送的升级请求后,获取升级请求对应的升级文件,将升级文件发送至网络设备。网络设备即可利用该升级文件进行升级。After receiving the upgrade information, the network device generates an upgrade request according to the upgrade information, and sends the upgrade request to the management and control server. After receiving the upgrade request sent by the network device, the control server obtains the upgrade file corresponding to the upgrade request, and sends the upgrade file to the network device. The network device can be upgraded by using the upgrade file.
实施例三Embodiment Three
参照图3,示出了本发明实施例三的一种设备升级方法的步骤流程图。本发明实施例的设备升级方法可以应用于网络设备。Referring to FIG. 3 , it shows a flowchart of steps of a device upgrading method according to
如图3所示,设备升级方法可以包括以下步骤:As shown in Figure 3, the device upgrading method may include the following steps:
步骤301,定时向连接服务端传输所述网络设备的通信链路信息。
由于网络设备的通信链路信息会发生变化,因此,网络设备定时向连接服务端传输该网络设备的通信链路信息。比如,网络设备可以通过向连接服务端发送心跳消息等方式,定时向连接服务端传输网络设备的通信链路信息。Since the communication link information of the network device will change, the network device periodically transmits the communication link information of the network device to the connection server. For example, the network device may regularly transmit the communication link information of the network device to the connection server by sending a heartbeat message to the connection server.
步骤302,向所述连接服务端发送所述网络设备的设备信息。
网络设备在与连接服务端连接成功后,将该网络设备的设备信息发送至连接服务端。连接服务端在接收到网络设备发送的设备信息后,基于管控服务端的通信链路信息,将网络设备的设备信息发送至管控服务端。After the network device is successfully connected to the connection server, the device information of the network device is sent to the connection server. After receiving the device information sent by the network device, the connection server sends the device information of the network device to the management and control server based on the communication link information of the management and control server.
步骤303,接收到所述连接服务端基于所述网络设备的通信链路信息发送的升级信息后,依据所述升级信息向管控服务端发送升级请求。Step 303: After receiving the upgrade information sent by the connection server based on the communication link information of the network device, send an upgrade request to the management and control server according to the upgrade information.
当需要对网络设备进行升级时,管控服务端将网络设备对应的升级信息发送给连接服务端,连接服务端基于网络设备的通信链路信息,将升级信息发送至网络设备。网络设备在接收到升级信息后,依据升级信息生成升级请求,向管控服务端发送升级请求。管控服务端将升级请求对应的升级文件发送至网络设备。When the network device needs to be upgraded, the control server sends the upgrade information corresponding to the network device to the connection server, and the connection server sends the upgrade information to the network device based on the communication link information of the network device. After receiving the upgrade information, the network device generates an upgrade request according to the upgrade information, and sends the upgrade request to the management and control server. The control server sends the upgrade file corresponding to the upgrade request to the network device.
步骤304,接收到所述管控服务端发送的升级文件后,利用所述升级文件进行升级。
网络设备接收到管控服务端发送的升级文件后,利用升级文件进行升级,从而实现远程升级。After the network device receives the upgrade file sent by the management and control server, it uses the upgrade file to upgrade, thereby realizing remote upgrade.
本发明实施例中,连接服务端基于定时获取的网络设备的通信链路信息与网络设备进行通信,基于定时获取的管控服务端的通信链路信息与管控服务端进行通信,因此连接服务端能够在网络设备与管控服务端之间转发与设备升级相关的信息,实现管控服务端对与该管控服务端位于不同局域网中的网络设备进行远程升级。In the embodiment of the present invention, the connection server communicates with the network device based on the regularly acquired communication link information of the network equipment, and communicates with the management and control server based on the regularly acquired communication link information of the management server, so the connection server can The information related to equipment upgrade is forwarded between the network device and the management and control server, so that the management and control server can remotely upgrade the network equipment that is located in a different local area network from the management and control server.
实施例四Embodiment four
下面,通过设备之间的整体交互过程,详细介绍设备升级方法。Next, through the overall interaction process between devices, the device upgrade method will be introduced in detail.
图4是本发明实施例四的一种设备升级方法的流程示意图。如图4所示,设备升级方法可以包括以下过程:FIG. 4 is a schematic flowchart of a device upgrading method according to Embodiment 4 of the present invention. As shown in Figure 4, the device upgrade method may include the following processes:
1、网络设备定时向连接服务端发送第一心跳消息。1. The network device regularly sends the first heartbeat message to the connection server.
由于网络设备与管控服务端位于不同的局域网中,因此需要通过公网进行交互。网络设备在作为客户端通过公网交互时,如果在公网上映射一个固定的公网端口,则该网络设备通过该固定的公网端口进行交互。但是如果有多个网络设备,则要映射多个公网端口,占用公网端口数量过多,而通常情况下,公网对网络设备开放的端口有限。为了解决上述问题,本发明实施例中,在公网上不对网络设备映射固定的公网端口,而是为网络设备随机分配公网端口,但是会导致网络设备的通信链路不固定,会经常发生变化。因此,网络设备定时向连接服务端传输通信链路信息,以便保证连接服务端中存储的,网络设备的通信链路信息的准确性。Since the network device and the management and control server are located in different local area networks, they need to interact through the public network. When a network device interacts through the public network as a client, if a fixed public network port is mapped on the public network, the network device interacts through the fixed public network port. However, if there are multiple network devices, multiple public network ports need to be mapped, which occupies too many public network ports. Usually, the public network has limited ports open to network devices. In order to solve the above problems, in the embodiment of the present invention, instead of mapping a fixed public network port to the network device on the public network, the public network port is randomly assigned to the network device, but the communication link of the network device will not be fixed, and frequent occurrences of Variety. Therefore, the network device regularly transmits the communication link information to the connection server, so as to ensure the accuracy of the communication link information of the network device stored in the connection server.
在实现中,网络设备在启动时或启动后,会主动连接该连接服务端。比如,网络设备作为连接服务端的客户端,与连接服务端进行TCP连接等。连接成功后,网络设备定时向连接服务端发送第一心跳消息。In the implementation, the network device will actively connect to the connection server when it is started or after it is started. For example, the network device acts as a client connected to the server, and performs a TCP connection with the connected server. After the connection is successful, the network device regularly sends the first heartbeat message to the connection server.
2、连接服务端将网络设备的通信链路信息更新至网络设备的路由表中。2. The connection server updates the communication link information of the network device to the routing table of the network device.
连接服务端在接收到第一心跳消息后,获取第一心跳消息对应的第一通信链路信息,将第一通信链路信息作为网络设备的通信链路信息进行存储。网络设备的通信链路信息可以包括:网络设备上与公网交互的端口、公网为网络设备随机分配的公网端口、公网为连接服务端映射的公网端口、连接服务端上与公网交互的端口。当然,如果网络设备与连接服务端之间还存在其他路由器、交换机等设备,则网络设备的通信链路信息还可以包括这些路由器、交换机等设备的端口,等等。After receiving the first heartbeat message, the connection server acquires first communication link information corresponding to the first heartbeat message, and stores the first communication link information as communication link information of the network device. The communication link information of the network device may include: the port on the network device that interacts with the public network, the public network is the public network port randomly allocated by the network device, the public network is the public network port mapped to the connection server, and the connection server connects to the public network port. Port for network interaction. Of course, if there are other devices such as routers and switches between the network device and the connection server, the communication link information of the network device may also include ports of these routers, switches and other devices, and so on.
连接服务端中可以预先设置网络设备的路由表,网络设备的路由表中可以通过key-value(键-值)的方式存储网络设备的通信链路信息。网络设备发送的第一心跳消息具有对应的源MAC地址,该源MAC地址即为网络设备的MAC地址。比如,第一心跳消息为数据包,该数据包的包头中携带该数据包的源MAC地址。连接服务端得到网络设备的通信链路信息后,获取第一心跳消息对应的源MAC地址(也即网络设备的MAC地址),将网络设备的MAC地址与网络设备的通信链路信息关联存储至网络设备的路由表中。在存储时,网络设备的MAC地址作为key,网络设备的通信链路信息作为value。The routing table of the network device can be preset in the connection server, and the communication link information of the network device can be stored in a key-value (key-value) manner in the routing table of the network device. The first heartbeat message sent by the network device has a corresponding source MAC address, and the source MAC address is the MAC address of the network device. For example, the first heartbeat message is a data packet, and the header of the data packet carries the source MAC address of the data packet. After the connection server obtains the communication link information of the network device, it obtains the source MAC address corresponding to the first heartbeat message (that is, the MAC address of the network device), and associates and stores the MAC address of the network device with the communication link information of the network device in the in the routing table of the network device. When storing, the MAC address of the network device is used as the key, and the communication link information of the network device is used as the value.
连接服务端每接收到一次第一心跳消息,就对网络设备的通信链路信息更新一次。Every time the connection server receives the first heartbeat message, it updates the communication link information of the network device.
3、连接服务端向网络设备回复第一心跳响应。3. The connection server sends a first heartbeat response to the network device.
4、管控服务端定时向连接服务端发送第二心跳消息。4. The control server regularly sends the second heartbeat message to the connection server.
由于管控服务端上与连接服务端交互的端口是随机分配的,端口会随时发生变化,因此管控服务端的通信链路信息也会发生变化。因此,管控服务端定时向连接服务端传输通信链路信息,以便保证连接服务端中存储的,管控服务端的通信链路信息的准确性。Since the ports on the management and control server interacting with the connection server are randomly assigned, the ports will change at any time, so the communication link information of the management and control server will also change. Therefore, the control server regularly transmits the communication link information to the connection server, so as to ensure the accuracy of the communication link information stored in the connection server and the control server.
在实现中,管控服务端在启动时或启动后,会主动连接该连接服务端。比如,管控服务端作为连接服务端的客户端,与连接服务端进行TCP连接等。连接成功后,管控服务端定时向连接服务端发送第二心跳消息。In the implementation, the control server will actively connect to the connection server when it is started or after it is started. For example, the control server acts as a client connecting to the server, and performs a TCP connection with the connecting server. After the connection is successful, the control server regularly sends a second heartbeat message to the connection server.
5、连接服务端将管控服务端的通信链路信息更新至管控服务端的路由表中。5. The connection server updates the communication link information of the control server to the routing table of the control server.
连接服务端接收到第二心跳消息后,获取第二心跳消息对应的第二通信链路信息,将第二通信链路信息作为管控服务端的通信链路信息进行存储。管控服务端的通信链路信息可以包括:管控服务端上与连接服务端交互的端口、连接服务端上与管控服务端交互的端口。当然,如果管控服务端与连接服务端之间还存在其他路由器、交换机等设备,则管控服务端的通信链路信息还可以包括这些设备的端口,等等。After receiving the second heartbeat message, the connection server acquires the second communication link information corresponding to the second heartbeat message, and stores the second communication link information as the communication link information of the management and control server. The communication link information of the management and control server may include: a port on the management and control server that interacts with the connection server, and a port on the connection server that interacts with the management and control server. Of course, if there are other devices such as routers and switches between the management and control server and the connection server, the communication link information of the management and control server may also include ports of these devices, and so on.
连接服务端中可以预先设置管控服务端的路由表,管控服务端的路由表中可以通过key-value(键-值)的方式存储管控服务端的通信链路信息。管控服务端发送的第二心跳消息具有对应的源MAC地址,该源MAC地址即为管控服务端的MAC地址。比如,第二心跳消息为数据包,该数据包的包头中携带该数据包的源MAC地址。连接服务端得到管控服务端的通信链路信息后,获取第二心跳消息对应的源MAC地址(也即管控服务端的MAC地址),将管控服务端的MAC地址与管控服务端的通信链路信息关联存储至管控服务端的路由表中。在存储时,管控服务端的MAC地址作为key,管控服务端的通信链路信息作为value。The routing table of the management and control server can be preset in the connection server, and the communication link information of the management and control server can be stored in the form of key-value (key-value) in the routing table of the management and control server. The second heartbeat message sent by the control server has a corresponding source MAC address, and the source MAC address is the MAC address of the control server. For example, the second heartbeat message is a data packet, and the header of the data packet carries the source MAC address of the data packet. After the connection server obtains the communication link information of the management and control server, obtain the source MAC address corresponding to the second heartbeat message (that is, the MAC address of the management and control server), and associate the MAC address of the management and control server with the communication link information of the management and control server. Control the routing table of the server. When storing, the MAC address of the control server is used as the key, and the communication link information of the control server is used as the value.
连接服务端每接收到一次第二心跳消息,就对管控服务端的通信链路信息更新一次。Every time the connection server receives the second heartbeat message, it updates the communication link information of the control server.
6、连接服务端向管控服务端回复第一心跳响应。6. The connection server returns the first heartbeat response to the control server.
7、网络设备向连接服务端上报设备信息,携带第一目的MAC地址。7. The network device reports the device information to the connection server, carrying the first destination MAC address.
网络设备连接成功后,将自身的设备信息上报给连接服务端。在实现中,网络设备将设备信息打包成数据包,该数据包的包头中携带第一目的MAC地址,该第一目的MAC地址即为要将该设备信息发送给的目标管控服务端的MAC地址。After the network device is successfully connected, it reports its own device information to the connection server. In implementation, the network device packs the device information into a data packet, and the header of the data packet carries the first destination MAC address, and the first destination MAC address is the MAC address of the target control server to which the device information is to be sent.
8、连接服务端从管控服务端的路由表中,查找第一目的MAC地址对应的通信链路信息。8. The connection server searches for the communication link information corresponding to the first destination MAC address from the routing table of the management and control server.
连接服务端接收到网络设备的设备信息后,解析数据包,获取设备信息对应的第一目的MAC地址。连接服务端从管控服务端的路由表中,查找第一目的MAC地址对应的通信链路信息,第一目的MAC地址对应的通信链路信息为管控服务端的通信链路信息。After receiving the device information of the network device, the connection server parses the data packet to obtain the first destination MAC address corresponding to the device information. The connection server searches the routing table of the management and control server for communication link information corresponding to the first destination MAC address, and the communication link information corresponding to the first destination MAC address is the communication link information of the management and control server.
9、连接服务端基于第一目的MAC地址对应的通信链路信息,将设备信息发送给管控服务端。9. The connection server sends the device information to the management and control server based on the communication link information corresponding to the first destination MAC address.
10、管控服务端将网络设备的设备信息入库。10. The management and control server stores the equipment information of the network equipment into the database.
管控服务端接收到网络设备的设备信息后,解析数据并将网络设备的设备信息存入数据库。网络设备的设备信息可以包括网络设备的MAC地址、IP地址、版本号、设备名称、设备型号、设备类型,等等。After receiving the device information of the network device, the management and control server analyzes the data and stores the device information of the network device into the database. The device information of the network device may include a MAC address, an IP address, a version number, a device name, a device model, a device type, and the like of the network device.
11、管控服务端将网络设备的设备信息传输给管控前端页面显示。11. The management and control server transmits the equipment information of the network equipment to the front-end page of the management and control for display.
管控服务端可以将网络设备的设备信息传输给管控前端页面显示。在显示时,可以只显示设备信息中的一部分。比如,可以在页面中显示各网络设备的设备名称,以供用户从其中选择目标设备名称进行升级。The management and control server can transmit the device information of the network device to the management and control front-end page for display. When displaying, only a part of the device information can be displayed. For example, the device name of each network device may be displayed on the page, so that the user may select a target device name for upgrading.
12、管控前端触发升级,将相关数据传输给管控服务端。12. The management and control front-end triggers an upgrade, and transmits relevant data to the management and control server.
用户在管控前端选择网络设备的设备名称,并触发升级按钮,管控前端可以将用户选择的网络设备的设备名称传输给管控服务端。The user selects the device name of the network device on the management and control front end, and triggers the upgrade button, and the management and control front end can transmit the device name of the network device selected by the user to the management and control server.
13、管控服务端从数据库中获取网络设备的设备信息和升级信息。13. The management and control server obtains the device information and upgrade information of the network device from the database.
数据库中存储有各设备类型对应的升级信息。管控服务端根据管控前端传输的设备名称,从数据库中查找该设备名称对应的设备信息。管控服务端从查找到的设备信息中获取设备类型,然后获取该设备类型对应的网络设备的升级信息。Upgrade information corresponding to each device type is stored in the database. According to the device name transmitted by the control front end, the management and control server searches the database for the device information corresponding to the device name. The management and control server obtains the device type from the found device information, and then obtains the upgrade information of the network device corresponding to the device type.
14、管控服务端向连接服务端发送升级信息,携带第二目的MAC地址。14. The control server sends upgrade information to the connection server, carrying the second destination MAC address.
管控服务端从查找到的设备信息中获取网络设备的MAC地址,以查找到的MAC地址作为第二目的MAC地址,将升级信息打包成数据包,该数据包的包头中携带第二目的MAC地址。管控服务端向连接服务端发送该数据包。The control server obtains the MAC address of the network device from the found device information, uses the found MAC address as the second destination MAC address, and packs the upgrade information into a data packet, and the header of the data packet carries the second destination MAC address . The control server sends the data packet to the connection server.
15、连接服务端从网络设备的路由表中,查询第二目的MAC地址对应的通信链路信息。15. The connection server queries the communication link information corresponding to the second destination MAC address from the routing table of the network device.
连接服务端接收到升级信息后,解析数据包,获取升级信息对应的第二目的MAC地址。连接服务端从网络设备的路由表中,查找第二目的MAC地址对应的通信链路信息,第二目的MAC地址对应的通信链路信息为网络设备的通信链路信息。After receiving the upgrade information, the connection server parses the data packet to obtain the second destination MAC address corresponding to the upgrade information. The connection server searches the routing table of the network device for communication link information corresponding to the second destination MAC address, where the communication link information corresponding to the second destination MAC address is the communication link information of the network device.
16、连接服务端基于第二目的MAC地址对应的通信链路信息,将升级信息发送给网络设备。16. The connection server sends the upgrade information to the network device based on the communication link information corresponding to the second destination MAC address.
17、网络设备依据升级信息,从管控服务端下载升级文件,进行升级。17. The network device downloads the upgrade file from the management and control server according to the upgrade information, and performs the upgrade.
升级信息可以包括升级文件的版本号、升级文件的MD5(Message DigestAlgorithm,消息摘要算法第五版)值(该MD5值为升级文件上传时生成的MD5值)、升级文件对外下载的URL(Uniform Resource Locator,统一资源定位符)、升级文件的文件名称,等等。管控服务端将这些升级信息组装成JSON(JavaScript Object Notation,JS对象简谱)字符串。The upgrade information can include the version number of the upgrade file, the MD5 (Message Digest Algorithm, the fifth edition of the message digest algorithm) value of the upgrade file (the MD5 value is the MD5 value generated when the upgrade file is uploaded), and the URL (Uniform Resource Locator, Uniform Resource Locator), the file name of the upgrade file, and so on. The control server assembles these upgrade information into a JSON (JavaScript Object Notation, JS Object Notation) string.
网络设备接收到升级信息后,获取升级文件对外下载的URL,网络设备生成携带该URL的升级请求,向管控服务端发送该升级请求,主动从管控服务端的下载接口下载升级文件。管控服务端接收到升级请求后,解析获取该URL对应的升级文件,将升级文件下发给网络设备。After receiving the upgrade information, the network device obtains the URL for downloading the upgrade file, the network device generates an upgrade request carrying the URL, sends the upgrade request to the management and control server, and actively downloads the upgrade file from the download interface of the management and control server. After receiving the upgrade request, the management and control server analyzes and obtains the upgrade file corresponding to the URL, and sends the upgrade file to the network device.
网络设备接收到升级文件后,生成该下载的升级文件的MD5值,并获取之前接收到的升级信息中升级文件的MD5值。网络设备将该下载的升级文件的MD5值与升级信息中升级文件的MD5值进行比较。如果比较结果一致,则说明下载的升级文件正确,因此网络设备利用下载的升级文件进行升级;如果比较结果不一致,则说明下载的升级文件可能存在问题,因此网络设备暂时不利用下载的升级文件进行升级。After receiving the upgrade file, the network device generates the MD5 value of the downloaded upgrade file, and obtains the MD5 value of the upgrade file in the previously received upgrade information. The network device compares the MD5 value of the downloaded upgrade file with the MD5 value of the upgrade file in the upgrade information. If the comparison results are consistent, it means that the downloaded upgrade file is correct, so the network device uses the downloaded upgrade file to upgrade; upgrade.
本发明实施例中,通过互联网对网络设备进行升级,能够实现位于不同局域网内的管控服务端对网络设备进行远程升级,并且无需为网络设备映射固定的公网端口。In the embodiment of the present invention, the network equipment is upgraded through the Internet, so that the management and control servers located in different local area networks can remotely upgrade the network equipment, and there is no need to map fixed public network ports for the network equipment.
实施例五Embodiment five
参照图5,示出了本发明实施例五的一种连接服务端的结构框图。Referring to FIG. 5 , it shows a structural block diagram of a connection server according to
如图5所示,连接服务端可以包括以下模块:As shown in Figure 5, the connection server can include the following modules:
获取模块501,用于定时获取并存储网络设备的通信链路信息和管控服务端的通信链路信息;所述网络设备与所述管控服务端位于不同的局域网中;An
第一转发模块502,用于接收到所述网络设备发送的设备信息后,依据所述设备信息查找所述管控服务端的通信链路信,基于所述管控服务端的通信链路信息,将所述设备信息发送至所述管控服务端;The
第二转发模块503,用于接收到所述管控服务端依据所述设备信息发送的升级信息后,依据所述升级信息查找所述网络设备的通信链路信息,基于所述网络设备的通信链路信息,将所述升级信息发送至所述网络设备;所述升级信息作为所述网络设备从所述管控服务端下载升级文件进行升级的依据。The
可选地,所述获取模块501包括:第一获取单元,用于接收所述网络设备定时发送的第一心跳消息,获取所述第一心跳消息对应的第一通信链路信息,将所述第一通信链路信息作为所述网络设备的通信链路信息进行存储;第二获取单元,用于接收所述管控服务端定时发送的第二心跳消息,获取所述第二心跳消息对应的第二通信链路信息,将所述第二通信链路信息作为所述管控服务端的通信链路信息进行存储。Optionally, the acquiring
可选地,所述管控服务端的通信链路信息与所述管控服务端的MAC地址关联存储;所述第一转发模块502包括:第三获取单元,用于获取所述设备信息对应的第一目的MAC地址;第一查找单元,用于查找所述第一目的MAC地址对应的通信链路信息,作为所述管控服务端的通信链路信息。Optionally, the communication link information of the management and control server is stored in association with the MAC address of the management and control server; the
可选地,所述网络设备的通信链路信息与所述网络设备的MAC地址关联存储;所述第二转发模块503包括:第四获取单元,用于获取所述升级信息对应的第二目的MAC地址;第二查找单元,用于查找所述第二目的MAC地址对应的通信链路信息,作为所述网络设备的通信链路信息。Optionally, the communication link information of the network device is stored in association with the MAC address of the network device; the
实施例六Embodiment six
参照图6,示出了本发明实施例六的一种管控服务端的结构框图。Referring to FIG. 6 , it shows a structural block diagram of a management and control server according to Embodiment 6 of the present invention.
如图6所示,管控服务端可以包括以下模块:As shown in Figure 6, the control server can include the following modules:
第一传输模块601,用于定时向连接服务端传输所述管控服务端的通信链路信息;The
存储模块602,用于接收到所述连接服务端基于所述管控服务端的通信链路信息发送的,网络设备的设备信息后,存储所述设备信息;所述网络设备与所述管控服务端位于不同的局域网中;The
第一发送模块603,用于接收到对所述网络设备的升级指令后,获取所述网络设备的设备信息和升级信息,依据所述网络设备的设备信息,向所述连接服务端发送所述升级信息;The
第二发送模块604,用于接收到所述网络设备依据所述升级信息发送的升级请求后,将所述升级信息对应的升级文件发送至所述网络设备。The
实施例七Embodiment seven
参照图7,示出了本发明实施例四的一种网络设备的结构框图。Referring to FIG. 7 , it shows a structural block diagram of a network device according to Embodiment 4 of the present invention.
如图7所示,网络设备可以包括以下模块:As shown in Figure 7, a network device may include the following modules:
第二传输模块701,用于定时向连接服务端传输所述网络设备的通信链路信息;The
第三发送模块702,用于向所述连接服务端发送所述网络设备的设备信息;A
第四发送模块703,用于接收到所述连接服务端基于所述网络设备的通信链路信息发送的升级信息后,依据所述升级信息向管控服务端发送升级请求;所述网络设备与所述管控服务端位于不同的局域网中;The
升级模块704,用于接收到所述管控服务端发送的升级文件后,利用所述升级文件进行升级。The
本发明实施例中,连接服务端基于定时获取的网络设备的通信链路信息与网络设备进行通信,基于定时获取的管控服务端的通信链路信息与管控服务端进行通信,因此连接服务端能够在网络设备与管控服务端之间转发与设备升级相关的信息,实现管控服务端对与该管控服务端位于不同局域网中的网络设备进行远程升级。In the embodiment of the present invention, the connection server communicates with the network device based on the regularly acquired communication link information of the network equipment, and communicates with the management and control server based on the regularly acquired communication link information of the management server, so the connection server can The information related to equipment upgrade is forwarded between the network device and the management and control server, so that the management and control server can remotely upgrade the network equipment that is located in a different local area network from the management and control server.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
在本发明的实施例中,还提供了一种电子设备。该电子设备可以包括一个或多个处理器,以及其上存储有指令的一个或多个机器可读介质,指令例如应用程序。当所述指令由所述一个或多个处理器执行时,使得所述处理器执行如上任一项由连接服务端执行的设备升级方法,或者,执行如上任一项由管控服务端执行的设备升级方法,或者,执行如上任一项由网络设备执行的设备升级方法。In an embodiment of the present invention, an electronic device is also provided. The electronic device may include one or more processors and one or more machine-readable media having instructions, such as application programs, stored thereon. When the instructions are executed by the one or more processors, the processors execute any one of the device upgrade methods performed by the connection server, or execute any of the above devices performed by the management server An upgrade method, or perform any one of the device upgrade methods performed by the network device.
在本发明的实施例中,还提供了一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序可由电子设备的处理器执行,以执行如上任一项由连接服务端执行的设备升级方法,或者,执行如上任一项由管控服务端执行的设备升级方法,或者,执行如上任一项由网络设备执行的设备升级方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an embodiment of the present invention, there is also provided a non-transitory computer-readable storage medium on which a computer program is stored, and the program can be executed by the processor of the electronic device to perform any of the above items executed by the connection server The device upgrade method, or, perform any of the above device upgrade methods performed by the management and control server, or perform any of the above device upgrade methods performed by the network device. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
本领域内的技术人员应明白,本发明实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, devices, or computer program products. Accordingly, embodiments of the invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining 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 present 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 present invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor or processor of other programmable data processing terminal equipment to produce a machine such that instructions executed by the computer or processor of other programmable data processing terminal equipment Produce means for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded into a computer or other programmable data processing terminal equipment, so that a series of operational steps are performed on the computer or other programmable terminal equipment to produce computer-implemented processing, thereby The instructions executed above provide steps for implementing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
尽管已描述了本发明实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所有变更和修改。Having described preferred embodiments of embodiments of the present invention, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, the appended claims are intended to be construed to cover the preferred embodiment and all changes and modifications which fall within the scope of the embodiments of the present invention.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first and second etc. are only used to distinguish one entity or operation from another, and do not necessarily require or imply that these entities or operations, any such actual relationship or order exists. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or terminal equipment comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements identified, or also include elements inherent in such a process, method, article, or end-equipment. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
以上对本发明所提供的一种设备升级方法、网络设备、服务端、电子设备及存储介质,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A device upgrade method, network device, server, electronic device, and storage medium provided by the present invention are described above in detail. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The above embodiments The description is only used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, As stated above, the content of this specification should not be construed as limiting the present invention.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010642988.7A CN112003717B (en) | 2020-07-06 | 2020-07-06 | Equipment upgrade method, network equipment, server, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010642988.7A CN112003717B (en) | 2020-07-06 | 2020-07-06 | Equipment upgrade method, network equipment, server, electronic equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN112003717A CN112003717A (en) | 2020-11-27 |
| CN112003717B true CN112003717B (en) | 2023-05-09 |
Family
ID=73467615
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010642988.7A Active CN112003717B (en) | 2020-07-06 | 2020-07-06 | Equipment upgrade method, network equipment, server, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN112003717B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115622882B (en) * | 2022-09-21 | 2025-04-18 | 昆易电子科技(上海)有限公司 | Remote flash data processing method, system, electronic device and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105450455A (en) * | 2015-12-11 | 2016-03-30 | 上海市共进通信技术有限公司 | System and method for automatically upgrading network devices in batch in factory |
| CN105610627A (en) * | 2016-01-11 | 2016-05-25 | 上海斐讯数据通信技术有限公司 | Method and device for upgrading network device |
| CN107682197A (en) * | 2017-10-17 | 2018-02-09 | 锐捷网络股份有限公司 | Device updating method, the network equipment and server |
| WO2018121250A1 (en) * | 2016-12-30 | 2018-07-05 | 深圳创维-Rgb电子有限公司 | Remote system upgrading method utilized in smart apparatus |
| CN109450921A (en) * | 2018-11-29 | 2019-03-08 | 北京北信源信息安全技术有限公司 | Network status monitoring method, apparatus, storage medium and server |
| CN111277435A (en) * | 2020-01-16 | 2020-06-12 | 南京大鱼半导体有限公司 | Method and device for upgrading network equipment, storage medium and electronic equipment |
-
2020
- 2020-07-06 CN CN202010642988.7A patent/CN112003717B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105450455A (en) * | 2015-12-11 | 2016-03-30 | 上海市共进通信技术有限公司 | System and method for automatically upgrading network devices in batch in factory |
| CN105610627A (en) * | 2016-01-11 | 2016-05-25 | 上海斐讯数据通信技术有限公司 | Method and device for upgrading network device |
| WO2018121250A1 (en) * | 2016-12-30 | 2018-07-05 | 深圳创维-Rgb电子有限公司 | Remote system upgrading method utilized in smart apparatus |
| CN107682197A (en) * | 2017-10-17 | 2018-02-09 | 锐捷网络股份有限公司 | Device updating method, the network equipment and server |
| CN109450921A (en) * | 2018-11-29 | 2019-03-08 | 北京北信源信息安全技术有限公司 | Network status monitoring method, apparatus, storage medium and server |
| CN111277435A (en) * | 2020-01-16 | 2020-06-12 | 南京大鱼半导体有限公司 | Method and device for upgrading network equipment, storage medium and electronic equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112003717A (en) | 2020-11-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104202360B (en) | The method of accessed web page, device and router | |
| US8732205B2 (en) | Universal device identifier for globally identifying and binding disparate device identifiers to the same mobile device | |
| CN101616132B (en) | Method for acquiring data, device and system thereof | |
| CN104283723B (en) | Network access log processing method and processing device | |
| US9967177B2 (en) | Control apparatus, communication system, switch control method and program | |
| WO2001040954A1 (en) | System and method for directing a client to a content source | |
| CN111212156B (en) | A kind of network connection method and device | |
| CN102984223B (en) | A kind of message method, the network equipment and system | |
| US11297131B2 (en) | Method and apparatus for multi-vendor GTM fabric | |
| CN100479367C (en) | Program arranging method and system based on distributing network | |
| US11863633B2 (en) | Cloud communication method and apparatus | |
| CN107124483A (en) | Domain name analytic method and server | |
| CN109474718A (en) | Domain name analytic method and device | |
| CN110380969B (en) | Domain name based traffic scheduling method and system | |
| JP2017500679A (en) | Media resource feedback method, apparatus, program, and recording medium | |
| CN110392069B (en) | CDN service scheduling processing method and CDN server | |
| CN114138325A (en) | Gray scale publishing method and device | |
| CN107634975A (en) | A kind of method of data synchronization, equipment and system | |
| CN112003717B (en) | Equipment upgrade method, network equipment, server, electronic equipment and storage medium | |
| KR20040012311A (en) | Contents Sharing Service System and Method by Presence Information in Wireless Network | |
| CN105281987A (en) | Router and data upload method, device and system | |
| CN101527725A (en) | Information providing server and program, information providing method and information providing system | |
| CN107872538B (en) | Service processing method, reverse proxy and service server for decoupling TCP long connection | |
| WO2012170194A1 (en) | Routing by resolution | |
| CN107612831B (en) | A method and device for transmitting data message for accessing source station |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address |
Address after: 33rd Floor, No.1 Huasheng Road, Yuzhong District, Chongqing 400013 Patentee after: VISIONVERA INFORMATION TECHNOLOGY Co.,Ltd. Country or region after: China Address before: 100000 Beijing Dongcheng District Qinglong Hutong 1 Song Hua Building A1103-1113 Patentee before: VISIONVERA INFORMATION TECHNOLOGY Co.,Ltd. Country or region before: China |