CN111562926A - System and method for updating circuit breaker firmware - Google Patents

System and method for updating circuit breaker firmware Download PDF

Info

Publication number
CN111562926A
CN111562926A CN202010260314.0A CN202010260314A CN111562926A CN 111562926 A CN111562926 A CN 111562926A CN 202010260314 A CN202010260314 A CN 202010260314A CN 111562926 A CN111562926 A CN 111562926A
Authority
CN
China
Prior art keywords
version
firmware
updated
circuit breaker
version number
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
CN202010260314.0A
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.)
Jiangsu Nengdian S&t Co ltd
Original Assignee
Jiangsu Nengdian S&t 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 Jiangsu Nengdian S&t Co ltd filed Critical Jiangsu Nengdian S&t Co ltd
Priority to CN202010260314.0A priority Critical patent/CN111562926A/en
Publication of CN111562926A publication Critical patent/CN111562926A/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
    • 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)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a system and a method for updating breaker firmware, wherein the system comprises the following steps: the server is used for sending the version number, the version length and the first verification data of the new version of the firmware to be updated to the circuit breaker; the circuit breaker is used for downloading the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated and generating second check data according to the downloaded new version of the firmware to be updated; the circuit breaker is also used for obtaining a comparison result of the check data and a comparison result of the version length; the circuit breaker is also used for replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, so as to update the firmware to be updated. The invention can reduce the abnormal probability of the circuit breaker after the firmware is updated.

Description

System and method for updating circuit breaker firmware
Technical Field
The invention relates to the technical field of circuit breakers, in particular to a system and a method for updating circuit breaker firmware.
Background
A circuit breaker is a common switching device, and is widely used in various fields. In order to ensure the normal use of the circuit breaker, a large amount of firmware is usually provided in the circuit breaker, and the firmware usually needs to be updated and maintained, so as to ensure the normal use of the circuit breaker.
The existing method for updating the firmware of the circuit breaker is mainly characterized in that a server sends a version number of a new version of the firmware and verification data to the circuit breaker, when the circuit breaker is successfully verified according to the verification data, the firmware can be downloaded, and the downloaded firmware of the new version is replaced with the firmware of an old version, so that the firmware is updated.
However, in the process of downloading the new version of firmware, the circuit breaker is likely to cause an abnormality in the downloaded new version of firmware due to a network problem, for example, the downloaded new version of firmware is incomplete due to a packet loss phenomenon caused by the network problem, and if the new version of firmware is reused to replace the old version of firmware, the subsequent use of the circuit breaker is inevitably abnormal.
Disclosure of Invention
In view of the above, it is necessary to provide a system and a method for updating firmware of a circuit breaker, which reduce the probability of abnormality of the circuit breaker after firmware update.
In a first aspect, a system for updating circuit breaker firmware is provided, comprising: a server and a circuit breaker;
the server is used for sending the version number, the version length and the first verification data of the new version of the firmware to be updated to the circuit breaker;
the circuit breaker is used for downloading the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated and generating second check data according to the downloaded new version of the firmware to be updated;
the circuit breaker is further configured to compare the first check data with the second check data to obtain a check data comparison result, calculate a version length of the new version of the downloaded firmware to be updated, and compare the version length of the new version of the firmware to be updated sent by the server with the calculated version length of the new version of the downloaded firmware to be updated to obtain a version length comparison result;
the circuit breaker is also used for replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, so as to update the firmware to be updated.
In one embodiment, the server is further configured to send a version number of the old version of the firmware to be updated to the circuit breaker; the circuit breaker is also used for comparing the version number of the old version of the firmware to be updated with the version number of each local firmware; the circuit breaker is also used for sending update confirmation information to the server if the version number of each local firmware is the same as the version number of the old version of the firmware to be updated, so that the server can send the version number of the new version of the firmware to be updated, the version length and the first verification data to the circuit breaker according to the update confirmation information; the circuit breaker is further used for sending update refusing information to the server if the version number of each local firmware does not have the version number identical to the version number of the old version of the firmware to be updated, so that the server stops sending the version number, the version length and the first check data of the new version of the firmware to be updated according to the update refusing information.
In one embodiment, the system further comprises: an administrator terminal; the circuit breaker is also used for sending the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and a circuit breaker identifier to the administrator terminal when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed; the administrator terminal is further used for sending update permission information to the circuit breaker according to the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and the circuit breaker identifier; and the circuit breaker is also used for replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated when the update permission information sent by the administrator terminal is received.
In an embodiment, the circuit breaker is further configured to delete the downloaded new version of the firmware to be updated when the comparison result of the verification data is a comparison failure and/or the comparison result of the version length is a comparison failure.
In one embodiment, the circuit breaker is further configured to generate exception description information after deleting the downloaded new version of the firmware to be updated, and send the exception description information to the administrator terminal.
In one embodiment, the circuit breaker is further configured to generate a download request according to the version number of the new version of the firmware to be updated and a circuit breaker identifier, and send the download request to the server; the server is further used for acquiring a download link of the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated in the download request, and sending the download link to the circuit breaker corresponding to the circuit breaker identifier, so that the circuit breaker can download the new version of the firmware to be updated according to the download link.
In a second aspect, a method for updating circuit breaker firmware is provided, which is applied to a system for updating circuit breaker firmware, wherein the system comprises a server and a circuit breaker; the method comprises the following steps:
the server sends the version number, the version length and first verification data of a new version of the firmware to be updated to the circuit breaker;
the circuit breaker downloads the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated, and generates second check data according to the downloaded new version of the firmware to be updated;
the circuit breaker compares the first check data with the second check data to obtain a check data comparison result, calculates the version length of the new version of the downloaded firmware to be updated, and compares the version length of the new version of the downloaded firmware to be updated sent by the server with the calculated version length of the new version of the downloaded firmware to be updated to obtain a version length comparison result;
and when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, the circuit breaker replaces the old version of the firmware to be updated with the downloaded new version of the firmware to be updated so as to update the firmware to be updated.
In one embodiment, before the sending the version number of the new version of the firmware to be updated, the version length, and the first verification data to the circuit breaker, the method further includes: the server sends the version number of the old version of the firmware to be updated to the circuit breaker; the circuit breaker compares the version number of the old version of the firmware to be updated with the version number of each local firmware; the circuit breaker judges whether a version number identical to the version number of the old version of the firmware to be updated exists in the version numbers of the local firmware; if the version number of each local firmware is the same as the version number of the old version of the firmware to be updated, the circuit breaker sends update confirmation information to the server, so that the server sends the version number of the new version of the firmware to be updated, the version length and first verification data to the circuit breaker according to the update confirmation information; and if the version number of each local firmware does not have the version number identical to the version number of the old version of the firmware to be updated, the circuit breaker sends update refusing information to the server, so that the server stops sending the version number of the new version of the firmware to be updated, the version length and the first verification data according to the update refusing information.
In one embodiment, the system further comprises an administrator terminal; when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated, including: when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, sending the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and a circuit breaker identifier to the administrator terminal, so that the administrator terminal returns update-allowing information to the circuit breaker according to the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and the circuit breaker identifier; and when the update permission information sent by the administrator terminal is received, replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated.
In one embodiment, the method further comprises: and deleting the new version of the downloaded firmware to be updated when the comparison result of the check data is a comparison failure and/or the comparison result of the version length is a comparison failure.
In one embodiment, after deleting the new version of the firmware to be updated whose downloading is completed, the method further includes: and the circuit breaker generates abnormal description information and sends the abnormal description information to the administrator terminal.
In one embodiment, the downloading the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated includes: the circuit breaker generates a downloading request according to the version number of the new version of the firmware to be updated and the circuit breaker identifier, and sends the downloading request to the server; and the server acquires a download link of the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated in the download request, and sends the download link to the circuit breaker corresponding to the circuit breaker identifier, so that the circuit breaker downloads the new version of the firmware to be updated according to the download link.
The embodiment of the invention has the following beneficial effects:
the invention has proposed a system and method used for updating the firmware of the circuit breaker, because it is the second check-up data that is produced according to the newer edition of the firmware to be upgraded that is downloaded after finishing downloading, namely the check-up data is produced according to the data in the firmware, it is equivalent to the check-up to various data included in the firmware, if the check-up is passed, prove the data of the firmware of the newer edition of download have not been unusual to a certain extent, compared with the simple way of producing the check-up data and checking up according to the version number, have reduced the probability that the circuit breaker appears unusually after the firmware is upgraded; furthermore, the circuit breaker also carries out comparison of version lengths, and the packet loss phenomenon can be effectively detected through the comparison, namely if the packet loss phenomenon occurs due to a network problem, the version length of the firmware of the new version downloaded by the circuit breaker is inevitably smaller than the version length issued by the server, and when the comparison is passed, the packet loss phenomenon is not generated, the circuit breaker has successfully downloaded the new version of the firmware to be updated, and the probability of abnormity of the circuit breaker after the firmware is updated is effectively reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a schematic diagram of the components of a system for updating circuit breaker firmware in one embodiment;
FIG. 2 is a schematic diagram of the components of a system for updating circuit breaker firmware in one embodiment;
fig. 3 is a schematic flow chart illustrating an implementation of a method for updating firmware of a circuit breaker according to an embodiment.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the 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 invention.
As shown in fig. 1, there is provided a system 100 for updating circuit breaker firmware, comprising: a server 110 and a circuit breaker 120.
The server comprises a high-performance computer or a high-performance computer cluster.
The server 110 is configured to send the version number of the new version of the firmware to be updated, the version length, and the first verification data to the circuit breaker 120.
The firmware to be updated is the firmware with the version to be updated. It can be understood that, in the process of using the circuit breaker, the version of the firmware in the circuit breaker needs to be updated continuously, so that the performance of the firmware is improved, and the circuit breaker is ensured to be used better.
And the new version of the firmware to be updated is the latest version of the firmware to be updated.
Wherein, the version number is used for uniquely identifying a version of firmware.
The version length indicates the size of the data volume contained in the firmware, and the longer the version length is, the larger the data volume contained in the firmware is; the shorter the version length, the smaller the amount of data the firmware contains.
The first check data is data generated by the server according to a certain algorithm for checking, where the certain algorithm may include, but is not limited to, an SHA algorithm (e.g., SHA256), and a CRC algorithm. It will be appreciated that subsequent operations, such as a firmware update operation, may be performed only if the verification data has been verified.
The circuit breaker 120 is configured to download the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated, and generate second verification data according to the downloaded new version of the firmware to be updated.
The second check data is data used for checking and generated by the circuit breaker according to the downloaded new version of the firmware to be updated, specifically, the circuit breaker generates the second check data according to the data in the downloaded new version of the firmware to be updated, for example, the circuit breaker extracts part of data from the downloaded new version of the firmware to be updated, and then generates the second check data according to the extracted part of data by using the same algorithm as that of the server.
Illustratively, the circuit breaker sends the version number of the new version of the firmware to be updated to the server, and the server issues the new version corresponding to the version number to the circuit breaker.
The circuit breaker 120 is further configured to compare the first check data with the second check data to obtain a check data comparison result, calculate a version length of the new version of the downloaded firmware to be updated, and compare the version length of the new version of the firmware to be updated sent by the server 110 with the calculated version length of the new version of the downloaded firmware to be updated to obtain a version length comparison result.
And the comparison result of the check data is the comparison result of the first check data and the second check data.
The comparison result of the version length is a comparison result of the version length of the new version of the firmware to be updated sent by the server and the version length of the new version of the firmware to be updated which is obtained by calculating and downloaded by the circuit breaker.
The circuit breaker 120 is further configured to replace the old version of the firmware to be updated with the downloaded new version of the firmware to be updated when the comparison result of the verification data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, so as to update the firmware to be updated.
If the first check data and the second check data are the same, the comparison result of the check data is that the comparison is passed; and if the first check data and the second check data are different, the check data comparison result is a comparison failure.
If the first version length (the version length of the new version of the firmware to be updated, which is sent to the circuit breaker by the server, is called the first version length) is the same as the second version length (the version length of the new version of the firmware to be updated, which is obtained by calculating by the circuit breaker and downloaded, is called the second version length), the comparison result of the version lengths is that the comparison is passed; if the first version length is different from the second version length, the comparison result of the version lengths is a comparison failure.
And only when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, the downloaded new version of the firmware to be updated is considered to have no abnormality, for example, no packet is lost, and at the moment, the downloaded new version of the firmware to be updated is used for replacing the old version of the firmware to be updated so as to update the firmware to be updated.
According to the system for updating the firmware of the circuit breaker, the second check data is generated according to the downloaded new version of the firmware to be updated after the firmware is downloaded, namely the check data is generated according to the data in the firmware, so that the check of various data contained in the firmware is equivalent to the check, if the check is passed, the data of the downloaded new version of the firmware is proved to be abnormal to a certain extent, and compared with a simple mode of generating the check data according to the version number and carrying out the check, the probability of the abnormality of the circuit breaker after the firmware is updated is reduced; furthermore, the circuit breaker also carries out comparison of version lengths, and the packet loss phenomenon can be effectively detected through the comparison, namely if the packet loss phenomenon occurs due to a network problem, the version length of the firmware of the new version downloaded by the circuit breaker is inevitably smaller than the version length issued by the server, and when the comparison is passed, the packet loss phenomenon is not generated, the circuit breaker has successfully downloaded the new version of the firmware to be updated, and the probability of abnormity of the circuit breaker after the firmware is updated is effectively reduced.
In one embodiment, the server 110 is further configured to send a version number of the old version of the firmware to be updated to the circuit breaker 120.
The old version of the firmware to be updated is the version of the firmware to be updated which is currently used by the circuit breaker.
The circuit breaker 120 is further configured to compare the version number of the old version of the firmware to be updated with the version number of each local firmware.
After receiving the version number of the old version of the firmware to be updated, which is sent by the server, the circuit breaker compares the received version number of the old version with the version numbers of the local currently used firmware, so that the circuit breaker sends update confirmation information or update refusal information to the server according to the comparison result.
The circuit breaker 120 is further configured to send update confirmation information to the server 110 if a version number identical to the version number of the old version of the firmware to be updated exists in the version numbers of the local firmware, so that the server 110 sends the version number of the new version of the firmware to be updated, the version length, and the first verification data to the circuit breaker 120 according to the update confirmation information.
If the version number of each local firmware is the same as the version number of the old version of the firmware to be updated, the fact that the firmware which the server wants to update is the firmware existing in the circuit breaker is indicated, at this moment, the circuit breaker sends update confirmation information to the server, and the server is instructed to send the version number of the new version of the firmware to be updated, the version length and the first verification data.
The circuit breaker 120 is further configured to send update rejection information to the server 110 if a version number identical to the version number of the old version of the firmware to be updated does not exist in the version numbers of the local firmware, so that the server 110 stops sending the version number of the new version of the firmware to be updated, the version length, and the first verification data according to the update rejection information.
If the version number of the local firmware does not have the version number identical to the version number of the old version of the firmware to be updated, it indicates that the firmware that the server wants to update is not the firmware existing in the circuit breaker, and the server may send the version number of the old version of the firmware to be updated in error, that is, the version number of the old version of the firmware to be updated should be sent to the circuit breaker a but now sent to the circuit breaker B, but the firmware to be updated does not exist in the circuit breaker B. In this case, the B breaker sends update rejection information to the server, instructing the server to stop sending the version number, version length, and first verification data of the new version of the firmware to be updated, to tell the server that you sent an error message.
Further, after receiving the update rejection information sent by the circuit breaker, the server may generate feedback information according to the update rejection information, the version number of the new version of the firmware to be updated, and the version length, and send the feedback information to the administrator terminal to feed back to the administrator.
In one embodiment, as shown in fig. 2, the system 100 further comprises: the administrator terminal 130.
The administrator terminal is a terminal used by a system administrator, and the administrator terminal may include, but is not limited to, a mobile phone, a tablet computer, a notebook computer, and a desktop computer.
The circuit breaker 120 is further configured to send the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated, and a circuit breaker identifier to the administrator terminal 130 when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed.
The circuit breaker identification is used for uniquely identifying one circuit breaker.
When the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, the circuit breaker further sends the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and the circuit breaker identifier to the administrator terminal, so that the administrator of the administrator terminal can confirm whether the version of the circuit breaker identified by the circuit breaker identifier is really updated or not, and can confirm whether the old version is to be updated to the new version corresponding to the version number of the new version or not. The purpose of this is that, although the verification data comparison is passed and the version length comparison is passed, the circuit breaker may not use the new version for some reason, but needs to continue to use the old version, for example, the new version is in the stage of releasing the gray scale, only part of the circuit breakers can use the new version, and the rest of the circuit breakers need to continue to use the old version, so the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated, and the circuit breaker identifier are sent to the administrator terminal, so that the administrator can confirm whether the circuit breaker identified by the circuit breaker identifier is a circuit breaker that can use the new version, and if not, the administrator terminal sends update prohibition information to the circuit breaker.
The administrator terminal 130 is further configured to send update permission information to the circuit breaker 120 according to the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated, and the circuit breaker identifier.
Wherein the update information is allowed, and the circuit breaker is instructed to replace the old version of the firmware to be updated with the downloaded new version of the firmware to be updated.
When the administrator of the administrator terminal confirms that the circuit breaker identified by the circuit breaker identifier is actually to be updated and the old version needs to be updated to the new version corresponding to the version number of the new version, the administrator terminal clicks a confirmation button in the management interface, at this time, the administrator terminal generates update permission information, and the generated update permission information contains the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and the circuit breaker identifier.
When the administrator of the administrator terminal confirms that the circuit breaker identified by the circuit breaker identifier does not need to be updated and/or that the updated version is wrong (for example, the version number of the old version of the firmware to be updated is correct, but the version number of the new version of the firmware to be updated is wrong), the administrator terminal clicks a prohibition button in the management interface, at this time, the administrator terminal generates prohibition update information, and the circuit breaker, after receiving the prohibition update information, will not replace the old version of the firmware to be updated with the downloaded new version of the firmware to be updated.
The circuit breaker 120 is further configured to replace the old version of the firmware to be updated with the downloaded new version of the firmware to be updated when receiving the update permission information sent by the administrator terminal 130.
Since the administrator terminal sends the update permission information, which indicates that the downloaded new version of the firmware to be updated is the version confirmed by the administrator, the new version should be used to replace the corresponding old version, and then the circuit breaker performs the operation of replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated. For example, the circuit breaker control program is started by itself, and the boot program overwrites the new version of the firmware to be updated with the old version of the firmware to be updated and then runs the new version of the firmware to be updated.
In an embodiment, the circuit breaker 120 is further configured to delete the downloaded new version of the firmware to be updated when the comparison result of the verification data is a comparison failure and/or the comparison result of the version length is a comparison failure.
When the comparison result of the verification data is a comparison failure and/or the comparison result of the version length is a comparison failure, it is indicated that there is a problem with the data in the new version of the firmware to be updated downloaded by the circuit breaker, for example, the data is missing, and because there is a problem with the data in the new version of the firmware to be updated downloaded by the circuit breaker, at this time, the downloaded new version of the firmware to be updated cannot be used to replace the old version of the firmware to be updated, so as to prevent the circuit breaker from running into a fault, and meanwhile, in order to save the storage space of the circuit breaker, the downloaded new version of the firmware to be updated needs.
In one embodiment, the circuit breaker 120 is further configured to generate exception description information after deleting the downloaded new version of the firmware to be updated, and send the exception description information to the administrator terminal 130.
The abnormal description information is used for indicating that a new version of the firmware to be updated downloaded by an administrator of the administrator terminal has a problem, and the administrator processes the abnormal description information after seeing the abnormal description information displayed by the administrator terminal.
In one embodiment, a method of a circuit breaker downloading firmware is provided. The circuit breaker 120 is further configured to generate a download request according to the version number of the new version of the firmware to be updated and the circuit breaker identifier, and send the download request to the server 110.
The circuit breaker is not provided with new firmware locally, so that a download address of the new firmware needs to be acquired to acquire the new firmware, and then the circuit breaker generates a download request according to the version number of the new version of the firmware to be updated and the circuit breaker identifier, and informs a server that the circuit breaker corresponding to the circuit breaker identifier currently needs to download the new version of the firmware to be updated.
The server 110 is further configured to obtain a download link of the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated in the download request, and send the download link to the circuit breaker 120 corresponding to the circuit breaker identifier, so that the circuit breaker 120 downloads the new version of the firmware to be updated according to the download link.
After receiving the downloading request, the server analyzes the downloading request and obtains the version number of the new version of the firmware to be updated, inquires the downloading link of the version number of the new version of the firmware to be updated according to the obtained version number of the new version of the firmware to be updated, and sends the downloading link to the circuit breaker corresponding to the circuit breaker identifier.
The server stores download links of various versions of firmware in advance, for example, the server establishes a version link table in which various versions of firmware and download links corresponding to the versions of firmware are recorded.
In one embodiment, as shown in fig. 3, there is provided a method for updating circuit breaker firmware, applied to a system for updating circuit breaker firmware, the system comprising a server and a circuit breaker; the method comprises the following steps:
step 302, the server sends the version number, version length and first verification data of the new version of the firmware to be updated to the circuit breaker.
And 304, the circuit breaker downloads the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated, and generates second check data according to the downloaded new version of the firmware to be updated.
Step 306, the circuit breaker compares the first check data with the second check data to obtain a check data comparison result, calculates the length of the new version of the downloaded firmware to be updated, and compares the length of the new version of the firmware to be updated sent by the server with the calculated length of the new version of the downloaded firmware to be updated to obtain a version length comparison result.
And 308, when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, the circuit breaker replaces the old version of the firmware to be updated with the downloaded new version of the firmware to be updated so as to update the firmware to be updated.
According to the method for updating the firmware of the circuit breaker, the second check data is generated according to the downloaded new version of the firmware to be updated after the firmware is downloaded, namely the check data is generated according to the data in the firmware, so that the check is performed on various data contained in the firmware, if the check is passed, the data of the downloaded new version of the firmware is proved to be abnormal to a certain extent, and compared with a simple mode of generating the check data according to the version number and performing the check, the probability of the abnormality of the circuit breaker after the firmware is updated is reduced; furthermore, the circuit breaker also carries out comparison of version lengths, and the packet loss phenomenon can be effectively detected through the comparison, namely if the packet loss phenomenon occurs due to a network problem, the version length of the firmware of the new version downloaded by the circuit breaker is inevitably smaller than the version length issued by the server, and when the comparison is passed, the packet loss phenomenon is not generated, the circuit breaker has successfully downloaded the new version of the firmware to be updated, and the probability of abnormity of the circuit breaker after the firmware is updated is effectively reduced.
In one embodiment, before sending the version number of the new version of the firmware to be updated, the version length, and the first verification data to the circuit breaker in step 302, the method further includes: the server sends the version number of the old version of the firmware to be updated to the circuit breaker; the circuit breaker compares the version number of the old version of the firmware to be updated with the version number of each local firmware; the circuit breaker judges whether a version number identical to the version number of the old version of the firmware to be updated exists in the version numbers of the local firmware; if the version number of each local firmware is the same as the version number of the old version of the firmware to be updated, the circuit breaker sends update confirmation information to the server, so that the server sends the version number of the new version of the firmware to be updated, the version length and first verification data to the circuit breaker according to the update confirmation information; and if the version number of each local firmware does not have the version number identical to the version number of the old version of the firmware to be updated, the circuit breaker sends update refusing information to the server, so that the server stops sending the version number of the new version of the firmware to be updated, the version length and the first verification data according to the update refusing information.
In one embodiment, the system further comprises an administrator terminal; step 308, when the comparison result of the verification data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated, includes: when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, sending the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and a circuit breaker identifier to the administrator terminal, so that the administrator terminal returns update-allowing information to the circuit breaker according to the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and the circuit breaker identifier; and when the update permission information sent by the administrator terminal is received, replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated.
In one embodiment, the method further comprises: and deleting the new version of the downloaded firmware to be updated when the comparison result of the check data is a comparison failure and/or the comparison result of the version length is a comparison failure.
In one embodiment, after deleting the new version of the firmware to be updated whose downloading is completed, the method further includes: and the circuit breaker generates abnormal description information and sends the abnormal description information to the administrator terminal.
In one embodiment, the downloading the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated in step 304 includes: the circuit breaker generates a downloading request according to the version number of the new version of the firmware to be updated and the circuit breaker identifier, and sends the downloading request to the server; and the server acquires a download link of the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated in the download request, and sends the download link to the circuit breaker corresponding to the circuit breaker identifier, so that the circuit breaker downloads the new version of the firmware to be updated according to the download link.
It should be noted that the system for updating the firmware of the circuit breaker and the method for updating the firmware of the circuit breaker described above belong to one general inventive concept, and the contents in the embodiments of the system for updating the firmware of the circuit breaker and the method for updating the firmware of the circuit breaker may be mutually applicable.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A system for updating circuit breaker firmware, comprising: a server and a circuit breaker;
the server is used for sending the version number, the version length and the first verification data of the new version of the firmware to be updated to the circuit breaker;
the circuit breaker is used for downloading the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated and generating second check data according to the downloaded new version of the firmware to be updated;
the circuit breaker is further configured to compare the first check data with the second check data to obtain a check data comparison result, calculate a version length of the new version of the downloaded firmware to be updated, and compare the version length of the new version of the firmware to be updated sent by the server with the calculated version length of the new version of the downloaded firmware to be updated to obtain a version length comparison result;
the circuit breaker is also used for replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, so as to update the firmware to be updated.
2. The system of claim 1, wherein the server is further to send a version number of an old version of the firmware to be updated to the circuit breaker;
the circuit breaker is also used for comparing the version number of the old version of the firmware to be updated with the version number of each local firmware;
the circuit breaker is also used for sending update confirmation information to the server if the version number of each local firmware is the same as the version number of the old version of the firmware to be updated, so that the server can send the version number of the new version of the firmware to be updated, the version length and the first verification data to the circuit breaker according to the update confirmation information;
the circuit breaker is further used for sending update refusing information to the server if the version number of each local firmware does not have the version number identical to the version number of the old version of the firmware to be updated, so that the server stops sending the version number, the version length and the first check data of the new version of the firmware to be updated according to the update refusing information.
3. The system of claim 1, wherein the system further comprises: an administrator terminal;
the circuit breaker is also used for sending the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and a circuit breaker identifier to the administrator terminal when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed;
the administrator terminal is further used for sending update permission information to the circuit breaker according to the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and the circuit breaker identifier;
and the circuit breaker is also used for replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated when the update permission information sent by the administrator terminal is received.
4. The system of claim 3, wherein the circuit breaker is further configured to delete the downloaded new version of the firmware to be updated when the comparison result of the verification data is a comparison failure and/or the comparison result of the version length is a comparison failure.
5. The system of claim 4, wherein the circuit breaker is further configured to generate exception description information after deleting the downloaded new version of the firmware to be updated, and to send the exception description information to the administrator terminal.
6. The system of claim 1, wherein the circuit breaker is further configured to generate a download request according to a version number of the new version of the firmware to be updated and a circuit breaker identifier, and send the download request to the server;
the server is further used for acquiring a download link of the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated in the download request, and sending the download link to the circuit breaker corresponding to the circuit breaker identifier, so that the circuit breaker can download the new version of the firmware to be updated according to the download link.
7. A method for updating circuit breaker firmware is applied to a system for updating circuit breaker firmware, and the system comprises a server and a circuit breaker; the method comprises the following steps:
the server sends the version number, the version length and first verification data of a new version of the firmware to be updated to the circuit breaker;
the circuit breaker downloads the new version of the firmware to be updated according to the version number of the new version of the firmware to be updated, and generates second check data according to the downloaded new version of the firmware to be updated;
the circuit breaker compares the first check data with the second check data to obtain a check data comparison result, calculates the version length of the new version of the downloaded firmware to be updated, and compares the version length of the new version of the downloaded firmware to be updated sent by the server with the calculated version length of the new version of the downloaded firmware to be updated to obtain a version length comparison result;
and when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, the circuit breaker replaces the old version of the firmware to be updated with the downloaded new version of the firmware to be updated so as to update the firmware to be updated.
8. The method of claim 7, wherein prior to said sending the version number, version length, and first verification data for the new version of the firmware to be updated to the circuit breaker, the method further comprises:
the server sends the version number of the old version of the firmware to be updated to the circuit breaker;
the circuit breaker compares the version number of the old version of the firmware to be updated with the version number of each local firmware;
the circuit breaker judges whether a version number identical to the version number of the old version of the firmware to be updated exists in the version numbers of the local firmware;
if the version number of each local firmware is the same as the version number of the old version of the firmware to be updated, the circuit breaker sends update confirmation information to the server, so that the server sends the version number of the new version of the firmware to be updated, the version length and first verification data to the circuit breaker according to the update confirmation information;
and if the version number of each local firmware does not have the version number identical to the version number of the old version of the firmware to be updated, the circuit breaker sends update refusing information to the server, so that the server stops sending the version number of the new version of the firmware to be updated, the version length and the first verification data according to the update refusing information.
9. The system of claim 7, wherein the system further comprises an administrator terminal;
when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated, including:
when the comparison result of the check data is that the comparison is passed and the comparison result of the version length is that the comparison is passed, sending the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and a circuit breaker identifier to the administrator terminal, so that the administrator terminal returns update-allowing information to the circuit breaker according to the version number of the new version of the firmware to be updated, the version number of the old version of the firmware to be updated and the circuit breaker identifier;
and when the update permission information sent by the administrator terminal is received, replacing the old version of the firmware to be updated with the downloaded new version of the firmware to be updated.
10. The method of claim 9, wherein the method further comprises:
and deleting the new version of the downloaded firmware to be updated when the comparison result of the check data is a comparison failure and/or the comparison result of the version length is a comparison failure.
CN202010260314.0A 2020-04-03 2020-04-03 System and method for updating circuit breaker firmware Pending CN111562926A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010260314.0A CN111562926A (en) 2020-04-03 2020-04-03 System and method for updating circuit breaker firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010260314.0A CN111562926A (en) 2020-04-03 2020-04-03 System and method for updating circuit breaker firmware

Publications (1)

Publication Number Publication Date
CN111562926A true CN111562926A (en) 2020-08-21

Family

ID=72074173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010260314.0A Pending CN111562926A (en) 2020-04-03 2020-04-03 System and method for updating circuit breaker firmware

Country Status (1)

Country Link
CN (1) CN111562926A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702423A (en) * 2013-12-04 2015-06-10 北京信威通信技术股份有限公司 Version dynamic-management method and device for distributed system
CN106161336A (en) * 2015-03-25 2016-11-23 阿里巴巴集团控股有限公司 A kind of information updating method, Apparatus and system
CN110413295A (en) * 2019-06-26 2019-11-05 上海电器科学研究所(集团)有限公司 A kind of embedded device remote firmware updating method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104702423A (en) * 2013-12-04 2015-06-10 北京信威通信技术股份有限公司 Version dynamic-management method and device for distributed system
CN106161336A (en) * 2015-03-25 2016-11-23 阿里巴巴集团控股有限公司 A kind of information updating method, Apparatus and system
CN110413295A (en) * 2019-06-26 2019-11-05 上海电器科学研究所(集团)有限公司 A kind of embedded device remote firmware updating method

Similar Documents

Publication Publication Date Title
CN107748668B (en) Method and device for upgrading application program
CN110737658B (en) Data fragment storage method, device, terminal and readable storage medium
CN110750267B (en) Service information updating method, device, computer equipment and storage medium
CN107547239B (en) Configuration object updating method and device
CN110851159B (en) Business rule updating method and device, computer equipment and storage medium
CN110633160A (en) Interface calling method and device, computer equipment and storage medium
CN111263354B (en) OTA differential upgrading method and device
CN103036706A (en) Local processing method of application upgrading abnormity
CN109358869A (en) Configuration file amending method, device, computer equipment and storage medium
CN111881150A (en) Web application program offline data processing method and device
CN111159233A (en) Distributed caching method, system, computer device and storage medium
CN115396192A (en) User identity verification method and device, computer equipment and storage medium
CN111901176A (en) Fault determination method, device, equipment and storage medium
CN114356855A (en) File management method, file management device, electronic device and readable storage medium
CN111984520A (en) Buried point testing method, computer device and computer-readable storage medium
CN111158747B (en) APP prompt message dynamic configuration method, system, computer equipment and storage medium
CN111562926A (en) System and method for updating circuit breaker firmware
CN114422576B (en) Session cleaning method and device, computer equipment and readable storage medium
CN114661771A (en) Stock data storage and reading method, equipment and readable storage medium
CN114090055A (en) Application program updating method and device, terminal and storage medium
CN115277678A (en) File downloading method and device, computer equipment and storage medium
CN114968963A (en) File overwriting method and device and electronic equipment
CN112783522B (en) File loading method, file loading device and electronic equipment
CN115408025A (en) System upgrade management method and device
CN113709195A (en) Vehicle software upgrading method, device and system

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