CN115102856A - Internet of things equipment upgrading method and system - Google Patents
Internet of things equipment upgrading method and system Download PDFInfo
- Publication number
- CN115102856A CN115102856A CN202210568174.2A CN202210568174A CN115102856A CN 115102856 A CN115102856 A CN 115102856A CN 202210568174 A CN202210568174 A CN 202210568174A CN 115102856 A CN115102856 A CN 115102856A
- Authority
- CN
- China
- Prior art keywords
- upgrade
- file
- upgrading
- internet
- execution
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
- H04L63/123—Applying verification of the received information received data contents, e.g. message integrity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides an Internet of things equipment upgrading method and system in the technical field of Internet of things equipment, wherein the method comprises the following steps: step S10, the upper computer acquires an initial upgrade file, and adds upgrade information into the file header of the initial upgrade file; step S20, packaging the initial upgrade file and the upgrade information into an upgrade execution file; step S30, selecting a corresponding execution upgrading file based on the model, the production batch and the hardware version of the Internet of things equipment, performing first verification on the execution upgrading file based on upgrading information, and sending the execution upgrading file to the Internet of things equipment; step S40, the Internet of things equipment receives the upgrade execution file, and stores the upgrade execution file after second verification is carried out on the upgrade execution file based on the upgrade information; and step S50, after the Internet of things equipment carries out third verification on the stored execution upgrading file based on the upgrading information, executing the execution upgrading file and carrying out upgrading operation. The invention has the advantages that: the safety and the reliability of the upgrading of the Internet of things equipment are greatly improved.
Description
Technical Field
The invention relates to the technical field of Internet of things equipment, in particular to an Internet of things equipment upgrading method and system.
Background
The Internet of things (IoT) is a network that extends and expands on the basis of the Internet, and is a huge network formed by combining various information sensing devices and networks, and realizes interconnection and intercommunication among people, machines and things at any time and any place.
With the rapid development of the internet of things, various internet of things devices are in endless, and in order to provide the best use experience for users, each internet of things device needs to be continuously upgraded and iterated. Because the internet of things equipment of one manufacturer has a plurality of models, even if the internet of things equipment of one model also has a plurality of different versions, the software of the internet of things equipment of different models or versions can be compatible, can not be completely compatible or can not be completely compatible, if the burning file is wrong during upgrading of different internet of things equipment, if the function is abnormal, the upgrading is needed to be carried out again for repairing, and if the function is abnormal, the internet of things equipment is disconnected, so that the subsequent use can not be carried out.
Therefore, how to provide an internet of things equipment upgrading method and system to improve the safety and reliability of internet of things equipment upgrading becomes a technical problem to be solved urgently.
Disclosure of Invention
The invention aims to provide an Internet of things equipment upgrading method and system, and safety and reliability of Internet of things equipment upgrading are improved.
In a first aspect, the invention provides an internet of things equipment upgrading method, which includes the following steps:
step S10, the upper computer acquires an initial upgrade file of each sensor of the Internet of things, and upgrade information including upgrade file types, applicable machine types, applicable production batch ranges, applicable hardware versions, current software versions, upgrade terms and verification parameters is added to a file header of the initial upgrade file;
step S20, the upper computer packs the initial upgrade file and the upgrade information into an execution upgrade file with a preset format;
step S30, selecting the corresponding execution upgrading file based on the model, the production batch and the hardware version of the Internet of things equipment, performing first verification on the execution upgrading file based on the upgrading information, and then sending the execution upgrading file to the Internet of things equipment;
step S40, the Internet of things equipment receives the execution upgrading file, and stores the execution upgrading file after second verification is carried out on the execution upgrading file based on the upgrading information;
and step S50, after the Internet of things equipment carries out third verification on the stored upgrade execution file based on the upgrade information, executing the upgrade execution file to carry out upgrade operation.
Further, in step S10, when the value of the applicable model is 0, the model is a model wildcard;
the applicable production batch range comprises a range lower limit and a range upper limit, wherein the range lower limit is 0 to indicate that only the range upper limit is effective, the range upper limit is 0 to indicate that only the range lower limit is effective, and the range lower limit and the range upper limit are both 0 to indicate that the production batch is wildcarded;
when the value of the applicable hardware version is 0, hardware wildcard is represented;
when the value of the current software version is 0, the software wildcard is represented;
the upgrade terms are expiration dates or time periods;
the verification parameters are first Hash values obtained by carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline.
Further, the step S30 specifically includes:
step S31, selecting the corresponding execution upgrading file based on the model, production batch and hardware version of the Internet of things equipment;
step S32, analyzing the selected upgrade execution file to obtain an initial upgrade file and upgrade information, respectively matching the model, production batch and hardware version of the Internet of things equipment based on the applicable model, the applicable production batch range and the applicable hardware version carried by the upgrade information, and entering step S33 if the matching is passed; if the matching is not passed, ending the process;
step S33, judging whether the current time is in the upgrade deadline, if yes, entering step S34; if not, ending the process or actively sending an upgrading request to the upper computer;
step S34, carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline to obtain a second Hash value, judging whether the second Hash value is consistent with the value of the verification parameter, if so, successfully verifying, and sending the upgrade execution file to the Internet of things equipment; if not, the first check fails and the process is ended.
Further, the step S40 is specifically:
the internet of things equipment receives the upgrade execution file, analyzes the received upgrade execution file to obtain an initial upgrade file and upgrade information, obtains the model, the production batch, the hardware version, the software version and the current time of the local machine, sequentially carries out second inspection on the model, the production batch, the hardware version, the software version and the current time based on the upgrade information, stores the upgrade execution file if the second inspection is successful, and then enters step S50; if the second check fails, the flow is ended.
Further, the step S50 specifically includes:
step S51, after the Internet of things equipment receives the upgrade command, analyzing the stored upgrade execution file to obtain an initial upgrade file and upgrade information, and obtaining the model, hardware version, software version and current time of the local machine;
step S52, checking the model, the hardware version, the software version and the current time in sequence based on the upgrading information, and entering step S53 if the checking is passed; if the verification fails, ending the process;
step S53, carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline to obtain a third Hash value, judging whether the third Hash value is consistent with the value of the verification parameter, if so, successfully carrying out the third verification, and executing the upgrade file to carry out upgrade operation; if not, the third check fails and the process is ended.
In a second aspect, the invention provides an internet of things equipment upgrading system, which includes the following modules:
the system comprises an upgrade information setting module, an upgrade information processing module and a verification module, wherein the upgrade information setting module is used for acquiring an initial upgrade file of each sensor of the Internet of things by an upper computer, and adding upgrade information comprising an upgrade file type, an applicable machine type, an applicable production batch range, an applicable hardware version, a current software version, an upgrade period and a verification parameter into a file header of the initial upgrade file;
the execution upgrading file production module is used for packaging the initial upgrading file and the upgrading information into an execution upgrading file with a preset format by the upper computer;
the first checking module is used for selecting the corresponding execution upgrading file based on the model, the production batch and the hardware version of the equipment of the Internet of things, and sending the execution upgrading file to the equipment of the Internet of things after the first checking is carried out on the execution upgrading file based on the upgrading information;
the second check module is used for receiving the execution upgrading file by the Internet of things equipment, performing second check on the execution upgrading file based on the upgrading information and storing the execution upgrading file;
and the third verification module is used for performing third verification on the stored execution upgrading file by the Internet of things equipment based on the upgrading information and then executing the execution upgrading file to perform upgrading operation.
Further, in the upgrade information setting module, when the value of the applicable model is 0, the model wildcard is represented;
the applicable production batch range comprises a range lower limit and a range upper limit, wherein the range lower limit is 0 to indicate that only the range upper limit is effective, the range upper limit is 0 to indicate that only the range lower limit is effective, and the range lower limit and the range upper limit are both 0 to indicate production batch wildcard;
when the value of the applicable hardware version is 0, hardware wildcard is represented;
when the value of the current software version is 0, the software wildcard is represented;
the upgrade deadline is an expiration date or time period;
the verification parameters are first Hash values obtained by carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline.
Further, the first verification module specifically includes:
the upgrade execution file selection unit is used for selecting the corresponding upgrade execution file based on the model, the production batch and the hardware version of the equipment of the Internet of things;
the first upgrading information checking unit is used for analyzing the selected execution upgrading file to obtain an initial upgrading file and upgrading information, respectively matching the model, the production batch and the hardware version of the equipment of the Internet of things based on the applicable model, the applicable production batch range and the applicable hardware version carried by the upgrading information, and entering the upgrading time limit checking unit if the matching is passed; if the matching is not passed, ending the flow;
the upgrading time limit checking unit is used for judging whether the current time is within the upgrading time limit or not, and if so, entering the Hash checking unit; if not, ending the process or actively sending an upgrading request to the upper computer;
the Hash check unit is used for carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline to obtain a second Hash value, judging whether the second Hash value is consistent with the value of the check parameter or not, if so, successfully checking the first Hash value, and sending the upgrade execution file to the Internet of things equipment; if not, the first check fails and the process is ended.
Further, the second check module specifically includes:
the Internet of things equipment receives the execution upgrading file, analyzes the received execution upgrading file to obtain an initial upgrading file and upgrading information, obtains the machine type, the production batch, the hardware version, the software version and the current time of the local machine, sequentially carries out second inspection on the machine type, the production batch, the hardware version, the software version and the current time based on the upgrading information, stores the execution upgrading file if the second inspection is successful, and enters a third inspection module; if the second check fails, the flow is ended.
Further, the third verification module specifically includes:
the upgrading command receiving unit is used for analyzing the stored upgrade execution file to obtain an initial upgrading file and upgrading information after the Internet of things equipment receives the upgrading command, and obtaining the machine type, the hardware version, the software version and the current time of the machine;
the second upgrading information checking unit is used for sequentially checking the machine type, the hardware version, the software version and the current time based on the upgrading information, and entering the upgrading unit if the checking is passed; if the verification fails, ending the process;
the upgrading unit is used for carrying out Hash calculation on the initial upgrading file, the upgrading file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrading period to obtain a third Hash value, judging whether the third Hash value is consistent with the value of the verification parameter or not, if so, successfully verifying the third Hash value, and executing the upgrading file to carry out upgrading operation; if not, the third check fails and the process is ended.
The invention has the advantages that:
1. the upgrading information including the upgrading file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version, the upgrading period and the verification parameters is added into the file header of the initial upgrading file, the initial upgrading file and the upgrading information are packaged into the upgrading execution file, then the three links of selection, sending and execution of the upgrading execution file are verified respectively through the upgrading information, the upgrading execution file is subjected to full-flow management, the finally executed upgrading execution file is ensured to be matched with the equipment of the Internet of things to be upgraded, and the safety and the reliability of upgrading of the equipment of the Internet of things are greatly improved.
2. The method comprises the steps of taking a first hash value obtained by carrying out hash calculation on an initial upgrade file, an upgrade file type, an applicable machine type, an applicable production batch range, an applicable hardware version, a current software version and an upgrade deadline as a check parameter, and comparing whether a hash value obtained by secondary hash calculation is consistent with the check parameter, so that whether the upgrade file is tampered or not and whether data loss exists or not can be quickly judged, and the safety and reliability of the upgrade of the equipment of the Internet of things are guaranteed.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
Fig. 1 is a flowchart of an internet of things device upgrading method according to the present invention.
Fig. 2 is a schematic structural diagram of an internet of things equipment upgrading system.
Detailed Description
The technical scheme in the embodiment of the application has the following general idea: the method comprises the steps of setting an execution upgrading file to carry upgrading information comprising upgrading file types, applicable machine types, applicable production batch ranges, applicable hardware versions, current software versions, upgrading time limits and verification parameters, respectively verifying three links of selection, issuing and execution of the execution upgrading file through the upgrading information, and ensuring that the finally executed execution upgrading file is matched with the equipment of the Internet of things to be upgraded so as to improve the safety and reliability of upgrading of the equipment of the Internet of things.
Referring to fig. 1 to 2, a preferred embodiment of an internet of things device upgrading method according to the present invention includes the following steps:
step S10, the upper computer acquires an initial upgrade file of each sensor of the Internet of things, and upgrade information including upgrade file types, applicable machine types, applicable production batch ranges, applicable hardware versions, current software versions, upgrade terms and verification parameters is added to a file header of the initial upgrade file; the initial upgrade file is in a HEX format;
by setting the upgrading information comprising the upgrading file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version, the upgrading time limit and the verification parameters, the upgrading file type, the machine type, the production batch, the hardware version, the software version, the current time and whether the upgrading file is tampered can be quickly verified, and the upgrading file is ensured to be matched with the Internet of things equipment to be upgraded; when the current time is not within the upgrading time limit, an upgrading request can be actively sent to an upper computer;
step S20, the upper computer packs the initial upgrade file and the upgrade information into an execution upgrade file with a preset format; the preset format is a format supported by the Internet of things equipment;
step S30, selecting the corresponding upgrade execution file based on the model, production batch and hardware version of the Internet of things equipment, performing first verification on the upgrade execution file based on the upgrade information, and then sending the upgrade execution file to the Internet of things equipment;
step S40, the Internet of things equipment receives the execution upgrading file, and stores the execution upgrading file after second verification is carried out on the execution upgrading file based on the upgrading information;
and step S50, after the Internet of things equipment carries out third verification on the stored upgrade execution file based on the upgrade information, executing the upgrade execution file to carry out upgrade operation.
In step S10, when the value of the applicable model is 0, the model is a model wildcard;
the applicable production batch range comprises a range lower limit and a range upper limit, wherein the range lower limit is 0 to indicate that only the range upper limit is effective, the range upper limit is 0 to indicate that only the range lower limit is effective, and the range lower limit and the range upper limit are both 0 to indicate production batch wildcard;
when the value of the applicable hardware version is 0, hardware wildcard is represented;
when the value of the current software version is 0, the software wildcard is represented;
the upgrade deadline is an expiration date or a time period, for example, the upgrade execution file of a certain version is set to be only installed at a certain festival, namely, a festival limited version;
the verification parameters are first Hash values obtained by carrying out Hash calculation on an initial upgrade file, an upgrade file type, an applicable machine type, an applicable production batch range, an applicable hardware version, a current software version and an upgrade deadline;
the default value of the upgrade file type is 1.
The step S30 specifically includes:
s31, selecting the corresponding upgrade execution file based on the model, production batch and hardware version of the Internet of things equipment;
step S32, analyzing the selected upgrade execution file to obtain an initial upgrade file and upgrade information, respectively matching the model, production batch and hardware version of the Internet of things equipment based on the applicable model, applicable production batch range and applicable hardware version carried by the upgrade information, and if the matching is passed, entering step S33; if the matching fails, ending the process and reporting an error;
step S33, judging whether the current time is in the upgrade deadline, if yes, entering step S34; if not, ending the process or actively sending an upgrading request to the upper computer;
step S34, carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline to obtain a second Hash value, judging whether the second Hash value is consistent with the value of the verification parameter, if so, successfully verifying, and sending the upgrade execution file to the Internet of things equipment; if not, the first check fails, and the process is ended to report an error.
The step S40 specifically includes:
the IOT equipment receives the execution upgrade file, analyzes the received execution upgrade file to obtain an initial upgrade file and upgrade information, obtains the model, the production batch, the hardware version, the software version and the current time of the local machine, performs second inspection on the model, the production batch, the hardware version, the software version and the current time in sequence based on the upgrade information, stores the execution upgrade file if the second inspection is successful, and goes to step S50; if the second check fails, the process is ended and an error is reported.
The step S50 specifically includes:
step S51, after the Internet of things equipment receives the upgrade command, analyzing the stored upgrade execution file to obtain an initial upgrade file and upgrade information, and obtaining the model, hardware version, software version and current time of the local machine;
step S52, checking the model, the hardware version, the software version and the current time in sequence based on the upgrading information, and entering step S53 if the checking is passed; if the verification fails, ending the process and reporting errors; when the upgrade information is used for verification, if the value of part of parameters of the upgrade information is 0, the verification of the corresponding item is skipped, for example, when the value of the applicable model is 0, the model wildcard is indicated, the verification of the model is skipped, so that the verification efficiency is improved, and the upgrade efficiency of the internet of things equipment is further improved;
step S53, carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade period to obtain a third Hash value, judging whether the third Hash value is consistent with the value of the verification parameter, if so, successfully carrying out the third verification, executing the upgrade file to carry out upgrade operation, and feeding back an upgrade result to the upper computer; if not, the third check fails, and the process is ended to report errors.
The invention discloses a preferred embodiment of an Internet of things equipment upgrading system, which comprises the following modules:
the system comprises an upgrade information setting module, an upgrade information processing module and a verification module, wherein the upgrade information setting module is used for acquiring an initial upgrade file of each sensor of the Internet of things by an upper computer, and adding upgrade information comprising an upgrade file type, an applicable machine type, an applicable production batch range, an applicable hardware version, a current software version, an upgrade period and a verification parameter into a file header of the initial upgrade file; the initial upgrade file is in a HEX format;
by setting the upgrading information comprising the upgrading file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version, the upgrading time limit and the verification parameters, the upgrading file type, the machine type, the production batch, the hardware version, the software version, the current time and whether the upgrading file is tampered can be quickly verified, and the upgrading file is ensured to be matched with the Internet of things equipment to be upgraded; when the current time is not in the upgrading time limit, an upgrading request can be actively sent to an upper computer;
the execution upgrading file production module is used for packaging the initial upgrading file and the upgrading information into an execution upgrading file with a preset format by the upper computer; the preset format is a format supported by the Internet of things equipment;
the first checking module is used for selecting the corresponding execution upgrading file based on the model, the production batch and the hardware version of the equipment of the Internet of things, and sending the execution upgrading file to the equipment of the Internet of things after the first checking is carried out on the execution upgrading file based on the upgrading information;
the second check module is used for receiving the execution upgrading file by the Internet of things equipment, performing second check on the execution upgrading file based on the upgrading information and storing the execution upgrading file;
and the third verification module is used for performing third verification on the stored execution upgrading file by the Internet of things equipment based on the upgrading information and then executing the execution upgrading file to perform upgrading operation.
In the upgrading information setting module, when the value of the applicable model is 0, the model is in wildcard;
the applicable production batch range comprises a range lower limit and a range upper limit, wherein the range lower limit is 0 to indicate that only the range upper limit is effective, the range upper limit is 0 to indicate that only the range lower limit is effective, and the range lower limit and the range upper limit are both 0 to indicate that the production batch is wildcarded;
when the value of the applicable hardware version is 0, hardware wildcard is represented;
when the value of the current software version is 0, the software wildcard is represented;
the upgrade deadline is an expiration date or a time period, for example, the upgrade execution file of a certain version is set to be only installed at a certain festival, namely, a festival limited version;
the verification parameters are first hash values obtained by carrying out hash calculation on an initial upgrade file, an upgrade file type, an applicable machine type, an applicable production batch range, an applicable hardware version, a current software version and an upgrade deadline;
the default value of the upgrade file type is 1.
The first verification module specifically includes:
the upgrade execution file selection unit is used for selecting the corresponding upgrade execution file based on the model, the production batch and the hardware version of the equipment of the Internet of things;
the first upgrading information checking unit is used for analyzing the selected execution upgrading file to obtain an initial upgrading file and upgrading information, respectively matching the model, the production batch and the hardware version of the equipment of the Internet of things based on the applicable model, the applicable production batch range and the applicable hardware version carried by the upgrading information, and entering the upgrading time limit checking unit if the matching is passed; if the matching fails, ending the process and reporting an error;
the upgrade deadline checking unit is used for judging whether the current time is within the upgrade deadline, and if so, entering the hash checking unit; if not, ending the process or actively sending an upgrading request to the upper computer;
the Hash check unit is used for carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline to obtain a second Hash value, judging whether the second Hash value is consistent with the value of the check parameter or not, if so, successfully checking the first Hash value, and sending the upgrade execution file to the Internet of things equipment; if not, the first check fails, and the process is ended to report an error.
The second check module specifically comprises:
the Internet of things equipment receives the execution upgrading file, analyzes the received execution upgrading file to obtain an initial upgrading file and upgrading information, obtains the machine type, the production batch, the hardware version, the software version and the current time of the local machine, sequentially carries out second inspection on the machine type, the production batch, the hardware version, the software version and the current time based on the upgrading information, stores the execution upgrading file if the second inspection is successful, and enters a third inspection module; if the second check fails, the process is ended and an error is reported.
The third verification module specifically includes:
the upgrading command receiving unit is used for analyzing the stored execution upgrading file to obtain an initial upgrading file and upgrading information after the Internet of things equipment receives the upgrading command, and obtaining the machine type, the hardware version, the software version and the current time of the machine;
the second upgrading information checking unit is used for sequentially checking the machine type, the hardware version, the software version and the current time based on the upgrading information, and entering the upgrading unit if the checking is passed; if the verification fails, ending the flow and reporting an error; when the upgrade information is used for verification, if the value of part of parameters of the upgrade information is 0, the verification of the corresponding item is skipped, for example, when the value of the applicable model is 0, the model wildcard is indicated, the verification of the model is skipped, so that the verification efficiency is improved, and the upgrade efficiency of the internet of things equipment is further improved;
the upgrading unit is used for carrying out Hash calculation on the initial upgrading file, the upgrading file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrading time limit to obtain a third Hash value, judging whether the third Hash value is consistent with the value of the verification parameter or not, if so, successfully carrying out third verification, executing the upgrading file to carry out upgrading operation, and feeding an upgrading result back to the upper computer; if not, the third check fails, and the process is ended to report errors.
In summary, the invention has the advantages that:
1. the upgrading information including the upgrading file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version, the upgrading period and the verification parameters is added into the file header of the initial upgrading file, the initial upgrading file and the upgrading information are packaged into the upgrading execution file, then the three links of selection, sending and execution of the upgrading execution file are verified respectively through the upgrading information, the upgrading execution file is subjected to full-flow management, the finally executed upgrading execution file is ensured to be matched with the equipment of the Internet of things to be upgraded, and the safety and the reliability of upgrading of the equipment of the Internet of things are greatly improved.
2. The method comprises the steps of taking a first Hash value obtained by carrying out Hash calculation on an initial upgrade file, an upgrade file type, an applicable machine type, an applicable production batch range, an applicable hardware version, a current software version and an upgrade period as a verification parameter, and comparing whether the Hash value obtained by secondary Hash calculation is consistent with the verification parameter, so that whether the upgrade file is tampered and whether data loss exists can be quickly judged, and the safety and reliability of the upgrade of the Internet of things equipment are guaranteed.
While specific embodiments of the invention have been described, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, as equivalent modifications and variations as will be made by those skilled in the art in light of the spirit of the invention are intended to be included within the scope of the appended claims.
Claims (10)
1. An Internet of things equipment upgrading method is characterized by comprising the following steps: the method comprises the following steps:
step S10, the upper computer acquires an initial upgrade file of each sensor of the Internet of things, and upgrade information including upgrade file types, applicable machine types, applicable production batch ranges, applicable hardware versions, current software versions, upgrade terms and verification parameters is added to a file header of the initial upgrade file;
step S20, the upper computer packs the initial upgrade file and the upgrade information into an execution upgrade file with a preset format;
step S30, selecting the corresponding upgrade execution file based on the model, production batch and hardware version of the Internet of things equipment, performing first verification on the upgrade execution file based on the upgrade information, and then sending the upgrade execution file to the Internet of things equipment;
step S40, the Internet of things equipment receives the execution upgrading file, and stores the execution upgrading file after performing second verification on the execution upgrading file based on the upgrading information;
and step S50, after the Internet of things equipment carries out third verification on the stored upgrade execution file based on the upgrade information, executing the upgrade execution file to carry out upgrade operation.
2. The internet of things equipment upgrading method as recited in claim 1, wherein: in the step S10, when the value of the applicable model is 0, the model wildcard is represented;
the applicable production batch range comprises a range lower limit and a range upper limit, wherein the range lower limit is 0 to indicate that only the range upper limit is effective, the range upper limit is 0 to indicate that only the range lower limit is effective, and the range lower limit and the range upper limit are both 0 to indicate production batch wildcard;
when the value of the applicable hardware version is 0, hardware wildcard is represented;
when the value of the current software version is 0, the software wildcard is represented;
the upgrade terms are expiration dates or time periods;
the verification parameters are first Hash values obtained by carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline.
3. The internet of things equipment upgrading method as recited in claim 1, wherein: the step S30 specifically includes:
s31, selecting the corresponding upgrade execution file based on the model, production batch and hardware version of the Internet of things equipment;
step S32, analyzing the selected upgrade execution file to obtain an initial upgrade file and upgrade information, respectively matching the model, production batch and hardware version of the Internet of things equipment based on the applicable model, the applicable production batch range and the applicable hardware version carried by the upgrade information, and entering step S33 if the matching is passed; if the matching is not passed, ending the process;
step S33, judging whether the current time is in the upgrade deadline, if yes, entering step S34; if not, ending the process or actively sending an upgrading request to the upper computer;
step S34, carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline to obtain a second Hash value, judging whether the second Hash value is consistent with the value of the verification parameter, if so, successfully verifying, and sending the upgrade execution file to the Internet of things equipment; if not, the first check fails and the process is ended.
4. The internet of things equipment upgrading method as recited in claim 1, wherein: the step S40 specifically includes:
the internet of things equipment receives the upgrade execution file, analyzes the received upgrade execution file to obtain an initial upgrade file and upgrade information, obtains the model, the production batch, the hardware version, the software version and the current time of the local machine, sequentially carries out second inspection on the model, the production batch, the hardware version, the software version and the current time based on the upgrade information, stores the upgrade execution file if the second inspection is successful, and then enters step S50; if the second check fails, the flow is ended.
5. The internet of things equipment upgrading method as recited in claim 1, wherein: the step S50 specifically includes:
step S51, after the Internet of things equipment receives the upgrade command, analyzing the stored upgrade execution file to obtain an initial upgrade file and upgrade information, and obtaining the model, hardware version, software version and current time of the local machine;
step S52, checking the model, the hardware version, the software version and the current time in sequence based on the upgrading information, and entering step S53 if the checking is passed; if the verification fails, ending the process;
step S53, carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline to obtain a third Hash value, judging whether the third Hash value is consistent with the value of the verification parameter, if so, successfully carrying out the third verification, and executing the upgrade file to carry out upgrade operation; if not, the third check fails and the process is ended.
6. The utility model provides an thing networking device upgrade system which characterized in that: the system comprises the following modules:
the system comprises an upgrade information setting module, an upgrade information processing module and a verification module, wherein the upgrade information setting module is used for acquiring an initial upgrade file of each sensor of the Internet of things by an upper computer, and adding upgrade information comprising an upgrade file type, an applicable machine type, an applicable production batch range, an applicable hardware version, a current software version, an upgrade period and a verification parameter into a file header of the initial upgrade file;
the execution upgrading file production module is used for packaging the initial upgrading file and the upgrading information into an execution upgrading file with a preset format by the upper computer;
the first checking module is used for selecting the corresponding execution upgrading file based on the model, the production batch and the hardware version of the equipment of the Internet of things, and sending the execution upgrading file to the equipment of the Internet of things after the first checking is carried out on the execution upgrading file based on the upgrading information;
the second check module is used for receiving the execution upgrading file by the Internet of things equipment, performing second check on the execution upgrading file based on the upgrading information and storing the execution upgrading file;
and the third verification module is used for performing third verification on the stored execution upgrading file by the Internet of things equipment based on the upgrading information and then executing the execution upgrading file to perform upgrading operation.
7. The internet of things equipment upgrading system as recited in claim 6, wherein: in the upgrading information setting module, when the value of the applicable model is 0, the model is wildcarded;
the applicable production batch range comprises a range lower limit and a range upper limit, wherein the range lower limit is 0 to indicate that only the range upper limit is effective, the range upper limit is 0 to indicate that only the range lower limit is effective, and the range lower limit and the range upper limit are both 0 to indicate production batch wildcard;
when the value of the applicable hardware version is 0, hardware wildcard is represented;
when the value of the current software version is 0, the software wildcard is represented;
the upgrade terms are expiration dates or time periods;
the verification parameters are first Hash values obtained by carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline.
8. The internet of things equipment upgrading system of claim 6, wherein: the first verification module specifically includes:
the upgrade execution file selection unit is used for selecting the corresponding upgrade execution file based on the model, the production batch and the hardware version of the equipment of the Internet of things;
the first upgrade information checking unit is used for analyzing the selected upgrade execution file to obtain an initial upgrade file and upgrade information, respectively matching the model, the production batch and the hardware version of the equipment of the Internet of things based on the applicable model, the applicable production batch range and the applicable hardware version carried by the upgrade information, and entering the upgrade deadline checking unit if the matching is passed; if the matching is not passed, ending the process;
the upgrading time limit checking unit is used for judging whether the current time is within the upgrading time limit or not, and if so, entering the Hash checking unit; if not, ending the process or actively sending an upgrading request to the upper computer;
the Hash check unit is used for carrying out Hash calculation on the initial upgrade file, the upgrade file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrade deadline to obtain a second Hash value, judging whether the second Hash value is consistent with the check parameter, if so, successfully checking the second Hash value, and sending the upgrade execution file to the Internet of things equipment; if not, the first check fails and the process is ended.
9. The internet of things equipment upgrading system of claim 6, wherein: the second check module specifically comprises:
the Internet of things equipment receives the execution upgrading file, analyzes the received execution upgrading file to obtain an initial upgrading file and upgrading information, obtains the machine type, the production batch, the hardware version, the software version and the current time of the local machine, performs second inspection on the machine type, the production batch, the hardware version, the software version and the current time in sequence based on the upgrading information, stores the execution upgrading file if the second inspection is successful, and enters a third inspection module; if the second check fails, the flow is ended.
10. The internet of things equipment upgrading system of claim 6, wherein: the third verification module specifically includes:
the upgrading command receiving unit is used for analyzing the stored upgrade execution file to obtain an initial upgrading file and upgrading information after the Internet of things equipment receives the upgrading command, and obtaining the machine type, the hardware version, the software version and the current time of the machine;
the second upgrading information checking unit is used for sequentially checking the machine type, the hardware version, the software version and the current time based on the upgrading information, and entering the upgrading unit if the checking is passed; if the verification fails, ending the process;
the upgrading unit is used for carrying out Hash calculation on the initial upgrading file, the upgrading file type, the applicable machine type, the applicable production batch range, the applicable hardware version, the current software version and the upgrading time limit to obtain a third Hash value, judging whether the third Hash value is consistent with the value of the verification parameter or not, if so, successfully carrying out third verification, and executing the upgrading file to carry out upgrading operation; if not, the third check fails, and the process is ended.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210568174.2A CN115102856B (en) | 2022-05-24 | 2022-05-24 | Method and system for upgrading equipment of Internet of things |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210568174.2A CN115102856B (en) | 2022-05-24 | 2022-05-24 | Method and system for upgrading equipment of Internet of things |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115102856A true CN115102856A (en) | 2022-09-23 |
CN115102856B CN115102856B (en) | 2023-07-07 |
Family
ID=83288155
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210568174.2A Active CN115102856B (en) | 2022-05-24 | 2022-05-24 | Method and system for upgrading equipment of Internet of things |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115102856B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106528086A (en) * | 2016-10-10 | 2017-03-22 | 广州视源电子科技股份有限公司 | Method and system for upgrading Android software |
CN107122207A (en) * | 2017-04-12 | 2017-09-01 | 青岛海信移动通信技术股份有限公司 | Method for upgrading software, client device and server |
WO2018001082A1 (en) * | 2016-06-30 | 2018-01-04 | 中兴通讯股份有限公司 | Upgrade file manufacturing method, upgrade method and device, and apparatus |
CN109189445A (en) * | 2018-10-12 | 2019-01-11 | 武汉微智创大科技有限公司 | A kind of method of internet of things equipment program upgrading |
WO2019076293A1 (en) * | 2017-10-16 | 2019-04-25 | 华为技术有限公司 | Differential upgrading method, device and system |
CN110134420A (en) * | 2019-05-22 | 2019-08-16 | 上海诺雅克电气有限公司 | Firmware upgrade method and system based on cloud platform |
CN111522562A (en) * | 2020-04-16 | 2020-08-11 | 佛山市顺德区美的洗涤电器制造有限公司 | Dish washer software burning method, device and equipment |
CN114416135A (en) * | 2022-01-04 | 2022-04-29 | 徐工汉云技术股份有限公司 | Internet of things cloud platform remote terminal upgrading system and method |
-
2022
- 2022-05-24 CN CN202210568174.2A patent/CN115102856B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018001082A1 (en) * | 2016-06-30 | 2018-01-04 | 中兴通讯股份有限公司 | Upgrade file manufacturing method, upgrade method and device, and apparatus |
CN106528086A (en) * | 2016-10-10 | 2017-03-22 | 广州视源电子科技股份有限公司 | Method and system for upgrading Android software |
CN107122207A (en) * | 2017-04-12 | 2017-09-01 | 青岛海信移动通信技术股份有限公司 | Method for upgrading software, client device and server |
WO2019076293A1 (en) * | 2017-10-16 | 2019-04-25 | 华为技术有限公司 | Differential upgrading method, device and system |
CN109189445A (en) * | 2018-10-12 | 2019-01-11 | 武汉微智创大科技有限公司 | A kind of method of internet of things equipment program upgrading |
CN110134420A (en) * | 2019-05-22 | 2019-08-16 | 上海诺雅克电气有限公司 | Firmware upgrade method and system based on cloud platform |
CN111522562A (en) * | 2020-04-16 | 2020-08-11 | 佛山市顺德区美的洗涤电器制造有限公司 | Dish washer software burning method, device and equipment |
CN114416135A (en) * | 2022-01-04 | 2022-04-29 | 徐工汉云技术股份有限公司 | Internet of things cloud platform remote terminal upgrading system and method |
Also Published As
Publication number | Publication date |
---|---|
CN115102856B (en) | 2023-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106843957A (en) | System firmware upgrade method and device | |
CN109165170B (en) | Method and system for automatic request test | |
CN106484611B (en) | Fuzzy test method and device based on automatic protocol adaptation | |
JP5198154B2 (en) | Fault monitoring system, device, monitoring apparatus, and fault monitoring method | |
CN108228190B (en) | Persistent integration and delivery methods, systems, devices, and computer-readable storage media | |
CN112241360A (en) | Test case generation method, device, equipment and storage medium | |
CN112039900B (en) | Network security risk detection method, system, computer device and storage medium | |
CN111338656B (en) | Method and device for installing software package to target host and computer equipment | |
CN108491321A (en) | test case range determining method, device and storage medium | |
CN112540924A (en) | Interface automation test method, device, equipment and storage medium | |
CN108804315B (en) | Test method and device applied to dynamic development, electronic equipment and storage medium | |
CN109725906A (en) | A kind of code compiling method and corresponding continuous integration system | |
WO2020091592A1 (en) | A self-learning method and system for automatically performing application packaging and deployment for a hosting environment | |
CN110198222B (en) | Plug-and-play test method and test master station for power distribution automation terminal | |
CN110990289A (en) | Method and device for automatically submitting bug, electronic equipment and storage medium | |
CN115102856B (en) | Method and system for upgrading equipment of Internet of things | |
CN115934559A (en) | Testing method of intelligent form testing system | |
CN112965735B (en) | Model updating method, device, equipment and computer readable medium | |
CN106528248B (en) | Downloading method and system of mobile terminal based on software integrity | |
CN115268965A (en) | Adaptive software remote upgrading method and system for low-voltage intelligent circuit breaker | |
CN113495750B (en) | Upgrade detection method and device for equipment and server | |
CN113037526B (en) | Security detection method, terminal, system and storage medium | |
CN114154169A (en) | Jenkins and JMeter-based automatic test method and device | |
CN116010239B (en) | Automatic test method based on assembly line | |
CN115065670B (en) | IOS APP automatic release method, macOS server 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |