CN112003717A - Device upgrading method, network device, server, electronic device and storage medium - Google Patents

Device upgrading method, network device, server, electronic device and storage medium Download PDF

Info

Publication number
CN112003717A
CN112003717A CN202010642988.7A CN202010642988A CN112003717A CN 112003717 A CN112003717 A CN 112003717A CN 202010642988 A CN202010642988 A CN 202010642988A CN 112003717 A CN112003717 A CN 112003717A
Authority
CN
China
Prior art keywords
information
management
communication link
control server
network equipment
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.)
Granted
Application number
CN202010642988.7A
Other languages
Chinese (zh)
Other versions
CN112003717B (en
Inventor
陈辉
陈婷
杜迎锋
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN202010642988.7A priority Critical patent/CN112003717B/en
Publication of CN112003717A publication Critical patent/CN112003717A/en
Application granted granted Critical
Publication of CN112003717B publication Critical patent/CN112003717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Abstract

The invention provides a device upgrading method, network equipment, a server, electronic equipment and a storage medium. The equipment upgrading method comprises the following steps: the connection server acquires and stores communication link information of the network equipment and communication link information of the control server regularly, and the network equipment and the control server are located in different local area networks; after receiving the equipment information sent by the network equipment, searching the communication link information of the management and control server side according to the equipment information, and sending the equipment information to the management and control server side based on the communication link information of the management and control server side; after receiving the upgrade information sent by the management and control server, searching the communication link information of the network equipment according to the upgrade information, sending the upgrade information to the network equipment based on the communication link information of the network equipment, wherein the upgrade information is used as a basis for the network equipment to download the upgrade file from the management and control server for upgrading. The invention can realize that the management and control server remotely upgrades the network equipment which is positioned in different local area networks with the management and control server.

Description

Device upgrading method, network device, server, electronic device and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an apparatus upgrading method, a network apparatus, a server, an electronic apparatus, and a storage medium.
Background
A network device is a physical entity connected to a network. The variety of network devices is great and increasing. The 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 manages the network devices in the local area network.
In practical applications, it is usually necessary to upgrade these network devices, so as to eliminate the problems existing in the network devices, and improve the performance of the network devices. At present, network devices are generally upgraded in the same local area network, that is, the network devices in the local area network are upgraded through a management and control server in the local area network.
With the continuous improvement of service requirements, a requirement for remotely upgrading network devices in other local area networks by using a management and control server in a certain local area network arises. However, the existing upgrading method cannot realize the remote upgrading.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a device upgrade method, a network device, a server, an electronic device, and a storage medium that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention discloses an apparatus upgrading method, which is applied to a connection server, and the method includes:
the method comprises the steps that communication link information of network equipment and communication link information of a management and control server side are obtained and stored regularly; 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, searching the communication link information of the management and control server according to the device information, and sending the device information to the management and control server based on the communication link information of the management and control server;
after receiving upgrade information sent by the management and control server according to the equipment information, searching communication link information of the network equipment according to the upgrade information, and sending the upgrade information to the network equipment based on the communication link information of the network equipment; the upgrade information is used as a basis for the network equipment to download the upgrade file from the management and control server side for upgrading.
Optionally, the periodically acquiring and storing communication link information of the network device and communication link information of the management and control server includes: receiving a first heartbeat message sent by the network equipment at regular time, acquiring first communication link information corresponding to the first heartbeat message, and storing the first communication link information as the communication link information of the network equipment; and receiving a second heartbeat message sent by the management and control server at regular time, acquiring second communication link information corresponding to the second heartbeat message, and storing the second communication link information as the communication link information of the management and control server.
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: acquiring a first destination MAC address corresponding to the equipment information; (ii) a And searching communication link information corresponding to the first destination MAC address as the communication link information of the management and control server side.
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: acquiring a second destination MAC address corresponding to the upgrading information; and searching the communication link information corresponding to the second destination MAC address as the communication link information of the network equipment.
In a second aspect, an embodiment of the present invention discloses an apparatus upgrading method, which is applied to a management and control server, and the method includes:
the communication link information of the management and control server side is transmitted to a connection server side in a timing mode;
after receiving the equipment information of the network equipment, which is sent by the connection server based on the communication link information of the management and control server, storing the equipment information; the network equipment and the management and control server are located in different local area networks;
after receiving an upgrading instruction of the network equipment, acquiring equipment information and upgrading information of the network equipment, and sending the upgrading information to the connection server side according to the equipment information of the network equipment;
and after receiving an upgrading request sent by the network equipment according to the upgrading information, sending an upgrading file corresponding to the upgrading information to the network equipment.
In a third aspect, an embodiment of the present invention discloses an apparatus upgrading method, which is applied to a network apparatus, and the method includes:
the communication link information of the network equipment is transmitted to a connection server at regular time;
sending the equipment information of the network equipment to the connection server;
after receiving upgrade information sent by the communication link information of the connection server based on the network equipment, sending an upgrade request to a management and control server according to the upgrade information; the network equipment and the management and control server are located in different local area networks;
and after receiving the upgrade file sent by the management and control server, upgrading by using the upgrade file.
In a fourth aspect, an embodiment of the present invention discloses a connection service, where the connection service includes:
the acquisition module is used for acquiring and storing the communication link information of the network equipment and the communication link information of the management and control server side at regular time; the network equipment and the management and control server are located in different local area networks;
the first forwarding module is used for searching a communication link message of the management and control server according to the equipment information after receiving the equipment information sent by the network equipment, and sending the equipment information to the management and control server based on the communication link message of the management and control server;
the second forwarding module is used for searching the communication link information of the network equipment according to the upgrading information after receiving the upgrading information sent by the management and control server according to the equipment information, and sending the upgrading information to the network equipment based on the communication link information of the network equipment; the upgrade information is used as a basis for the network equipment to download the upgrade file from the management and control server side for upgrading.
Optionally, the obtaining module includes: a first obtaining unit, configured to receive a first heartbeat message sent by the network device at regular time, obtain first communication link information corresponding to the first heartbeat message, and store the first communication link information as communication link information of the network device; and the second obtaining unit is configured to receive a second heartbeat message sent by the management and control server at regular time, obtain second communication link information corresponding to the second heartbeat message, and store the second communication link information as the communication link information of the management and control server.
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 comprises: a third obtaining unit, configured to obtain a first destination MAC address corresponding to the device information; and the first searching unit is configured to search the communication link information corresponding to the first destination MAC address, as the communication link information of the management and control server.
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 comprises: a fourth obtaining unit, configured to obtain a second destination MAC address corresponding to the upgrade information; and the second searching unit is used for searching the communication link information corresponding to the second destination MAC address as the communication link information of the network equipment.
In a fifth aspect, an embodiment of the present invention discloses a management and control server, where the management and control server includes:
the first transmission module is used for transmitting the communication link information of the management and control server side to a connection server side at regular time;
the storage module is used for storing the equipment information after receiving the equipment information of the network equipment, which is sent by the connection server based on 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 sending module is used for obtaining the equipment information and the upgrading information of the network equipment after receiving an upgrading instruction of the network equipment, and sending the upgrading information to the connection server side according to the equipment information of the network equipment;
and the second sending module is used for sending the upgrade file corresponding to the upgrade information to the network equipment after receiving the upgrade request sent by the network equipment according to the upgrade information.
In a sixth aspect, an embodiment of the present invention discloses a network device, where the network device includes:
the second transmission module is used for transmitting the communication link information of the network equipment to a connection server at regular time;
a third sending module, configured to send device information of the network device to the connection server;
the fourth sending module is used for sending an upgrading request to the management and control server according to the upgrading information after receiving the upgrading information sent by the communication link information of the network equipment of the connection server; the network equipment and the management and control server are located in different local area networks;
and the upgrading module is used for upgrading by using the upgrading file after receiving the upgrading file sent by the management and control server side.
In a seventh aspect, an embodiment of the present invention discloses an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon; when executed by the one or more processors, the instructions cause the processors to perform any one of the above device upgrade methods performed by the connection service, or any one of the above device upgrade methods performed by the regulation service, or any one of the above device upgrade methods performed by the network device.
In an eighth aspect, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a device upgrade method executed by a connection server as any one of the above, or implements a device upgrade method executed by a management server as any one of the above, or implements a device upgrade method executed by a network device as any one of the above.
In the embodiment of the invention, a connection server acquires and stores communication link information of network equipment and communication link information of a control server regularly, and the network equipment and the control server are positioned in different local area networks; after receiving the device information sent by the network device, the connection server searches the communication link information of the management and control server according to the device information, and sends the device information to the management and control server based on the communication link information of the management and control server; and after receiving the upgrading information sent by the management and control server according to the equipment information, the connection server searches the communication link information of the network equipment according to the upgrading information, and sends the upgrading information to the network equipment based on the communication link information of the network equipment, wherein the upgrading information is used as the basis for the network equipment to download upgrading files from the management and control server for upgrading. Therefore, 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 acquired at the timing, and communicates with the management and control server based on the communication link information of the management and control server acquired at the timing, so that the connection server can forward information related to device upgrade between the network device and the management and control server, and the management and control server remotely upgrades the network device located in different local area networks from the management and control server.
Drawings
Fig. 1 is a flowchart illustrating steps of a device upgrading method according to a first embodiment of the present invention.
Fig. 2 is a flowchart of steps of a device upgrading method according to a second embodiment of the present invention.
Fig. 3 is a flowchart of steps of a device upgrading method according to a third embodiment of the present invention.
Fig. 4 is a flowchart illustrating an apparatus upgrading method according to a fourth embodiment of the present invention.
Fig. 5 is a block diagram of a connection server according to a fifth embodiment of the present invention.
Fig. 6 is a block diagram of a management and control server according to a sixth embodiment of the present invention.
Fig. 7 is a block diagram of a network device according to a seventh embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
In the embodiment of the invention, the information related to equipment upgrading is forwarded between the network equipment and the management and control server side by connecting the server side, so that the management and control server side can remotely upgrade the network equipment which is positioned in different local area networks with the management and control server side.
Network devices may include personal computers, servers, switches, bridges, routers, access devices, and the like. For example, in an internet of view, the network device may be a device (e.g., a vhub) for connecting the internet with the internet, the device functioning like a switch, and so on.
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 a management and control front end, a management and control server (also referred to as a management and control back end), a connection server, a DataBase (DB), and so on. The control front end may be a Web (Web) end, and may provide a user interaction interface, etc. The management and control server may perform management control on the network device, such as controlling upgrading of the network device. The connection server may be an SNMP (Simple Network Management Protocol) -TCP (Transmission Control Protocol) service, and the connection server may communicate with the Management and Control server and the Network device in different lans respectively to implement operations such as information forwarding.
In the following embodiments, the network device and the management and control server are both located in different local area networks.
Example one
Referring to fig. 1, a flowchart illustrating steps of a device upgrading method according to a first embodiment of the present invention is shown. The equipment upgrading method of the embodiment of the invention can be applied to the connection server.
As shown in fig. 1, the device upgrade method may include the following steps:
step 101, regularly acquiring and storing communication link information of the network device and communication link information of the management and control server.
The connection server respectively stores the communication link information of the network equipment and the communication link information of the management and control server, so that the information is forwarded to the network equipment based on the communication link information of the network equipment in the following process, and the information is forwarded to the management and control server based on the communication link information of the management and control server.
Because the ports corresponding to the network devices on the public network are randomly allocated and the ports can change at any time, the communication link information of the network devices can also change, and therefore the connection service end needs to acquire and store the communication link information of the network devices at regular time so as to ensure the accuracy of the communication link information of the network devices. Because the ports on the management and control server, which interact with the connection server, are randomly allocated, and the ports can change at any time, the communication link information of the management and control server also changes, and therefore the connection server needs to acquire and store the communication link information of the management and control server at regular time, so as to ensure the accuracy of the communication link information of the management and control server.
In the embodiment of the invention, any applicable numerical value can be set according to actual experience as to the specific numerical value of the timing time. For example, the timing time may be set to be 1 second, 2 seconds, 3 seconds, 5 seconds, and the like, which is not limited in this embodiment of the present invention.
Step 102, after receiving the device information sent by the network device, searching the communication link information of the management and control server according to the device information, and sending the device information to the management and control server based on the communication link information of the management and control server.
After the network device establishes connection with the connection server, the network device sends the device information corresponding to the network device to the connection server. And after receiving the equipment information sent by the network equipment, the connection service end searches the communication link information of the management and control service end according to the equipment information. And the connection server sends the equipment information of the network equipment to the management and control server based on the communication link information of the management and control server.
The device information of the network device may include a MAC (Media Access Control) address, an IP (Internet Protocol) address, a version number, a device name, a device model, a device type, and the like of the network device.
Step 103, after receiving the upgrade information sent by the management and control server according to the device information, searching the communication link information of the network device according to the upgrade information, and sending the upgrade information to the network device based on the communication link information of the network device.
When the network device needs to be upgraded, the management and control server may obtain the upgrade information corresponding to the network device according to the device information of the network device. And the management and control server sends the upgrading information to the connection server. And after receiving the upgrading information sent by the control server, the connection server searches the communication link information of the network equipment according to the upgrading information. And the connection server sends the upgrading information to the network equipment based on the communication link information of the network equipment. The upgrade information is used as a basis for the network equipment to download the upgrade file from the management and control server side and upgrade by using the upgrade file.
Example two
Referring to fig. 2, a flowchart illustrating steps of a device upgrading method according to a second embodiment of the present invention is shown. The equipment upgrading method provided by the embodiment of the invention can be applied to a management and control server side.
As shown in fig. 2, the device upgrade method may include the steps of:
step 201, regularly transmitting the communication link information of the management and control server to the connection server.
Because the communication link information of the management and control server side changes, the management and control server side transmits the communication link information of the management and control server side to the connection server side at regular time. For example, the management and control server may transmit the communication link information of the management and control server to the connection server at regular time by sending a heartbeat message to the connection server.
Step 202, after receiving the device information of the network device, which is sent by the connection server based on the communication link information of the management and control server, storing the device information.
And after receiving the equipment information sent by the network equipment, the connection server sends the equipment information of the network equipment to the management and control server based on the communication link information of the management and control server. And after receiving the equipment information of the network equipment, the management and control server stores the equipment information.
Step 203, after receiving the upgrade instruction to the network device, obtaining the device information and the upgrade information of the network device, and sending 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 may perform corresponding operations, such as selecting the network device, selecting an upgrade operation, and the like, at the management and control front end, so as to trigger an upgrade instruction for the network device. The control server side obtains the equipment information and the upgrading information of the network equipment after receiving the upgrading instruction of the network equipment, and sends the upgrading information of the network equipment to the connection server side according to the equipment information of the network equipment. And the connection service end forwards the upgrading information to the network equipment.
And step 204, after receiving an upgrade request sent by the network equipment according to the upgrade information, sending an upgrade file corresponding to the upgrade information to the network equipment.
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. And after receiving the upgrading request sent by the network equipment, the control server acquires an upgrading file corresponding to the upgrading request and sends the upgrading file to the network equipment. The network device can be upgraded by using the upgrade file.
EXAMPLE III
Referring to fig. 3, a flowchart illustrating steps of a device upgrading method according to a third embodiment of the present invention is shown. The equipment upgrading method of the embodiment of the invention can be applied to network equipment.
As shown in fig. 3, the device upgrade method may include the steps of:
step 301, regularly transmitting the communication link information of the network device to a connection service end.
Since the communication link information of the network device changes, the network device transmits the communication link information of the network device to the connection service side at regular time. For example, the network device may transmit the communication link information of the network device to the connection server at regular time by sending a heartbeat message to the connection server.
Step 302, sending the device information of the network device to the connection server.
And after the network equipment is successfully connected with the connection service end, the equipment information of the network equipment is sent to the connection service end. And after receiving the equipment information sent by the network equipment, the connection server sends the equipment information of the network equipment to the management and control server based on the communication link information of the management and control server.
Step 303, after receiving the upgrade information sent by the connection server based on the communication link information of the network device, sending an upgrade request to the management and control server according to the upgrade information.
When the network equipment needs to be upgraded, the management and control server side sends upgrading information corresponding to the network equipment to the connection server side, and the connection server side sends the upgrading information to the network equipment based on the communication link information of the network equipment. 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. And the management and control server sends the upgrade file corresponding to the upgrade request to the network equipment.
And step 304, after receiving the upgrade file sent by the management and control server, upgrading by using the upgrade file.
After the network equipment receives the upgrade file sent by the management and control server, the upgrade file is used for upgrading, and therefore remote upgrade is achieved.
In the embodiment of the invention, the connection server communicates with the network equipment based on the communication link information of the network equipment acquired at regular time, and communicates with the control server based on the communication link information of the control server acquired at regular time, so that the connection server can forward information related to equipment upgrading between the network equipment and the control server, and the control server can remotely upgrade the network equipment in different local area networks with the control server.
Example four
In the following, the device upgrade method is described in detail through the overall interaction process between devices.
Fig. 4 is a flowchart illustrating an apparatus upgrading method according to a fourth embodiment of the present invention. As shown in fig. 4, the device upgrade method may include the following processes:
1. the network equipment sends a first heartbeat message to the connection service end at regular time.
Because the network device and the management and control server are located in different local area networks, interaction needs to be performed through a public network. When the network equipment is used as a client to interact through a public network, if a fixed public network port is mapped on the public network, the network equipment interacts through the fixed public network port. However, if there are multiple network devices, multiple public network ports are mapped, which occupies too many public network ports, and in general, the ports of the public network that are open to the network devices are limited. In order to solve the above problem, in the embodiment of the present invention, a fixed public network port is not mapped to a network device on a public network, but a public network port is randomly allocated to the network device, but a communication link of the network device is not fixed and may change frequently. Therefore, the network device transmits the communication link information to the connection service terminal at regular time so as to ensure the accuracy of the communication link information of the network device stored in the connection service terminal.
In the implementation, the network device will actively connect with the connection server at or after the startup. For example, the network device serves as a client connected to the server, and performs TCP connection with the connection server. And after the connection is successful, the network equipment sends a first heartbeat message to the connection server at regular time.
2. And the connection service end updates the communication link information of the network equipment into a routing table of the network equipment.
And 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 equipment. The communication link information of the network device may include: the port of the network device interacting with the public network, the public network port randomly allocated by the public network for the network device, the public network port mapped by the public network for the connection service end, and the port of the connection service end interacting with the public network. Of course, if there are other routers, switches, and other devices between the network device and the connection service end, the communication link information of the network device may also include ports of these routers, switches, and other devices.
The connection server may preset a routing table of the network device, and the routing table of the network device may store communication link information of the network device in a key-value manner. The first heartbeat message sent by the network equipment has a corresponding source MAC address, and the source MAC address is the MAC address of the network equipment. For example, the first heartbeat message is a data packet, and a header of the data packet carries a source MAC address of the data packet. After the connection server obtains the communication link information of the network device, the connection server obtains a source MAC address (namely, the MAC address of the network device) corresponding to the first heartbeat message, and stores the MAC address of the network device and the communication link information of the network device into a routing table of the network device in an associated manner. When storing, the MAC address of the network device is used as a key, and the communication link information of the network device is used as a value.
And the connection service end updates the communication link information of the network equipment once every time the connection service end receives the first heartbeat message.
3. And the connection server side replies a first heartbeat response to the network equipment.
4. And the management and control server sends a second heartbeat message to the connection server at regular time.
Because the ports on the management and control server interacting with the connection server are randomly allocated, the ports will change at any time, and therefore the communication link information of the management and control server will also change. Therefore, the management and control server transmits the communication link information to the connection server at regular time, so as to ensure the accuracy of the communication link information of the management and control server stored in the connection server.
In implementation, the management and control server is actively connected to the connection server during or after the start-up. For example, the management and control server serves as a client connected to the server, and performs TCP connection with the connection server. And after the connection is successful, the management and control server sends a second heartbeat message to the connection server at regular time.
5. And the connection server updates the communication link information of the management and control server to a routing table of the management and control server.
And after receiving the second heartbeat message, the connection server acquires 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 server may include: the management and control server is provided with a port which is interacted with the connection server and a port which is interacted with the management and control server. Of course, if there are other devices such as routers and switches between the management server and the connection server, the communication link information of the management server may further include ports of these devices, and the like.
The connection server may preset a routing table of the management and control server, and the routing table of the management and control server may store communication link information of the management and control server in a key-value manner. And the second heartbeat message sent by the control server side has a corresponding source MAC address, and the source MAC address is the MAC address of the control server side. For example, the second heartbeat message is a data packet, and a header of the data packet carries a source MAC address of the data packet. And after the connection server obtains the communication link information of the control server, obtaining a source MAC address (namely the MAC address of the control server) corresponding to the second heartbeat message, and storing the MAC address of the control server and the communication link information of the control server in a routing table of the control server in an associated manner. During storage, the MAC address of the management and control server is used as a key, and the communication link information of the management and control server is used as a value.
And updating the communication link information of the pipe control server once by the connection server every time the connection server receives the second heartbeat message.
6. And the connection server side replies a first heartbeat response to the management and control server side.
7. And the network equipment reports the equipment information to the connection service end and carries the first destination MAC address.
And after the network equipment is successfully connected, reporting the equipment information of the network equipment to a connection server. In implementation, the network device packages the device information into a data packet, where a packet header of the data packet carries a first destination MAC address, and the first destination MAC address is an MAC address of a target management and control server to which the device information is to be sent.
8. And the connection service end searches the communication link information corresponding to the first destination MAC address from a routing table of the control service end.
And after receiving the equipment information of the network equipment, the connection service end analyzes the data packet and acquires a first destination MAC address corresponding to the equipment information. The connection service end searches the communication link information corresponding to the first destination MAC address from the routing table of the control service end, and the communication link information corresponding to the first destination MAC address is the communication link information of the control service end.
9. And the connection service end sends the equipment information to the management and control service end based on the communication link information corresponding to the first destination MAC address.
10. And the management and control server side stores the equipment information of the network equipment in a storage.
And after receiving the equipment information of the network equipment, the management and control server analyzes the data and stores the equipment information of the network equipment into a 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. And the management and control server transmits the equipment information of the network equipment to a management and control front-end page for display.
The management and control server side can transmit the equipment information of the network equipment to the management and control front-end page for display. When displayed, only a portion of the device information may be displayed. For example, the device names of the network devices may be displayed in a page, so that the user may select the target device name from the page for upgrading.
12. The management and control front end triggers upgrading and transmits related data to the management and control server.
The user selects the device name of the network device at 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. And the management and control server acquires the equipment information and the upgrading information of the network equipment from the database.
The database stores the upgrading information corresponding to each equipment type. And the management and control server searches the equipment information corresponding to the equipment name from the database according to the equipment name transmitted by the management and control front end. And the management and control server acquires the equipment type from the searched equipment information and then acquires the upgrading information of the network equipment corresponding to the equipment type.
14. And the management and control server sends the upgrading information to the connection server, and the upgrading information carries the second target MAC address.
And the management and control server acquires the MAC address of the network equipment from the searched equipment information, packages the upgrade information into a data packet by taking the searched MAC address as a second destination MAC address, and carries the second destination MAC address in the packet head of the data packet. And the management and control server sends the data packet to the connection server.
15. And the connection service end inquires the communication link information corresponding to the second destination MAC address from a routing table of the network equipment.
And after receiving the upgrading information, the connection service end analyzes the data packet and acquires a second target MAC address corresponding to the upgrading information. And the connection service end searches the communication link information corresponding to the second destination MAC address from the routing table of the network equipment, wherein the communication link information corresponding to the second destination MAC address is the communication link information of the network equipment.
16. And the connection service end sends the upgrading information to the network equipment based on the communication link information corresponding to the second destination MAC address.
17. And the network equipment downloads the upgrade file from the management and control server side according to the upgrade information for upgrading.
The upgrade information may include a version number of the upgrade file, an MD5(Message Digest Algorithm, fifth edition) value of the upgrade file (the MD5 value is an MD5 value generated when the upgrade file is uploaded), a URL (Uniform Resource Locator) of the upgrade file downloaded to the outside, a file name of the upgrade file, and the like. The management and control server assembles the upgrade information into a JSON (JavaScript Object Notation) character string.
After receiving the upgrade information, the network device obtains the externally downloaded URL of the upgrade file, generates an upgrade request carrying the URL, sends the upgrade request to the management and control server, and actively downloads the upgrade file from a download interface of the management and control server. And after receiving the upgrading request, the control server analyzes and acquires the upgrading file corresponding to the URL and issues the upgrading file to the network equipment.
After receiving the upgrade file, the network device generates an MD5 value of the downloaded upgrade file, and obtains an 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 result is consistent, the downloaded upgrade file is correct, so that the network equipment is upgraded by using the downloaded upgrade file; if the comparison result is inconsistent, it indicates that the downloaded upgrade file may have a problem, and therefore the network device does not temporarily upgrade with the downloaded upgrade file.
In the embodiment of the invention, the network equipment is upgraded through the Internet, the remote upgrade of the network equipment by the management and control service terminals in different local area networks can be realized, and a fixed public network port does not need to be mapped for the network equipment.
EXAMPLE five
Referring to fig. 5, a block diagram of a connection server according to a fifth embodiment of the present invention is shown.
As shown in fig. 5, the connection server may include the following modules:
an obtaining module 501, configured to obtain and store communication link information of a network device and communication link information of a management and control server at regular time; the network equipment and the management and control server are located in different local area networks;
a first forwarding module 502, configured to, after receiving the device information sent by the network device, search for a communication link message 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 message of the management and control server;
a second forwarding module 503, configured to search, after receiving upgrade information sent by the management and control server according to the device information, communication link information of the network device according to the upgrade information, and send, based on the communication link information of the network device, the upgrade information to the network device; the upgrade information is used as a basis for the network equipment to download the upgrade file from the management and control server side for upgrading.
Optionally, the obtaining module 501 includes: a first obtaining unit, configured to receive a first heartbeat message sent by the network device at regular time, obtain first communication link information corresponding to the first heartbeat message, and store the first communication link information as communication link information of the network device; and the second obtaining unit is configured to receive a second heartbeat message sent by the management and control server at regular time, obtain second communication link information corresponding to the second heartbeat message, and store the second communication link information as the communication link information of the management and control server.
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 502 comprises: a third obtaining unit, configured to obtain a first destination MAC address corresponding to the device information; and the first searching unit is configured to search the communication link information corresponding to the first destination MAC address, as the communication link information of the management and control server.
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 503 includes: a fourth obtaining unit, configured to obtain a second destination MAC address corresponding to the upgrade information; and the second searching unit is used for searching the communication link information corresponding to the second destination MAC address as the communication link information of the network equipment.
EXAMPLE six
Referring to fig. 6, a block diagram of a management and control server according to a sixth embodiment of the present invention is shown.
As shown in fig. 6, the management server may include the following modules:
a first transmission module 601, configured to transmit, to a connection server at regular time, communication link information of the management and control server;
the storage module 602 is configured to store device information of a network device 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; the network equipment and the management and control server are located in different local area networks;
a first sending module 603, configured to obtain device information and upgrade information of the network device after receiving an upgrade instruction for the network device, and send the upgrade information to the connection server according to the device information of the network device;
a second sending module 604, configured to send an upgrade file corresponding to the upgrade information to the network device after receiving an upgrade request sent by the network device according to the upgrade information.
EXAMPLE seven
Referring to fig. 7, a block diagram of a network device according to a fourth embodiment of the present invention is shown.
As shown in fig. 7, the network device may include the following modules:
a second transmission module 701, configured to transmit communication link information of the network device to a connection server at regular time;
a third sending module 702, configured to send device information of the network device to the connection server;
a fourth sending module 703, 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 communication link information of the network device of the connection server; the network equipment and the management and control server are located in different local area networks;
and the upgrading module 704 is configured to upgrade by using the upgrade file after receiving the upgrade file sent by the management and control server.
In the embodiment of the invention, the connection server communicates with the network equipment based on the communication link information of the network equipment acquired at regular time, and communicates with the control server based on the communication link information of the control server acquired at regular time, so that the connection server can forward information related to equipment upgrading between the network equipment and the control server, and the control server can remotely upgrade the network equipment in different local area networks with the control server.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In an embodiment of the 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 an application program, stored thereon. When executed by the one or more processors, the instructions cause the processors to perform any one of the above device upgrade methods performed by the connection service, or any one of the above device upgrade methods performed by the regulation service, or any one of the above device upgrade methods performed by the network device.
In an embodiment of the present invention, there is also provided a non-transitory computer-readable storage medium having stored thereon a computer program executable by a processor of an electronic device to perform a device upgrade method performed by a connection service as any one of the above, or a device upgrade method performed by a regulation service as any one of the above, or a device upgrade method performed by a network device as any one of the above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present 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 present 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, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations 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 flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is provided for the device upgrading method, the network device, the server, the electronic device and the storage medium, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (11)

1. An equipment upgrading method is applied to a connection server side, and comprises the following steps:
the method comprises the steps that communication link information of network equipment and communication link information of a management and control server side are obtained and stored regularly; 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, searching the communication link information of the management and control server according to the device information, and sending the device information to the management and control server based on the communication link information of the management and control server;
after receiving upgrade information sent by the management and control server according to the equipment information, searching communication link information of the network equipment according to the upgrade information, and sending the upgrade information to the network equipment based on the communication link information of the network equipment; the upgrade information is used as a basis for the network equipment to download the upgrade file from the management and control server side for upgrading.
2. The method according to claim 1, wherein the periodically 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 sent by the network equipment at regular time, acquiring first communication link information corresponding to the first heartbeat message, and storing the first communication link information as the communication link information of the network equipment;
and receiving a second heartbeat message sent by the management and control server at regular time, acquiring second communication link information corresponding to the second heartbeat message, and storing the second communication link information as the communication link information of the management and control server.
3. The method according to claim 1, wherein 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:
acquiring a first destination MAC address corresponding to the equipment information; (ii) a
And searching communication link information corresponding to the first destination MAC address as the communication link information of the management and control server side.
4. The method of claim 1, wherein the communication link information of the network device is stored in association with a MAC address of the network device; the searching for the communication link information of the network device according to the upgrade information includes:
acquiring a second destination MAC address corresponding to the upgrading information;
and searching the communication link information corresponding to the second destination MAC address as the communication link information of the network equipment.
5. The equipment upgrading method is applied to a management and control server side, and comprises the following steps:
the communication link information of the management and control server side is transmitted to a connection server side in a timing mode;
after receiving the equipment information of the network equipment, which is sent by the connection server based on the communication link information of the management and control server, storing the equipment information; the network equipment and the management and control server are located in different local area networks;
after receiving an upgrading instruction of the network equipment, acquiring equipment information and upgrading information of the network equipment, and sending the upgrading information to the connection server side according to the equipment information of the network equipment;
and after receiving an upgrading request sent by the network equipment according to the upgrading information, sending an upgrading file corresponding to the upgrading information to the network equipment.
6. A device upgrading method is applied to network devices, and comprises the following steps:
the communication link information of the network equipment is transmitted to a connection server at regular time;
sending the equipment information of the network equipment to the connection server;
after receiving upgrade information sent by the communication link information of the connection server based on the network equipment, sending an upgrade request to a management and control server according to the upgrade information; the network equipment and the management and control server are located in different local area networks;
and after receiving the upgrade file sent by the management and control server, upgrading by using the upgrade file.
7. A connection service, wherein the connection service comprises:
the acquisition module is used for acquiring and storing the communication link information of the network equipment and the communication link information of the management and control server side at regular time; the network equipment and the management and control server are located in different local area networks;
the first forwarding module is used for searching a communication link message of the management and control server according to the equipment information after receiving the equipment information sent by the network equipment, and sending the equipment information to the management and control server based on the communication link message of the management and control server;
the second forwarding module is used for searching the communication link information of the network equipment according to the upgrading information after receiving the upgrading information sent by the management and control server according to the equipment information, and sending the upgrading information to the network equipment based on the communication link information of the network equipment; the upgrade information is used as a basis for the network equipment to download the upgrade file from the management and control server side for upgrading.
8. The utility model provides a management and control server side, its characterized in that, management and control server side includes:
the first transmission module is used for transmitting the communication link information of the management and control server side to a connection server side at regular time;
the storage module is used for storing the equipment information after receiving the equipment information of the network equipment, which is sent by the connection server based on 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 sending module is used for obtaining the equipment information and the upgrading information of the network equipment after receiving an upgrading instruction of the network equipment, and sending the upgrading information to the connection server side according to the equipment information of the network equipment;
and the second sending module is used for sending the upgrade file corresponding to the upgrade information to the network equipment after receiving the upgrade request sent by the network equipment according to the upgrade information.
9. A network device, characterized in that the network device comprises:
the second transmission module is used for transmitting the communication link information of the network equipment to a connection server at regular time;
a third sending module, configured to send device information of the network device to the connection server;
the fourth sending module is used for sending an upgrading request to the management and control server according to the upgrading information after receiving the upgrading information sent by the communication link information of the network equipment of the connection server; the network equipment and the management and control server are located in different local area networks;
and the upgrading module is used for upgrading by using the upgrading file after receiving the upgrading file sent by the management and control server side.
10. An electronic device, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon;
the instructions, when executed by the one or more processors, cause the processors to perform the device upgrade method of any one of claims 1 to 4, or perform the device upgrade method of claim 5, or perform the device upgrade method of claim 6.
11. A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, implements a device upgrade method as claimed in any one of claims 1 to 4, or implements a device upgrade method as claimed in claim 5, or implements a device upgrade method as claimed in claim 6.
CN202010642988.7A 2020-07-06 2020-07-06 Device upgrading method, network device, server, electronic device and storage medium Active CN112003717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010642988.7A CN112003717B (en) 2020-07-06 2020-07-06 Device upgrading method, network device, server, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010642988.7A CN112003717B (en) 2020-07-06 2020-07-06 Device upgrading method, network device, server, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN112003717A true CN112003717A (en) 2020-11-27
CN112003717B 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 Device upgrading method, network device, server, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112003717B (en)

Citations (6)

* Cited by examiner, † Cited by third party
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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
CN112003717B (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN109347968B (en) Method, equipment and system for downloading data blocks of resource file
CN104283723B (en) Network access log processing method and processing device
EP2985705A2 (en) Webpage access method and apparatus, and router
CN102047243A (en) Request routing based on class
CN109729183B (en) Request processing method, device, equipment and storage medium
WO2001040954A1 (en) System and method for directing a client to a content source
CN112788126B (en) Resource downloading method, device, server and storage medium
CN107580052B (en) Self-evolution network self-adaptive crawler method and system
CN112995269B (en) Data processing method, computer device and readable storage medium
CN110392069B (en) CDN service scheduling processing method and CDN server
CN101621548A (en) Method and system for realizing terminal resource sharing based on peer connection system
CN111064780B (en) Multitask content updating method, device, equipment and medium
CN109474718A (en) Domain name analytic method and device
CN112565406B (en) Gray release method, gray release system and electronic equipment
CN113704654A (en) Page display method and device, electronic equipment and storage medium
JP2010198055A (en) Web state monitoring system and web server
CN112039718A (en) Upgrade state detection method, server, device and storage medium
CN107634975A (en) A kind of method of data synchronization, equipment and system
CN112398797B (en) Data transmission method, receiving device, transmitting device, medium, equipment and system
CN110740355A (en) Equipment monitoring method and device, electronic equipment and storage medium
CN110309342B (en) Media file acquisition method, device and storage medium
JP5109901B2 (en) Session data sharing method
KR20040012311A (en) Contents Sharing Service System and Method by Presence Information in Wireless Network
US11297131B2 (en) Method and apparatus for multi-vendor GTM fabric
JP2003209570A (en) Relaying method, and client, server, and repeater used for implementing the method

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