CN112394966A - Equipment upgrading method and device, computer readable medium and equipment - Google Patents

Equipment upgrading method and device, computer readable medium and equipment Download PDF

Info

Publication number
CN112394966A
CN112394966A CN201910763428.4A CN201910763428A CN112394966A CN 112394966 A CN112394966 A CN 112394966A CN 201910763428 A CN201910763428 A CN 201910763428A CN 112394966 A CN112394966 A CN 112394966A
Authority
CN
China
Prior art keywords
firmware
upgrading
upgrade
equipment
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910763428.4A
Other languages
Chinese (zh)
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.)
Yunding Network Technology Beijing Co Ltd
Original Assignee
Yunding Network Technology Beijing 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 Yunding Network Technology Beijing Co Ltd filed Critical Yunding Network Technology Beijing Co Ltd
Priority to CN201910763428.4A priority Critical patent/CN112394966A/en
Publication of CN112394966A publication Critical patent/CN112394966A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The application discloses a device upgrading method, a device, a computer readable medium and a device. The method is applied to the gateway equipment, and a specific implementation mode of the method comprises the following steps: the method comprises the steps of sending current version information of gateway equipment and sub-equipment thereof to a server in a timing mode, responding to received prompt information returned by the server and used for prompting downloading of an upgrading firmware information package, downloading and storing the upgrading firmware information package based on the prompt information, analyzing the upgrading firmware information package to obtain upgrading firmware after the server determines that equipment to be upgraded exists in equipment corresponding to the current version information, and executing corresponding upgrading operation based on the upgrading firmware. By the technical scheme, the upgrading firmware is obtained by analyzing the upgrading firmware information packet after downloading, and when the gateway equipment and the sub-equipment thereof meet the upgrading conditions, the gateway equipment and the sub-equipment thereof are upgraded, so that repeated downloading of the upgrading firmware is avoided, and the upgrading efficiency of the gateway equipment and the sub-equipment thereof is improved.

Description

