Device upgrade method, device, terminal device and storage medium
By adopting service mode and client mode configurations in the batch upgrade system, service mode devices download and multicast upgrade data packets, solving the network congestion problem caused by batch upgrades and improving upgrade efficiency and network bandwidth utilization.
Patent Information
- Application Number
- CN202010296787.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-15
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2040-04-15
AI Technical Summary
When upgrading minivhub devices in batches, the management and control platform in the existing technology needs to send upgrade messages to multiple devices, resulting in large network bandwidth usage and possible network congestion problems.
Using the configuration of service mode and client mode, after the management and control server receives the upgrade response command from the client mode device, the service mode device downloads the upgrade data packet and sends it to the client mode device in multicast form, which reduces the reception of upgrade packets from the external network. Reduces network bandwidth usage.
It achieves batch upgrade while reducing network bandwidth usage, avoiding network congestion problems, and improving upgrade efficiency.
Smart Images

Figure CN111638891B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote control technology, and in particular to a device upgrading method, device, terminal device and storage medium. Background Art
[0002] In the prior art, minivhub devices in a wide area network are upgraded through a management and control platform. Each minivhub device needs to be connected to the management and control platform and report basic information of each minivhub device, such as the IP address, MAC address or device version number of the minivhub device.
[0003] When the management and control platform performs batch upgrades on minivhub devices, the management and control platform sends upgrade messages to each minivhub device based on the basic information of multiple minivhub devices obtained. This will occupy a large amount of network bandwidth and may cause network congestion. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a device upgrading method, apparatus, terminal device and storage medium that overcome the above problems or at least partially solve the above problems.
[0005] In a first aspect, an embodiment of the present invention provides a device upgrade method, which is applied to a batch upgrade system, wherein the batch upgrade system includes a management and control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device in a service mode and at least one upgrade device in a client mode, and an upgrade device in a service mode is connected to the at least one upgrade device in the client mode, and the method includes:
[0006] If the control server receives a response instruction of accepting the upgrade returned by the at least one client mode upgrade device, the service mode upgrade device receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes the upgrade package path address;
[0007] The upgrade device in the service mode downloads the upgrade data packet from the management and control server according to the upgrade package path address;
[0008] After the upgrade data packet is downloaded, the upgrade device in the service mode sends the upgrade data packet to the at least one upgrade device in the client mode in a multicast manner, so that the at least one upgrade device in the client mode is upgraded according to the upgrade data packet.
[0009] Optionally, the upgrade device in the service mode is connected to the at least one upgrade device in the client mode, specifically including:
[0010] The upgrade device in the service mode receives a connection request instruction sent by the at least one upgrade device in the client mode, wherein the connection request instruction includes a MAC address of the upgrade device in the client mode;
[0011] The upgrade device in the service mode sends a connection success response instruction to at least one upgrade device in the client mode corresponding to the MAC address according to the MAC address.
[0012] Optionally, before the upgrade device in the service mode receives the upgrade instruction sent by the management and control server, the method further includes:
[0013] The upgrade device in the service mode receives the upgrade query instruction sent by the management and control server;
[0014] The upgrade device in the service mode sends the upgrade query instruction to the at least one upgrade device in the client mode in a multicast form;
[0015] The upgrade device in service mode receives a response instruction from the at least one upgrade device in client mode asking whether to accept the upgrade, and sends the response instruction to the management and control server.
[0016] Optionally, before the upgrade device in the service mode receives the upgrade query instruction sent by the management and control server, the method further includes:
[0017] The upgrade device in the service mode sends local configuration information of the upgrade device in the service mode to the management and control server, where the local configuration information at least includes an IP address, a port number, and an upgrade package version number.
[0018] Optionally, the upgrade device in the service mode downloads the upgrade data packet from the management and control server according to the upgrade package path address, including:
[0019] The upgrade device in the service mode downloads the upgrade data packet from the database of the management and control server through the http protocol according to the upgrade package path address.
[0020] In a second aspect, an embodiment of the present invention provides a device upgrade apparatus, which is applied to the upgrade device of the service mode in a batch upgrade system, wherein the batch upgrade system includes a management and control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device of the service mode and at least one upgrade device of the client mode, and one upgrade device of the service mode is connected to the at least one upgrade device of the client mode, and the apparatus includes:
[0021] A receiving module, configured to receive an upgrade instruction sent by the control server after the control server receives a response instruction of accepting the upgrade returned by the at least one client mode upgrade device, wherein the upgrade instruction includes an upgrade package path address;
[0022] A download module, used to download the upgrade data package from the management and control server according to the upgrade package path address;
[0023] The sending module is used to send the upgrade data packet to the at least one client mode upgrade device in a multicast manner after the upgrade data packet is downloaded, so that the at least one client mode upgrade device is upgraded according to the upgrade data packet.
[0024] Optionally, the receiving module further includes:
[0025] Receiving a connection request instruction sent by the at least one client mode upgrade device, wherein the connection request instruction includes a MAC address of the client mode upgrade device;
[0026] According to the MAC address, a response instruction of successful connection is sent to at least one client mode upgrade device corresponding to the MAC address.
[0027] Optionally, the device further comprises a query module, wherein the query module is configured to:
[0028] Receiving an upgrade query instruction sent by the management and control server;
[0029] Sending the upgrade query instruction to the at least one client mode upgrade device in a multicast form;
[0030] Receive a response instruction from the at least one client mode upgrade device to indicate whether to accept the upgrade, and send the response instruction to the management and control server.
[0031] Optionally, the device further includes a reporting module, and the reporting module is used to:
[0032] The local configuration information of the service device of the service mode is sent to the management and control server, wherein the local configuration information at least includes an IP address, a port number and an upgrade package version number.
[0033] Optionally, the download module is used to:
[0034] According to the upgrade package path address, the upgrade data package is downloaded from the database of the management and control server through the http protocol.
[0035] In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and a memory;
[0036] The memory stores a computer program; and the at least one processor executes the computer program stored in the memory to implement the device upgrading method provided in the first aspect.
[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the device upgrade method provided in the first aspect is implemented.
[0038] The technical solution provided by the embodiment of the present invention is applied to a batch upgrade system, which includes a control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device in service mode and at least one upgrade device in client mode, and an upgrade device in service mode is connected to at least one upgrade device in client mode. If the control server receives a response instruction of accepting the upgrade returned by at least one upgrade device in client mode, the upgrade device in service mode receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes the path address of the upgrade package; the upgrade device in service mode downloads the upgrade data package from the control server according to the path address of the upgrade package; after the download of the upgrade data package is completed, the upgrade device in service mode The upgrade device sends an upgrade data packet to at least one upgrade device in client mode in the form of multicast, so that at least one upgrade device in client mode is upgraded according to the upgrade data packet. Through the solution provided by the embodiment of the present invention, the upgrade device of the local area network is configured in server-client mode. When the control server remotely upgrades the upgrade device, it is only necessary to configure the upgrade device in server mode to receive the upgrade package sent by the control server. The upgrade device in server mode then sends the upgrade package to the upgrade device in client mode by multicast. In this way, not only batch upgrades can be performed, but also the number of upgrade packages received from the external network is reduced, thereby reducing network bandwidth and avoiding network congestion. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flowchart of steps of an embodiment of a device upgrading method of the present invention;
[0040] Figure 2 is a flowchart of another device upgrading method embodiment of the present invention;
[0041] Figure 3 is a flowchart of steps of another device upgrading method embodiment of the present invention;
[0042] Figure 4 is a structural block diagram of an embodiment of a device upgrading apparatus of the present invention;
[0043] Figure 5It is a structural schematic diagram of a terminal device of the present invention. DETAILED DESCRIPTION
[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0045] An embodiment of the present invention provides a device upgrade method, in which the execution subject is a device upgrade device, which is arranged on an upgrade device in a service mode. The upgrade device can be a minivhub device, wherein the mimivhub device is a device that can realize the conversion between the visual network protocol and the Internet protocol. It can also be other devices, which are not specifically limited in the embodiment of the present invention.
[0046] Reference Figure 1 , shows a flow chart of steps of an embodiment of a device upgrade method of the present invention, the method can be applied to a batch upgrade system, the batch upgrade system includes a management and control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device in a service mode and at least one upgrade device in a client mode, and the upgrade device in the service mode is connected to the at least one upgrade device in the client mode, and specifically may include the following steps:
[0047] S101: After the control server receives a response instruction of accepting the upgrade returned by at least one client mode upgrade device, the service mode upgrade device receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes the upgrade package path address;
[0048] Specifically, an embodiment of the present invention provides a batch upgrade system, which includes a management and control server and devices to be upgraded. When multiple devices to be upgraded need to be upgraded, the multiple devices to be upgraded are configured in service-client mode, that is, server-client mode, and one device to be upgraded in service mode can be connected to multiple devices to be upgraded in client mode. The server-client mode of the device to be upgraded is configured in a local area network, and the device to be upgraded in service mode maintains a heartbeat connection with the device to be upgraded in client mode.
[0049] After the control server receives a response instruction of accepting the upgrade returned by at least one upgrade device in client mode on the external network, the control server sends an upgrade instruction to the device to be upgraded in service mode on the external network, and the upgrade instruction includes the upgrade package path address.
[0050] S102, the upgrade device in the service mode downloads the upgrade data packet from the management and control server according to the upgrade package path address;
[0051] Specifically, the upgrade device in the service mode downloads the upgrade data packet from the management and control server through the http protocol according to the upgrade package path address.
[0052] S103: After the upgrade data packet is downloaded, the upgrade device in the service mode sends the upgrade data packet to the at least one upgrade device in the client mode in a multicast manner, so that the at least one upgrade device in the client mode is upgraded according to the upgrade data packet.
[0053] Specifically, after the upgrade device in the service mode completes downloading the upgrade data packet, the upgrade data packet is sent to at least one upgrade device in the client mode in a multicast form.
[0054] For example, if there are 10 devices to be upgraded, if the existing technology is adopted, the management and control server upgrades the 10 devices to be upgraded, then the management and control server needs to send 10 upgrade instructions or 10 upgrade packages to the devices to be upgraded. If the embodiment of the present invention is adopted, one of the devices to be upgraded is set to service mode, and the other 9 devices to be upgraded are set to client mode, then the management and control server only needs to send one upgrade instruction or one upgrade package to the device to be upgraded in service mode, thus saving network bandwidth and avoiding network congestion.
[0055] The device upgrade method provided by the embodiment of the present invention is applied to a batch upgrade system, wherein the batch upgrade system includes a control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device in service mode and at least one upgrade device in client mode, and one upgrade device in service mode is connected to at least one upgrade device in client mode. If the control server receives a response instruction of accepting the upgrade returned by at least one upgrade device in client mode, the upgrade device in service mode receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes the upgrade package path address; the upgrade device in service mode downloads the upgrade data packet from the control server according to the upgrade package path address; after the download of the upgrade data packet is completed, the service mode receives the upgrade instruction sent by the control server. The upgrade device in the mode sends an upgrade data packet to at least one upgrade device in the client mode in the form of multicast, so that at least one upgrade device in the client mode is upgraded according to the upgrade data packet. Through the solution provided by the embodiment of the present invention, the upgrade device in the local area network is configured in server-client mode. When the control server remotely upgrades the upgrade device, it only needs to be configured in the server mode to receive the upgrade package sent by the control server. The upgrade device in the server mode then sends the upgrade package to the upgrade device in the client mode by multicast. In this way, not only batch upgrades can be performed, but also the number of upgrade packages received from the external network is reduced, thereby reducing network bandwidth and avoiding network congestion.
[0056] Another embodiment of the present invention further supplements the method provided by the above embodiment.
[0057] like Figure 2 FIG. 1 is a flowchart showing another embodiment of a device upgrade method of the present invention. The method for processing a service request includes:
[0058] S201. An upgrade device in service mode receives a connection request instruction sent by at least one upgrade device in client mode, wherein the connection request instruction includes a MAC address of the upgrade device in client mode; wherein a MAC (Media Access Control or Medium Access Control) address, literally translated as media access control, or called a physical address or hardware address, is used to define the location of a network device.
[0059] Specifically, when configuring the upgrade device to the service mode and the client mode, at least one upgrade device in the client mode sends a connection request instruction to the upgrade device in the service mode, wherein the connection request instruction includes the MAC address of the at least one upgrade device in the client mode.
[0060] S202, the upgrade device in the service mode sends a response instruction of successful connection to at least one upgrade device in the client mode corresponding to the MAC address according to the MAC address;
[0061] S203, the upgrade device in the service mode sends the local configuration information of the upgrade device in the service mode to the management and control server, where the local configuration information includes at least the IP address, port number and upgrade package version number of the upgrade device in the service mode;
[0062] S204, the upgrade device in the service mode receives the upgrade query instruction sent by the control server;
[0063] S205, the upgrade device in the service mode sends the upgrade query instruction to at least one upgrade device in the client mode in the form of multicast;
[0064] S206, the upgrade device in service mode receives a response instruction from the at least one upgrade device in client mode to indicate whether to accept the upgrade, and sends the response instruction to the management and control server;
[0065] S207, after the control server receives the response instruction of accepting the upgrade returned by the at least one client mode upgrade device, the service mode upgrade device receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes the upgrade package path address;
[0066] Specifically, the management and control platform sends an upgrade instruction to the upgrade device in the service mode, wherein the upgrade instruction is in the form of a message header of an upgrade identifier plus an upgrade package path address.
[0067] S208, the upgrade device in the service mode downloads the upgrade data packet from the database of the management and control server through the http protocol according to the upgrade package path address;
[0068] S209: After the upgrade data packet is downloaded, the upgrade device in the service mode sends the upgrade data packet to the at least one upgrade device in the client mode in a multicast manner, so that the at least one upgrade device in the client mode is upgraded according to the upgrade data packet.
[0069] like Figure 3 As shown, a schematic diagram of the structure of another embodiment of the device upgrade system of the present invention is shown, and the device upgrade system includes: a visual network control platform 301, i.e., a remote control platform, a minivhub (server) 302, i.e., an upgrade device in service mode, and at least one minivhub (client), i.e., an upgrade device in client mode, such as minivhub (client) 3031, minivhub (client) 3032, minivhub (client) 3033, etc. The visual network control platform 301 includes a control front end and a control server, and the control server is connected to the minivhub (server) via the Internet. Among them, the minivhub is a device for converting the message protocol of the visual network and the IP network.
[0070] Specific device upgrade methods include:
[0071] 1. Minivhub is configured as server and client, at least two devices are required;
[0072] 2. The client sends a connection request command to the server, and the server replies that the connection is successful. The server establishes a connection with the client.
[0073] 3. The server reports the local configuration and version number to the remote control platform and establishes a relationship with the remote control platform;
[0074] 4. The remote control platform sends an upgrade query command to the server, and the server forwards this upgrade command to the client in the form of multicast;
[0075] 5. The client side replies to the server side whether it accepts the upgrade, and the server side replies (or forwards) whether the management and control platform has been upgraded;
[0076] 6. If the management and control platform receives the response instructions of receiving the upgrade returned by each client, the management and control platform sends the upgrade package instruction (upgrade identifier + upgrade package path address) to the server;
[0077] 7. The server uses the HTTP protocol to download the upgrade package data from the specified path according to the received upgrade package path address;
[0078] 8. After the server completes the download, it sends the upgrade package datagram to the client connected to the server in the form of multicast;
[0079] 9. After receiving the upgrade package data message, the client will upgrade according to the upgrade package data message. After the upgrade is completed, it will reply that the upgrade is successful and restart.
[0080] The device upgrade method provided by the embodiment of the present invention is applied to a batch upgrade system, wherein the batch upgrade system includes a control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device in service mode and at least one upgrade device in client mode, and one upgrade device in service mode is connected to at least one upgrade device in client mode. If the control server receives a response instruction of accepting the upgrade returned by at least one upgrade device in client mode, the upgrade device in service mode receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes the upgrade package path address; the upgrade device in service mode downloads the upgrade data packet from the control server according to the upgrade package path address; after the download of the upgrade data packet is completed, the service mode receives the upgrade instruction sent by the control server. The upgrade device in the mode sends an upgrade data packet to at least one upgrade device in the client mode in the form of multicast, so that at least one upgrade device in the client mode is upgraded according to the upgrade data packet. Through the solution provided by the embodiment of the present invention, the upgrade device in the local area network is configured in server-client mode. When the control server remotely upgrades the upgrade device, it only needs to be configured in the server mode to receive the upgrade package sent by the control server. The upgrade device in the server mode then sends the upgrade package to the upgrade device in the client mode by multicast. In this way, not only batch upgrades can be performed, but also the number of upgrade packages received from the external network is reduced, thereby reducing network bandwidth and avoiding network congestion.
[0081] Another embodiment of the present invention provides a device upgrading apparatus, which is used to execute the device upgrading method provided in the above embodiment.
[0082] Reference Figure 4, shows a structural block diagram of an embodiment of a device upgrade device of the present invention, the service mode upgrade device applied to a batch upgrade system, the batch upgrade system includes a management and control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device in the service mode and at least one upgrade device in the client mode, the upgrade device in the service mode is connected to the at least one upgrade device in the client mode, the device includes: a receiving module 401, a downloading module 402 and a sending module 403, wherein:
[0083] The receiving module 401 is used to receive the upgrade instruction sent by the control server after the control server receives the response instruction of accepting the upgrade returned by the at least one client mode upgrade device, wherein the upgrade instruction includes the upgrade package path address;
[0084] The download module 402 is used to download the upgrade data package from the management and control server according to the upgrade package path address;
[0085] The sending module 403 is used to send the upgrade data packet to the at least one client mode upgrade device in a multicast manner after the upgrade data packet is downloaded, so that the at least one client mode upgrade device is upgraded according to the upgrade data packet.
[0086] The device upgrade device provided by the embodiment of the present invention is applied to a batch upgrade system, which includes a control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device in service mode and at least one upgrade device in client mode, and one upgrade device in service mode is connected to at least one upgrade device in client mode. If the control server receives a response instruction of accepting the upgrade returned by at least one upgrade device in client mode, the upgrade device in service mode receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes an upgrade package path address; the upgrade device in service mode downloads the upgrade data packet from the control server according to the upgrade package path address; after the download of the upgrade data packet is completed, the upgrade device in service mode The upgrade device in the client mode sends an upgrade data packet to at least one upgrade device in the client mode in the form of multicast, so that at least one upgrade device in the client mode is upgraded according to the upgrade data packet. Through the solution provided by the embodiment of the present invention, the upgrade device in the local area network is configured in server-client mode. When the control server remotely upgrades the upgrade device, it only needs to be configured in the server mode to receive the upgrade package sent by the control server. The upgrade device in the server mode then sends the upgrade package to the upgrade device in the client mode by multicast. In this way, not only batch upgrades can be performed, but also the number of upgrade packages received from the external network is reduced, thereby reducing network bandwidth and avoiding network congestion.
[0087] Another embodiment of the present invention further supplements the device provided in the above embodiment.
[0088] Optionally, the receiving module 401 further includes:
[0089] Receiving a connection request instruction sent by the at least one client mode upgrade device, wherein the connection request instruction includes a MAC address of the client mode upgrade device;
[0090] According to the MAC address, a response instruction of successful connection is sent to at least one client mode upgrade device corresponding to the MAC address.
[0091] Optionally, the device further comprises a query module, wherein the query module is configured to:
[0092] Receiving an upgrade query instruction sent by the management and control server;
[0093] Sending the upgrade query instruction to the at least one client mode upgrade device in a multicast form;
[0094] Receive a response instruction from the at least one client mode upgrade device to indicate whether to accept the upgrade, and send the response instruction to the management and control server.
[0095] Optionally, the device further includes a reporting module, and the reporting module is used to:
[0096] The local configuration information of the service mode is sent to the management and control server, wherein the local configuration information at least includes an IP address, a port number and an upgrade package version number.
[0097] Optionally, the download module 402 is used to:
[0098] According to the upgrade package path address, the upgrade data package is downloaded from the database of the management and control server through the http protocol.
[0099] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.
[0100] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0101] The device upgrade device provided by the embodiment of the present invention is applied to a batch upgrade system, which includes a control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device in service mode and at least one upgrade device in client mode, and one upgrade device in service mode is connected to at least one upgrade device in client mode. If the control server receives a response instruction of accepting the upgrade returned by at least one upgrade device in client mode, the upgrade device in service mode receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes an upgrade package path address; the upgrade device in service mode downloads the upgrade data packet from the control server according to the upgrade package path address; after the download of the upgrade data packet is completed, the upgrade device in service mode The upgrade device in the client mode sends an upgrade data packet to at least one upgrade device in the client mode in the form of multicast, so that at least one upgrade device in the client mode is upgraded according to the upgrade data packet. Through the solution provided by the embodiment of the present invention, the upgrade device in the local area network is configured in server-client mode. When the control server remotely upgrades the upgrade device, it only needs to be configured in the server mode to receive the upgrade package sent by the control server. The upgrade device in the server mode then sends the upgrade package to the upgrade device in the client mode by multicast. In this way, not only batch upgrades can be performed, but also the number of upgrade packages received from the external network is reduced, thereby reducing network bandwidth and avoiding network congestion.
[0102] Yet another embodiment of the present invention provides a terminal device, which is used to execute the device upgrade method provided in the above embodiment.
[0103] Figure 5 It is a structural diagram of a terminal device of the present invention. As shown in 5, the electronic device includes: at least one processor 501 and a memory 502;
[0104] The memory stores a computer program; and the at least one processor executes the computer program stored in the memory to implement the device upgrade method provided in the above embodiment.
[0105] The terminal device provided in this embodiment includes a control server and at least two devices to be upgraded in a batch upgrade system, wherein the at least two devices to be upgraded include at least one upgrade device in service mode and at least one upgrade device in client mode, and one upgrade device in service mode is connected to at least one upgrade device in client mode. If the control server receives a response instruction of accepting the upgrade returned by at least one upgrade device in client mode, the upgrade device in service mode receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes the upgrade package path address; the upgrade device in service mode downloads the upgrade data packet from the control server according to the upgrade package path address; after the download of the upgrade data packet is completed, the upgrade device in service mode An upgrade data packet is sent to at least one upgrade device in client mode in the form of multicast, so that at least one upgrade device in client mode is upgraded according to the upgrade data packet. Through the solution provided by the embodiment of the present invention, the upgrade device in the local area network is configured in server-client mode. When the control server remotely upgrades the upgrade device, only the upgrade device configured in server mode needs to receive the upgrade packet sent by the control server. The upgrade device in server mode then sends the upgrade packet to the upgrade device in client mode through multicast. In this way, not only batch upgrades can be performed, but also the number of upgrade packets received from the external network is reduced, thereby reducing network bandwidth and avoiding network congestion.
[0106] Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed, the device upgrade method provided in any of the above embodiments is implemented.
[0107] According to the computer-readable storage medium of the present embodiment, by being applied to a batch upgrade system, the batch upgrade system includes a control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded include at least one upgrade device in service mode and at least one upgrade device in client mode, and an upgrade device in service mode is connected to at least one upgrade device in client mode. If the control server receives a response instruction of accepting the upgrade returned by at least one upgrade device in client mode, the upgrade device in service mode receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes the upgrade package path address; the upgrade device in service mode downloads the upgrade data packet from the control server according to the upgrade package path address; after the download of the upgrade data packet is completed, the server The upgrade device in service mode sends an upgrade data packet to at least one upgrade device in client mode in the form of multicast, so that at least one upgrade device in client mode is upgraded according to the upgrade data packet. Through the solution provided by the embodiment of the present invention, the upgrade device in the local area network is configured in server-client mode. When the control server remotely upgrades the upgrade device, it only needs to be configured in server mode to receive the upgrade package sent by the control server. The upgrade device in server mode then sends the upgrade package to the upgrade device in client mode by multicast. In this way, not only batch upgrades can be performed, but also the number of upgrade packages received from the external network is reduced, thereby reducing network bandwidth and avoiding network congestion.
[0108] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0109] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0110] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0111] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0113] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0114] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0115] The above is a detailed introduction to a device upgrading method and a device upgrading device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for general technicians in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A device upgrading method, characterized in that: Applied to a batch upgrade system, the batch upgrade system includes a management and control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded are configured in a service-client mode, the at least two devices to be upgraded include at least one upgrade device in a service mode and at least one upgrade device in a client mode, and an upgrade device in a service mode is connected to the at least one upgrade device in a client mode, the method includes: If the control server receives a response instruction of accepting the upgrade returned by the at least one client mode upgrade device, the service mode upgrade device receives the upgrade instruction sent by the control server, wherein the upgrade instruction includes the upgrade package path address; The upgrade device in the service mode downloads the upgrade data packet from the management and control server according to the upgrade package path address; After the upgrade data packet is downloaded, the upgrade device in the service mode sends the upgrade data packet to the at least one upgrade device in the client mode in a multicast manner, so that the at least one upgrade device in the client mode is upgraded according to the upgrade data packet; The upgrade device in the service mode is connected to the at least one upgrade device in the client mode, specifically comprising: The upgrade device in the service mode receives a connection request instruction sent by the at least one upgrade device in the client mode, wherein the connection request instruction includes a MAC address of the upgrade device in the client mode; The upgrade device in the service mode sends a response instruction of successful connection to at least one upgrade device in the client mode corresponding to the MAC address according to the MAC address; The upgrade device in the service mode downloads the upgrade data packet from the management and control server according to the upgrade package path address, including: The upgrade device in the service mode downloads the upgrade data packet from the database of the management and control server through the http protocol according to the upgrade package path address.
2. The method according to claim 1, characterized in that Before the upgrade device in the service mode receives the upgrade instruction sent by the management and control server, the method further includes: The upgrade device in the service mode receives the upgrade query instruction sent by the management and control server; The upgrade device in the service mode sends the upgrade query instruction to the at least one upgrade device in the client mode in a multicast form; The upgrade device in service mode receives a response instruction from the at least one upgrade device in client mode asking whether to accept the upgrade, and sends the response instruction to the management and control server.
3. The method according to claim 2, characterized in that Before the upgrade device in the service mode receives the upgrade query instruction sent by the management and control server, the method further includes: The upgrade device in the service mode sends local configuration information of the upgrade device in the service mode to the management and control server, where the local configuration information at least includes an IP address, a port number, and an upgrade package version number.
4. A device upgrading device, characterized in that: An upgrade device in a service mode applied to a batch upgrade system, the batch upgrade system comprising a management and control server and at least two devices to be upgraded, wherein the at least two devices to be upgraded are configured in a service-client mode, the at least two devices to be upgraded include at least one upgrade device in the service mode and at least one upgrade device in the client mode, and one upgrade device in the service mode is connected to the at least one upgrade device in the client mode, the device comprising: A receiving module, configured to receive an upgrade instruction sent by the control server after the control server receives a response instruction of accepting the upgrade returned by the at least one client mode upgrade device, wherein the upgrade instruction includes an upgrade package path address; A download module, used to download the upgrade data package from the management and control server according to the upgrade package path address; A sending module, configured to send the upgrade data packet to the at least one upgrade device in the client mode in a multicast manner after the upgrade data packet is downloaded, so that the at least one upgrade device in the client mode is upgraded according to the upgrade data packet; The receiving module further includes: Receiving a connection request instruction sent by the at least one client mode upgrade device, wherein the connection request instruction includes a MAC address of the client mode upgrade device; According to the MAC address, a connection success response instruction is sent to at least one client mode upgrade device corresponding to the MAC address; The download module is used for: According to the upgrade package path address, the upgrade data package is downloaded from the database of the management and control server through the http protocol.
5. The device according to claim 4, characterized in that The device further comprises a connection module, wherein the connection module is configured to: Receiving a connection request instruction sent by the at least one client mode upgrade device; A response instruction indicating successful connection is sent to the at least one client mode upgrade device.
6. The device according to claim 4, characterized in that The device further includes a query module, wherein the query module is configured to: Receiving an upgrade query instruction sent by the management and control server; Sending the upgrade query instruction to the at least one client mode upgrade device in a multicast form; Receive a response instruction from the at least one client mode upgrade device to indicate whether to accept the upgrade, and send the response instruction to the management and control server.
7. A terminal device, characterized in that: include: at least one processor and memory; The memory stores a computer program; The at least one processor executes the computer program stored in the memory to implement the device upgrading method according to any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the device upgrading method according to any one of claims 1 to 3 is implemented.
