CN105045640A - Software upgrading method and apparatus and intelligent device - Google Patents

Software upgrading method and apparatus and intelligent device Download PDF

Info

Publication number
CN105045640A
CN105045640A CN201510535862.9A CN201510535862A CN105045640A CN 105045640 A CN105045640 A CN 105045640A CN 201510535862 A CN201510535862 A CN 201510535862A CN 105045640 A CN105045640 A CN 105045640A
Authority
CN
China
Prior art keywords
master control
control borad
mixed
media
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510535862.9A
Other languages
Chinese (zh)
Inventor
胡祝青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingsoft Corp Ltd
Original Assignee
Kingsoft Corp 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 Kingsoft Corp Ltd filed Critical Kingsoft Corp Ltd
Priority to CN201510535862.9A priority Critical patent/CN105045640A/en
Publication of CN105045640A publication Critical patent/CN105045640A/en
Pending legal-status Critical Current

Links

Abstract

Embodiments of the invention disclose a software upgrading method and apparatus and an intelligent device, and relates to the technical field of software. The software upgrading method and apparatus are applied to a main control board in the intelligent device. The intelligent device at least comprises the main control board and a network module. The method comprises: receiving a software upgrading instruction, for an application program in the main control board, sent by the network module, wherein the software upgrading instruction is sent after the network module downloads an upgrading file for the application program of the main control board from a server to a storage region; and according to the software upgrading instruction, downloading the upgrading file from the network module to the storage region corresponding to the application program in the main control board to realize upgrading of the application program in the main control board. By applying the scheme provided by the embodiments of the invention, the upgrading of the application program in the main control board can be realized even under the condition that storage resources of the main control board are limited and a buffer region used for storing the upgrading file cannot be reserved.

Description

A kind of method for upgrading software, device and smart machine
Technical field
The present invention relates to software technology field, particularly a kind of method for upgrading software, device and smart machine.
Background technology
Along with the fast development of hardware technology, the terminal of application smart machine gets more and more, such as, and intelligent television, intelligent refrigerator etc.Wherein, smart machine mainly comprises: for controlling the master control borad of conventional hardware and the mixed-media network modules mixed-media for accesses network.Consider that the factor such as user's request is constantly updated, in practical application, the demand of software upgrading carried out to application program in master control borad more and more urgent.
Under normal circumstances, in the flash memory Flash of master control borad except there is storage area corresponding to application program and storage area corresponding to start-up routine, the general buffer area that also existence one is reserved, this region can be used for the upgrade file storing application program in master control borad, in addition, above-mentioned start-up routine is the program for loading application program in master control borad.
Concrete, during the application program of upgrading in master control borad in prior art, after master control borad receives the software upgrade instruction of server transmission, upgrade file is downloaded to above-mentioned reserved buffer area from server according to this instruction, after file download to be done, storage area corresponding for application program in downloaded file copy to master control borad can be realized upgrading.
Application said method can realize the upgrading to application program in master control borad.But due to the Flash resource-constrained of most of master control borad, possibly cannot reserve above-mentioned buffer area, and then the upgrading to the application program in master control borad cannot be realized.
Summary of the invention
The embodiment of the invention discloses a kind of method for upgrading software, device and smart machine, to make master control borad limited at storage resources, when cannot reserve the buffer area for storing upgrade file, also can realize the upgrading to the application program in master control borad.
For achieving the above object, the embodiment of the invention discloses a kind of method for upgrading software, being applied to the master control borad in smart machine, wherein, described smart machine at least comprises: master control borad and mixed-media network modules mixed-media, and described method comprises:
Receive the software upgrade instruction being directed to application program in described master control borad that described mixed-media network modules mixed-media sends, wherein, described software upgrade instruction for: described mixed-media network modules mixed-media sends after the upgrade file of the application program being directed to described master control borad being downloaded to self storage area from server;
According to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad.
In a kind of specific implementation of the present invention, described according to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad, comprising:
According to described software upgrade instruction, the status indicator upgrading described master control borad is the mark of " upgrading " state, and wherein, the state demarcation of described master control borad is: be designated S r" request upgrading " state, be designated S i" upgrading " state and be designated S n" normally run " state;
By restarting the mode of described master control borad, call the start-up routine in described master control borad, wherein, described start-up routine is the program for loading the application program in described master control borad;
Detect that the status indicator of described master control borad is S receiving described start-up routine itime the trigger for download signal that sends after, send file download instructions to described mixed-media network modules mixed-media;
Receive the described upgrade file that described mixed-media network modules mixed-media feeds back according to described file download instructions, and fed back file is stored to the storage area that in described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad.
In a kind of specific implementation of the present invention, described method for upgrading software also comprises:
After successfully upgrading to the application program in described master control borad, the status indicator upgrading described master control borad is S n, and by restarting the mode of described master control borad, the state of described master control borad is switched to " normally running " state by " upgrading " state.
In a kind of specific implementation of the present invention, described method for upgrading software also comprises:
Receive abnormality process request;
The status indicator upgrading described master control borad is S r, and restart described master control borad.
In a kind of specific implementation of the present invention, described abnormality process request is the process request for any one abnormality following:
After receiving described software upgrade instruction, the state upgrading described master control borad is S itime failure;
After successfully upgrading to the application program in described master control borad, the status indicator upgrading described master control borad is S ntime failure;
The failure of described upgrade file is downloaded from described mixed-media network modules mixed-media.
In a kind of specific implementation of the present invention, described method for upgrading software also comprises:
By restarting the mode of described master control borad, the start-up routine called in described master control borad sends the current state mark of described master control borad to described mixed-media network modules mixed-media;
Receive described mixed-media network modules mixed-media and detect that the current state of described master control borad is designated S rwhen the described software upgrade instruction that sends, and return described according to described software upgrade instruction, from described mixed-media network modules mixed-media, download the step of described upgrade file.
In a kind of specific implementation of the present invention, described software upgrade instruction comprises: the proof test value of described upgrade file;
Described according to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad, comprising:
According to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding;
In the process downloading described upgrade file, detect whether complete file download;
If downloaded, according to the proof test value of the described upgrade file that described software upgrade instruction comprises, downloaded file is verified;
If verification succeeds, then determine to have realized the upgrading to the application program in described master control borad.
In a kind of specific implementation of the present invention, also comprise in described software upgrade instruction: the size of described upgrade file;
In the described process downloading described upgrade file, detecting whether complete file download, comprising:
In the process downloading described upgrade file, whether the size detecting institute's download file is more than or equal to the size of described upgrade file, if yes, then judges to have completed file download.
In a kind of specific implementation of the present invention, described method for upgrading software also comprises:
After completing file download, information has been downloaded to described mixed-media network modules mixed-media feedback file, the lock-out state of described upgrade file is removed with the described mixed-media network modules mixed-media made, wherein, described master control borad from described mixed-media network modules mixed-media after download file, it is lock-out state that described mixed-media network modules mixed-media arranges described upgrade file.
For achieving the above object, the embodiment of the invention discloses a kind of software updating apparatus, being applied to the master control borad in smart machine, wherein, described smart machine at least comprises: master control borad and mixed-media network modules mixed-media, and described device comprises:
Software upgrade instruction receiving element, for receiving the software upgrade instruction being directed to application program in described master control borad that described mixed-media network modules mixed-media sends, wherein, described software upgrade instruction for: described mixed-media network modules mixed-media sends after the upgrade file of the application program being directed to described master control borad being downloaded to self storage area from server;
Upgrade file download unit, for according to described software upgrade instruction, downloads the storage area that in described upgrade file to described master control borad, application program is corresponding from described mixed-media network modules mixed-media, and then realizes the upgrading to the application program in described master control borad.
In a kind of specific implementation of the present invention, described upgrade file download unit, comprising:
Status indicator upgrades subelement, and for according to described software upgrade instruction, the status indicator upgrading described master control borad is the mark of " upgrading " state, and wherein, the state demarcation of described master control borad is: be designated S r" request upgrading " state, be designated S i" upgrading " state and be designated S n" normally run " state;
Start-up routine calls subelement, for the mode by restarting described master control borad, calls the start-up routine in described master control borad, and wherein, described start-up routine is the program for loading the application program in described master control borad;
File download instructions sends subelement, for detecting that the status indicator of described master control borad is S receiving described start-up routine itime the trigger for download signal that sends after, send file download instructions to described mixed-media network modules mixed-media;
Upgrade file receives and storing sub-units, for receiving the described upgrade file that described mixed-media network modules mixed-media feeds back according to described file download instructions, and fed back file is stored to the storage area that in described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad.
In a kind of specific implementation of the present invention, described software updating apparatus also comprises:
Status toggle unit, after successfully upgrading to the application program in described master control borad, the status indicator upgrading described master control borad is S n, and by restarting the mode of described master control borad, the state of described master control borad is switched to " normally running " state by " upgrading " state.
In a kind of specific implementation of the present invention, described software updating apparatus also comprises:
Process request reception unit, for receiving abnormality process request;
Status indicator updating block is S for upgrading the status indicator of described master control borad r, and restart described master control borad.
In a kind of specific implementation of the present invention, described abnormality process request is the process request for any one abnormality following:
After receiving described software upgrade instruction, the state upgrading described master control borad is S itime failure;
After successfully upgrading to the application program in described master control borad, the status indicator upgrading described master control borad is S ntime failure;
The failure of described upgrade file is downloaded from described mixed-media network modules mixed-media.
In a kind of specific implementation of the present invention, described software updating apparatus also comprises:
Status indicator transmitting element, for the mode by restarting described master control borad, the start-up routine called in described master control borad sends the current state mark of described master control borad to described mixed-media network modules mixed-media;
For receiving described mixed-media network modules mixed-media, described software upgrade instruction receiving element, also detects that the current state of described master control borad is designated S rwhen the described software upgrade instruction that sends, and trigger described upgrade file download unit and download upgrade file.
In a kind of specific implementation of the present invention, described software upgrade instruction comprises: the proof test value of described upgrade file;
Described upgrade file download unit, comprising:
Subelements under upgrade file, for according to described software upgrade instruction, downloads the storage area that in described upgrade file to described master control borad, application program is corresponding from described mixed-media network modules mixed-media;
File download detection sub-unit, in the process downloading described upgrade file, detects whether complete file download;
File verification subelement, for when the testing result of described file download detection sub-unit is for being, according to the proof test value of the described upgrade file that described software upgrade instruction comprises, verifies downloaded file;
Subelement is determined in upgrading, for when described file verification subelement verification succeeds, determines to realize the upgrading to the application program in described master control borad.
In a kind of specific implementation of the present invention, also comprise in described software upgrade instruction: the size of described upgrade file;
Described file download detection sub-unit, specifically in the process downloading described upgrade file, whether the size detecting institute's download file is more than or equal to the size of described upgrade file, if yes, then judges to have completed file download.
In a kind of specific implementation of the present invention, described software updating apparatus also comprises:
File download message feedback unit, for after completing file download, information has been downloaded to described mixed-media network modules mixed-media feedback file, the lock-out state of described upgrade file is removed with the described mixed-media network modules mixed-media made, wherein, described master control borad from described mixed-media network modules mixed-media after download file, it is lock-out state that described mixed-media network modules mixed-media arranges described upgrade file.
For achieving the above object, the embodiment of the invention discloses a kind of smart machine, described smart machine comprises:
Mixed-media network modules mixed-media and master control borad;
Wherein, described mixed-media network modules mixed-media, for the upgrade file being directed to application program in described master control borad is downloaded to self storage area, and according to downloaded upgrade file, sends the software upgrade instruction for application program in described master control borad to described master control borad;
Described master control borad, for receiving described software upgrade instruction, and according to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad.
As seen from the above, in the scheme that the embodiment of the present invention provides, to when in master control borad, application program is upgraded, after the upgrade file of the application program for master control borad is downloaded to himself storage area by mixed-media network modules mixed-media from server, the software upgrade instruction for application program in master control borad is sent to master control borad, after master control borad receives this instruction, download from mixed-media network modules mixed-media in the storage area that in upgrade file to master control borad, application program is corresponding according to this instruction, and then realize the upgrading to application program in master control borad.As seen from the above, the upgrade file of the application program for master control borad obtained from server is stored in the storage area of mixed-media network modules mixed-media, but not be stored in the storage area of master control borad, so, even if the storage resources of master control borad is limited, when cannot reserve the buffer area for storing upgrade file, still can by the upgrading of storage space realization to the application program in master control borad of mixed-media network modules mixed-media.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The first schematic flow sheet of the method for upgrading software that Fig. 1 provides for the embodiment of the present invention;
The second schematic flow sheet of the method for upgrading software that Fig. 2 provides for the embodiment of the present invention;
The third schematic flow sheet of the method for upgrading software that Fig. 3 provides for the embodiment of the present invention;
The master control board state change schematic diagram that Fig. 4 provides for the embodiment of the present invention;
The first structural representation of the software updating apparatus that Fig. 5 provides for the embodiment of the present invention;
The second structural representation of the software updating apparatus that Fig. 6 provides for the embodiment of the present invention;
The third structural representation of the software updating apparatus that Fig. 7 provides for the embodiment of the present invention;
The structural representation of a kind of smart machine that Fig. 8 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The first schematic flow sheet of the method for upgrading software that Fig. 1 provides for the embodiment of the present invention, the method is applied to the master control borad in smart machine, and wherein, smart machine at least comprises: master control borad and mixed-media network modules mixed-media, and above-mentioned method for upgrading software comprises:
S101: receive the software upgrade instruction being directed to application program in master control borad that mixed-media network modules mixed-media sends.
Wherein, above-mentioned software upgrade instruction for: mixed-media network modules mixed-media sends after the upgrade file of the application program being directed to master control borad being downloaded to self storage area from server.
In the optional implementation of one of the present invention, after server obtains the upgrade file for the application program of master control borad, by to mixed-media network modules mixed-media send for the notification message of upgrade file mode informing network module its obtain upgrade file, wherein, the download address of the upgrade file of the application program for master control borad can be comprised in above-mentioned notification message, mixed-media network modules mixed-media downloads upgrade file to himself storage area according to this download address from server, the software upgrade instruction for application program in master control borad is sent to master control borad after mixed-media network modules mixed-media completes upgrade file download.
In the optional implementation of another kind of the present invention, after server obtains the upgrade file for the application program of master control borad, initiatively do not send the notification message for upgrade file to master control borad, but by mixed-media network modules mixed-media according to the rule preset inquire server whether exist for master control borad with the upgrade file of application program, such as, start is also inquired after connected network, according to fixed time interval inquiry etc., after the feedback message obtained from server when mixed-media network modules mixed-media shows wherein there is the upgrade file for the application program of master control borad, this upgrade file is downloaded to the storage area of mixed-media network modules mixed-media self from server, and the software upgrade instruction for application program in master control borad is sent to master control borad after completing file download.
In practical application, the file download that mixed-media network modules mixed-media can be sent by the mode of detection End of File Label, detection server completes the mode of mark, the mode checking institute's download file size etc. and determines whether upgrade file has been downloaded.After file download completes, can also first verify downloaded file, verification learns that downloaded file is not deposited in case of transmission errors, then sends the software upgrade instruction for application program in master control borad to master control borad.
Those skilled in the art's easy understand; smart machine can pass through OTA (Over-The-Air usually; over the air) download upgrade file and carry out document upgrading; a buffer area can be reserved in the storage area of mixed-media network modules mixed-media, for information such as the upgrade files that storage networking module is downloaded from server by OTA in such practical application.Wherein, in above-mentioned reserved buffer area, not only can store the upgrade file for application program master control borad downloaded from server, the upgrade file for application program mixed-media network modules mixed-media downloaded from server can also be stored.
Can comprise the check code of upgrade file, the size of upgrade file etc. in above-mentioned software upgrade instruction, the application does not limit this.
In a kind of specific implementation, mixed-media network modules mixed-media can send software upgrade instruction by WCMD_SET_OTA_IMAGE_INFO order to master control borad, informs that master control borad can start to carry out software upgrading.
S102: according to software upgrade instruction, downloads the storage area that in upgrade file to master control borad, application program is corresponding from mixed-media network modules mixed-media, and then realizes the upgrading to the application program in master control borad.
With prior art, after master control borad receives software upgrade instruction, download for the upgrade file of application program master control borad buffer area reserved to its storage area from server, and it is after the download is complete that the mode of storage area corresponding for application program in downloaded file copy to master control borad is different, in the embodiment of the present invention, mixed-media network modules mixed-media first downloads upgrade file for application program in master control borad in the storage area of mixed-media network modules mixed-media from server, after download completes, master control borad directly downloads the storage area that in above-mentioned upgrade file to master control borad, application program is corresponding from mixed-media network modules mixed-media.
Understandable, the work carried out needed for each stage of master control borad is different, and master control borad can correspond to different states, and concrete, the state of master control borad can be divided into: be designated S r" request upgrading " state, be designated S i" upgrading " state and be designated S n" normally run " state etc.Based on this, in a kind of specific implementation of the present invention, see Fig. 2, provide the second schematic flow sheet of method for upgrading software, in this specific implementation, above-mentioned S102 comprises:
S102A: according to software upgrade instruction, the status indicator upgrading master control borad is the mark of " upgrading " state.
Status indicator by master control borad is updated to S i.
Concrete, master control borad can after receiving WCMD_SET_OTA_IMAGE_INFO order, and upgrading its status indicator is S i.
S102B: by restarting the mode of master control borad, call the start-up routine in master control borad.
Except existing except application program in master control borad, can also there is start-up routine, wherein, start-up routine is the program for loading the application program in master control borad.
S102C: detect that the status indicator of master control borad is S receiving start-up routine itime the trigger for download signal that sends after, send file download instructions to mixed-media network modules mixed-media.
S102D: receive the upgrade file that mixed-media network modules mixed-media feeds back according to file download instructions, and fed back file is stored to storage area corresponding to application program in master control borad, and then realize the upgrading to the application program in master control borad.
In a kind of specific implementation, can by the upgrade file of WCMD_GET_OTA_INFO order from serial ports packet-by-packet download network module feedback.
Optionally, when software upgrade instruction comprises the proof test value of upgrade file, according to software upgrade instruction, the storage area that in upgrade file to master control borad, application program is corresponding is downloaded from mixed-media network modules mixed-media, and then when realizing upgrading to the application program in master control borad, can according to software upgrade instruction, the storage area that in upgrade file to master control borad, application program is corresponding is downloaded from mixed-media network modules mixed-media, simultaneously in the process downloading upgrade file, detect and whether complete file download, if downloaded file download, according to the proof test value of the upgrade file that software upgrade instruction comprises, downloaded file is verified, if verification succeeds, then determine to have realized the upgrading to the application program in master control borad.
The proof test value of above-mentioned upgrade file can be the MD5 value, SHA1 value etc. of upgrade file, and the application does not limit this.
Concrete, when also comprising the size of upgrade file in software upgrade instruction, download in the process of upgrade file, when whether detection has completed file download, the mode that whether can be more than or equal to the size of upgrade file by the size detecting institute's download file detects whether complete file download, if be more than or equal to the size of upgrade file, then judges to complete file download, otherwise, can judge not complete file download or file download failure.
Understandable, after completing the upgrading to application program in master control borad, master control borad can terminate software upgrading, enters normal operating condition, then, in the optional implementation of one of the present invention, above-mentioned method for upgrading software can also comprise:
After successfully upgrading to the application program in master control borad, the status indicator upgrading master control borad is S n, and by restarting the mode of master control borad, the state of master control borad is switched to " normally running " state by " upgrading " state.
In addition, master control borad is downloaded in the process of upgrade file from mixed-media network modules mixed-media, and mixed-media network modules mixed-media is correct in order to ensure the data provided to master control borad, can adopt a series of measures to keep data stabilization in its respective memory regions.
Concrete, in the better implementation of one of the present invention, above-mentioned method for upgrading software can also comprise:
Master control borad from mixed-media network modules mixed-media after download file, it is lock-out state that mixed-media network modules mixed-media arranges upgrade file, after master control borad completes file download, download information to mixed-media network modules mixed-media feedback file, remove the lock-out state of upgrade file with the mixed-media network modules mixed-media made.In a kind of specific implementation, master control borad can download information by WCMD_NOTIFY_OTA_RESULT order to mixed-media network modules mixed-media feedback file.
Wherein, upgrade file is in the lock state, and can be understood as that upgrade file does not allow to be modified, mixed-media network modules mixed-media do not allow to for storage area written information storing upgrade file etc.
As seen from the above, in the scheme that the present embodiment provides, to when in master control borad, application program is upgraded, after the upgrade file of the application program for master control borad is downloaded to himself storage area by mixed-media network modules mixed-media from server, the software upgrade instruction for application program in master control borad is sent to master control borad, after master control borad receives this instruction, download from mixed-media network modules mixed-media in the storage area that in upgrade file to master control borad, application program is corresponding according to this instruction, and then realize the upgrading to application program in master control borad.As seen from the above, the upgrade file of the application program for master control borad obtained from server is stored in the storage area of mixed-media network modules mixed-media, but not be stored in the storage area of master control borad, so, even if the storage resources of master control borad is limited, when cannot reserve the buffer area for storing upgrade file, still can by the upgrading of storage space realization to the application program in master control borad of mixed-media network modules mixed-media.
In another kind of specific implementation of the present invention, see Fig. 3, provide the third schematic flow sheet of method for upgrading software, compared with previous embodiment, in the present embodiment, also comprise:
S103: receive abnormality process request.
In practical application, abnormality process request can be the process request for any one abnormality following:
After receiving software upgrade instruction, the state upgrading master control borad is S itime failure;
After successfully upgrading to the application program in master control borad, the status indicator upgrading master control borad is S ntime failure;
Upgrade file failure is downloaded from mixed-media network modules mixed-media, etc.
It should be noted that, the application is just described for above-mentioned, and in practical application, the concrete condition of abnormality is not limited in above-mentioned several.
S104: the status indicator upgrading master control borad is S r, and restart master control borad.
In the better implementation of one of the present invention, can also by restarting the mode of master control borad, the start-up routine called in master control borad sends the current state mark of master control borad to mixed-media network modules mixed-media, receive mixed-media network modules mixed-media and detect that the current state of master control borad is designated S rwhen the software upgrade instruction that sends, and return after S102 downloads upgrade file from mixed-media network modules mixed-media, perform S103 and software upgrading is carried out to application program in master control borad.
In practical application, when restarting master control borad, can restart mixed-media network modules mixed-media, can also restart mixed-media network modules mixed-media, the application does not limit this simultaneously.In addition, the current state mark that master control borad sends master control borad to mixed-media network modules mixed-media can be passive transmission, also can be initiatively send.
Such as, in a kind of situation, after mixed-media network modules mixed-media detects that master control borad is restarted, send status request instruction to master control borad, after master control borad receives this status request instruction, obtain its current state and identify and send to mixed-media network modules mixed-media.
In another kind of situation, when restarting master control borad, master control borad obtains its current state mark, and initiatively obtained status indicator is sent to mixed-media network modules mixed-media.
As seen from the above, present embodiments provide exception handling, during to make to occur abnormality in document upgrading process, document upgrading can be proceeded according to exception handling, effectively prevent the software upgrading failure brought due to abnormality.
Below by a specific embodiment, the transformational relation between the various states of master control borad is described.
See Fig. 4, provide master control board state change schematic diagram.
Wherein, the State Transferring that label " 1 " is corresponding is: master control borad is " upgrading " state by " normally running " State Transferring, after master control borad receives software upgrade instruction, the mode of being restarted by master control borad is " upgrading " state by " normally running " State Transferring;
The State Transferring that label " 2 " is corresponding is: master control borad is " normally running " state by " upgrading " State Transferring, success is to after in master control borad, application program is upgraded, and the state of master control borad is " upgrading " state by " upgrading " State Transferring by the mode of being restarted by master control borad;
The State Transferring that label " 3 " mod sum label " 4 " is corresponding is: master control borad is " request upgrading " state by " upgrading " State Transferring, wherein, the State Transferring that label " 3 " is corresponding is specially: successfully to after in master control borad, application program is upgraded, when changing master control board state mark, the abnormal conditions such as unexpected power down occur causes status indicator to change unsuccessfully, master control borad is " request upgrading " state by " upgrading " State Transferring, the State Transferring that label " 4 " is corresponding is specially: to when in master control borad, application program is upgraded, there is master control borad and receive the failure of upgrade file packet, the upgrade file downloaded verify unsuccessfully etc. abnormal conditions time, master control borad is " request upgrading " state by " upgrading " State Transferring,
The State Transferring that label " 5 " is corresponding is: master control borad is " upgrading " state by " request upgrading " State Transferring, after master control borad receives software upgrade instruction under " request upgrading " state, the mode master control board state of being restarted by master control borad is " upgrading " state by " request upgrading " State Transferring;
The State Transferring that label " 6 " is corresponding is: master control borad is " request upgrading " state by " normally running " State Transferring, after master control borad receives software upgrade instruction under " normally running " state, when changing master control board state mark, the abnormal conditions such as unexpected power down occur causes status indicator to change unsuccessfully, and master control borad is " request upgrading " state by " normally running " State Transferring.
Corresponding with above-mentioned method for upgrading software, the embodiment of the present invention additionally provides a kind of software updating apparatus.
The first structural representation of the software updating apparatus that Fig. 5 provides for the embodiment of the present invention, the master control borad of this application of installation in smart machine, wherein, described smart machine at least comprises: master control borad and mixed-media network modules mixed-media, and described device comprises:
Software upgrade instruction receiving element 501, for receiving the software upgrade instruction being directed to application program in described master control borad that described mixed-media network modules mixed-media sends, wherein, described software upgrade instruction for: described mixed-media network modules mixed-media sends after the upgrade file of the application program being directed to described master control borad being downloaded to self storage area from server;
Upgrade file download unit 502, for according to described software upgrade instruction, downloads the storage area that in described upgrade file to described master control borad, application program is corresponding from described mixed-media network modules mixed-media, and then realizes the upgrading to the application program in described master control borad.
In a kind of specific implementation of the present invention, see Fig. 6, provide the second structural representation of software updating apparatus, compared with previous embodiment, in the present embodiment, described upgrade file download unit 702, comprising:
Status indicator upgrades subelement 5021, and for according to described software upgrade instruction, the status indicator upgrading described master control borad is the mark of " upgrading " state, and wherein, the state demarcation of described master control borad is: be designated S r" request upgrading " state, be designated S i" upgrading " state and be designated S n" normally run " state;
Start-up routine calls subelement 5022, for the mode by restarting described master control borad, calls the start-up routine in described master control borad, and wherein, described start-up routine is the program for loading the application program in described master control borad;
File download instructions sends subelement 5023, for detecting that the status indicator of described master control borad is S receiving described start-up routine itime the trigger for download signal that sends after, send file download instructions to described mixed-media network modules mixed-media;
Upgrade file receives and storing sub-units 5024, for receiving the described upgrade file that described mixed-media network modules mixed-media feeds back according to described file download instructions, and fed back file is stored to the storage area that in described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad.
Concrete, described software updating apparatus can also comprise:
Status toggle unit, after successfully upgrading to the application program in described master control borad, the status indicator upgrading described master control borad is S n, and by restarting the mode of described master control borad, the state of described master control borad is switched to " normally running " state by " upgrading " state.
Concrete, can comprise in described software upgrade instruction: the proof test value of described upgrade file;
Described upgrade file download unit 502 can comprise:
Subelements under upgrade file, for according to described software upgrade instruction, downloads the storage area that in described upgrade file to described master control borad, application program is corresponding from described mixed-media network modules mixed-media;
File download detection sub-unit, in the process downloading described upgrade file, detects whether complete file download;
File verification subelement, for when the testing result of described file download detection sub-unit is for being, according to the proof test value of the described upgrade file that described software upgrade instruction comprises, verifies downloaded file;
Subelement is determined in upgrading, for when described file verification subelement verification succeeds, determines to realize the upgrading to the application program in described master control borad.
Further, can also comprise in described software upgrade instruction: the size of described upgrade file;
Described file download detection sub-unit, specifically in the process downloading described upgrade file, whether the size detecting institute's download file is more than or equal to the size of described upgrade file, if yes, then judges to have completed file download.
Concrete, described software updating apparatus can also comprise:
File download message feedback unit, for after completing file download, information has been downloaded to described mixed-media network modules mixed-media feedback file, the lock-out state of described upgrade file is removed with the described mixed-media network modules mixed-media made, wherein, described master control borad from described mixed-media network modules mixed-media after download file, it is lock-out state that described mixed-media network modules mixed-media arranges described upgrade file.
As seen from the above, in the scheme that the present embodiment provides, to when in master control borad, application program is upgraded, after the upgrade file of the application program for master control borad is downloaded to himself storage area by mixed-media network modules mixed-media from server, the software upgrade instruction for application program in master control borad is sent to master control borad, after master control borad receives this instruction, download from mixed-media network modules mixed-media in the storage area that in upgrade file to master control borad, application program is corresponding according to this instruction, and then realize the upgrading to application program in master control borad.As seen from the above, the upgrade file of the application program for master control borad obtained from server is stored in the storage area of mixed-media network modules mixed-media, but not be stored in the storage area of master control borad, so, even if the storage resources of master control borad is limited, when cannot reserve the buffer area for storing upgrade file, still can by the upgrading of storage space realization to the application program in master control borad of mixed-media network modules mixed-media.
In another kind of specific implementation of the present invention, see Fig. 7, provide the third structural representation of software updating apparatus, compared with previous embodiment, in the present embodiment, above-mentioned software updating apparatus also comprises:
Process request reception unit 503, for receiving abnormality process request;
Status indicator updating block 504 is S for upgrading the status indicator of described master control borad r, and restart described master control borad.
Concrete, described abnormality process request can be the process request for any one abnormality following:
After receiving described software upgrade instruction, the state upgrading described master control borad is S itime failure;
After successfully upgrading to the application program in described master control borad, the status indicator upgrading described master control borad is S ntime failure;
The failure of described upgrade file is downloaded from described mixed-media network modules mixed-media.
Concrete, described software updating apparatus can also comprise:
Status indicator transmitting element, for the mode by restarting described master control borad, the start-up routine called in described master control borad sends the current state mark of described master control borad to described mixed-media network modules mixed-media;
For receiving described mixed-media network modules mixed-media, described software upgrade instruction receiving element, also detects that the current state of described master control borad is designated S rwhen the described software upgrade instruction that sends, and trigger described upgrade file download unit and download upgrade file.
As seen from the above, present embodiments provide exception handling, during to make to occur abnormality in document upgrading process, document upgrading can be proceeded according to exception handling, effectively prevent the software upgrading failure brought due to abnormality.
Corresponding with aforesaid method for upgrading software, software updating apparatus, the embodiment of the present invention additionally provides a kind of smart machine.
The structural representation of a kind of smart machine that Fig. 8 provides for the embodiment of the present invention, this smart machine comprises:
Mixed-media network modules mixed-media 801 and master control borad 802.
Wherein, mixed-media network modules mixed-media 801, for the upgrade file being directed to application program in described master control borad is downloaded to self storage area, and according to downloaded upgrade file, sends the software upgrade instruction for application program in described master control borad to described master control borad;
Master control borad 802, for receiving described software upgrade instruction, and according to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad.
Certainly, mixed-media network modules mixed-media and master control borad can also have other function, specifically see Fig. 1-embodiment illustrated in fig. 7, can repeat no more here.
As seen from the above, in the scheme that the present embodiment provides, to when in master control borad, application program is upgraded, after the upgrade file of the application program for master control borad is downloaded to himself storage area by mixed-media network modules mixed-media from server, the software upgrade instruction for application program in master control borad is sent to master control borad, after master control borad receives this instruction, download from mixed-media network modules mixed-media in the storage area that in upgrade file to master control borad, application program is corresponding according to this instruction, and then realize the upgrading to application program in master control borad.As seen from the above, the upgrade file of the application program for master control borad obtained from server is stored in the storage area of mixed-media network modules mixed-media, but not be stored in the storage area of master control borad, so, even if the storage resources of master control borad is limited, when cannot reserve the buffer area for storing upgrade file, still can by the upgrading of storage space realization to the application program in master control borad of mixed-media network modules mixed-media.
For device, smart machine embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
One of ordinary skill in the art will appreciate that all or part of step realized in said method embodiment is that the hardware that can carry out instruction relevant by program has come, described program can be stored in computer read/write memory medium, here the alleged storage medium obtained, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. a method for upgrading software, is characterized in that, is applied to the master control borad in smart machine, and wherein, described smart machine at least comprises: master control borad and mixed-media network modules mixed-media, and described method comprises:
Receive the software upgrade instruction being directed to application program in described master control borad that described mixed-media network modules mixed-media sends, wherein, described software upgrade instruction for: described mixed-media network modules mixed-media sends after the upgrade file being directed to application program in described master control borad being downloaded to self storage area from server;
According to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad.
2. method according to claim 1, it is characterized in that, described according to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding, and then the upgrading realized the application program in described master control borad, comprising:
According to described software upgrade instruction, the status indicator upgrading described master control borad is the mark of " upgrading " state, and wherein, the state demarcation of described master control borad is: be designated S r" request upgrading " state, be designated S i" upgrading " state and be designated S n" normally run " state;
By restarting the mode of described master control borad, call the start-up routine in described master control borad, wherein, described start-up routine is the program for loading the application program in described master control borad;
Detect that the status indicator of described master control borad is S receiving described start-up routine itime the trigger for download signal that sends after, send file download instructions to described mixed-media network modules mixed-media;
Receive the described upgrade file that described mixed-media network modules mixed-media feeds back according to described file download instructions, and fed back file is stored to the storage area that in described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad.
3. method according to claim 2, is characterized in that, described method also comprises:
After successfully upgrading to the application program in described master control borad, the status indicator upgrading described master control borad is S n, and by restarting the mode of described master control borad, the state of described master control borad is switched to " normally running " state by " upgrading " state.
4. method according to claim 2, is characterized in that, described method also comprises:
Receive abnormality process request;
The status indicator upgrading described master control borad is S r, and restart described master control borad.
5. method according to claim 4, is characterized in that, described abnormality process request is the process request for any one abnormality following:
After receiving described software upgrade instruction, the state upgrading described master control borad is S itime failure;
After successfully upgrading to the application program in described master control borad, the status indicator upgrading described master control borad is S ntime failure;
The failure of described upgrade file is downloaded from described mixed-media network modules mixed-media.
6. the method according to claim 4 or 5, is characterized in that, described method also comprises:
By restarting the mode of described master control borad, the start-up routine called in described master control borad sends the current state mark of described master control borad to described mixed-media network modules mixed-media;
Receive described mixed-media network modules mixed-media and detect that the current state of described master control borad is designated S rwhen the described software upgrade instruction that sends, and return described according to described software upgrade instruction, from described mixed-media network modules mixed-media, download the step of described upgrade file.
7. method according to claim 1, is characterized in that, described software upgrade instruction comprises: the proof test value of described upgrade file;
Described according to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad, comprising:
According to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding;
In the process downloading described upgrade file, detect whether complete file download;
If downloaded, according to the proof test value of the described upgrade file that described software upgrade instruction comprises, downloaded file is verified;
If verification succeeds, then determine to have realized the upgrading to the application program in described master control borad.
8. method according to claim 7, is characterized in that, also comprises in described software upgrade instruction: the size of described upgrade file;
In the described process downloading described upgrade file, detecting whether complete file download, comprising:
In the process downloading described upgrade file, whether the size detecting institute's download file is more than or equal to the size of described upgrade file, if yes, then judges to have completed file download.
9. a software updating apparatus, is characterized in that, is applied to the master control borad in smart machine, and wherein, described smart machine at least comprises: master control borad and mixed-media network modules mixed-media, and described device comprises:
Software upgrade instruction receiving element, for receiving the software upgrade instruction being directed to application program in described master control borad that described mixed-media network modules mixed-media sends, wherein, described software upgrade instruction for: described mixed-media network modules mixed-media sends after the upgrade file being directed to application program in described master control borad being downloaded to self storage area from server;
Upgrade file download unit, for according to described software upgrade instruction, downloads the storage area that in described upgrade file to described master control borad, application program is corresponding from described mixed-media network modules mixed-media, and then realizes the upgrading to the application program in described master control borad.
10. a smart machine, is characterized in that, described smart machine comprises:
Mixed-media network modules mixed-media and master control borad;
Wherein, described mixed-media network modules mixed-media, for the upgrade file being directed to application program in described master control borad is downloaded to self storage area, and according to downloaded upgrade file, sends the software upgrade instruction for application program in described master control borad to described master control borad;
Described master control borad, for receiving described software upgrade instruction, and according to described software upgrade instruction, from described mixed-media network modules mixed-media, download the storage area that in described upgrade file to described master control borad, application program is corresponding, and then realize the upgrading to the application program in described master control borad.
CN201510535862.9A 2015-08-27 2015-08-27 Software upgrading method and apparatus and intelligent device Pending CN105045640A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510535862.9A CN105045640A (en) 2015-08-27 2015-08-27 Software upgrading method and apparatus and intelligent device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510535862.9A CN105045640A (en) 2015-08-27 2015-08-27 Software upgrading method and apparatus and intelligent device

Publications (1)

Publication Number Publication Date
CN105045640A true CN105045640A (en) 2015-11-11

Family

ID=54452204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510535862.9A Pending CN105045640A (en) 2015-08-27 2015-08-27 Software upgrading method and apparatus and intelligent device

Country Status (1)

Country Link
CN (1) CN105045640A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446770A (en) * 2015-11-13 2016-03-30 邦彦技术股份有限公司 Centralized storage method capable of saving memory chips and multi-functional module system
CN107203396A (en) * 2017-05-23 2017-09-26 中山市明阳电器有限公司 A kind of Industry Control plate and its update method by network online updating program
CN107423087A (en) * 2017-05-19 2017-12-01 北京有初科技有限公司 A kind of application program updating method that server can monitor
WO2018076755A1 (en) * 2016-10-25 2018-05-03 西安中兴新软件有限责任公司 Method and apparatus for issuing upgrade package
CN112181461A (en) * 2020-09-28 2021-01-05 珠海格力电器股份有限公司 Upgrading method, network module, equipment, server and upgrading system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719072A (en) * 2009-11-23 2010-06-02 青岛海信宽带多媒体技术有限公司 Embedded type terminal equipment software upgrading method and upgrading device
CN101742067A (en) * 2009-12-21 2010-06-16 康佳集团股份有限公司 Device and method for updating TV mainboard on line
CN101895671A (en) * 2010-07-21 2010-11-24 深圳创维数字技术股份有限公司 Set top box Loader module updating method and set top box thereof
CN201805489U (en) * 2009-12-30 2011-04-20 康佳集团股份有限公司 Television with capability of on-line upgrade
CN102075564A (en) * 2010-12-23 2011-05-25 李华嵩 Remote software upgrading technique
CN103488501A (en) * 2013-09-09 2014-01-01 青岛海信宽带多媒体技术有限公司 Optical network terminal equipment and system software upgrade method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719072A (en) * 2009-11-23 2010-06-02 青岛海信宽带多媒体技术有限公司 Embedded type terminal equipment software upgrading method and upgrading device
CN101742067A (en) * 2009-12-21 2010-06-16 康佳集团股份有限公司 Device and method for updating TV mainboard on line
CN201805489U (en) * 2009-12-30 2011-04-20 康佳集团股份有限公司 Television with capability of on-line upgrade
CN101895671A (en) * 2010-07-21 2010-11-24 深圳创维数字技术股份有限公司 Set top box Loader module updating method and set top box thereof
CN102075564A (en) * 2010-12-23 2011-05-25 李华嵩 Remote software upgrading technique
CN103488501A (en) * 2013-09-09 2014-01-01 青岛海信宽带多媒体技术有限公司 Optical network terminal equipment and system software upgrade method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446770A (en) * 2015-11-13 2016-03-30 邦彦技术股份有限公司 Centralized storage method capable of saving memory chips and multi-functional module system
WO2018076755A1 (en) * 2016-10-25 2018-05-03 西安中兴新软件有限责任公司 Method and apparatus for issuing upgrade package
CN107423087A (en) * 2017-05-19 2017-12-01 北京有初科技有限公司 A kind of application program updating method that server can monitor
CN107203396A (en) * 2017-05-23 2017-09-26 中山市明阳电器有限公司 A kind of Industry Control plate and its update method by network online updating program
CN112181461A (en) * 2020-09-28 2021-01-05 珠海格力电器股份有限公司 Upgrading method, network module, equipment, server and upgrading system

Similar Documents

Publication Publication Date Title
CN105045640A (en) Software upgrading method and apparatus and intelligent device
CN102830984B (en) Method, chip and the communication terminal that firmware updates
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
US20120117557A1 (en) Method and system for upgrading wireless data card
KR20140060912A (en) Method and apparatus for updating boot loader
CN107193612B (en) Version upgrading method and device for mobile terminal
CN102541596A (en) Operating system upgrading method and device
CN105045671B (en) The method for upgrading system and device of a kind of intelligent terminal
TW201621647A (en) Operating system updating method
CN106648781B (en) Method and system for upgrading remote firmware of communication equipment
CN105897461A (en) Multi-system OTA upgrading method and multi-system device
CN107783776B (en) Processing method and device of firmware upgrade package and electronic equipment
CN106708494B (en) JAR upgrading method and device
CN106210877A (en) The method for upgrading system of intelligent television and device
CN104918114A (en) Method and device for upgrading operation system
CN106886436B (en) Android system upgrading method and device
CN105095006A (en) Restoration method and device for aborted installation of software
CN105589718A (en) System updating method and updating apparatus for intelligent device
CN106528248B (en) Downloading method and system of mobile terminal based on software integrity
WO2017198156A1 (en) Service deployment method, apparatus and system
CN109558160A (en) Upgrade method, embedded system
US20080244558A1 (en) Content downloading in a radio communication network
US20210182398A1 (en) Package-based remote firmware update
CN107608698B (en) Command line tool updating method and device
CN110659052A (en) Method and system for updating system software in network equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20151111

RJ01 Rejection of invention patent application after publication