Equipment upgrading method and device, computer readable medium and equipment
Technical Field
The present application relates to the field of network technologies, and in particular, to a method and an apparatus for upgrading a device, a computer-readable medium, and a device.
Background
With the development of network technology, the internet of things gateway is a bridge connecting a wide area network and a local area network, meanwhile, the gateway also manages the sub-devices, respective local area networks are formed among the sub-devices, and due to the difference of functions and responsibilities of the sub-devices, the firmware versions of the sub-devices are different.
At present, when the gateway device and the sub-devices thereof need to be upgraded, the gateway device downloads the upgrade firmware one by one for upgrading, if the number of the sub-devices is large or the sub-devices fail to be upgraded due to network reasons, the gateway device downloads the upgrade firmware again during the next upgrade, so that too much time is spent in the process of downloading the upgrade firmware, and the upgrade efficiency of the gateway and the sub-devices thereof is low.
Disclosure of Invention
In view of this, the present application provides a device upgrading method, apparatus, computer readable medium and device, when a gateway device and its sub-devices meet an upgrading condition, the gateway device and its sub-devices are upgraded, so as to avoid repeated downloading of upgrading firmware, and achieve the purpose of improving the upgrading efficiency of the gateway device and its sub-devices.
In order to achieve the above object, the following solutions are proposed:
the first aspect of the present application discloses an apparatus upgrading method, which is applied to a gateway apparatus, and the method includes:
the current version information of the gateway equipment and the sub-equipment thereof is sent to the server in a timing manner;
in response to receiving prompt information which is returned by the server and used for prompting downloading of an upgrading firmware information package, downloading and storing the upgrading firmware information package based on the prompt information, wherein the upgrading firmware information package is generated after the server determines that equipment to be upgraded exists in equipment corresponding to the current version information;
and analyzing the upgrade firmware information packet to obtain upgrade firmware, and executing corresponding upgrade operation based on the upgrade firmware.
In some embodiments, after parsing the upgrade firmware information packet to obtain an upgrade firmware and performing a corresponding upgrade operation based on the upgrade firmware, the method further includes:
if the upgrade operation related to the upgrade firmware fails to be executed, recording the upgrade failure times related to the upgrade firmware;
and if the upgrading failure times reach the preset times, deleting the upgrading firmware.
In some embodiments, parsing the upgrade firmware information packet to obtain an upgrade firmware, and performing a corresponding upgrade operation based on the upgrade firmware, includes:
analyzing the upgrade firmware information packet to obtain gateway upgrade firmware;
updating the current firmware version of the gateway equipment to a first target firmware version based on the gateway upgrading firmware;
and deleting the gateway upgrading firmware.
In some embodiments, parsing the upgrade firmware information packet to obtain an upgrade firmware, and performing a corresponding upgrade operation based on the upgrade firmware, includes:
analyzing the upgrade firmware information packet to obtain the upgrade firmware of the sub-equipment;
updating the current firmware version of the sub-equipment to a second target firmware version based on the upgraded firmware of the sub-equipment;
and deleting the upgrading firmware of the sub-equipment.
In some embodiments, the gateway device comprises a coordinator, and the current version information of the coordinator is sent to the server at the same time of sending the current version information of the gateway device and the sub-devices thereof to the server at regular time; and
if the firmware upgrading information packet further comprises coordinator upgrading firmware, after the gateway upgrading firmware is deleted, the method further comprises the following steps:
sending the coordinator upgrading firmware to the coordinator, so that the coordinator updates the current firmware version of the coordinator to a third target firmware version based on the coordinator upgrading firmware;
the coordinator upgrade firmware is deleted.
In some embodiments, the gateway device includes a coordinator; and
updating the current firmware version of the sub-device to a second target firmware version based on the sub-device upgrade firmware, including:
and sending the upgrading firmware of the sub-equipment to the coordinator, so that the coordinator sends the upgrading firmware of the sub-equipment to the sub-equipment, and the sub-equipment updates the current firmware version to a second target firmware version based on the upgrading firmware of the sub-equipment.
The second aspect of the present application discloses an apparatus upgrading apparatus, which is applied to a gateway device, and the apparatus includes:
the sending unit is used for sending the current version information of the gateway equipment and the sub-equipment thereof to the server in a timing manner;
the storage unit is used for responding to received prompt information which is returned by the server and used for prompting the downloading of the upgrading firmware information package, downloading and storing the upgrading firmware information package based on the prompt information, wherein the upgrading firmware information package is generated after the server determines that equipment to be upgraded exists in the equipment corresponding to the current version information;
and the upgrading unit is used for analyzing the upgrading firmware information packet to obtain upgrading firmware and executing corresponding upgrading operation based on the upgrading firmware.
In some embodiments, the above apparatus further comprises:
the recording unit is used for recording the upgrading failure times related to the firmware upgrading if the upgrading operation related to the firmware upgrading fails to be executed;
and the deleting unit is used for deleting the upgrade firmware if the upgrade failure times reach the preset times.
A third aspect of the application discloses a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements the method as described in any of the implementations of the first aspect.
A fourth aspect of the present application discloses a processor for running a program, wherein the program when running performs the method as described in any implementation manner of the first aspect.
A fifth aspect of the present application discloses an apparatus, comprising: one or more processors; a storage device having one or more programs stored thereon; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation of the first aspect.
According to the technical scheme, the method, the device, the computer readable medium and the equipment for upgrading the equipment can send current version information of the gateway equipment and the sub-equipment thereof to the server in a timing manner, respond to the fact that prompt information for prompting downloading of an upgrading firmware information package returned by the server is received, and download and store the upgrading firmware information package based on the prompt information, wherein the upgrading firmware information package is generated after the server determines that the equipment to be upgraded exists in the equipment corresponding to the current version information, analyzes the upgrading firmware information package to obtain upgrading firmware, and executes corresponding upgrading operation based on the upgrading firmware. By the technical scheme, the upgrading firmware is obtained by analyzing the upgrading firmware information packet after downloading, and when the gateway equipment and the sub-equipment thereof meet the upgrading conditions, the gateway equipment and the sub-equipment thereof are upgraded, so that repeated downloading of the upgrading firmware is avoided, and the upgrading efficiency of the gateway equipment and the sub-equipment thereof is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some examples or embodiments of the present application, and for a person of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts, and the present application can be applied to other similar scenarios according to the provided drawings. Unless otherwise apparent from the context, or otherwise indicated, like reference numbers in the figures refer to the same structure or operation.
Fig. 1 is a schematic flowchart of an apparatus upgrading method disclosed in an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a process of analyzing an upgrade firmware information packet to obtain a gateway upgrade firmware and executing a corresponding upgrade operation based on the gateway upgrade firmware, disclosed in an embodiment of the present application;
fig. 3 is another schematic flow chart illustrating a process of analyzing an upgrade firmware information packet to obtain a sub-device upgrade firmware and executing a corresponding upgrade operation based on the sub-device upgrade firmware, disclosed in the embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus upgrading device disclosed in an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. The described embodiments are only some embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be understood that "system", "apparatus", "unit" and/or "module" as used herein is a method for distinguishing different components, elements, parts or assemblies at different levels. However, other words may be substituted by other expressions if they accomplish the same purpose.
As used in this application and the appended claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are intended to be inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements are included which are explicitly identified, that the steps and elements do not form an exclusive list, and that a method or apparatus may include other steps or elements. An element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
Flow charts are used herein to illustrate operations performed by an apparatus according to embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, the various steps may be processed in reverse order or simultaneously. Meanwhile, other operations may be added to the processes, or a certain step or several steps of operations may be removed from the processes.
As can be seen from the background art, in the prior art, when the gateway device and the sub-devices thereof are all required to be upgraded, the gateway device downloads the upgrade firmware one by one for upgrading, and if the number of the sub-devices is large or the upgrade fails due to a network reason, the gateway device downloads the upgrade firmware again in the next upgrade, so that too much time is spent in the process of downloading the upgrade firmware, and the upgrade efficiency of the gateway and the sub-devices thereof is low.
Therefore, the application discloses an equipment upgrading method, an equipment upgrading device, a computer readable medium and equipment, which are used for upgrading the gateway equipment and the sub-equipment thereof simultaneously under the condition that the gateway equipment and the sub-equipment thereof accord with upgrading conditions, so that the purpose of improving the upgrading efficiency of the gateway equipment and the sub-equipment thereof is achieved.
As shown in fig. 1, a schematic flow chart of an apparatus upgrading method disclosed in the embodiment of the present application specifically includes the following steps:
step S101: and periodically sending the current version information of the gateway equipment and the sub-equipment thereof to the server.
In the process of implementing step S101 specifically, the gateway device checks version information based on a preset time, and sends current version information of the gateway device and its child devices to the server.
The current version information of the gateway device and the sub-devices thereof may be sent to the server at regular time intervals, such as at 6-minute intervals, at 10-minute intervals, or at one day intervals, and the setting of the time for sending the current version information of the gateway device and the sub-devices thereof to the server is set by a technician according to actual conditions.
A Coordinator is set in the gateway device, and selects a channel and a domain Network address (PAN ID) to establish and start the whole Network.
Step S102: and in response to receiving prompt information which is returned by the server and used for prompting the downloading of the upgrading firmware information package, downloading and storing the upgrading firmware information package based on the prompt information, wherein the upgrading firmware information package is generated by the server after determining that the equipment to be upgraded exists in the equipment corresponding to the current version information.
In the process of implementing step S102 specifically, the server receives the version request information sent by the gateway device and then performs version matching, the server sends a prompt message for prompting downloading of the upgrade firmware information package to the gateway device according to the upgrade policy, and the gateway device downloads the upgrade firmware information package based on the prompt message.
It should be noted that, after downloading the firmware upgrading information package, the gateway device stores the firmware upgrading information package into the solid-state memory flash of the gateway device.
Step S103: and analyzing the upgrade firmware information packet to obtain upgrade firmware, and executing corresponding upgrade operation based on the upgrade firmware.
In the process of implementing step S103 specifically, the upgrade firmware information packet is parsed to obtain the upgrade firmware, where the upgrade firmware information packet includes information such as the verification information, each upgrade firmware packet type, the upgrade firmware packet version number, the upgrade firmware packet length, and the upgrade priority.
It should be noted that the upgrading priorities of the corresponding gateway device, the sub-device, and the coordinator are determined based on the upgrading priorities, and the upgrading is performed sequentially from high to low according to the upgrading priorities of the gateway device, the sub-device, and the coordinator.
Upgrading the firmware may include at least one of: the gateway upgrading firmware, the sub-equipment upgrading firmware and the coordinator upgrading firmware.
And the gateway equipment executes upgrading operation based on the gateway upgrading firmware, and restarts the gateway equipment after the gateway equipment is upgraded successfully.
The gateway device upgrade can be divided into app upgrade and Linux kernel upgrade, and if the gateway device upgrade is in a Linux operating system, the gateway device upgrade can involve Linux kernel upgrade and app upgrade. If the gateway device is under a real-time operating system (RTOS) or a single chip without an operating system, only the app is upgraded.
The child device performs an upgrade operation based on the child device upgrade firmware.
The number of the sub-devices may be one or more.
Under the condition that the upgrading priorities of the gateway device, the sub-device and the coordinator are the same, the upgrading is not limited to the limitation of the sequence, and when the upgrading firmware corresponding to each gateway device, the sub-device or the coordinator exists, the gateway device, the sub-device or the coordinator can be upgraded.
And the coordinator receives the coordinator upgrading firmware based on the uart serial port of the universal asynchronous receiving and transmitting transmission, and executes upgrading operation.
The embodiment of the application discloses a device upgrading method. The method is applied to the gateway equipment, and a specific implementation mode of the method comprises the following steps: the method comprises the steps of sending current version information of gateway equipment and sub-equipment thereof to a server in a timing mode, responding to received prompt information returned by the server and used for prompting downloading of an upgrading firmware information package, downloading and storing the upgrading firmware information package based on the prompt information, analyzing the upgrading firmware information package to obtain upgrading firmware after the server determines that equipment to be upgraded exists in equipment corresponding to the current version information, and executing corresponding upgrading operation based on the upgrading firmware. By the technical scheme, the upgrading firmware is obtained by analyzing the upgrading firmware information packet after downloading, and when the gateway equipment and the sub-equipment thereof meet the upgrading conditions, the gateway equipment and the sub-equipment thereof are upgraded, so that repeated downloading of the upgrading firmware is avoided, and the upgrading efficiency of the gateway equipment and the sub-equipment thereof is improved.
The process of analyzing the upgrade firmware information packet to obtain the gateway upgrade firmware and executing the corresponding upgrade operation based on the gateway upgrade firmware in step S103 includes the following steps, as shown in fig. 2:
step S201: and analyzing the upgrade firmware information packet to obtain the gateway upgrade firmware.
Step S202: and updating the current firmware version of the gateway equipment to the first target firmware version based on the gateway upgrading firmware.
In the process of implementing step S202 specifically, the gateway device installs an installation package of the gateway upgrade firmware based on the gateway upgrade firmware obtained by analyzing the upgrade firmware information package, so that the current firmware version of the gateway device is updated to the first target firmware version.
It should be noted that the first target firmware version is a latest updated firmware version of the current gateway device.
If the gateway equipment fails to be upgraded, the gateway upgrading firmware is stored in the flash of the gateway equipment, and the server sends the gateway upgrading firmware to the gateway equipment at regular time for upgrading.
The time for the server to send the gateway upgrading firmware to the gateway device at regular time can be sent at intervals of 7 minutes, 9 minutes, a day, and the like, and the setting of the time for the server to send the gateway upgrading firmware to the gateway device at regular time and upgrade is set by a technician according to actual conditions.
Based on the above procedure of updating the firmware version of the gateway device to the first target firmware version based on the gateway upgrade firmware in step S202, the following steps are taken as examples:
the first target firmware version of the gateway upgrading firmware is 2.0, the current firmware version of the gateway device is 1.0, and if the current firmware version of the gateway device is inconsistent with the first target firmware version, the current firmware version 1.0 of the gateway device is updated to the first target firmware version 2.0, wherein the first target firmware version 2.0 is the current latest firmware version of the gateway device.
Step S203: and deleting the gateway upgrading firmware.
And analyzing the upgrade firmware information packet by executing the steps S201 to S203 to obtain gateway upgrade firmware, updating the current firmware version of the gateway equipment to the first target firmware version based on the gateway upgrade firmware, and deleting the gateway upgrade firmware.
In the embodiment of the application, the gateway upgrading firmware is obtained by analyzing the upgrading firmware information packet, and the purpose of updating the current firmware version of the gateway device to the first target firmware version based on the gateway upgrading firmware is achieved.
Optionally, the gateway device includes a coordinator, and the gateway device sends current version information of the gateway device and its child devices to the server at regular time, and also sends current version information of the coordinator to the server. If the upgrade firmware information packet further includes coordinator upgrade firmware, after the gateway upgrade firmware is deleted, the gateway device may further send the coordinator upgrade firmware to the coordinator, so that the coordinator upgrades the firmware based on the coordinator, sets the current firmware version of the coordinator as a third target firmware version, and deletes the coordinator upgrade firmware.
It should be noted that the third target firmware version is a latest upgraded firmware version of the current coordinator.
If the coordinator fails to be upgraded, the coordinator upgrading firmware is stored in a flash of the gateway device, and is sent to the coordinator at regular time to be upgraded.
The gateway device sends the coordinator upgrading firmware to the coordinator at regular time, wherein the time for upgrading the coordinator upgrading firmware is sent at intervals of 5 minutes, 12 minutes or one day, and the time for upgrading the coordinator upgrading firmware is sent to the coordinator at regular time by the gateway device and is set by a technician according to actual conditions.
In the embodiment of the application, the gateway device sends the coordinator upgrading firmware to the coordinator, so that the aim of updating the current firmware version of the coordinator to the third target firmware version based on the coordinator upgrading firmware is fulfilled.
The process of analyzing the upgrade firmware information packet to obtain the upgrade firmware of the sub-device and performing the corresponding upgrade operation based on the upgrade firmware of the sub-device in step S103 includes the following steps, as shown in fig. 3:
step S301: and analyzing the upgrade firmware information packet to obtain the upgrade firmware of the sub-equipment.
Step S302: updating the current firmware version of the sub-device to a second target firmware version based on the upgraded firmware of the sub-device.
In the process of executing step S302, the child device installs the installation package of the child device upgrade firmware based on the child device upgrade firmware obtained by analyzing the upgrade firmware information package, so that the current firmware version of the child device is updated to the second target firmware version.
It should be noted that the second target firmware version is a latest updated firmware version of the current sub-device.
If the upgrading of the sub-equipment fails, the upgrading firmware of the sub-equipment is stored in the flash of the gateway equipment, and the gateway equipment sends the upgrading firmware of the sub-equipment to the sub-equipment at regular time for upgrading.
The gateway device sends the upgrading firmware of the sub-device to the sub-device at regular time for upgrading, the time can be sent at intervals of 10 minutes, 15 minutes, one day, and the like, and the setting of the time for sending the upgrading firmware of the sub-device to the sub-device at regular time by the gateway device for upgrading is set by a technician according to actual conditions.
Based on the above process of updating the firmware based on the sub-device and updating the current firmware version of the sub-device to the second target firmware version in step S302, the following steps are taken as examples:
and if the second target firmware version of the upgrading firmware of the sub-equipment is 3.1, the current firmware version of the sub-equipment is 3.0, and the current firmware version of the sub-equipment is inconsistent with the second target firmware version, updating the current firmware version 3.0 of the sub-equipment to the second target firmware version 3.1, wherein the second target firmware version 3.1 is the current latest firmware version of the sub-equipment.
Optionally, the gateway device comprises a coordinator. The gateway device may send the sub-device upgrade firmware to the coordinator, so that the coordinator sends the sub-device upgrade firmware to the sub-device, and the sub-device updates the current firmware version to the second target firmware version based on the sub-device upgrade firmware.
Step S303: and deleting the upgrading firmware of the sub-equipment.
And analyzing the upgrade firmware information packet by executing the step S301 to the step S303 to obtain the upgrade firmware of the sub-equipment, updating the current firmware version of the sub-equipment to a second target firmware version based on the upgrade firmware of the sub-equipment, and deleting the upgrade firmware of the sub-equipment.
In the embodiment of the application, the upgrading firmware of the sub-equipment is obtained by analyzing the upgrading firmware information packet, so that the purpose of updating the current firmware version of the sub-equipment to the second target firmware version based on the upgrading firmware of the sub-equipment is achieved.
Optionally, after analyzing the upgrade firmware information packet to obtain the upgrade firmware, and after executing the corresponding upgrade operation based on the upgrade firmware, if the execution of the upgrade operation related to the upgrade firmware fails, the gateway device may record the number of upgrade failures related to the upgrade firmware, and if the number of upgrade failures reaches a preset number, delete the upgrade firmware.
It should be noted that, if the upgrade failure times related to the upgraded firmware do not reach the preset times, the gateway device may continue to execute the corresponding upgrade operation based on the upgraded firmware. Specifically, if the upgrade failure times related to the upgrade firmware do not reach the preset times, the gateway device may continue to execute the corresponding upgrade operation based on the upgrade firmware after a preset time interval.
The preset times can be 3 times per day, 5 times per day, or other times, and the specific preset times are determined by technicians according to data conditions.
In the embodiment of the application, after the upgrade firmware information packet is analyzed to obtain the upgrade firmware, and corresponding upgrade operation is executed based on the upgrade firmware, if the upgrade operation related to the upgrade firmware fails to be executed, the upgrade failure times related to the upgrade firmware are recorded, when the upgrade failure times reach the preset times, the upgrade firmware is deleted, and when the upgrade failure times do not reach the preset times, the corresponding upgrade operation is continuously executed based on the upgrade firmware, so that repeated downloading of the upgrade firmware information packet is avoided, and for the gateway equipment with limited flow, the purpose of saving flow consumption caused by upgrading of the gateway equipment and the sub-equipment is achieved.
The following illustrates the generation process of the upgrade firmware information package:
the server may store the latest firmware version information corresponding to the gateway device and the child device of the gateway device, respectively. After receiving the current version information of the gateway device and the sub device, the server may determine whether the gateway device and the sub device have a device to be upgraded by checking whether the current version information of the gateway device and the sub device is lower than the latest firmware version information corresponding to the gateway device and the sub device, respectively. The equipment to be upgraded is equipment with current version information lower than the corresponding latest firmware version information. After determining that the gateway device and the sub-device have the device to be upgraded, the server may use the latest firmware version indicated by the latest firmware version information corresponding to the device to be upgraded as the upgrade firmware. The server may then obtain the determined upgrade firmware from the local or connected device and package the determined upgrade firmware based on configuration information relating to the firmware upgrade, generating an upgrade firmware information package.
In the embodiment of the application, whether the current version information of the gateway equipment and/or the current version information of the sub-equipment is lower than the corresponding latest firmware version information is checked through the server, and whether the gateway equipment needs to download the upgrade firmware information packet is determined, so that repeated downloading of the upgrade firmware information packet is avoided, and for the gateway equipment with limited flow, the flow consumption caused by upgrading of the gateway equipment and the sub-equipment is saved.
Optionally, after receiving the current version information sent by the gateway device (for example, the current version information of the gateway device, the child device of the gateway device, and/or the coordinator), the server sends, to the gateway device, a prompt message for prompting that no firmware is updated if it is determined that the device to be upgraded does not exist in the device corresponding to the received current version information. The gateway device may not download the upgrade firmware information package in response to receiving the prompt message, thereby avoiding downloading useless upgrade firmware information packages to save traffic consumption.
Based on the specific implementation process of the device upgrading method, the following examples are given:
the gateway equipment sends the current version information of the gateway equipment and the current version information of the sub-equipment to a server, the server matches the firmware version based on the current version information of the gateway equipment and the firmware version of the current version information of the sub-equipment, the server matches an upgrade firmware information packet, the server sends prompt information for downloading upgrade firmware to the gateway equipment, the gateway equipment downloads the upgrade firmware information packet and stores the upgrade firmware information packet into flash of the gateway equipment, the gateway equipment analyzes the upgrade firmware information packet to obtain a gateway target firmware version 2.1 and a sub-equipment target firmware version 3.2, the gateway equipment upgrades based on the gateway target firmware version 2.1, the current firmware version of the gateway equipment is upgraded from 2.0 to 2.1, the gateway equipment upgrades successfully, the gateway upgrade firmware in the flash of the gateway equipment is deleted, the sub-equipment upgrades based on the sub-equipment target firmware version 3.2, and upgrading the current firmware version of the sub-equipment from 3.1 to 3.2, successfully upgrading the sub-equipment, and deleting the upgrading firmware of the sub-equipment in the flash of the gateway equipment.
Based on the device upgrading method disclosed in the embodiment of the present application, the embodiment of the present application correspondingly discloses a device upgrading apparatus 400, and the device upgrading apparatus 400 may be applied to a gateway device. As shown in fig. 4, the device upgrading apparatus 400 specifically includes:
a sending unit 401, configured to send current version information of the gateway device and its child devices to the server at regular time.
And the storage unit 402 is configured to, in response to receiving prompt information for prompting downloading of an upgrade firmware information package returned by the server, download and store the upgrade firmware information package based on the prompt information, where the upgrade firmware information package is generated by the server after determining that the device to be upgraded exists in the device corresponding to the current version information.
And an upgrading unit 403, configured to parse the upgrade firmware information packet to obtain an upgrade firmware, and execute a corresponding upgrading operation based on the upgrade firmware.
Further, the upgrade unit 403 includes:
and the analysis module is used for analyzing the upgrade firmware information packet to obtain the gateway upgrade firmware.
And the first upgrading module is used for upgrading the current firmware version of the gateway equipment to the first target firmware version based on the gateway upgrading firmware.
And the first deleting module is used for deleting the gateway upgrading firmware. Optionally, the parsing module is further configured to parse the upgrade firmware information packet to obtain the upgrade firmware of the sub-device; and the upgrade unit 403 includes: the second upgrading module is used for upgrading the firmware based on the sub-equipment and updating the current firmware version of the sub-equipment to a second target firmware version; and the second deleting module is used for deleting the upgrading firmware of the sub-equipment.
Optionally, the device upgrading apparatus 400 further includes:
and the recording unit is used for recording the upgrading failure times related to the firmware upgrading if the upgrading operation related to the firmware upgrading fails to be executed.
And the deleting unit is used for deleting the upgrade firmware if the upgrade failure times reach the preset times.
Further, the gateway device may include a coordinator. A second upgrade module comprising:
and the updating submodule is used for sending the upgrading firmware of the sub-equipment to the coordinator, so that the coordinator sends the upgrading firmware of the sub-equipment to the sub-equipment, and the sub-equipment updates the current firmware version to a second target firmware version based on the upgrading firmware of the sub-equipment.
Optionally, the parsing module is further configured to parse the upgrade firmware information packet to obtain the coordinator upgrade firmware; and an upgrade unit 403 including:
and the third upgrading module is used for sending the coordinator upgrading firmware to the coordinator, so that the coordinator can upgrade the firmware based on the coordinator and update the current firmware version of the coordinator to a third target firmware version.
And the third deleting module is used for deleting the coordinator upgrading firmware.
It should be noted that the device upgrade apparatus 400 may include a processor and a memory, where the sending unit 401, the storage unit 402, the upgrade unit 403, and the like are all stored as program units in the memory, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor may include a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the upgrading efficiency of the gateway equipment and the sub-equipment thereof is improved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the application discloses a device upgrading device. The device is applied to the gateway equipment, and a specific implementation mode of the device comprises the following steps: the method comprises the steps of sending current version information of gateway equipment and sub-equipment thereof to a server in a timing mode, responding to received prompt information returned by the server and used for prompting downloading of an upgrading firmware information package, downloading and storing the upgrading firmware information package based on the prompt information, analyzing the upgrading firmware information package to obtain upgrading firmware after the server determines that equipment to be upgraded exists in equipment corresponding to the current version information, and executing corresponding upgrading operation based on the upgrading firmware. By the technical scheme, the upgrading firmware is obtained by analyzing the upgrading firmware information packet after downloading, and when the gateway equipment and the sub-equipment thereof meet the upgrading conditions, the gateway equipment and the sub-equipment thereof are upgraded, so that repeated downloading of the upgrading firmware is avoided, and the upgrading efficiency of the gateway equipment and the sub-equipment thereof is improved.
The specific principle and the implementation process of each unit and module in the device upgrading apparatus disclosed in the embodiment of the present application are the same as those of the device upgrading method disclosed in the embodiment of the present application, and reference may be made to corresponding parts in the device upgrading method disclosed in the embodiment of the present application, which are not described herein again.
The embodiment of the application provides a computer readable medium, on which a computer program is stored, wherein the program is executed by a processor to implement the device upgrading method provided by the above method embodiments.
The embodiment of the application provides a processor, and the processor is used for running a program, wherein the program realizes the device upgrading method provided by the above method embodiments when running.
The embodiment of the application provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the equipment upgrading method provided by the method embodiments is realized when the processor executes the program.
The embodiment of the present application further provides a computer program product, which when executed on a data processing device, enables the data processing device to implement the device upgrade method provided in the above method embodiments.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. 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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, 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 apparatus 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 apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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.
The above description is only for the purpose of illustrating the preferred embodiments of the present application and the technical principles applied, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. The scope of the invention according to the present application is not limited to the specific combinations of the above-described features, and may also cover other embodiments in which the above-described features or their equivalents are arbitrarily combined without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (11)

1. A device upgrading method is applied to a gateway device, and comprises the following steps:
the current version information of the gateway equipment and the sub-equipment thereof is sent to a server in a timing manner;
in response to receiving prompt information which is returned by the server and used for prompting downloading of an upgrading firmware information package, downloading and storing the upgrading firmware information package based on the prompt information, wherein the upgrading firmware information package is generated by the server after determining that equipment to be upgraded exists in equipment corresponding to the current version information;
and analyzing the upgrade firmware information packet to obtain upgrade firmware, and executing corresponding upgrade operation based on the upgrade firmware.
2. The method of claim 1, wherein after parsing the upgrade firmware information package to obtain an upgrade firmware and performing a corresponding upgrade operation based on the upgrade firmware, the method further comprises:
if the upgrade operation related to the upgraded firmware fails to be executed, recording the upgrade failure times related to the upgraded firmware;
and if the upgrading failure times reach preset times, deleting the upgrading firmware.
3. The method of claim 1, wherein the parsing the upgrade firmware information packet to obtain an upgrade firmware, and performing a corresponding upgrade operation based on the upgrade firmware comprises:
analyzing the upgrade firmware information packet to obtain gateway upgrade firmware;
updating the current firmware version of the gateway device to a first target firmware version based on the gateway upgrade firmware;
and deleting the gateway upgrading firmware.
4. The method according to any one of claims 1 to 3, wherein the parsing the upgrade firmware information packet to obtain upgrade firmware, and performing corresponding upgrade operations based on the upgrade firmware includes:
analyzing the updating firmware information packet to obtain updating firmware of the sub-equipment;
updating the current firmware version of the sub-equipment to a second target firmware version based on the upgraded firmware of the sub-equipment;
and deleting the upgrading firmware of the sub-equipment.
5. The method according to claim 3, wherein the gateway device comprises a coordinator, and the current version information of the coordinator is sent to a server at the same time of sending the current version information of the gateway device and the sub-devices thereof to the server at regular time; and
if the firmware upgrading information packet further comprises coordinator upgrading firmware, after the gateway upgrading firmware is deleted, the method further comprises:
sending the coordinator upgrade firmware to the coordinator, so that the coordinator updates the current firmware version of the coordinator to a third target firmware version based on the coordinator upgrade firmware;
and deleting the coordinator upgrading firmware.
6. The method of claim 4, wherein the gateway device comprises a coordinator; and
the updating the firmware based on the child device and the current firmware version of the child device to a second target firmware version comprises:
and sending the upgrading firmware of the sub-equipment to the coordinator, so that the coordinator sends the upgrading firmware of the sub-equipment to the sub-equipment, and the sub-equipment updates the current firmware version to a second target firmware version based on the upgrading firmware of the sub-equipment.
7. An apparatus upgrading device, applied to a gateway device, the apparatus comprising:
the sending unit is used for sending the current version information of the gateway equipment and the sub-equipment thereof to a server in a timing manner;
the storage unit is used for responding to received prompt information which is returned by the server and used for prompting the downloading of an upgrading firmware information package, downloading and storing the upgrading firmware information package based on the prompt information, wherein the upgrading firmware information package is generated by the server after the existence of equipment to be upgraded in equipment corresponding to the current version information is determined;
and the upgrading unit is used for analyzing the upgrading firmware information packet to obtain upgrading firmware and executing corresponding upgrading operation based on the upgrading firmware.
8. The apparatus of claim 7, further comprising:
a recording unit, configured to record, if an upgrade operation related to the upgraded firmware fails to be executed, a number of upgrade failures related to the upgraded firmware;
and the deleting unit is used for deleting the upgrade firmware if the upgrade failure times reach preset times.
9. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-6.
10. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method according to any of claims 1-6.
11. An apparatus, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-6.
CN201910763428.4A 2019-08-19 2019-08-19 Equipment upgrading method and device, computer readable medium and equipment Pending CN112394966A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910763428.4A CN112394966A (en) 2019-08-19 2019-08-19 Equipment upgrading method and device, computer readable medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910763428.4A CN112394966A (en) 2019-08-19 2019-08-19 Equipment upgrading method and device, computer readable medium and equipment

Publications (1)

Publication Number Publication Date
CN112394966A true CN112394966A (en) 2021-02-23

Family

ID=74603283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910763428.4A Pending CN112394966A (en) 2019-08-19 2019-08-19 Equipment upgrading method and device, computer readable medium and equipment

Country Status (1)

Country Link
CN (1) CN112394966A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445504A (en) * 2019-08-29 2021-03-05 云丁网络技术(北京)有限公司 Equipment firmware upgrading method, device and system
CN113326056A (en) * 2021-06-28 2021-08-31 上海致景信息科技有限公司 Data processing method, data processing device, storage medium and processor
CN114721684A (en) * 2022-04-12 2022-07-08 中国联合网络通信集团有限公司 Firmware version upgrading method, version upgrading server and management platform
CN115022164A (en) * 2022-05-31 2022-09-06 广州助蜂网络科技有限公司 Device remote upgrade control method and system based on dos command
CN117369854A (en) * 2023-12-07 2024-01-09 浪潮云洲工业互联网有限公司 OTA upgrading method, device and medium for active identification industrial equipment
CN117453257A (en) * 2023-12-25 2024-01-26 深圳万物安全科技有限公司 Upgrading method based on hierarchical management, terminal equipment and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131682A (en) * 2016-07-14 2016-11-16 青岛海信宽带多媒体技术有限公司 Set Top Box built-in WiFi firmware upgrade method, device and Set Top Box
CN106980511A (en) * 2017-05-09 2017-07-25 深圳市乐得瑞科技有限公司 Firmware upgrade method, apparatus and system
CN107239302A (en) * 2017-05-10 2017-10-10 努比亚技术有限公司 A kind of firmware upgrade method, terminal and server
CN107291497A (en) * 2017-06-08 2017-10-24 Tcl通力电子(惠州)有限公司 Multi-firmware upgrading method and system and readable storage medium
CN107608701A (en) * 2017-10-20 2018-01-19 深圳市道通科技股份有限公司 A kind of method and apparatus of firmware updating
CN108196863A (en) * 2018-01-15 2018-06-22 深圳市共进电子股份有限公司 A kind of upgrade method of firmware, device, terminal and storage medium
CN108306768A (en) * 2018-01-30 2018-07-20 惠州Tcl家电集团有限公司 Collaboration upgrade method, device and the storage medium of gateway and its coordinator
WO2019083440A2 (en) * 2017-10-24 2019-05-02 华为国际有限公司 Vehicle-mounted device upgrading method and related device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131682A (en) * 2016-07-14 2016-11-16 青岛海信宽带多媒体技术有限公司 Set Top Box built-in WiFi firmware upgrade method, device and Set Top Box
CN106980511A (en) * 2017-05-09 2017-07-25 深圳市乐得瑞科技有限公司 Firmware upgrade method, apparatus and system
CN107239302A (en) * 2017-05-10 2017-10-10 努比亚技术有限公司 A kind of firmware upgrade method, terminal and server
CN107291497A (en) * 2017-06-08 2017-10-24 Tcl通力电子(惠州)有限公司 Multi-firmware upgrading method and system and readable storage medium
CN107608701A (en) * 2017-10-20 2018-01-19 深圳市道通科技股份有限公司 A kind of method and apparatus of firmware updating
WO2019083440A2 (en) * 2017-10-24 2019-05-02 华为国际有限公司 Vehicle-mounted device upgrading method and related device
CN108196863A (en) * 2018-01-15 2018-06-22 深圳市共进电子股份有限公司 A kind of upgrade method of firmware, device, terminal and storage medium
CN108306768A (en) * 2018-01-30 2018-07-20 惠州Tcl家电集团有限公司 Collaboration upgrade method, device and the storage medium of gateway and its coordinator

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445504A (en) * 2019-08-29 2021-03-05 云丁网络技术(北京)有限公司 Equipment firmware upgrading method, device and system
CN113326056A (en) * 2021-06-28 2021-08-31 上海致景信息科技有限公司 Data processing method, data processing device, storage medium and processor
CN114721684A (en) * 2022-04-12 2022-07-08 中国联合网络通信集团有限公司 Firmware version upgrading method, version upgrading server and management platform
CN114721684B (en) * 2022-04-12 2024-05-14 中国联合网络通信集团有限公司 Firmware version upgrading method, version upgrading server and management platform
CN115022164A (en) * 2022-05-31 2022-09-06 广州助蜂网络科技有限公司 Device remote upgrade control method and system based on dos command
CN117369854A (en) * 2023-12-07 2024-01-09 浪潮云洲工业互联网有限公司 OTA upgrading method, device and medium for active identification industrial equipment
CN117453257A (en) * 2023-12-25 2024-01-26 深圳万物安全科技有限公司 Upgrading method based on hierarchical management, terminal equipment and readable storage medium
CN117453257B (en) * 2023-12-25 2024-03-26 深圳万物安全科技有限公司 Upgrading method based on hierarchical management, terminal equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN112394966A (en) Equipment upgrading method and device, computer readable medium and equipment
CN107608689B (en) Method and device for updating application program on client and electronic equipment
CN110109741B (en) Method and device for managing circular tasks, electronic equipment and storage medium
CN111324423B (en) Method and device for monitoring processes in container, storage medium and computer equipment
CN106250192A (en) The method for upgrading software of host computer and system
CN110837388B (en) Software upgrading method of robot, upgrading server, robot and storage medium
CN108062235B (en) Data processing method and device
CN112134961B (en) Client use control method, client and computer storage medium
CN112068896A (en) DTS modification method, device and computer readable storage medium
US20180232279A1 (en) Accelerating system dump capturing
CN110837391B (en) Application program hot updating method and device, storage medium and electronic equipment
CN109542920B (en) Data transmission method, device, medium and electronic equipment
CN107689969B (en) Method and device for determining cache strategy
CN110298031B (en) Dictionary service system and model version consistency distribution method
CN110308914B (en) Upgrade processing method, device, equipment, system and computer readable storage medium
CN110968406B (en) Method, device, storage medium and processor for processing task
CN112445504A (en) Equipment firmware upgrading method, device and system
CN112286622A (en) Virtual machine migration processing and strategy generating method, device, equipment and storage medium
CN115827035A (en) Equipment upgrading method and device, storage medium and electronic device
CN112685063B (en) Feature library updating method, device, network equipment and readable storage medium
CN114327835A (en) Distributed task scheduling method and device, processor and electronic equipment
CN114610331A (en) Software installation method and system
TW202113587A (en) Program upgrade method and apparatus for internet of things device, and internet of things device
CN110618791B (en) CFS storage domain configuration method, device, equipment and readable storage medium
CN113630422B (en) Network security data processing method and system based on edge node

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