CN114978904A - Remote firmware upgrading method, system, device, embedded equipment and storage medium - Google Patents

Remote firmware upgrading method, system, device, embedded equipment and storage medium Download PDF

Info

Publication number
CN114978904A
CN114978904A CN202210574700.6A CN202210574700A CN114978904A CN 114978904 A CN114978904 A CN 114978904A CN 202210574700 A CN202210574700 A CN 202210574700A CN 114978904 A CN114978904 A CN 114978904A
Authority
CN
China
Prior art keywords
upgrade
upgrading
file
equipment
embedded
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
CN202210574700.6A
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.)
Xi'an Telingchong New Energy Technology Co ltd
Original Assignee
Xi'an Telingchong New Energy Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Telingchong New Energy Technology Co ltd filed Critical Xi'an Telingchong New Energy Technology Co ltd
Priority to CN202210574700.6A priority Critical patent/CN114978904A/en
Publication of CN114978904A publication Critical patent/CN114978904A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The application provides a remote firmware upgrading method, a system, a device, embedded equipment and a storage medium, and relates to the technical field of firmware upgrading. The method comprises the following steps: receiving an upgrading indication message sent by a server; wherein, the upgrade indication message includes: the address of the upgrade file package; obtaining an upgrade file package according to the address of the upgrade file package, wherein the upgrade file package comprises: a plurality of upgrade files and upgrade policies for the upgrade files; according to the upgrading strategy of each upgrading file, determining appointed upgrading equipment corresponding to each upgrading file from a plurality of pieces of equipment respectively, wherein the plurality of pieces of equipment comprise embedded equipment and at least one piece of equipment controlled by the embedded equipment; and upgrading the firmware of the appointed upgrading equipment corresponding to each upgrading file according to each upgrading file. By the method and the device, distributed upgrading and batch upgrading can be realized, and the processing pressure of the server is reduced.

Description

Remote firmware upgrading method, system, device, embedded equipment and storage medium
Technical Field
The invention relates to the technical field of firmware upgrading, in particular to a remote firmware upgrading method, a system, a device, embedded equipment and a storage medium.
Background
With the development of internet technology, the functions that can be realized by the device are more and more, and when a technician develops a new function, the firmware program of the device needs to be upgraded.
The existing equipment firmware upgrading generally comprises the steps that communication connection is established between equipment and a server, the server accesses the equipment and judges whether the equipment needs upgrading, and an upgrading file package is sent to the equipment for upgrading when the equipment needs upgrading.
In the existing upgrading mode, because the upgrading requirement is initiated by the server, when the server is in communication connection with a plurality of devices, the server needs to record communication addresses of the devices, and because the communication addresses of the devices are not fixed and unchangeable, the server also needs to update and maintain the communication addresses of the devices in time, so that the processing pressure of the server is increased, and the processing pressure of the server is also increased because the existing upgrading mode is that the server carries out one-to-one upgrading on the devices.
Disclosure of Invention
The present invention aims to provide a method, a system, an apparatus, an embedded device and a storage medium for remote firmware upgrade, in order to overcome the above-mentioned shortcomings in the prior art, wherein a server sends an upgrade scheme to the embedded device, and the embedded device upgrades a plurality of devices under control, thereby implementing distributed upgrade and reducing the processing pressure of the server.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a remote firmware upgrade method, which is applied to an embedded device, and the method includes:
receiving an upgrading indication message sent by a server; wherein, the upgrade indication message includes: the address of the upgrade file package;
obtaining the upgrade file package according to the address of the upgrade file package, wherein the upgrade file package comprises: a plurality of upgrade files and an upgrade policy of each upgrade file;
according to the upgrading strategy of each upgrading file, determining appointed upgrading equipment corresponding to each upgrading file from a plurality of equipment respectively, wherein the plurality of equipment comprise: the embedded equipment and at least one piece of lower equipment controlled by the embedded equipment;
and upgrading the firmware of the appointed upgrading equipment corresponding to each upgrading file according to each upgrading file.
Optionally, the upgrade policy is: upgrading parameter conditions of the target attribute type;
the determining, according to the upgrade policy of each upgrade file, the specific upgrade device corresponding to each upgrade file from the multiple devices includes:
and according to the attribute parameters of the target attribute type of each device, adopting the upgrading strategy of each upgrading file, and respectively determining the device meeting the upgrading parameter condition of the target attribute type from the plurality of devices as the specified upgrading device.
Optionally, the target attribute types include: at least one of firmware version information, preset upgrade time and equipment identification.
Optionally, the upgrade file package further includes: after the preset check value of each upgrade file is obtained according to the address of the upgrade file package, the method further includes:
calculating the real check value of each upgrade file;
and verifying each upgrade file according to the comparison result of the real verification value and the preset verification value.
Optionally, if the designated upgrade device of the first target upgrade file in the plurality of upgrade files includes: the embedded device; correspondingly, the upgrading the firmware of the designated upgrading device corresponding to each upgrading file according to each upgrading file includes:
and operating the first target upgrading file to upgrade the firmware.
Optionally, if the designated upgrade device of the second target upgrade file in the plurality of upgrade files includes: the lower equipment is controlled by the embedded equipment; correspondingly, the upgrading the firmware of the designated upgrading device corresponding to each upgrading file according to each upgrading file includes:
and sending the second target upgrading file to the lower set of equipment, so that the lower set of equipment carries out firmware upgrading by operating the second target upgrading file.
In a second aspect, an embodiment of the present application further provides a remote firmware upgrade system, including: the system comprises a server, at least one embedded device and at least one set device controlled by each embedded device;
the server is in communication connection with the at least one embedded device to send upgrading indication information to the at least one embedded device;
the embedded device is configured to execute the steps of the remote firmware upgrading method according to any one of the above embodiments, and send an upgrade file to the lower device when the specified upgrade device is the lower device.
In a third aspect, an embodiment of the present application further provides a remote firmware upgrade apparatus, which is applied to an embedded device, and the apparatus includes:
the message receiving module is used for receiving an upgrading indication message sent by the server; wherein, the upgrade indication message includes: the address of the upgrade file package;
an upgrade file package obtaining module, configured to obtain the upgrade file package according to an address of the upgrade file package, where the upgrade file package includes: a plurality of upgrade files and an upgrade policy for each upgrade file;
an appointed upgrading device determining module, configured to determine, according to the upgrading policy of each upgrading file, an appointed upgrading device corresponding to each upgrading file from multiple devices, where the multiple devices include: the embedded equipment and at least one piece of lower equipment controlled by the embedded equipment;
and the upgrading module is used for upgrading the firmware of the appointed upgrading equipment corresponding to each upgrading file according to each upgrading file.
Optionally, the upgrade policy is: upgrading parameter conditions of the target attribute type; the specified upgrading device determining module is specifically configured to determine, according to the attribute parameter of the target attribute type of each device, a device that meets the upgrading parameter condition of the target attribute type from the multiple devices as the specified upgrading device by using the upgrading policy of each upgrading file.
Optionally, the target attribute types include: at least one of firmware version information, preset upgrade time and equipment identification.
Optionally, the upgrade file package further includes: after the module for obtaining the upgrade file package, the device further comprises:
the real check value calculating module is used for calculating the real check value of each upgrading file;
and the check value comparison module is used for verifying each upgrade file according to the comparison result of the real check value and the preset check value.
Optionally, if the designated upgrade device of the first target upgrade file in the plurality of upgrade files includes: the embedded device; correspondingly, the upgrade module is specifically configured to operate the first target upgrade file to perform firmware upgrade.
Optionally, if the designated upgrade device of the second target upgrade file in the plurality of upgrade files includes: the lower equipment is controlled by the embedded equipment; correspondingly, the upgrade module is specifically configured to send the second target upgrade file to the lower equipment, so that the lower equipment performs firmware upgrade by running the second target upgrade file.
In a fourth aspect, an embodiment of the present application further provides an embedded device, including: the embedded device comprises a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when the embedded device runs, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the remote firmware upgrading method according to any one of the embodiments.
In a fifth aspect, embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the storage medium, and the computer program is executed by a processor to perform the steps of the remote firmware upgrade method according to any of the foregoing embodiments.
The beneficial effect of this application is:
the application provides a method, a system, a device, an embedded device and a storage medium for remote firmware upgrade, wherein the method comprises the following steps: receiving an upgrading indication message sent by a server; wherein, the upgrade indication message includes: the address of the upgrade file package; obtaining an upgrade file package according to the address of the upgrade file package, wherein the upgrade file package comprises: a plurality of upgrade files and an upgrade policy for the upgrade files; according to the upgrading strategy of each upgrading file, determining appointed upgrading equipment corresponding to each upgrading file from a plurality of equipment respectively, wherein the plurality of equipment comprises embedded equipment and at least one equipment controlled by the embedded equipment; and upgrading the firmware of the appointed upgrading equipment corresponding to each upgrading file according to each upgrading file. According to the method and the device, the embedded equipment is used for receiving the upgrading indication information sent by the server, and the embedded equipment is used for upgrading the specified upgrading equipment meeting the upgrading strategy, so that distributed upgrading and batch upgrading are realized through the embedded equipment, one-to-one upgrading of a plurality of equipment by the server is not needed, and the pressure of the server is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of a remote firmware upgrade system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a first remote firmware upgrade method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a second remote firmware upgrade method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a third remote firmware upgrade method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a remote firmware upgrade apparatus according to an embodiment of the present application;
fig. 6 is a schematic diagram of an embedded device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
In the description of the present application, it should be noted that if the terms "upper", "lower", etc. are used for indicating the orientation or positional relationship based on the orientation or positional relationship shown in the drawings or the orientation or positional relationship which is usually arranged when the product of the application is used, the description is only for convenience of describing the application and simplifying the description, but the indication or suggestion that the referred device or element must have a specific orientation, be constructed in a specific orientation and operation, and thus, cannot be understood as the limitation of the application.
Furthermore, the terms "first," "second," and the like in the description and in the claims, as well as in the drawings, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
In the existing method for upgrading the firmware remotely for the equipment, a server is generally in direct communication connection with a plurality of pieces of equipment, the server initiates an upgrade requirement access to the equipment, and if the equipment responds that the equipment needs to be upgraded, the server sends an upgrade file to the corresponding equipment so as to upgrade the firmware of the equipment. According to the upgrading method, the server is required to upgrade the equipment one to one, the processing pressure of the server is increased, the server is required to record the communication address of the equipment in advance to send an upgrading requirement scheme to the equipment, and the communication address of the equipment is not fixed and unchanged, so that the server is required to update and maintain the communication address of the equipment, and the processing pressure of the server is increased.
In order to solve the problems in the prior art, the invention provides the following technical idea that the embedded equipment for controlling the plurality of pieces of equipment under the control is utilized, the embedded equipment receives the upgrading indication message sent by the server, and the embedded equipment upgrades the specified upgrading equipment based on the upgrading strategy, so that on one hand, the controlled equipment is upgraded by the embedded equipment to realize distributed upgrading without one-to-one upgrading, on the other hand, the embedded equipment actively sends the information of the embedded equipment and the controlled at least one piece of equipment under the control to the server, and the server does not need to record the communication addresses of all the equipment, thereby reducing the processing pressure of the server.
On the basis of the above introduction, the following describes in detail a method, an apparatus, an embedded device, and a storage medium for upgrading a remote firmware provided by the present invention.
First, the present invention provides a remote firmware upgrade system, fig. 1 is a schematic structural diagram of a remote firmware upgrade system provided in an embodiment of the present invention, and as shown in fig. 1, the remote firmware upgrade system includes: the system comprises a server 10, at least one embedded device 20, and at least one set-down device 30 controlled by each embedded device 20; the server 10 is communicatively connected to at least one embedded device 20, and each embedded device 20 is connected to at least one lower set device 30 via a field bus.
Each embedded device 20 obtains the attribute parameters of at least one under-device 30 correspondingly controlled, and sends the attribute parameters of the embedded device and the attribute parameters of at least one under-device 30 to the server 10 in a communication cycle, the server 10 judges whether the embedded device 20 or the under-device 30 meeting the upgrading strategy exists according to the attribute parameters, if so, the server sends an upgrading indication message to the corresponding embedded device 20, the embedded device 20 obtains an upgrading file package according to the upgrading indication message, determines the specified upgrading device meeting the upgrading strategy from the embedded device 20 and the at least one under-device based on the upgrading strategy in the upgrading file package, and upgrades the firmware of the specified upgrading device according to the upgrading file.
It should be noted that, if each embedded device 20 is connected to a plurality of lower set devices 30, the plurality of lower set devices 30 may include multiple types.
In an alternative embodiment, the communication mode between the server 10 and the embedded device 20 is: virtual Private Network (VPN) communication, Transmission Control Protocol (TCP) communication, User Datagram Protocol (UDP) communication, or hypertext transfer Protocol (http) communication.
The invention provides at least one piece of lower equipment controlled by embedded equipment in a remote firmware upgrading system, which mainly aims at equipment related to charging in the field of electric automobiles, such as a charger, an energy controller, a charging module controller and the like, wherein the embedded equipment is control equipment of a plurality of equipment related to charging.
On the basis of the remote firmware upgrade system, an embodiment of the present application further provides a remote firmware upgrade method, which is applied to the embedded device 20 in the remote firmware upgrade system, and fig. 2 is a schematic flow diagram of a first remote firmware upgrade method provided in the embodiment of the present application, as shown in fig. 2, the method includes:
s21: receiving an upgrading indication message sent by a server; wherein, the upgrade indication message includes: and upgrading the address of the file package.
Specifically, the embedded device 20 sends its attribute parameters and at least one attribute parameter of the equipment under installation 30 to the server 10 in a communication cycle, the server 10 determines whether there is an embedded device 20 or an equipment under installation 30 that meets at least one upgrade policy according to the attribute parameters, if there is an embedded device 20 or an equipment under installation 30 that meets the upgrade policy, the server 10 sends an upgrade indication message to the corresponding embedded device, where the upgrade indication message is used to indicate that there is an equipment that meets the upgrade policy in the embedded device 20 and/or the equipment under installation 30, and the upgrade indication message includes: and upgrading the address of the file package. The address of the upgrade file package is used to download the upgrade file package. For example, the upgrade indication message is a Uniform Resource Locator (URL).
S22: obtaining an upgrade file package according to the address of the upgrade file package, wherein the upgrade file package comprises: a plurality of upgrade files and an upgrade policy for each upgrade file.
Specifically, in order to reduce the storage pressure of the server 10, in general, the upgrade file package is stored in a dedicated file server, and the embedded device 20 downloads the upgrade file package from the dedicated file server according to the address of the upgrade file package, where the upgrade file package includes: the upgrade method includes a plurality of upgrade files and an upgrade policy of each upgrade file, where the upgrade files are upgrade packages of devices, and the upgrade policy is used to indicate upgrade conditions, so that the server 10 screens upgradable devices that meet the upgrade conditions from the plurality of devices according to the upgrade conditions. Generally, an upgrade policy and an upgrade file name are written into an upgrade configuration file (configinfo. ini) as an upgrade description file, and the upgrade policy is acquired by parsing the upgrade file, where the upgrade file name is used to indicate an upgrade file corresponding to a device that satisfies the upgrade policy.
Exemplary communication methods for downloading the upgrade file package from the file server by the embedded device include, but are not limited to: file Transfer Protocol (FTP), Secure File Transfer Protocol (SFTP), HyperText Transfer Protocol (HTTP), Secure HyperText Transfer Protocol (SHTTP), Bluetooth Protocol (BT), and the like.
S23: according to the upgrading strategy of each upgrading file, determining appointed upgrading equipment corresponding to each upgrading file from a plurality of equipment respectively, wherein the plurality of equipment comprises: an embedded device and at least one device controlled by the embedded device.
Specifically, the plurality of upgrade files included in the upgrade file package all have corresponding upgrade policies, and according to the upgrade policy of each upgrade file, it is determined that a device, which satisfies the upgrade policy, of the embedded device 20 and the lower device 30 is used as a designated upgrade device corresponding to the upgrade file.
In an optional implementation manner, the upgrade policy includes a device type identifier, which is used to indicate a device type of the upgrade corresponding to the upgrade file, and after at least one initial device of the device type is selected from the multiple devices according to the device type identifier in the upgrade policy, at least one upgradable device meeting the upgrade condition is selected from the at least one initial device according to the upgrade condition indicated in the upgrade policy.
It should be noted that the upgrade policies of the plurality of upgrade files may be the same upgrade policy or different upgrade policies, if the server provides a plurality of upgrade policies to judge the plurality of devices, it is determined that, for each upgrade policy, a plurality of types of devices satisfy the corresponding upgrade policy, the number of each type of device is at least one, the file server, when generating the upgrade file package, provides two ways of generation, the first being based on the number of devices of a type that satisfy an upgrade policy, a corresponding number of upgrade files are stored in the upgrade file package, the second is for a type of device corresponding to an upgrade policy, only one upgrade file is stored in the upgrade file package, and the second mode can reduce the size of the upgrade file package compared with the first mode and reduce the probability of file loss when the upgrade file package is downloaded by the embedded device.
For a clearer understanding of the above two generation modes, the following two generation modes are exemplified: for an upgrade policy, three types of devices satisfy the upgrade policy, where one type of device includes five devices, the first generation manner is: the method comprises the steps that five same upgrade files are stored in an upgrade file package, the five same upgrade files are the upgrade files which are specific to the same type of equipment and have the same upgrade strategy, and 5 pieces of equipment of the type are screened out by the embedded equipment according to the equipment type of each upgrade file, wherein the 5 pieces of equipment all meet the upgrade strategy corresponding to the five upgrade files; the second generation method is: only one upgrade file is saved in the upgrade file package, and five types of equipment are screened out by the embedded equipment according to the equipment type corresponding to the upgrade file to meet the upgrade strategy corresponding to the upgrade file.
S24: and upgrading the firmware of the appointed upgrading equipment corresponding to each upgrading file according to each upgrading file.
Specifically, after the designated upgrading equipment corresponding to each upgrading file is determined, the corresponding upgrading file is operated on the designated upgrading equipment so as to upgrade the firmware of the designated upgrading equipment.
The remote firmware upgrading method provided by the embodiment of the application receives upgrading indication information sent by a server; wherein, the upgrade indication message includes: the address of the upgrade file package; obtaining an upgrade file package according to the address of the upgrade file package, wherein the upgrade file package comprises: a plurality of upgrade files and an upgrade policy for the upgrade files; according to the upgrading strategy of each upgrading file, determining appointed upgrading equipment corresponding to each upgrading file from a plurality of pieces of equipment respectively, wherein the plurality of pieces of equipment comprise embedded equipment and at least one piece of lower equipment controlled by the embedded equipment; and upgrading the firmware of the appointed upgrading equipment corresponding to each upgrading file according to each upgrading file. According to the method and the device, the embedded equipment is used for receiving the upgrading indication information sent by the server, and the embedded equipment is used for upgrading the specified upgrading equipment meeting the upgrading strategy, so that distributed upgrading and batch upgrading are realized through the embedded equipment, one-to-one upgrading of a plurality of equipment by the server is not needed, and the pressure of the server is reduced.
In an optional implementation manner, if the designated upgrade apparatus of the first target upgrade file in the plurality of upgrade files includes: an embedded device; accordingly, the above S24 includes:
and operating the first target upgrading file to upgrade the firmware.
Specifically, if the server 10 determines that the embedded device 20 meets the upgrade policy according to the attribute parameters of the embedded device 20, the upgrade file package inevitably includes an upgrade file that is the upgrade file corresponding to the embedded device 20, the embedded device 20 determines that the attribute parameters of the embedded device 20 meet the upgrade policy of the first target upgrade file according to the upgrade policies of a plurality of upgrade files, and then the embedded device is used as the specified upgrade device of the first target upgrade file, and since the upgrade file package downloaded by the embedded device 20 is stored in the memory of the embedded device 20, the embedded device 20 can directly obtain and operate the first target upgrade file from the memory, so as to upgrade the firmware of the embedded device 20.
In the implementation mode, the server can judge the attribute parameters of all connected embedded devices so as to send the upgrading indication message to all the embedded devices meeting the upgrading strategy, so that all the embedded devices meeting the upgrading strategy can be upgraded in batches according to the upgrading file without sending upgrading requirements to the embedded devices one by one, and therefore, the server does not need to store and maintain the communication addresses of the embedded devices, and the processing pressure of the server is reduced.
In another optional implementation, if the designated upgrade device of the second target upgrade file in the plurality of upgrade files includes: the lower equipment is controlled by the embedded equipment; accordingly, the above S24 includes:
and sending the second target upgrading file to the lower set of equipment so that the lower set of equipment can carry out firmware upgrading by running the second target upgrading file.
Specifically, the embedded device 20 determines that the attribute parameters of the controlled at least one piece of lower device 30 meet the upgrade policy of the second target upgrade file according to the upgrade policies of the plurality of upgrade files, and then the lower device is used as the designated upgrade device of the second target upgrade file, the embedded device sends the second target upgrade file to the corresponding lower device, and the lower device performs firmware upgrade on the lower device by running the second target upgrade file.
It should be noted that, if the upgrade file in the upgrade file package is stored in the first manner as described above, and a plurality of second target upgrade files exist in the upgrade file package for similar down-set devices, the embedded device may delete the sent second target upgrade file from the embedded device after sending a second target upgrade file to one down-set device every time, so as to reduce the storage pressure of the embedded device; if the upgrade file in the upgrade file package is stored in the second manner described above, and there is only one second target upgrade file for the similar type of devices in the upgrade file package, the embedded device must send the second target upgrade file to all the similar type of devices before deleting the second target upgrade file.
In the embodiment, the server sends the upgrade file of the device meeting the upgrade policy to the embedded device through the upgrade indication message, and the server does not need to send upgrade requirements to the device one by one, so that the server does not need to store and maintain the communication address of the embedded device, and the processing pressure of the server is reduced. And the embedded equipment upgrades the equipment meeting the upgrading strategy, thereby realizing distributed upgrading.
On the basis of the foregoing embodiments, an embodiment of the present application further provides a remote firmware upgrade method, where the upgrade policy is: the upgrade parameter condition of the target attribute type, in which the step S23 includes:
and according to the attribute parameters of the target attribute types of the equipment, adopting the upgrading strategy of each upgrading file, and respectively determining the equipment meeting the upgrading parameter conditions of the target attribute types from the plurality of equipment as the specified upgrading equipment.
Specifically, each device has multiple different attributes, the types of the multiple different attributes are divided, multiple different attribute types are determined, and the corresponding data or the parameter identified as the attribute, i.e., the attribute parameter, of each attribute. The upgrade conditions in the upgrade policy may be: and if the upgrading strategy is the upgrading parameter condition of the target attribute type, judging whether the attribute parameter of the target attribute type of each device meets the upgrading parameter condition of the target attribute type of each upgrading file, and taking the device of which the attribute parameter of the target attribute type meets the upgrading parameter condition of the target attribute type as the specified upgrading device.
In an alternative embodiment, the target property types include: at least one of firmware version information, preset upgrade time and equipment identification.
Specifically, the attribute types of the device at least may include: the firmware version information is used for indicating the current firmware version of the equipment, the preset upgrading time is used for indicating the time of the equipment for upgrading the firmware last time, and the equipment identification is unique encoding information of the equipment, such as an SN (serial number). For example, if the attribute type is firmware version information, the attribute parameters may be: current version information of firmware running on the device, such as version _ a7_27_ YC01_ D1; if the attribute type is the preset upgrade time, the attribute parameter may be the time when the device has recently upgraded the firmware in sequence, for example, 4, month and 15 days 2022, and if the attribute type is the device identifier, the attribute parameter may be the unique encoding information of the device.
If the upgrade strategy is as follows: and if the upgrade parameter condition of the firmware version information is the specified version number, selecting at least one initial device of the device type from the multiple devices according to the device type corresponding to the upgrade file, acquiring the firmware version number of the at least one initial device, matching the firmware version information of the at least one initial device of the type with the specified version number in the upgrade strategy, and taking the initial device of which the firmware version information is the specified version number as the specified upgrade device of the upgrade file.
If the upgrade strategy is as follows: and presetting an upgrade parameter condition of the upgrade time, wherein the upgrade parameter condition can be the appointed upgrade time or the appointed upgrade time period for the latest upgrade of the equipment, selecting at least one initial equipment of the equipment type from the multiple equipment according to the equipment type corresponding to the upgrade file, then acquiring the preset upgrade time of the at least one initial equipment, matching the preset upgrade time of the at least one initial equipment of the type with the appointed upgrade time or the appointed upgrade time period in the upgrade strategy, and taking the initial equipment with the preset upgrade time as the appointed upgrade equipment of the upgrade file or within the appointed upgrade time period.
If the upgrade strategy is as follows: and if the upgrade parameter condition of the equipment identifier is the specified equipment identifier, selecting at least one piece of initial equipment of the equipment type from the plurality of pieces of equipment according to the equipment type corresponding to the upgrade file, acquiring the equipment identifier of the at least one piece of initial equipment, matching the equipment identifier of the at least one piece of initial equipment of the type with the specified equipment identifier in the upgrade strategy, and taking the only initial equipment of which the equipment identifier is the specified equipment identifier as the specified upgrade equipment of the upgrade file.
In the remote firmware upgrading method provided by the embodiment of the application, the upgrading strategy is as follows: and according to the attribute parameters of the target attribute type of each device, adopting the upgrading strategy of each upgrading file, and respectively determining the device meeting the upgrading parameter conditions in the corresponding upgrading strategy from a plurality of devices as the designated upgrading device. By the method provided by the embodiment of the application, the specified upgrading equipment with the target attribute type meeting the upgrading parameter condition can be matched for each upgrading file, so that the equipment with the target attribute type meeting the upgrading parameter condition can be upgraded in batches, and the one-to-one upgrading processing pressure of the server is reduced.
On the basis of the foregoing embodiment, an embodiment of the present application further provides a remote firmware upgrade method, where the upgrading file package further includes: fig. 3 is a schematic flowchart of a second remote firmware upgrade method according to an embodiment of the present application, and as shown in fig. 3, after the step S22, the method further includes:
s25: and calculating the real check value of each upgrade file.
Specifically, the check value is used for judging the integrity and consistency of each upgrade file downloaded by the embedded device, a preset check value calculation method or a preset check value calculation tool is adopted to obtain the check field in each upgrade file, and the real check value of each upgrade file is calculated according to the check field.
S26: and verifying each upgrade file according to the comparison result of the real verification value and the preset verification value.
Specifically, the preset check value, the upgrade policy and the upgrade file name are used as upgrade description files to be written into the upgrade configuration file, and the upgrade files are verified through a comparison result of the real check value and the preset check value. On one hand, the check value is used for judging the integrity of each upgrade file downloaded by the embedded equipment, if the real check value is different from the preset check value, the damage exists in the downloading process of the upgrade file, and the upgrade file is incomplete; on the other hand, the check value is used for judging whether each upgrade file downloaded by the embedded device is consistent with the upgrade file expected to be downloaded, and if the real check value is different from the preset check value, the downloaded upgrade file is an error file.
In an alternative embodiment, the type of check value includes, but is not limited to: md5(Message Digest Algorithm 5, fifth edition) value, CRC (Cyclic Redundancy Check) value or xor Check, and if the type of the Check value is md5 value, the Check field of the upgrade file is a Filename field.
In the remote firmware upgrading method provided in the embodiment of the present application, upgrading the file package further includes: and after the upgrade file package is obtained according to the address of the upgrade file package, calculating the real check value of each upgrade file, and checking each upgrade file according to the comparison result of the real check value and the preset check value. By checking each upgrading file, the accuracy of the upgrading file is ensured, and the equipment is ensured to be upgraded correctly.
On the basis of the foregoing embodiments, an embodiment of the present application further provides a remote firmware upgrade method, which is applied to a server 10 in a remote firmware upgrade system, and fig. 4 is a flowchart illustrating a third remote firmware upgrade method provided in the embodiment of the present application, as shown in fig. 4, the method includes:
s11: at least one upgrade policy is obtained.
Specifically, the server receives and stores attribute parameters of a plurality of devices sent by the embedded device in a communication cycle, and the operation and maintenance personnel make an upgrade strategy by checking the attribute parameters of the plurality of devices and input at least one upgrade strategy through the input device of the server.
In an optional implementation manner, the upgrade policy is an upgrade parameter condition of a target attribute type, and the target attribute type includes: at least one of firmware version information, preset upgrade time and equipment identification.
It should be noted that the server may store the attribute parameters of multiple devices in a database, or record the attribute parameters in the form of a file record.
S12: judging whether equipment meeting at least one upgrading strategy exists or not according to at least one upgrading strategy and attribute parameters of a plurality of pieces of equipment, wherein the plurality of pieces of equipment comprise: the embedded device and at least one set-down device controlled by the embedded device.
Specifically, the server determines, according to at least one upgrade policy input by the operation and maintenance staff, whether there is a device whose attribute parameter satisfies the upgrade policy from among the multiple devices, where the device may be: the embedded device and/or at least one set-down device controlled by the embedded device.
In an alternative embodiment, the apparatus may comprise: the server can judge whether equipment with the attribute parameters of the target attribute type meeting the upgrading parameter conditions of the target attribute type exists in the multiple pieces of equipment according to at least one upgrading strategy input by operation and maintenance personnel and the upgrading parameter conditions of the target attribute type corresponding to the upgrading strategy.
S13: if yes, sending an upgrading indication message to the corresponding embedded equipment; wherein, the upgrade indication message includes: and upgrading the address of the file package.
Specifically, if there is a device whose attribute parameters satisfy the upgrade policy, the server sends an upgrade indication message to the corresponding embedded device, where the upgrade indication message includes: and upgrading the address of the file package. If the embedded equipment does not meet the upgrading strategy, but equipment meeting the upgrading strategy exists in at least one piece of equipment under the control of the embedded equipment, the upgrading indication message is also sent to the corresponding embedded equipment.
It should be noted that, if there is a device whose attribute parameters satisfy the upgrade policy, the server sends the device information that satisfies the upgrade policy to the file server, and the file server encapsulates an upgrade package of the device that needs to be upgraded into upgrade files according to the device information, writes the upgrade policy, the upgrade file name, and a preset check value of each upgrade file as upgrade description files into upgrade configuration files, and packages the upgrade files and the upgrade configuration files into upgrade file packages, and sends the generated address of the upgrade file package to the server.
For example, an upgrade configuration file is provided as follows, where Type is device policy, a7 and M3 represent two different device types, and their CPU cores are different, Version is Version number, Filename is upgrade file name, and md5 is a preset check value.
Type:A7
Version:version_A7_27_YC01_D1
FileName:setup_A7_YC01.tar.gz
md5:b4ae04db9db7102900e69d4628657e93
Type:M3
Version:V100B000000
FileName:ACM3V100B000000.bin
md5:b4ae04db9db7102900e69d4628657e93
The remote firmware upgrading method provided by the embodiment of the application is applied to a server, judges whether equipment meeting at least one upgrading strategy exists or not according to the at least one upgrading strategy and attribute parameters of a plurality of pieces of equipment by obtaining the at least one upgrading strategy, and sends upgrading indication information to corresponding embedded equipment if the equipment meeting the at least one upgrading strategy exists, wherein the upgrading indication information comprises: and upgrading the address of the file package. According to the method and the device, the attribute parameters are actively sent to the server by the equipment, and whether the equipment needing to be upgraded exists is judged according to the upgrading strategy.
In an alternative embodiment, if not, the server receives and stores the new attribute parameters of the devices sent by the embedded device in the next communication cycle, and the server performs the above steps S11-S13 again to determine whether there are devices satisfying the upgrade policy.
On the basis of the foregoing embodiments, an embodiment of the present application further provides a remote firmware upgrade apparatus, which is applied to an embedded device 20, and fig. 5 is a schematic structural diagram of the remote firmware upgrade apparatus provided in the embodiment of the present application, as shown in fig. 5, the apparatus includes:
a message receiving module 21, configured to receive an upgrade indication message sent by a server; wherein, the upgrade indication message includes: the address of the upgrade file package;
an upgrade file package obtaining module 22, configured to obtain an upgrade file package according to an address of the upgrade file package, where the upgrade file package includes: a plurality of upgrade files and an upgrade policy of each upgrade file;
the designated upgrade device determining module 23 is configured to determine, according to the upgrade policy of each upgrade file, a designated upgrade device corresponding to each upgrade file from multiple devices, where the multiple devices include: the embedded equipment and at least one lower equipment controlled by the embedded equipment;
and the upgrading module 24 is used for upgrading the firmware of the specified upgrading equipment corresponding to each upgrading file according to each upgrading file.
Optionally, the upgrade policy is: upgrading parameter conditions of the target attribute type; the designated upgrading device determining module 23 is specifically configured to determine, according to the attribute parameter of the target attribute type of each device, a device that meets the upgrading parameter condition of the target attribute type from among the multiple devices as a designated upgrading device by using the upgrading policy of each upgrading file.
Optionally, the target attribute types include: at least one of firmware version information, preset upgrade time and equipment identification.
Optionally, the upgrade file package further includes: after upgrading the file package obtaining module 22, the apparatus further includes:
the real check value calculating module is used for calculating the real check value of each upgrade file;
and the check value comparison module is used for checking each upgrade file according to the comparison result of the real check value and the preset check value.
Optionally, if the designated upgrade device of the first target upgrade file in the plurality of upgrade files includes: an embedded device; correspondingly, the upgrade module 24 is specifically configured to run the first target upgrade file to perform firmware upgrade.
Optionally, if the designated upgrade device of the second target upgrade file in the plurality of upgrade files includes: the lower equipment is controlled by the embedded equipment; correspondingly, the upgrade module 24 is specifically configured to send the second target upgrade file to the lower equipment, so that the lower equipment performs firmware upgrade by running the second target upgrade file.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 6 is a schematic diagram of an embedded device provided in an embodiment of the present application, and as shown in fig. 6, an embedded device 20 includes: the processor 201, the storage medium 202, and a bus, where the storage medium 202 stores program instructions executable by the processor 201, and when the embedded device 20 runs, the processor 201 communicates with the storage medium 202 through the bus, and the processor 201 executes the program instructions to execute the above method embodiment, and the specific implementation manner and the technical effect are similar, and are not described herein again.
Optionally, the invention also provides a program product, for example a computer-readable storage medium, comprising a program which, when being executed by a processor, is adapted to carry out the above-mentioned method embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a hardware mode, and can also be realized in a hardware reinforcement function unit mode.
The integrated unit implemented in the form of a firmware functional unit may be stored in a computer readable storage medium. The firmware functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and shall be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A remote firmware upgrading method is applied to an embedded device, and comprises the following steps:
receiving an upgrading indication message sent by a server; wherein, the upgrade indication message includes: the address of the upgrade file package;
obtaining the upgrade file package according to the address of the upgrade file package, wherein the upgrade file package comprises: a plurality of upgrade files and an upgrade policy for each upgrade file;
according to the upgrading strategy of each upgrading file, determining appointed upgrading equipment corresponding to each upgrading file from a plurality of equipment respectively, wherein the plurality of equipment comprise: the embedded equipment and at least one piece of lower equipment controlled by the embedded equipment;
and upgrading the firmware of the appointed upgrading equipment corresponding to each upgrading file according to each upgrading file.
2. The method of claim 1, wherein the upgrade policy is: upgrading parameter conditions of the target attribute type;
the determining, according to the upgrade policy of each upgrade file, the specific upgrade device corresponding to each upgrade file from the multiple devices includes: and according to the attribute parameters of the target attribute type of each device, adopting the upgrading strategy of each upgrading file, and respectively determining the device meeting the upgrading parameter condition of the target attribute type from the plurality of devices as the specified upgrading device.
3. The method of claim 2, wherein the target property type comprises: at least one of firmware version information, preset upgrade time and equipment identification.
4. The method of claim 1, wherein the upgrade file package further comprises: after the preset check value of each upgrade file is obtained according to the address of the upgrade file package, the method further includes:
calculating the real check value of each upgrade file;
and verifying each upgrade file according to the comparison result of the real verification value and the preset verification value.
5. The method of claim 1, wherein if the designated upgrade device for the first target upgrade file in the plurality of upgrade files comprises: the embedded device; correspondingly, the upgrading the firmware of the designated upgrading device corresponding to each upgrading file according to each upgrading file comprises:
and operating the first target upgrading file to upgrade the firmware.
6. The method of claim 1, wherein if the designated upgrade device for the second target upgrade file in the plurality of upgrade files comprises: the lower equipment is controlled by the embedded equipment; correspondingly, the upgrading the firmware of the designated upgrading device corresponding to each upgrading file according to each upgrading file includes:
and sending the second target upgrading file to the lower set of equipment, so that the lower set of equipment carries out firmware upgrading by operating the second target upgrading file.
7. A remote firmware upgrade system, comprising: the system comprises a server, at least one embedded device and at least one set device controlled by each embedded device;
the server is in communication connection with the at least one embedded device to send upgrading indication information to the at least one embedded device;
the embedded device is configured to perform the steps of the remote firmware upgrade method according to any one of claims 1 to 6, and send an upgrade file to the lower device when the upgrade device is designated as the lower device.
8. A remote firmware upgrading device is applied to an embedded device, and comprises:
the message receiving module is used for receiving an upgrading indication message sent by the server; wherein, the upgrade indication message includes: the address of the upgrade file package;
an upgrade file package obtaining module, configured to obtain the upgrade file package according to an address of the upgrade file package, where the upgrade file package includes: a plurality of upgrade files and an upgrade policy for each upgrade file;
an appointed upgrading device determining module, configured to determine, according to the upgrading policy of each upgrading file, an appointed upgrading device corresponding to each upgrading file from multiple devices, where the multiple devices include: the embedded equipment and at least one piece of lower equipment controlled by the embedded equipment;
and the upgrading module is used for upgrading the firmware of the appointed upgrading equipment corresponding to each upgrading file according to each upgrading file.
9. An embedded device, comprising: a processor, a storage medium and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating via the bus when the embedded device is running, the processor executing the program instructions to perform the steps of the remote firmware upgrade method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the remote firmware upgrade method according to any one of claims 1 to 6.
CN202210574700.6A 2022-05-24 2022-05-24 Remote firmware upgrading method, system, device, embedded equipment and storage medium Pending CN114978904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210574700.6A CN114978904A (en) 2022-05-24 2022-05-24 Remote firmware upgrading method, system, device, embedded equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210574700.6A CN114978904A (en) 2022-05-24 2022-05-24 Remote firmware upgrading method, system, device, embedded equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114978904A true CN114978904A (en) 2022-08-30

