CN106250192A - The method for upgrading software of host computer and system - Google Patents

The method for upgrading software of host computer and system Download PDF

Info

Publication number
CN106250192A
CN106250192A CN201610633338.XA CN201610633338A CN106250192A CN 106250192 A CN106250192 A CN 106250192A CN 201610633338 A CN201610633338 A CN 201610633338A CN 106250192 A CN106250192 A CN 106250192A
Authority
CN
China
Prior art keywords
unit
wireless module
software
check value
host computer
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
Application number
CN201610633338.XA
Other languages
Chinese (zh)
Other versions
CN106250192B (en
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.)
Shanghai Simcom Wireless Solutions Co Ltd
Original Assignee
Shanghai Simcom Wireless Solutions 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 Shanghai Simcom Wireless Solutions Co Ltd filed Critical Shanghai Simcom Wireless Solutions Co Ltd
Priority to CN201610633338.XA priority Critical patent/CN106250192B/en
Publication of CN106250192A publication Critical patent/CN106250192A/en
Application granted granted Critical
Publication of CN106250192B publication Critical patent/CN106250192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

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)
  • Mobile Radio Communication Systems (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses method for upgrading software and the system of a kind of host computer, described method for upgrading software includes: S1 wireless module is every a time period login service device;Whether S2 wireless module inspection software AKU updates, if then performing step S3;S3 wireless module software upgrade package after down loading updating from server;S4 wireless module sends upgrade command to host computer;S5 host computer arranges upgrading flag bit;S6 host computer judges whether upgrading flag bit to be detected during restarting, if then performing step S7;The segmentation from wireless module of S7 host computer reads the data of software upgrade package, and the data writing program memory area that will read, until all data are written into.Compared with prior art, the present invention reads and writes the data of software upgrade package by segmentation from wireless module so that host computer also is able to realize software upgrading in the case of limited storage space, has saved cost.

Description

The method for upgrading software of host computer and system
Technical field
The present invention relates to software upgrading field, particularly to method for upgrading software and the system of a kind of host computer.
Background technology
Transport at M2M (Machine to Machine, the communication between machine and machine) and Internet of Things domain design at present In the wireless device of row, the most all have employed host computer and framework that wireless module combines, wherein wireless module provides Wireless link, host computer realizes application logic.Owing to wireless device running environment is the most various and complicated, when using When journey being pinpointed the problems or have demand to change, at this time updating apparatus software the most more difficulty, need to spend higher fund to become Basis and human cost.
For wireless module, (Firmware Over-The-Air, the aerial download of mobile terminal is soft can to pass through FOTA Part upgrade) etc. mode carry out remote upgrade.But it is in some cases, it is also desirable to upgrading upper computer software, bigger for some Type upper computer software, such as, run (SuSE) Linux OS, because the memory space of itself and running space are the most sufficient, permissible By wireless module, AKU is directly downloaded to the memory space of host computer, then carries out software upgrading.
But for the host computer that some is more small-sized, because the limited storage space of itself, it is impossible to directly download AKU Carrying out renewal and the upgrading of upper computer software, if there being upgrade requirement, then needing to beam back producer or field upgrade of sending someone, consumption Take the costs such as higher time, manpower and fund.If you go up the memory space of host computer, then the cost of product can be caused to increase Add, thus reduce the competitiveness of product in market and profit.
Summary of the invention
The technical problem to be solved in the present invention is to overcome the upgrading master computer of limited storage space in prior art soft Need to beam back producer or field upgrade of sending someone during part, or need to expand memory space, cause the defect that cost increases, it is provided that The method for upgrading software of the host computer that a kind of low cost, reliability are high and system.
The present invention solves above-mentioned technical problem by following technical proposals:
A kind of method for upgrading software of host computer, its feature is, comprises the following steps:
S1, wireless module log in a server every a time period, and wherein, in described server, storage has the soft of host computer Part AKU;
S2, described wireless module detect whether described software upgrade package updates, the most then perform step S3, if it is not, then return Return step S1;
S3, described wireless module software upgrade package after down loading updating from described server;
S4, described wireless module send a upgrade command to described host computer;
S5, described host computer arrange a upgrading flag bit when receiving described upgrade command, and restart;
S6, described host computer judge whether described upgrading flag bit to be detected during restarting, the most then perform step Rapid S7, if it is not, then terminate flow process;
The data of the software upgrade package after updating are read in the segmentation from described wireless module of S7, described host computer, and will read The data writing program memory area taken, until all data of described software upgrade package are written into.
In this programme, by the software upgrade package after wireless module login service device down loading updating, host computer is from wireless In module, the data of software upgrade package are read and write in segmentation, until all data are written into program storage area, whole to complete The renewal of individual software upgrade package, it is achieved that software upgrading.
In step S1, the interval time of wireless module login service device can be fixed, it is also possible to random.Specifically can basis Demand is arranged, it is also possible to arrange according to the bearing capacity of server.Set time section such as can be used to add every time The method of random time section generates a random time section, and as the interval time of login service device, is so possible to prevent The time of login service device compares concentration, thus reduces the pressure of server.
In step S2, the algorithm whether wireless module inspection software AKU updates is prior art, such as, can pass through Check that in server, the title of software upgrade package is to obtain software version, and by itself and the software version phase of storage in wireless module Relatively, detect whether the software upgrade package in server updates according to comparative result.
In step S3, the software upgrade package after wireless module will update downloads to self memory space.
In step S5, the upgrading flag bit of setting is stored in the power-off such as flash (flash memory) by host computer will not lose data Memory space.
In step S7, the data of software upgrade package are read in host computer segmentation from wireless module, and are reading it every time After the data writing program memory area that will read, wherein, after the data that once can read before overriding of the data that once read, So there is no need to the biggest memory space to deposit the data of software upgrade package.It addition, host computer can also according to self Memory space arranges Data Position (i.e. side-play amount) and the data length of reading every time.Such as, if the memory space of self is less, Then can the data length every time read be configured to shorter;If the memory space of self is relatively big, then can will read every time Data length is configured to longer.
Compared with prior art, this programme is read by host computer segmentation from wireless module and is write software upgrade package Data so that host computer also is able to realize software upgrading in the case of limited storage space, it is not necessary to beams back producer or sends someone Field upgrade, more without expanding the memory space of host computer, has saved cost.
It is preferred that further comprising the steps of after step S7: described upgrading flag bit is removed by S8, described host computer, and Restart.In step S8, the software of host computer is successfully upgraded and is removed by upgrading flag bit afterwards, prevents from next time from restarting mistiming upgrading.
It is preferred that also storage has AKU message file in described server, described AKU message file comprises institute State the information of the software upgrade package of host computer;
When in step S2, testing result is for being, execution following steps:
S23, described wireless module download described AKU message file from described server, and to the described liter downloaded Level package informatin file resolves, and obtains the first check value, performs step S3;
Step S3 comprises the following steps:
S31, described wireless module software upgrade package after down loading updating from described server, and calculate the software of download Second check value of AKU;
S32, described wireless module judge that described first check value is the most identical with described second check value, the most then hold Row step S4, if it is not, then return step S1.
In this programme, under the same path that AKU message file and software upgrade package are positioned in server.In step S31 The algorithm of the second check value of wireless module software for calculation AKU is prior art, repeats no more.
It addition, the communication between wireless module and server is it is possible that exception, cause the data that wireless module is downloaded Wrong, accordingly, it would be desirable to the software upgrade package downloading wireless module verifies, i.e. judge the second check value and the first check value The most identical, so that it is guaranteed that the data complete of the software upgrade package in wireless module software upgrade package and the server downloaded Cause.
It is preferred that further comprising the steps of in step S1: described wireless module arranges one first download time;
Step S23 comprises the following steps:
S231, described wireless module download described AKU message file from described server, and by described first time Carry number of times and add one;
S232, described wireless module judge whether described AKU message file is downloaded successfully, the most then perform step S234, if it is not, then perform step 233;
S233, described wireless module judge whether described first download time presets download time more than or equal to first, if It is then to return step S1, if it is not, then return step S231;
The described AKU message file downloaded is resolved by S234, described wireless module, obtains the first check value.
In step S232 of this programme, it is existing that wireless module judges whether AKU message file downloads successful algorithm Technology, download here successfully refers to that wireless module completes the download of AKU message file.When failed download, wireless mould Block can repeatedly download AKU message file from server.Wherein, download time is first to the maximum and presets download time, tool Body value can be arranged according to practical situation, such as, could be arranged to 2 times.
It is preferred that further comprising the steps of in step S1: described wireless module arranges one second download time;
Step S31 comprises the following steps:
S311, described wireless module software upgrade package after down loading updating from described server, and by described second time Carry number of times and add one;
S312, described wireless module judge whether described software upgrade package is downloaded successfully, the most then perform step S314, If it is not, then perform step 313;
S313, described wireless module judge whether described second download time presets download time more than or equal to second, if It is then to return step S1, if it is not, then return step S311;
S314, described wireless module calculate the second check value of the software upgrade package downloaded.
In step S312 of this programme, wireless module judges whether software upgrade package downloads successful algorithm also for existing skill Art, download here successfully refers to that wireless module completes the download of software upgrade package, but does not represent the software upgrading of download The data of bag are completely the same with the data of software upgrade package in server.When failed download, wireless module can be from server In repeatedly downloaded software AKU.Wherein, download time is second to the maximum and presets download time, and occurrence can be according to actual feelings Condition is arranged, such as, could be arranged to 3 times.
It is preferred that wireless module described in step S32 judges when described first check value is different from described second check value, Perform step S313.
In this programme, when the first check value and the second check value are different, the software upgrade package that wireless module is downloaded is described Data inconsistent with the data of software upgrade package in server, if the download time of software upgrade package that is second download time does not has Have and reach second and preset download time, the most again from server downloaded software AKU;If the download time of software upgrade package is i.e. Second download time has reached second and has preset download time, then need to wait and upgrade next time, i.e. software liter in server Level bag updates again.
During it is preferred that judged result is for being in step S6, perform following steps: described host computer is from described wireless module Read described first check value, perform step S7;
Between step S7 and S8 further comprising the steps of:
S781, described host computer calculate the 3rd verification writing the data of software upgrade package in described program storage area Value;
S782, described host computer judge that described first check value is the most identical with described 3rd check value, the most then perform Step S8, if it is not, then return step S7.
In this programme, the communication between wireless module and host computer, it is possible that exception, causes the number that host computer reads According to wrong, accordingly, it would be desirable to verify after the software upgrading of host computer, so that it is guaranteed that the software data of upgrading is with wireless The data of the software upgrade package downloaded in module are completely the same.
It is preferred that further comprising the steps of before step S1: by the IP address (Internet protocol address) of a server and Port numbers stores to wireless module;
Step S1 comprises the following steps: described wireless module logs in described service according to described IP address and described port numbers Device.
In this programme, wireless module Successful login storage could have software upgrade package and upgrading according to IP address and port numbers The server of package informatin file.Wherein, IP address and port numbers corresponding unique server jointly.It addition, some servers can Can need to input username and password just can log in, accordingly, it would be desirable to also store the username and password of server to wireless In module.The file may deposited in some servers is more, accordingly, it would be desirable to will storage software upgrade package and AKU information literary composition The path of part also stores to wireless module.
It is preferred that described server is FTP (file transfer protocol (FTP)) server or Http (HTML (Hypertext Markup Language)) service Device.
It is preferred that described first check value, described second check value and described 3rd check value all include: CRC (circulates superfluous Remaining check) 32 checksum values or MD (message digest algorithm) 5 check value.
It is preferred that described first check value, described second check value and described 3rd check value also include software upgrade package Size.In this programme, the object of verification also includes the size of software upgrade package, be effectively increased upper computer software upgrading can By property and accuracy.
The present invention also provides for the software update system of a kind of host computer, and its feature is, including a host computer, a wireless mould Block and a server, described wireless module includes a login unit, a detector unit, AKU download unit and an instruction Transmitting element, described host computer includes that a flag bit arranges unit, a flag bit judging unit and a read-write cell, described clothes In business device, storage has the software upgrade package of described host computer;
Described login unit is for logging in described server every a time period;
Described detector unit is used for detecting whether described software upgrade package updates, and calls described upgrading in a case of yes Bag download unit, and call described login unit in a case of no;
Described AKU download unit is used for the software upgrade package from described server after down loading updating, calls described finger Make transmitting element;
Described instruction sending unit is for sending a upgrade command to described host computer;
Described flag bit arranges unit for arranging a upgrading flag bit when receiving described upgrade command, and restarts institute State host computer;
Described flag bit judging unit is for judging whether described upgrading to be detected during described host computer is restarted Flag bit, and call described read-write cell in a case of yes;
Described read-write cell reads the data of the software upgrade package after updating for segmentation from described wireless module, and will The data writing program memory area read;
It is preferred that described software update system also includes a flag bit clearing cell, in described software upgrade package When all data are written into, described upgrading flag bit is removed, and restart described host computer.
It is preferred that also storage has AKU message file in described server, described AKU message file comprises institute Stating the information of the software upgrade package of host computer, it is single that described wireless module also includes that a message file download unit and one first judges Unit;
Described detector unit is for detecting that described software upgrade package calls described message file download unit when updating;
Described message file download unit is used for downloading described AKU message file from described server, and to download Described AKU message file resolve, obtain the first check value, call described AKU download unit;
Described AKU download unit is additionally operable to calculate the second check value of the software upgrade package downloaded;
Described first judging unit is used for judging that described first check value is the most identical with described second check value, and is being In the case of call described transmitting element, and call described login unit in a case of no.
It is preferred that described login unit is additionally operable to arrange one first download time;
Described message file download unit includes one first time subelements, one first judgment sub-unit, one second judgement Subelement and one resolves subelement;
Described first time subelements is for downloading described AKU message file from described server, and by described the One download time adds one;
Described first judgment sub-unit is used for judging whether described AKU message file is downloaded successfully, and in the situation being Under call described parsing subelement, and call described second judgment sub-unit in a case of no;
Described second judgment sub-unit is used for judging whether described first download time is more than or equal to first and presets download time Number, and call described login unit in a case of yes, and call described first time subelements in a case of no;
Described parsing subelement, for resolving the described AKU message file downloaded, obtains the first check value.
It is preferred that described login unit is additionally operable to arrange one second download time;
Described AKU download unit includes one second time subelements, one the 3rd judgment sub-unit, one the 4th judgement Unit and a computation subunit;
Described second time subelements is for software upgrade package after down loading updating from described server, and by described the Two download time add one;
Described 3rd judgment sub-unit is used for judging whether described software upgrade package is downloaded successfully, and adjusts in a case of yes Use described computation subunit, and call described 4th judgment sub-unit in a case of no;
Described 4th judgment sub-unit is used for judging whether described second download time is more than or equal to second and presets download time Number, and call described login unit in a case of yes, and call described second time subelements in a case of no;
Described computation subunit is for calculating the second check value of the software upgrade package of download.
It is preferred that described first judging unit is for judging that described first check value is different from described second check value Time, call described 4th judgment sub-unit.
It is preferred that described host computer also includes a reading unit, a computing unit and one second judging unit;
Described reading unit is for reading described first check value from described wireless module;
Described computing unit writes the 3rd verification of the data of software upgrade package in described program storage area for calculating Value;
Described second judging unit is used for judging that described first check value is the most identical with described 3rd check value, and is being In the case of call described flag bit clearing cell, and call described read-write cell in a case of no.
It is preferred that storage has IP address and the port numbers of described server in described wireless module;
Described login unit is for logging in described server according to described IP address and described port numbers.
It is preferred that described server is ftp server or Http server.
It is preferred that described first check value, described second check value and described 3rd check value all include: CRC32 verifies With value or MD5 check value.
It is preferred that described first check value, described second check value and described 3rd check value also include software upgrade package Size.
On the basis of meeting common sense in the field, above-mentioned each optimum condition, can combination in any, obtain each preferable reality of the present invention Example.
The most progressive effect of the present invention is: compared with prior art, and the present invention passes through host computer from wireless module The data of software upgrade package are read and write in segmentation so that host computer also is able to realize software in the case of limited storage space Upgrading, it is not necessary to beam back producer or field upgrade of sending someone, more without expanding the memory space of host computer, saved cost.It addition, Reliability and the accuracy of software upgrading is ensure that by multiple check.
Accompanying drawing explanation
Fig. 1 is the method for upgrading software flow chart of embodiment of the present invention host computer.
Fig. 2 is the structured flowchart of the software update system of embodiment of the present invention host computer.
Fig. 3 is the structured flowchart of the wireless module of the embodiment of the present invention.
Fig. 4 is the structured flowchart of the host computer of the embodiment of the present invention.
Detailed description of the invention
Further illustrate the present invention below by the mode of embodiment, but the most therefore limit the present invention to described reality Execute among example scope.
The present embodiment provides the method for upgrading software of a kind of host computer, as it is shown in figure 1, comprise the following steps:
Step 101, IP address and the port numbers of a ftp server are stored to wireless module;
Wherein, in described ftp server, storage has software upgrade package and the AKU message file of host computer, described upgrading Package informatin file comprises the information of the software upgrade package of described host computer;
Step 102, described wireless module logged in described FTP service every 3 days according to described IP address and described port numbers Device, and the first download time and the second download time are set;
In the present embodiment, the initial value of the first download time and the second download time is 0.
Step 103, described wireless module detect whether described software upgrade package updates, the most then perform step 104, if No, then return step 102;
Step 104, described wireless module download described AKU message file from described ftp server, and by described First download time adds one;
Step 105, described wireless module judge whether described AKU message file is downloaded successfully, the most then perform step Rapid 107, if it is not, then perform step 106;
Step 106, described wireless module judge whether described first download time presets download time more than or equal to first, The most then return step 102, if it is not, then return step 104;
The described AKU message file downloaded is resolved by step 107, described wireless module, obtains the first verification Value;
Step 108, described wireless module software upgrade package after down loading updating from described ftp server, and by described Second download time adds one;
Step 109, described wireless module judge whether described software upgrade package is downloaded successfully, the most then perform step 111, if it is not, then perform step 110;
Step 110, described wireless module judge whether described second download time presets download time more than or equal to second, The most then return step 102, if it is not, then return step 108;
Step 111, described wireless module calculate the second check value of the software upgrade package downloaded;
Step 112, described wireless module judge that described first check value is the most identical, if so, with described second check value Then perform step 113, if it is not, then return step 110;
Step 113, described wireless module send a upgrade command to described host computer;
Step 114, described host computer arrange a upgrading flag bit when receiving described upgrade command, and restart;
Step 115, described host computer judge whether to detect described upgrading flag bit during restarting, the most then Perform step 116, if it is not, then terminate flow process;
Step 116, described host computer read described first check value from described wireless module;
The data of the software upgrade package after updating are read in the segmentation from described wireless module of step 117, described host computer, and The data writing program memory area that will read, until all data of described software upgrade package are written into;
Step 118, described host computer calculate and write the 3rd school of the data of software upgrade package in described program storage area Test value;
Step 119, described host computer judge that described first check value is the most identical, the most then with described 3rd check value Perform step 120, if it is not, then return step 117;
Described upgrading flag bit is removed by step 120, described host computer.
Host computer in the present embodiment is PIC (programmable terminal controller) the small-sized single-chip microcomputer of limited storage space, the One to preset download time be 2, and second to preset download time be 3.First check value, the second check value and the 3rd check value are CRC32 checksum value and the size of software upgrade package, wherein, the size of software upgrade package is 10MB.
The present embodiment also provides for the software update system 10 of a kind of host computer being capable of above-mentioned method for upgrading software, as Shown in Fig. 2, including ftp server 11, wireless module 12 and host computer 13.
Wherein, in ftp server 11, storage has software upgrade package and the AKU message file of host computer, described AKU Message file comprises the information of the software upgrade package of described host computer.In the present embodiment, described AKU message file wraps Size containing software upgrade package and the CRC32 checksum value of software upgrade package.
Wireless module 12 includes logging in unit 21, detector unit 22, message file download unit 23, AKU download unit 24, instruction sending unit the 25, first judging unit 26, message file download unit 23 includes first time subelements 231, first Judgment sub-unit the 232, second judgment sub-unit 233 and parsing subelement 234, AKU download unit 24 includes the second download Subelement the 241, the 3rd judgment sub-unit the 242, the 4th judgment sub-unit 243 and computation subunit 244, wherein, wireless module Middle storage has IP address and the port numbers of ftp server.
Host computer 13 include flag bit arrange unit 31, flag bit judging unit 32, read unit 33, read-write cell 34, Computing unit the 35, second judging unit 36 and flag bit clearing cell 37.
In the present embodiment, the data transmission between wireless module and host computer is realized by serial ports.
Below the function of the software update system of host computer in the present embodiment is simply introduced.
Described login unit is used for logging in described ftp server every 3 days according to described IP address and described port numbers, and First download time and the second download time are set.In the present embodiment, the first download time and the initial value of the second download time It is 0.
Described detector unit is used for detecting whether described software upgrade package updates, and calls described information in a case of yes File download unit, and call described login unit in a case of no.
Described first time subelements is for downloading described AKU message file from described server, and by described the One download time adds one.
Described first judgment sub-unit is used for judging whether described AKU message file is downloaded successfully, and in the situation being Under call described parsing subelement, and call described second judgment sub-unit in a case of no.
Described second judgment sub-unit is used for judging whether described first download time is more than or equal to first and presets download time Number, and call described login unit in a case of yes, and call described first time subelements in a case of no.This reality Executing in example, first to preset download time be 2.
Described parsing subelement, for resolving the described AKU message file downloaded, obtains the first check value, Call described AKU download unit.
Described second time subelements is for software upgrade package after down loading updating from described server, and by described the Two download time add one.
Described 3rd judgment sub-unit is used for judging whether described software upgrade package is downloaded successfully, and adjusts in a case of yes Use described computation subunit, and call described 4th judgment sub-unit in a case of no;
Described 4th judgment sub-unit is used for judging whether described second download time is more than or equal to second and presets download time Number, and call described login unit in a case of yes, and call described second time subelements in a case of no.This reality Executing in example, second to preset download time be 3.
Described computation subunit is for calculating the second check value of the software upgrade package of download.
Described first judging unit is used for judging that described first check value is the most identical with described second check value, and is being In the case of call described instruction sending unit, and call described 4th judgment sub-unit in a case of no.
Described instruction sending unit is for sending a upgrade command to described host computer.
Described flag bit arranges unit for arranging a upgrading flag bit when receiving described upgrade command, and restarts institute State host computer.
Described flag bit judging unit is for judging whether described upgrading to be detected during described host computer is restarted Flag bit, and call described read-write cell in a case of yes.
Described reading unit is for reading described first check value from described wireless module.In the present embodiment, when described When instruction sending unit is called, illustrate that described first check value is identical with described second check value, therefore, described reading unit In addition to can reading described first check value from described wireless module, it is also possible to read described second check value.
Described read-write cell reads the data of the software upgrade package after updating for segmentation from described wireless module, and will The data writing program memory area read.
Described computing unit writes the 3rd verification of the data of software upgrade package in described program storage area for calculating Value.
Described second judging unit is used for judging that described first check value is the most identical with described 3rd check value, and is being In the case of call described flag bit clearing cell, and call described read-write cell in a case of no.
Described flag bit clearing cell is for marking described upgrading when all data of described software upgrade package are written into Will bit clear.
Compared with prior art, the present embodiment is read by host computer segmentation from wireless module and is write software upgrade package Data so that host computer also is able to successfully realize software upgrading in the case of limited storage space, it is not necessary to beam back producer or Send someone field upgrade, more without expanding the memory space of host computer, saved cost.It addition, the present embodiment is by many re-graduations Test reliability and the accuracy that ensure that software upgrading, be with a wide range of applications.
Although the foregoing describing the detailed description of the invention of the present invention, it will be appreciated by those of skill in the art that these Being merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back On the premise of the principle and essence of the present invention, these embodiments can be made various changes or modifications, but these change Protection scope of the present invention is each fallen within amendment.

Claims (22)

1. the method for upgrading software of a host computer, it is characterised in that comprise the following steps:
S1, wireless module log in a server every a time period, and wherein, in described server, storage has the software liter of host computer Level bag;
S2, described wireless module detect whether described software upgrade package updates, the most then perform step S3, if it is not, then return step Rapid S1;
S3, described wireless module software upgrade package after down loading updating from described server;
S4, described wireless module send a upgrade command to described host computer;
S5, described host computer arrange a upgrading flag bit when receiving described upgrade command, and restart;
S6, described host computer judge whether described upgrading flag bit to be detected during restarting, the most then perform step S7, if it is not, then terminate flow process;
The data of the software upgrade package after updating are read in the segmentation from described wireless module of S7, described host computer, and by reading Data writing program memory area, until all data of described software upgrade package are written into.
2. method for upgrading software as claimed in claim 1, it is characterised in that further comprising the steps of after step S7: S8, institute State host computer to be removed by described upgrading flag bit, and restart.
3. method for upgrading software as claimed in claim 2, it is characterised in that in described server, also storage has AKU information File, comprises the information of the software upgrade package of described host computer in described AKU message file;
When in step S2, testing result is for being, execution following steps:
S23, described wireless module download described AKU message file from described server, and to the described AKU downloaded Message file resolves, and obtains the first check value, performs step S3;
Step S3 comprises the following steps:
S31, described wireless module software upgrade package after down loading updating from described server, and calculate the software upgrading of download Second check value of bag;
S32, described wireless module judge that described first check value is the most identical with described second check value, the most then perform step Rapid S4, if it is not, then return step S1.
4. method for upgrading software as claimed in claim 3, it is characterised in that
In step S1 further comprising the steps of: described wireless module arranges one first download time;
Step S23 comprises the following steps:
S231, described wireless module download described AKU message file from described server, and download secondary by described first Number adds one;
S232, described wireless module judge whether described AKU message file is downloaded successfully, the most then perform step S234, If it is not, then perform step 233;
S233, described wireless module judge whether described first download time presets download time, the most then more than or equal to first Return step S1, if it is not, then return step S231;
The described AKU message file downloaded is resolved by S234, described wireless module, obtains the first check value.
5. method for upgrading software as claimed in claim 3, it is characterised in that
In step S1 further comprising the steps of: described wireless module arranges one second download time;
Step S31 comprises the following steps:
S311, described wireless module software upgrade package after down loading updating from described server, and download described second time Number adds one;
S312, described wireless module judge whether described software upgrade package is downloaded successfully, the most then perform step S314, if it is not, Then perform step 313;
S313, described wireless module judge whether described second download time presets download time, the most then more than or equal to second Return step S1, if it is not, then return step S311;
S314, described wireless module calculate the second check value of the software upgrade package downloaded.
6. method for upgrading software as claimed in claim 5, it is characterised in that
Wireless module described in step S32 judges when described first check value is different from described second check value, performs step S313。
7. method for upgrading software as claimed in claim 3, it is characterised in that
When judged result is for being in step S6, perform following steps: described host computer reads described the from described wireless module One check value, performs step S7;
Between step S7 and S8 further comprising the steps of:
S781, described host computer calculate and write the 3rd check value of the data of software upgrade package in described program storage area;
S782, described host computer judge that described first check value is the most identical with described 3rd check value, the most then perform step S8, if it is not, then return step S7.
8. the method for upgrading software as according to any one of claim 1-7, it is characterised in that also include following before step S1 Step: IP address and the port numbers of a server are stored to wireless module;
Step S1 comprises the following steps: described wireless module logs in described server according to described IP address and described port numbers.
9. method for upgrading software as claimed in claim 8, it is characterised in that described server is ftp server or Http clothes Business device.
10. method for upgrading software as claimed in claim 7, it is characterised in that described first check value, described second check value All include with described 3rd check value: CRC32 checksum value or MD5 check value.
11. method for upgrading software as claimed in claim 10, it is characterised in that described first check value, described second verification Value and described 3rd check value also include the size of software upgrade package.
The software update system of 12. 1 kinds of host computers, it is characterised in that include a host computer, a wireless module and a service Device, described wireless module includes a login unit, a detector unit, AKU download unit and an instruction sending unit, institute State host computer and include that a flag bit arranges unit, a flag bit judging unit and a read-write cell, described server stores There is the software upgrade package of described host computer;
Described login unit is for logging in described server every a time period;
Described detector unit is used for detecting whether described software upgrade package updates, and calls in a case of yes under described AKU Carrier unit, and call described login unit in a case of no;
Described AKU download unit is used for the software upgrade package from described server after down loading updating, calls described instruction and sends out Send unit;
Described instruction sending unit is for sending a upgrade command to described host computer;
Described flag bit arranges unit for arranging a upgrading flag bit when receiving described upgrade command, and restarts on described Position machine;
Described flag bit judging unit is used for judging whether described upgrading mark to be detected during described host computer is restarted Position, and call described read-write cell in a case of yes;
Described read-write cell reads the data of the software upgrade package after updating for segmentation from described wireless module, and will read Data writing program memory area.
13. software update systems as claimed in claim 12, it is characterised in that described software update system also includes a mark Bit clear unit, for being removed by described upgrading flag bit when all data of described software upgrade package are written into, and restarts Described host computer.
14. software update systems as claimed in claim 13, it is characterised in that in described server, also storage has AKU to believe Breath file, comprises the information of the software upgrade package of described host computer in described AKU message file, described wireless module also wraps Include a message file download unit and one first judging unit;
Described detector unit is for detecting that described software upgrade package calls described message file download unit when updating;
Described message file download unit is for downloading described AKU message file from described server, and the institute to download State AKU message file to resolve, obtain the first check value, call described AKU download unit;
Described AKU download unit is additionally operable to calculate the second check value of the software upgrade package downloaded;
Described first judging unit is used for judging that described first check value is the most identical with described second check value, and in the feelings being Call described instruction sending unit under condition, and call described login unit in a case of no.
15. software update systems as claimed in claim 14, it is characterised in that
Described login unit is additionally operable to arrange one first download time;
Described message file download unit includes one first time subelements, one first judgment sub-unit, one second judgement son list Unit and one resolves subelement;
Described first time subelements is used for downloading described AKU message file from described server, and by described first time Carry number of times and add one;
Described first judgment sub-unit is used for judging whether described AKU message file is downloaded successfully, and adjusts in a case of yes With described parsing subelement, and call described second judgment sub-unit in a case of no;
Described second judgment sub-unit is used for judging whether described first download time presets download time more than or equal to first, and Call described login unit in a case of yes, and call described first time subelements in a case of no;
Described parsing subelement, for resolving the described AKU message file downloaded, obtains the first check value.
16. software update systems as claimed in claim 14, it is characterised in that
Described login unit is additionally operable to arrange one second download time;
Described AKU download unit includes one second time subelements, one the 3rd judgment sub-unit, one the 4th judgment sub-unit And a computation subunit;
Described second time subelements is used for the software upgrade package from described server after down loading updating, and by described second time Carry number of times and add one;
Described 3rd judgment sub-unit is used for judging whether described software upgrade package is downloaded successfully, and calls institute in a case of yes State computation subunit, and call described 4th judgment sub-unit in a case of no;
Described 4th judgment sub-unit is used for judging whether described second download time presets download time more than or equal to second, and Call described login unit in a case of yes, and call described second time subelements in a case of no;
Described computation subunit is for calculating the second check value of the software upgrade package of download.
17. software update systems as claimed in claim 16, it is characterised in that
Described first judging unit for when judging that described first check value is different from described second check value, calls described the Four judgment sub-unit.
18. software update systems as claimed in claim 14, it is characterised in that
Described host computer also includes a reading unit, a computing unit and one second judging unit;
Described reading unit is for reading described first check value from described wireless module;
Described computing unit writes the 3rd check value of the data of software upgrade package in described program storage area for calculating;
Described second judging unit is used for judging that described first check value is the most identical with described 3rd check value, and in the feelings being Call described flag bit clearing cell under condition, and call described read-write cell in a case of no.
19. software update systems as according to any one of claim 12-18, it is characterised in that deposit in described wireless module Contain IP address and the port numbers of described server;
Described login unit is for logging in described server according to described IP address and described port numbers.
20. software update systems as claimed in claim 19, it is characterised in that described server is ftp server or Http Server.
21. software update systems as claimed in claim 18, it is characterised in that described first check value, described second verification Value and described 3rd check value all include: CRC32 checksum value or MD5 check value.
22. software update systems as claimed in claim 21, it is characterised in that described first check value, described second verification Value and described 3rd check value also include the size of software upgrade package.
CN201610633338.XA 2016-08-04 2016-08-04 Software upgrading method and system of upper computer Active CN106250192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610633338.XA CN106250192B (en) 2016-08-04 2016-08-04 Software upgrading method and system of upper computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610633338.XA CN106250192B (en) 2016-08-04 2016-08-04 Software upgrading method and system of upper computer

Publications (2)

Publication Number Publication Date
CN106250192A true CN106250192A (en) 2016-12-21
CN106250192B CN106250192B (en) 2019-12-17

Family

ID=58077694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610633338.XA Active CN106250192B (en) 2016-08-04 2016-08-04 Software upgrading method and system of upper computer

Country Status (1)

Country Link
CN (1) CN106250192B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107179928A (en) * 2017-05-12 2017-09-19 深圳市四海众联网络科技有限公司 A kind of method that communication equipment is upgraded automatically
CN107332932A (en) * 2017-08-09 2017-11-07 南京阿凡达机器人科技有限公司 A kind of robot system remote upgrade method based on FOTA
CN107395666A (en) * 2017-05-23 2017-11-24 武汉华中数控股份有限公司 A kind of method and device of operating numerical control lathe upgrading data packet
CN107832074A (en) * 2017-11-28 2018-03-23 福州瑞芯微电子股份有限公司 A kind of intelligent sound box data updating method and device
CN107861746A (en) * 2017-12-06 2018-03-30 北京经纬恒润科技有限公司 The method for refreshing and system of a kind of Vehicle Electronic Control Unit
CN109002305A (en) * 2017-06-05 2018-12-14 深圳市海洋王照明工程有限公司 A kind of update method and its system of device program
CN109639666A (en) * 2018-12-07 2019-04-16 国能日新科技股份有限公司 Meteorological data document transmission method and device
CN110502256A (en) * 2018-05-18 2019-11-26 佛山市顺德区美的电热电器制造有限公司 A kind of method for upgrading software, terminal and storage medium
CN110716727A (en) * 2019-09-02 2020-01-21 领翌技术(横琴)有限公司 Software upgrading method and system
WO2020073615A1 (en) * 2018-10-09 2020-04-16 广东美的制冷设备有限公司 Method for upgrading device software, and data converter and readable storage medium
CN111913728A (en) * 2019-05-08 2020-11-10 杰克缝纫机股份有限公司 Program upgrading method for sewing equipment
CN112068864A (en) * 2020-09-02 2020-12-11 深圳创维-Rgb电子有限公司 Terminal equipment camera software updating method and device and terminal equipment
CN112068857A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 OTA (over the air) upgrading method and system based on dual systems
CN116107612A (en) * 2023-04-11 2023-05-12 北京集度科技有限公司 Firmware air upgrading device, charging pile, device, method and program product

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032615A (en) * 2018-06-06 2018-12-18 咕咚网络(北京)有限公司 A kind of on-line software updating method for Wireless Networking door lock

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425018A (en) * 2008-12-05 2009-05-06 深圳创维数字技术股份有限公司 Embedded firmware upgrading method and device based on sectional form
US8230415B1 (en) * 2007-03-13 2012-07-24 Juniper Networks, Inc. On-demand advertising of software packages
CN103686685A (en) * 2012-09-20 2014-03-26 芯讯通无线科技(上海)有限公司 Wireless communication module over-the-air upgrading method
CN105760194A (en) * 2016-02-15 2016-07-13 清华大学 DSP control system software update method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8230415B1 (en) * 2007-03-13 2012-07-24 Juniper Networks, Inc. On-demand advertising of software packages
CN101425018A (en) * 2008-12-05 2009-05-06 深圳创维数字技术股份有限公司 Embedded firmware upgrading method and device based on sectional form
CN103686685A (en) * 2012-09-20 2014-03-26 芯讯通无线科技(上海)有限公司 Wireless communication module over-the-air upgrading method
CN105760194A (en) * 2016-02-15 2016-07-13 清华大学 DSP control system software update method and device

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107179928A (en) * 2017-05-12 2017-09-19 深圳市四海众联网络科技有限公司 A kind of method that communication equipment is upgraded automatically
CN107395666B (en) * 2017-05-23 2020-09-18 武汉华中数控股份有限公司 Method and device for operating upgrading data packet of numerical control machine tool
CN107395666A (en) * 2017-05-23 2017-11-24 武汉华中数控股份有限公司 A kind of method and device of operating numerical control lathe upgrading data packet
CN109002305A (en) * 2017-06-05 2018-12-14 深圳市海洋王照明工程有限公司 A kind of update method and its system of device program
CN109002305B (en) * 2017-06-05 2022-09-09 深圳市海洋王照明工程有限公司 Method and system for updating equipment program
CN107332932A (en) * 2017-08-09 2017-11-07 南京阿凡达机器人科技有限公司 A kind of robot system remote upgrade method based on FOTA
WO2019029253A1 (en) * 2017-08-09 2019-02-14 南京阿凡达机器人科技有限公司 Fota-based remote upgrade control method and system
CN107332932B (en) * 2017-08-09 2020-04-17 南京阿凡达机器人科技有限公司 Robot system remote upgrading method based on FOTA
CN107832074A (en) * 2017-11-28 2018-03-23 福州瑞芯微电子股份有限公司 A kind of intelligent sound box data updating method and device
CN107861746A (en) * 2017-12-06 2018-03-30 北京经纬恒润科技有限公司 The method for refreshing and system of a kind of Vehicle Electronic Control Unit
CN107861746B (en) * 2017-12-06 2020-11-27 北京经纬恒润科技有限公司 Vehicle electronic control unit refreshing method and system
CN110502256A (en) * 2018-05-18 2019-11-26 佛山市顺德区美的电热电器制造有限公司 A kind of method for upgrading software, terminal and storage medium
WO2020073615A1 (en) * 2018-10-09 2020-04-16 广东美的制冷设备有限公司 Method for upgrading device software, and data converter and readable storage medium
CN109639666B (en) * 2018-12-07 2020-12-25 国能日新科技股份有限公司 Meteorological data file transmission method and device
CN109639666A (en) * 2018-12-07 2019-04-16 国能日新科技股份有限公司 Meteorological data document transmission method and device
CN111913728A (en) * 2019-05-08 2020-11-10 杰克缝纫机股份有限公司 Program upgrading method for sewing equipment
CN112068857A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 OTA (over the air) upgrading method and system based on dual systems
CN110716727A (en) * 2019-09-02 2020-01-21 领翌技术(横琴)有限公司 Software upgrading method and system
CN110716727B (en) * 2019-09-02 2023-07-21 领翌技术(横琴)有限公司 Software upgrading method and system
CN112068864A (en) * 2020-09-02 2020-12-11 深圳创维-Rgb电子有限公司 Terminal equipment camera software updating method and device and terminal equipment
CN116107612A (en) * 2023-04-11 2023-05-12 北京集度科技有限公司 Firmware air upgrading device, charging pile, device, method and program product

Also Published As

Publication number Publication date
CN106250192B (en) 2019-12-17

Similar Documents

Publication Publication Date Title
CN106250192A (en) The method for upgrading software of host computer and system
CN108847950B (en) Electronic device, cloud system software automatic deployment method and storage medium
CN110058873B (en) Application page updating method, device, equipment and storage medium
US10002054B2 (en) Method and system for performing automatic system recovery
US9507604B2 (en) Boot method and boot system
US10452375B1 (en) Memory-efficient upgrade staging
CN110597542B (en) Software automatic OTA (over the air) upgrading method and device and electronic equipment
CN107193607B (en) Method and apparatus for updating code file, storage medium, processor, and terminal
EP3672199B1 (en) Application deployment method, apparatus and system
CN108027741A (en) Document handling method, device, terminal and storage medium based on patch upgrading
CN109558160A (en) Upgrade method, embedded system
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
CN106951284B (en) User interface upgrading method and device based on android system application and intelligent terminal
CN108509215B (en) System software replacing method and device, terminal equipment and storage medium
CN111240720A (en) Boot program upgrading method and device and storage medium
US11886886B2 (en) System and method for runtime synchronization and authentication of pre-boot device drivers for a rescue operating system
CN106843947B (en) Method and device for processing code defects
CN113220660A (en) Data migration method, device and equipment and readable storage medium
CN110209420A (en) A kind of method and device updating bootstrap loader
CN109471642A (en) Firmware generates storage method and device, firmware start method and device
US20130080751A1 (en) Method and device for updating bios program for computer system
WO2016082450A1 (en) Method for upgrading user terminal, and user terminal
CN105677409A (en) System upgrading method and device
US9158641B2 (en) Cloud auto-test system, method and non-transitory computer readable storage medium of the same
CN114780019A (en) Electronic device management method and device, electronic device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant