Embodiment
Fig. 1 illustrates according to a specific embodiment of the present invention, the process flow diagram of the control method of in the equipment of software place described software being upgraded.In the present embodiment, having described equipment obtains corresponding upgrade software and it is made control method and the overall flow of verification.Particularly, at first execution in step S101 obtains the upgrade software corresponding with the current version of described software, for example, and by this upgrade software of Network Capture.Then enter step S102, described upgrade software is carried out verification, this checking procedure can realize with different verification modes and algorithm, for simple application software, can use simple verification algorithm that it is carried out verification; And for important system software, can use complicated strict checking algorithm that it is carried out verification, for example Fig. 4 and Fig. 6 have set forth respectively the embodiment of verification mode from different perspectives.The purpose that it will be appreciated by those skilled in the art that verification is to guarantee that the upgrade software be acquired is suitable software, for example is and the corresponding upgrade software of the current version of described software, and for example this upgrade software is complete etc. again.Next execution in step S103 judges that whether described upgrade software is by verification.Usually, can draw a judged result behind the execution in step S102, i.e. the conclusion whether verification is passed through in this step, can determine that according to this judged result whether described upgrade software is by verification.If the judged result of described step S103 is sure, namely described upgrade software then enters step S104 by verification, and described upgrade software is set to the current version of described software; If the judged result of described step S103 negates, i.e. described upgrading is soft not by verification, then there is no need to carry out upgrade job again, and whole processing procedure directly finishes.After it will be appreciated by those skilled in the art that execution above-mentioned steps S104, described updating operation success, namely the former current version of described software is no longer moved, and the substitute is the upgrade software that obtains among the described step S101, i.e. up-to-date current version.
In conjunction with above-mentioned Fig. 1, wherein, described software refers to the software that need to be upgraded; The current version of described software refers to the software version that described software is using; The former current version of described software refers to that described software is upgraded a software version before, also may store as backup software in the present invention; Upgrade software refers to the software version of upgrading for to the current version of described software.
With reference to above-mentioned steps S101, it will be appreciated by those skilled in the art that the mode of obtaining described upgrade software can realize by different transmission modes and medium.Preferably, in the present embodiment, described software is run on an independently equipment, in the personal computer (for example desk-top computer) that for example embedded device or a Daepori are logical, can be by this upgrade software of Network Capture, for example described equipment and LAN (Local Area Network) (for example Ethernet) or internet or wireless network are connected and can communicate for the device (equipment) of storing upgrade software by these networks and Software Upgrade Server or one, thereby obtain this upgrade software.In the preferred embodiment, can improve dirigibility of the present invention by this upgrade software of Network Capture, especially for the embedded device that disperses to distribute.Each equipment carries out updating operation by network respectively, and no longer need equipment of maintainer to connect an equipment ground and manually upgrade, thereby improved maintenance efficiency, be very favorable in this situation about need to safeguard for a large amount of embedded devices.Change in the example at one, also can obtain this upgrade software with serial communication; Change in the example at another, can read the data that are recorded among CD or the DVD by CDROM or DVDROM and obtain this upgrade software.It will be appreciated by those skilled in the art that the above-mentioned various implementations of enumerating do not affect summary of the invention.Further, obtaining this upgrade software can realize by different steps, for example in the present embodiment, by need to initiatively sending upgrade request to a Software Upgrade Server to the equipment that software is upgraded, for example preferably, this process can be finished by dispensing device 414 shown in Figure 8, then determine upgrade software and notify the software place equipment of described needs upgrading with the download address of this upgrade software according to upgrade request by this server, thereby download this upgrade software by described equipment by network; Perhaps directly send described upgrade software to described equipment by described server.And change in the example at one, described Software Upgrade Server pushes respectively this upgrade software to a plurality of equipment on one's own initiative, and receives this upgrade software by network after confirming respectively to receive this upgrade software by each equipment.
In the present embodiment, after having obtained upgrade software by step S101, at first this upgrade software is stored provisionally, for example preferably it is stored in interim storage space (for example internal memory), in step S104, this upgrade software is trimmed in the permanent storage space from interim storage space; Change in the example at one, it is stored in permanent storage space (flash memory for example, Flash), but in follow-up processing procedure, if determine to carry out updating operation, then the memory location of this upgrade software in described permanent storage space is set to positional information corresponding to described software current version.
Preferably, in a variation example embodiment illustrated in fig. 1, the former current version of also carrying out described software before described step S104 is set to the step of backup software, and namely system provides the function that former software is backed up.For example, provide the storage space of special this backup software of storage an embedded system, perhaps adopt a specific method to indicate this backup software (for example do not cover under the prerequisite of also not deleting this backup software indicate backup software by a system variable).It will be understood by those skilled in the art that in such variation example described backup software can be used for the dynamic rolling back of software, for example embodiment illustrated in fig. 3 such.
Fig. 2 illustrates according to the first embodiment of the present invention, the process flow diagram of the control method of in the equipment of software place described software being upgraded.Present embodiment is a thinning process of embodiment shown in Figure 1, wherein the correctness of updating software release is carried out verification, and in verification by the rear upgrading processing of just carrying out.Particularly, at first execution in step S110 carries out the verification of version correctness to described upgrade software.Similar with step S102 shown in Figure 1, described verification can be accomplished in several ways, and for example can with reference to figure 4 and/or embodiment illustrated in fig. 6 the realization, not repeat them here.Then enter step S111, whether judge described upgrade software by the verification of above-mentioned version correctness, similarly, this step can be finished by the check results among the step S110, does not repeat them here.If the judged result of described step S111 negates, namely described upgrade software by the verification of version correctness, then can not carried out upgrading processing, and whole treatment scheme finishes, and described to be upgraded running software unusual because incorrect upgrade software can cause; If the judged result of described step S111 is sure, be that described upgrade software is by the verification of version correctness, then enter step S112, receive described upgrade software by network, it will be appreciated by those skilled in the art that and to realize this step by multiple different network, can use different network technologies to adapt to polytype network structure, for example, can use Ethernet or internet.Then enter step S113, described upgrade software is carried out completeness check, the purpose of this verification is to guarantee that the related software part that described upgrade software comprises all is downloaded, in order to avoid because network problem or other problem cause upgrade software imperfect.This step S113 can realize by existing various completeness check algorithms, also can realize with software integrity verification mode provided by the invention, and is for example embodiment illustrated in fig. 6.Next, execution in step S114 carries out the verification of equipment coupling to described software, detects the upgrade software of downloading and whether is applicable to download the equipment of this upgrade software, thereby guarantee that suitable upgrade software is used to suitable equipment.Then enter step S115, judge that whether described upgrade software is by verification.In the present embodiment, whether described step S115 determines this upgrade software by verification jointly according to the check results in above-mentioned steps S113 and two steps of S114, and when the judged result of any one the determining step S115 when negating in two check results negates; And change in the example at one, only carry out some among described step S113 or the step S114, in step S115, only need come according to the checking procedure that is performed the judged result of determining step S115 this moment; Change in the example at another, can also adopt other checking procedures to replace described step S113 and/or step S114, do not repeat them here.
If the judged result of step S115 negates, namely described upgrade software is not by verification, and then whole treatment scheme finishes; If the judged result of step S115 is sure, namely described upgrade software has passed through the verification of above-mentioned steps S113 and step S114, then enters step S116, and described upgrade software is stored to the first memory location; Then execution in step S117 is stored to the second memory location with described backup software, and so far, the treatment scheme that present embodiment provides finishes.In the present embodiment, the first memory location and the second memory location are used to respectively store current version and the backup software of described software, realize version rollback in the software upgrade process with this, for example embodiment illustrated in fig. 3 like that.Those skilled in the art understand, above-mentioned backup software is the backup of described software current version, the upper version of described current version normally, from another angle, described current version correspondence after updating operation is finished the upgraded version of updating operation before finishing, the described backup version correspondence after correspondingly updating operation is finished the described current version of updating operation before finishing.
It will be appreciated by those skilled in the art that the verifying work among above-mentioned steps S110 and step S113, the S114 can finish by number of ways.For example, in the present embodiment, be provided with dbase, version number of this upgrade software etc. in each upgrade software, correspondingly, in step S110, the equipment that need to carry out software upgrading can carry out verification to above-mentioned dbase, version number etc., if dbase is incorrect or the version number of this upgrade software little (height) in the version number of the software that is upgraded, determine that then this upgrade software fails by described correctness verification.And change in the example at one, in step S110, can also can determine or auxiliaryly determine that the content of software version correctness judges other, do not repeat them here.Equally, in the present embodiment, be provided with each ingredient of this upgrade software in each upgrade software, such as information such as the title of each module or sub-software, byte-sized, correspondingly, in step S113, after having received whole upgrade softwares, the equipment that need to carry out software upgrading carries out respectively verification according to above-mentioned information to the software each several part of having downloaded, and is not downloaded or downloads not exclusively if find some modules or sub-software, and then definite this upgrade software fails to pass through completeness check.For example, Fig. 6 shows the embodiment that is used for integrity check of a more complicated, does not repeat them here.Similarly, in the present embodiment, be provided with the information such as device name that this upgrade software is suitable for, type in each upgrade software, correspondingly, in step S114, the equipment that need to carry out software upgrading judges that whether above-mentioned information be complementary with the information of this equipment, if for example discovering device title or type are not mated, determines that then this upgrade software fails by the verification of equipment coupling.Those skilled in the art understand, in the specific implementation process, device name that can this upgrade software is applicable and type are encoded and are stored in a string bit, and the equipment that then carries out software upgrading by needs reads this Bit String and correspondingly obtains equipment coupling check information.Change in the example at one, the sequence number or other identification informations that also comprise upgrade software institute suitable device in the above-mentioned information, in such variation example, the check results of this step S114 is more accurate, because upgrade software only is set to one or more particular devices is upgraded; Change in the example at another, also can come realization equipment coupling checking procedure by moving specific equipment matching detection software, do not repeat them here.
In conjunction with above-mentioned explanation to Fig. 1, and with reference to above-mentioned steps S116, S117, it will be appreciated by those skilled in the art that and to realize this two steps by number of ways.In the present embodiment, after having received this upgrade software, at first this upgrade software is placed interim storage space, and in step S116, this upgrade software is stored in the permanent storage space, for example be stored among the Flash of embedded device, for example be stored in the hard disk of desk-top computer again.Preferably, this upgrade software places a particular category (the first memory location) all the time, this particular category is used for storing the current version of described software, 51 parts shown in Figure 5 for example, therefore, after upgrade software is placed in this particular category, in fact finished the updating operation to described software, namely described software will read this upgrade software that is stored in described 51 parts next time when moving; Accordingly; in step S117; usually the former current version of described software can be stored in another particular category (the second memory location); be about to former current version and be trimmed to the second memory location from the first memory location; for example the content in 51 parts shown in Figure 5 is moved to 52 parts, thereby so that described former current version becomes backup software.Change in the example at one, this upgrade software places permanent storage space all the time after receiving by step S112, in such variation example, then indicate the position at the current version place of described software with an indication information, and when described software restarts, read up-to-date software according to this indication information.At this moment, in step S116, above-mentioned indication information is set to the positional information of described upgrade software; Accordingly, can be in step S117 the indication information of backup software be set to the positional information of the former current version of described software, such process can be finished by the mode that two pointers exchange at least.It will be appreciated by those skilled in the art that common above-mentioned steps S117 can be performed before step S116, because at first will preserve the information of former current version, and then use upgrade software to cover former current version as new current version, do not repeat them here.
Compared to Figure 1 there is following variation in above-mentioned Fig. 2 at least: the first, increased the correctness checking procedure that obtains before the upgrade software this upgrade software; The second, increased the processing to backup software.And it will be understood by those skilled in the art that in the variation example of Fig. 2, if not needing to carry out dynamic rolling back processes, then can omit above-mentioned steps S117.
Fig. 3 illustrates according to the first embodiment of the present invention, described software is carried out the process flow diagram of the control method of dynamic rolling back in the equipment of software place, the base conditioning step when namely software can't normally start.Particularly, at first execution in step S121 judges whether to receive in the given time the normal feedback information that starts of software.After described software is successfully upgraded, carry out up-to-date current version (described upgrade software) during system restart, if described upgrade software can normally start, the all functions that after starting, can normally provide this upgrade software to provide, and all component of system all can work, then this software is considered as and can normally starts, otherwise is considered as upgrading unsuccessfully.Preferably, the checkout procedure whether described software normally starts can realize by the mode of robotization, by system's autoboot and judge the whether normally operation of described software, usually, finish such checkout procedure according to the feedback information that sends after the normal startup of described software, it will be appreciated by those skilled in the art that the operation of sending this feedback information controlled by the module that described software arranges in advance, do not repeat them here.Whether above-mentioned checkout procedure also can realize by artificial method, for example, detect described software by special tester and run well after upgrading.Described Preset Time is used for preventing unrestrictedly waiting for when described software from can not normally start that described feedback information, this Preset Time can be adjusted to adapt to different demands.
If the judged result of described step S121 is sure, namely in Preset Time, receive the normal feedback information that starts of software, then this flow process finishes, and does not namely need to carry out rolling back action.If the judged result of step S121 negates, namely in Preset Time, do not receive the normal feedback information that starts of software, then enter step S122, the routing information of the current version of described software is set to described the second memory location, then execution in step S123, the content that is stored in the first memory location is all deleted, enter at last step S124, the sign of the first memory location and the second memory location is exchanged.By step S122, the backup software (again) that originally is stored in the second memory location is resumed the current version into described software, and namely described software is rolled back to the situation before the last upgrading.Usually, because this backup software only carries out a series of changes in equipment, for example be set to backup software from former current version, be resumed from backup software again and be current version, so the probability that uses this backup software but can't normally start is smaller.Similarly, by step S124, so that the first memory location is used for storing the current version of described software again after software is finished rollback, and simultaneously so that the second memory location is used for storage backup software again.The exchange operation that it will be appreciated by those skilled in the art that the identification information of the first memory location and the second memory location can realize that with various ways for example, when pointer was adopted in the memory location, only needing to exchange two pointers can performing step S124.
In step S123 shown in Figure 3, the software version that is used for normally starting is removed.The purpose of this step is so that this software version can not cause described software normally to start again, also prepares for the software upgrading operation of next time simultaneously.It will be appreciated by those skilled in the art that and to pass through alternate manner performing step S123, an identification information for example is set indicates backup software and do not exist, the first memory location for example is set again makes it point to other memory locations etc.Change in the example at another, described step S123 is omitted, and this does not affect essence of the present invention.
Fig. 4 shows according to a second embodiment of the present invention, the process flow diagram of the control method of in the equipment of software place, described software being upgraded, and this flow process is more complicated.Particularly, execution in step S131 at first reads the check code of described upgrade file from upgrade file, and this check code is included in this upgrade file, and is for example shown in Figure 6.This check code is usually calculated described upgrade file by different checking algorithms by upgrade server and obtains.Then enter step S132, the equipment that need to carry out software upgrading carries out verification to described upgrade file, and judges that whether resulting check code is complementary with the check code that above-mentioned steps S131 reads.It will be appreciated by those skilled in the art that the employed checking algorithm of this verification is usually identical with the employed checking algorithm of described upgrade server.After calculating, obtain equally a check code, if the upgrade file that the upgrade file that described equipment obtains and above-mentioned upgrade server provide is in full accord, then two check codes should be identical.If the judged result of described step S132 negates, show that there is mistake in the upgrade software that is obtained by described equipment, for example this may be that packet is damaged in the network downloading process, so this processing procedure finishes; Otherwise execution in step S133 proceeds updating operation to software.It will be appreciated by those skilled in the art that described step S132 can be regarded as the specific embodiment of Fig. 2 step S113, does not repeat them here.
In step S133, obtain respectively the information of each ingredient that comprises in the described upgrade file.In the present embodiment, a complete upgrade file is comprised of uboot (Bootloader), OS (operating system) and APP (upper level applications), therefore should obtain respectively the relevant information of this three partial content, such as comprising at least in the present embodiment type, size, position, check information etc. in upgrade file.Then enter step S134, respectively uboot, OS and APP are carried out verification operation, this step can realize with reference to above-mentioned steps S132, not repeat them here.Next execution in step S135 judges whether the check code that obtains through step S134 is complementary with the check code that extracts from described upgrade software.If it will be appreciated by those skilled in the art that in step S135 any or appoint a plurality of check informations not mate, then causing the judged result of this step negates that this moment, whole treatment scheme finished, and no longer described software was carried out updating operation.On the contrary, if the judged result of described step S135 is sure, namely the check results of uboot, OS and APP and the check results of extracting from described upgrade file are complementary, then execution in step S136.
In step S136, the uboot in the described upgrade file, OS and data file corresponding to APP are write among the Flash respectively.It will be appreciated by those skilled in the art that preferably above-mentioned data file is write respectively designated memory space, such situation can realize in conjunction with above-mentioned step S116 shown in Figure 2.For example in the embodiment shown in fig. 6, described app.image is write in storage space corresponding to upper level applications; Similarly, in the storage space that uboot.bin write-enable boot is corresponding.And change in the example at one, described three data files are write respectively the optional position in the described Flash subregion, and correspondingly upgrade the indication information of indicating uboot, OS and APP, so that the indication information after upgrading points to the memory location that described data file is written into.For example, in the present embodiment, data file corresponding to described operating system specifically comprises: cmemk.ko, dsplinkk.ko, mt.linux, and size is respectively 12K, 76K, 6997K; Correspondingly, data file corresponding to described upper level applications specifically comprises: MediaStart, mtres.rc, mt.image, size is respectively 1168K, 5055K, 12439K.It will be understood by those skilled in the art that wherein described ko is the kernel file that linux operating system is called, mt.linux is operating system file; MediaStart is start-up picture, mtres.rc is terminal OSD (screen menu type regulative mode, on-screen display) resource file of menu, mt.image is the upper-layer service program, can read respectively accordingly these data files and carry out write operation, can realize this step in conjunction with prior art, it will not go into details.
Then, execution in step S137, judge that the described data file that is written into is whether consistent with the content that comprises in the described upgrade file, whether the data file of the uboot that namely finally is written into, OS and APP is consistent with the corresponding data file that comprises in the described upgrade file.If arbitrary partial content is inconsistent, then the judged result of described step S137 negates, and enter step S139 this moment, cancels the updating operation to described software; Otherwise, if three partial contents all are correctly written, then the judged result of described step S137 is sure, enters step S138 this moment, the information that transmission upgrades successfully has been finished upgrading so that other equipment (for example upgrade server) can be known this equipment.It will be appreciated by those skilled in the art that described step S139 can realize in several ways, preferably, the data file deletion that will be written in the present embodiment; If upgraded relevant indication information, for example the indication information of OS then also will restore to the original state these indication informations.Equally, it will be appreciated by those skilled in the art that described step S138 can be omitted, at this moment, might one equipment finish the process of upgrading and do not known by other equipment, also might other equipment can know that a particular device finishes the information of upgrading by other approach, it will not go into details.
With reference to above-mentioned Fig. 4, although it will be understood by those skilled in the art that and in step shown in Figure 4, directly used Flash, should " Flash " can be understood to other memory devices equally, for example hard disk, CD or tape etc.Present embodiment preferably is applicable to embedded device, so Flash is also preferably as memory device; And change in the example at other, when for example the present invention was applicable to desk-top computer, then described memory device can adopt hard disk, did not repeat them here.
Fig. 5 illustrates according to a specific embodiment of the present invention, in the equipment of software place described software is upgraded and the internal logic structure synoptic diagram of dynamic rolling back, and present embodiment is further specifying the described embodiment of above-mentioned Fig. 4.Wherein, preferably, described software is placed in the embedded device, from logic, this software comprise Bootloader (Boot) partly, operating system (OS) partly, upper-layer service program (App) part and user file (User) part.It will be appreciated by those skilled in the art that such composition is common in common equipment, the especially embedded device, does not repeat them here.Such as above-mentioned explanation to Fig. 1~Fig. 4, in the present embodiment, be provided with two parts of storage spaces and store respectively described operating system and upper level applications, wherein store the current version of described software in the first storage space, namely just by the version of described software application, correspondingly, the second storage space is stored the backup software of described software, namely is used for the backup version of rollback after current version starts unsuccessfully.Preferably, described the first storage space and the second storage space are arranged at separately independently on the memory device, for example are arranged on the different Flash; Suboptimum ground, two storage spaces also can be arranged on the same memory device, but lay respectively at different zones, and this does not affect flesh and blood of the present invention.
With reference to figure 5, it will be appreciated by those skilled in the art that described user data part 53 upgraded manually or automatically by the user usually, therefore usually do not need control method provided by the invention.Described Bootloader part 50 can use control method provided by the invention to upgrade.But the probability of considering the Bootloader upgrading is smaller, so it is not arranged back up memory space in the present embodiment, namely can't realize above-mentioned dynamic rolling back operation for the Bootloader part in the present embodiment.But it will be appreciated by those skilled in the art that at one to change in the example, also can back up memory space be set for Bootloader.
It will be appreciated by those skilled in the art that above-mentioned Fig. 5 shows the logical organization in the equipment.And in actual applications, by there being a plurality of equipment, the software that exists one or more needs to be upgraded in each equipment, and described a plurality of equipment communicates to obtain corresponding upgrade software with the device (equipment) of one or more Software Upgrade Server or other storage upgrade softwares respectively.In such embodiments, each equipment obtain the process of a upgrade software can be according to the present invention content and corresponding embodiment realize, do not repeat them here.
Fig. 6 illustrates according to a second embodiment of the present invention, the synoptic diagram of the partial information that comprises in the upgrade software.In the present embodiment, described upgrade software 6 comprises two parts content: check information and data content.Wherein, upgrade file check code 61 is used for identifying the correctness of described upgrade file version, namely identifies the renewal which software this upgrade file can be used to.For example, preferably, check code 61 can be used to the version correctness checking procedure among above-mentioned Fig. 2 step S110.Similarly, upgrade file redundant information 62 is used for the redundant information that record sets in advance, and this redundant information can be used for above-mentioned correctness verification and other proof procedures.Preferably, described redundant information is pre-arranged as comprising the information of following content: upgrade software title, version number, upgrading date, developer, applied device name, applied device type etc.These redundant informations are arranged in the data content of described upgrade software simultaneously, for example the ad-hoc location in operating system part 64 has also recorded these information simultaneously, after described data content has been written into Flash, then can be by reading these information of recording in the described data content and comparing with described redundant information 62, if consistent, then definite verification is passed through.For example above-mentioned step S114 shown in Figure 2 can realize by redundant information 62.
With reference to figure 6, except above-mentioned information for whole upgrade file, also comprise the various information of each ingredient in the described upgrade file.In the present embodiment, described message part 63 comprises much information, for example is recorded in respectively type, the size of each ingredient in the upgrade file, the position in upgrade file and the check code of each file etc.For example, can record in the following way above-mentioned information:
[operating system] [30k] [260] [30979] [check code]
[upper level applications] [210k] [30980] [246019] [check code]
By above-mentioned information 63, can obtain at least the included ingredient of described upgrade software and which position in upgrade software can obtain this ingredient, thereby this ingredient intactly can be read and write corresponding memory location.For example can read at the 260th byte to 30979 place of upgrade software the upgrade software of described operating system.Simultaneously, by above-mentioned information 63, can also obtain respectively the check code of each ingredient.Based on these check codes, can be in subsequent processes respectively whether complete to each ingredient, correctly carry out verification, for example suppose that above-mentioned check code obtains by cyclic redundancy check (CRC) (CRC) mode, then can adopt equally CRC check to carry out verification to upper level applications is whether complete.Those skilled in the art are appreciated that foregoing in conjunction with prior art, do not repeat them here.
Further, in the present embodiment, the data content of described upgrade file 6 has partly comprised operating system update file 64, upper level applications mirror image 65 and Bootloader upgrade file 66.Those skilled in the art understand, this three partial datas content corresponds respectively to the content in the above-mentioned message part 63, the ingredient that is the upgrade file of record in the information 63 correspondingly exists data content, this partial data content will be used as upgrade software upgrades with the former current version to described software, does not repeat them here.
Fig. 7 illustrates according to the first embodiment of the present invention, in the equipment of software place described software is upgraded and the structural representation of the control device of dynamic rolling back.In the present embodiment, described control device 4 comprises deriving means 41, the first calibration equipment 42, the first judgment means 43, the first treating apparatus 44 and the second judgment means 46, the second treating apparatus 47.Wherein, described deriving means 41 is used for obtaining the upgrade software corresponding with the current version of described software; Described the first calibration equipment 42 is used for described upgrade software is carried out verification, and the purpose of verification is to guarantee that the upgrade software that is acquired is suitable software, for example is and the corresponding upgrade software of the current version of described software; Described the first judgment means 43 is used for whether judging described upgrade software by verification, and when judged result calling device 44 when being sure; Described the first treating apparatus 44 be used for when described upgrade software during by verification described upgrade software be set to the current version of described software.Described the second judgment means 46 is used for judging whether described software can normally start, and at judged result calling device 47 whether regularly; Described the second treating apparatus 47 is set to the current version of described software for backup software when described software can not normally start.
It will be understood by those skilled in the art that described deriving means 41 can be accomplished in several ways, preferably, by the described upgrade software of Network Capture, for example by LAN (Local Area Network) (for example Ethernet) or internet or wireless network; Change in the example at one, also can obtain this upgrade software with serial communication; Change in the example at another, can also read the content that is recorded among CD or the DVD by CDROM or DVDROM and obtain this upgrade software.Further, described deriving means 41 can the described upgrade software of active obtaining, for example embodiment illustrated in fig. 8ly also can receive passively described upgrade software like that, does not repeat them here.
Similarly, described the first treating apparatus 44 also can be accomplished in several ways.In the present embodiment, after described device 41 has obtained described upgrade software, at first it is stored in the interim storage space (for example internal memory), then after this upgrade software is through processes such as verifications, again it is stored in permanent storage space, for example in the ad-hoc location among the Flash, for example the first memory location (for example 51 parts shown in Figure 5), simultaneously deletion is stored in this upgrade software in the interim storage space.And change in the example at another, after being obtained by device 41, this upgrade software places all the time some file directorys of permanent storage space, the first memory location for example, and the indication information of position that is used to indicate the current version place of described software after determining to carry out updating operation is set to this document catalogue (for example the first memory location), thereby so that described software can directly read the file under this document catalogue when start next time, namely call upgrade software, thereby finished updating operation.
Preferably, in the present embodiment, described the first treating apparatus 44 also comprises the 3rd treating apparatus 441, and it is used for the former current version of described software and is set to backup software, be that described control device 4 also provides the function that former software is backed up, thereby be used for the dynamic rolling back of software.In conjunction with above-mentioned description to the first treating apparatus 44, those skilled in the art understand, preferably, described device 441 can be stored to the former current version of described software in another particular category (the second memory location), for example the content in 51 parts shown in Figure 5 is moved to 52 parts, thereby so that described former current version becomes backup software.
In the present embodiment, described device 46 is not received the then definite described software startup failure of the normal feedback information that starts of described software in the given time.It will be appreciated by those skilled in the art that by the prior module controls that arranges of described software and send this feedback information.Described Preset Time is used for preventing unrestrictedly waiting for when described software from can not normally start that described feedback information, this Preset Time can be adjusted to adapt to different demands.If described device 46 determines that described software normally starts, then no longer call other device and carry out any processing; Otherwise, calling device 47.The fundamental purpose of device 47 is so that described software can start with backup software, thereby guarantees that described software can normally move, and usually described software is rolled back to the last upgrading situation before.In the present embodiment, the routing information of the current version of described device 47 described softwares is set to described the second memory location, is appreciated that the content of storing under this second memory location is the backup version of described software.Change in the example at one, this device 47 also will be stored in the content of the first memory location and all delete to avoid this software version again to cause described software normally to start, and the sign of the first memory location and the second memory location is exchanged.
It will be appreciated by those skilled in the art that preferably above-mentioned the first memory location and the second memory location can be respectively memory devices independently, for example two Flash independently; And change in the example at one, also can be the different storage space on the same memory device, two different catalogues for example.In the previous case, even wherein physical damage has occured a memory device, also can not affect the use of another piece memory device, therefore increase to a greater extent the reliability of backup software, not repeat them here.
Fig. 8 illustrates according to the first embodiment of the present invention, the structural representation of deriving means 41 shown in Figure 7.In the present embodiment, described deriving means 41 comprises the second calibration equipment 411, the 3rd judgment means 412, the 3rd receiving trap 413 and dispensing device 414.Wherein, described the second calibration equipment 411 is used for described upgrade software is carried out the verification of version correctness; Described the 3rd judgment means 412 is used for judging that whether described upgrade software is by the verification of version correctness; Described the 3rd receiving trap 413 is used for receiving described upgrade software by network when described upgrade software during by the verification of version correctness; Described dispensing device 414 is used for sending the software upgrading request to the server that stores described upgrade software.Particularly, through after the verification operation of device 411, not by the verification of version correctness, then can not carry out upgrading processing if described device 412 is determined described upgrade software, just no longer calling any device carries out any operation; Otherwise, install 412 calling devices 413 and receive described upgrade software.
Those skilled in the art understand, in a preferred embodiment, be provided with dbase, version number of this upgrade software etc. in each upgrade software, correspondingly, 411 pairs of above-mentioned dbases of above-mentioned the second calibration equipment, version number etc. carry out verification, if dbase is incorrect or the version number of this upgrade software little (height) in the version number of the software that is upgraded, then described the 3rd receiving trap 413 determines that these upgrade softwares fail by described correctness verification.
In the present embodiment, described device 413 receives described upgrade software by network, and as previously mentioned, changes in the example at one, also can receive by other means described upgrade software, such as by serial communication etc., does not repeat them here.
Further, described device 411~413 can cooperate with described dispensing device 414 finishes the operation of obtaining upgrade software, namely at first initiatively send upgrade request to a Software Upgrade Server by device 414, and determine upgrade software and notify the software place equipment of described needs upgrading with the download address of this upgrade software according to upgrade request by this server, thereby download this upgrade software by described equipment by network.And change in the example at one, described dispensing device 414 can be omitted, at this moment, described Software Upgrade Server pushes respectively this upgrade software to a plurality of control device 4 on one's own initiative, and receives this upgrade software by network after being confirmed respectively to receive this upgrade software by each control device 4.
Fig. 9 illustrates according to a second embodiment of the present invention, and the structural representation of the first calibration equipment 42 shown in Figure 7, present embodiment are embodiments of device 42.In the present embodiment, described the first calibration equipment 42 comprises the 3rd calibration equipment 421 and the 4th calibration equipment 422.Wherein, described the 3rd calibration equipment 421 is used for described upgrade software is carried out completeness check, to determine whether described upgrade software comprises the content that all are essential, this device is used for guaranteeing that the related software part that described upgrade software comprises all is downloaded, in order to avoid because network problem or other problem cause upgrade software imperfect; Whether described the 4th calibration equipment 422 is used for described upgrade software is carried out the verification of equipment coupling, be complementary with described software place equipment with definite described upgrade software, thereby guarantee that suitable upgrade software is used to suitable equipment.Particularly, the information such as device name that this upgrade software is suitable for, type can all be set in each upgrade software, then install 422 and judge that whether above-mentioned information be complementary with the information of this device place equipment, if for example discovering device title or type are not mated, then definite this upgrade software is failed by the verification of equipment coupling.
It will be appreciated by those skilled in the art that described device 421 can be accomplished in several ways, for example can be with reference to embodiment illustrated in fig. 6.Particularly, in the present embodiment, described the 3rd calibration equipment 421 comprises redundant information deriving means 4211, and it is used for obtaining the redundant information that described upgrade software comprises, for example 62 parts shown in Figure 6; And first determine device 4212, and it is used for determining according to described redundant information whether described upgrade software comprises the content that all are essential.Preferably, described redundant information is pre-arranged as comprising the information of following content: upgrade software title, version number, upgrading date, developer, applied device name, applied device type etc.These redundant informations are arranged in the data content of described upgrade software simultaneously, for example the ad-hoc location in operating system part 64 has also recorded these information simultaneously, after described data content has been written into Flash, then can be by reading these information of recording in the described data content and comparing with described redundant information 62, if consistent, then install 4212 and can determine that verification passes through.
In a variation example embodiment illustrated in fig. 9, described the 3rd calibration equipment 4211 or the 4th calibration equipment 4212 can be omitted, and namely only carry out verification according to one of them device, at this moment, the function of the device that is omitted then is not performed, and this does not affect flesh and blood of the present invention.
More than specific embodiments of the invention are described.It will be appreciated that the present invention is not limited to above-mentioned particular implementation, those skilled in the art can make various distortion or modification within the scope of the claims, and this does not affect flesh and blood of the present invention.