Family

ID=82955669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210574700.6A Pending CN114978904A (en) 2022-05-24 2022-05-24 Remote firmware upgrading method, system, device, embedded equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114978904A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115987976A (en) * 2023-03-20 2023-04-18 北京集度科技有限公司 Method and equipment for upgrading node

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364891A (en) * 2011-09-13 2012-02-29 杭州华三通信技术有限公司 Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
CN108259231A (en) * 2017-12-27 2018-07-06 生迪智慧科技有限公司 Method for upgrading software, gateway, server and the system of smart machine
CN109460245A (en) * 2018-10-31 2019-03-12 北京众谊越泰科技有限公司 A kind of remote upgrade method of embedded system
CN112905214A (en) * 2021-03-31 2021-06-04 安徽江淮汽车集团股份有限公司 Remote upgrading method, device, equipment and storage medium
CN113721966A (en) * 2021-08-27 2021-11-30 杭州华橙软件技术有限公司 Node upgrading method and device, storage medium and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364891A (en) * 2011-09-13 2012-02-29 杭州华三通信技术有限公司 Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
CN108259231A (en) * 2017-12-27 2018-07-06 生迪智慧科技有限公司 Method for upgrading software, gateway, server and the system of smart machine
CN109460245A (en) * 2018-10-31 2019-03-12 北京众谊越泰科技有限公司 A kind of remote upgrade method of embedded system
CN112905214A (en) * 2021-03-31 2021-06-04 安徽江淮汽车集团股份有限公司 Remote upgrading method, device, equipment and storage medium
CN113721966A (en) * 2021-08-27 2021-11-30 杭州华橙软件技术有限公司 Node upgrading method and device, storage medium and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
屠雪真;陈小强;: "分布式系统高效升级方法研究", 微型电脑应用, no. 06 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115987976A (en) * 2023-03-20 2023-04-18 北京集度科技有限公司 Method and equipment for upgrading node

Similar Documents

Publication Publication Date Title
CN107450941B (en) Automatic packaging method, device, storage medium and computer equipment
CN108196878B (en) Method and device for generating application program installation package, electronic equipment and storage medium
CN110032382A (en) A kind of vehicle electronic control unit upgrade method, system and terminal device
CN107992321A (en) ECU software update method, device, vehicle-mounted T-BOX and vehicle
CN110727454A (en) Updating method and device of intelligent equipment, electronic equipment and storage medium
US9223559B2 (en) Information processing apparatus, electronic control unit, information processing method, and program
CN104063239A (en) Application program update method of mobile terminal, server and client
CN103942065A (en) Method and system for updating firmware compatibility data
CN109857423B (en) Program version updating method and device, server and readable storage medium
CN109391673A (en) A kind of method, system and the terminal device of management update file
CN112506559B (en) Gray release method and device based on gateway, electronic equipment and storage medium
CN113342387A (en) Automatic software upgrading method, updating client and updating server
CN107395666B (en) Method and device for operating upgrading data packet of numerical control machine tool
CN109324821B (en) Self-service terminal system version management method
CN109725912A (en) Application program configuration method, device, terminal, server and readable storage medium storing program for executing
CN112947983A (en) Application program updating method and device, electronic equipment and storage medium
CN114978904A (en) Remote firmware upgrading method, system, device, embedded equipment and storage medium
CN110045969B (en) Application program installation method, server, system, device and storage medium
CN108920171A (en) Firmware update and device, electronic equipment
CN115220767A (en) Software upgrading method, system, electronic equipment and storage medium
CN113961226B (en) Software development kit repairing method, terminal, server and equipment
CN107526584B (en) Data access method and device
CN110362333A (en) A kind of quick solution, device and electronic equipment that client upgrading hinders
CN113094064A (en) Gateway software module upgrading method, device, equipment and storage medium
CN112667272A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination