On-line software updating method and system
Technical field
The present invention relates to a kind of on-line software updating method and system, relate in particular to a kind of on-line software updating method and system of distribution process upgrade request.
Background technology
At present, the on-line software updating function is the prerequisite function of some equipment, IPTV (Internet Protocol Television for example, hereinafter to be referred as: IPTV) set-top box, after disposing, need often to revise software error wherein or increase software function, and the IPTV set-top box is deployed in the user family, and therefore enormous amount can only realize by the on-line software updating function.
When carrying out IPTV set-top box software online upgrading, require usually in the short as far as possible time, to allow all set-top box finish upgrading.The general mode that adopts based on traditional client/server framework of existing on-line software updating method, utilize TFTP (Trivial File Transfer Protocol, hereinafter to be referred as: TFTP), file transfer protocol (FTP) (File Transfer Protocol, hereinafter to be referred as: FTP) or HTML (Hypertext Markup Language) (Hyper Text Transfer Protocol, hereinafter to be referred as: HTTP), the equipment that makes obtains upgrade service from upgrade server.
As shown in Figure 1, be the schematic diagram of on-line software updating system in the prior art, comprise upgrade server 1 and equipment 2, wherein upgrade server 1 comprises upgrade data memory module 11 and upgrading control module 12; Upgrade data memory module 11 is communicated by letter with equipment 2, is used to preserve upgrading data packet; Upgrading control module 12 is connected with upgrade data memory module 11, and communicates by letter with equipment 2, is used for the process of Control Software online upgrading.
As shown in Figure 2, be the flow chart of on-line software updating method in the prior art, wherein carry out following steps:
Step 101, equipment obtain upgrade notification and relevant information by certain channel, and this relevant information comprises the address of the control module of upgrading, the version of upgrade software etc.;
Step 102, equipment are initiated upgrade request to the upgrading control module;
Step 103, upgrading control module announcement apparatus are from upgrade data memory module download and upgrade packet;
Step 104, device downloads upgrading data packet are finished escalation process.
Wherein in the step 102, when the upgrading control module receives a plurality of upgrade request, can handle a plurality of upgrade request of one of them upgrade request or concurrent processing, other upgrade request that do not obtain to handle will be lined up in a formation, after the upgrading control module is handled a upgrade request, will from this formation, take out not processed upgrade request and handle.
Above-mentioned upgrading data packet is generally a bigger file, download needs the regular hour, and the quantity that needs the equipment of upgrading may reach 100,000,1,000,000 even the higher order of magnitude, a large amount of upgrade request can be sent in a short period of time, and the separate unit upgrade server obviously can't satisfy the requirement of response time.Therefore, in actual networking, generally need to dispose many image upgrade servers, solve the problem of large concurrent by the mode of load sharing.In management, need give different upgrade servers with devices allocation to be upgraded according to certain rule, upgrade server can redirect to upgrade request the idle relatively upgrade server of another one when the upgrade request of finding queuing exceeds threshold value simultaneously.This method that prior art provides can improve the concurrent processing ability to upgrade request, shortens the response time of upgrade request.
In the above-mentioned prior art on-line software updating method and system deployment a large amount of image upgrade servers, equal proportion increases the quantity of image upgrade server along with the increase of number of devices, and equipment does not need the process of frequent executive software online upgrading, might in long time, just carry out once upgrading, therefore, when equipment does not need to upgrade, a large amount of upgrade servers are in idle state, cause cost to increase, inefficiency easily causes the waste of resource.
Summary of the invention
The object of the present invention is to provide a kind of on-line software updating method and system, in order to realize the quantity of minimizing upgrade server, improve the service efficiency of upgrade server, reduce the possibility of upgrading failure, the assurance large number quipments is finished upgrading at short notice.
The invention provides a kind of on-line software updating method, comprising:
Step 1, first equipment are initiated upgrade request to the upgrading control module;
Step 2, described upgrading control module judge whether and need provide upgrading data packet by the upgrade data memory module, if then execution in step 3; Otherwise, execution in step 5;
Step 3, described upgrading control module are to the notification message of first equipment transmission from described upgrade data memory module download and upgrade packet, execution in step 4;
Step 4, first equipment are from upgrade data memory module download and upgrade packet;
Step 5, upgrading control module are to the notification message of first equipment transmission from the second device downloads upgrading data packet, execution in step 6;
Step 6, first equipment are from the second device downloads upgrading data packet.
The invention provides a kind of on-line software updating system, comprise: first equipment, second equipment and upgrade server, upgrade server comprises upgrading control module and upgrade data memory module, wherein first equipment communicates to connect with second equipment, upgrading control module and upgrade data memory module respectively, and upgrading control module and upgrade data memory module communicate to connect;
Described first equipment comprises:
First sending module is used for sending the notification message of upgrade request/preserved upgrading data packet/deleted the notification message of upgrading data packet to the upgrading control module;
First receiver module is used to receive the notification message that the upgrading control module sends;
Download module is used for from the upgrade data memory module or the second device downloads upgrading data packet;
Described upgrading control module comprises:
Judge module is connected with first sending module, and being used to judge whether to provide upgrading data packet by the upgrade data memory module;
Second sending module is connected with first receiver module with judge module, is used for to the first equipment dispatch order message;
Described upgrade data memory module comprises:
First memory module is used to store upgrading data packet;
First interface module is connected with download module with first memory module, is used to export upgrading data packet;
Described second equipment comprises:
Second memory module is used to store upgrading data packet;
Second interface module is connected with download module with second memory module, is used to export upgrading data packet.
On-line software updating method provided by the invention and system, judge whether and to provide upgrading data packet by the upgrade data memory module by upgrading control module by upgrade server, if then notify first equipment from upgrade data memory module download and upgrade packet; If not, then notify first equipment from the second equipment download and upgrade packet, these method and system have changed the mode that is focused on upgrade request by upgrade server, the upgrade request processing is distributed on the equipment, reduced the quantity of upgrade server, improved the service efficiency of upgrade server, reduced the possibility of upgrading failure, the assurance large number quipments is finished upgrading at short notice.
Description of drawings
Fig. 1 is the schematic diagram of on-line software updating system in the prior art;
Fig. 2 is the flow chart of on-line software updating method in the prior art;
Fig. 3 is the flow chart of on-line software updating method embodiment one of the present invention;
Fig. 4 is the flow chart of on-line software updating method embodiment two of the present invention;
Fig. 5 is the schematic diagram of on-line software updating system embodiment of the present invention.
Embodiment
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Upgrade server comprises upgrading control module and upgrade data memory module among the embodiment of on-line software updating method of the present invention, and first equipment need be upgraded to the software of self.
As shown in Figure 3, the flow chart for on-line software updating method embodiment one of the present invention specifically comprises the steps:
Step 201, first equipment are initiated upgrade request to the upgrading control module;
Step 202, upgrading control module judge whether and need provide upgrading data packet by the upgrade data memory module, if then execution in step 203; Otherwise, execution in step 205;
Step 203, upgrading control module notify first equipment from upgrade data memory module download and upgrade packet, execution in step 204 to the first equipment dispatch order message;
Step 204, first equipment are from upgrade data memory module download and upgrade packet;
Step 205, upgrading control module notify first equipment from the second device downloads upgrading data packet, execution in step 206 to the first equipment dispatch order message;
Step 206, first equipment are from the second device downloads upgrading data packet.
Present embodiment judges whether and need provide upgrading data packet by the upgrade data memory module by the upgrading control module by upgrade server, if then notify first equipment from upgrade data memory module download and upgrade packet; If not, then notify first equipment from the second device downloads upgrading data packet, changed the mode that focuses on upgrade request by upgrade server, the upgrade request processing is distributed on the equipment, reduced the quantity of upgrade server, improved the service efficiency of upgrade server, reduced the possibility of upgrading failure, the assurance large number quipments is finished upgrading at short notice.
As shown in Figure 4, the flow chart for on-line software updating method embodiment two of the present invention specifically comprises the steps:
Step 301, first equipment receive notification message and the related news that need upgrading, and these related news can be the address of upgrading control module and/or the information such as version of upgrade software;
Step 302, first equipment are initiated upgrade request to the upgrading control module;
Step 303, upgrading control module judge whether and need provide upgrading data packet by the upgrade data memory module, if then execution in step 304; Otherwise, execution in step 306;
Step 304, upgrading control module notify first equipment from upgrade data memory module download and upgrade packet, execution in step 305 to the first equipment dispatch order message;
Step 305, first equipment are from upgrade data memory module download and upgrade packet;
Second equipment that the upgrading data packet download service is provided is therefrom selected in step 306, the tabulation of upgrading control module query facility; List of devices is stored in the upgrading control module in advance, records the equipment that the upgrading data packet download service can be provided in this list of devices, comprising second equipment, and execution in step 307;
Step 307, upgrading control module notify first equipment from the second device downloads upgrading data packet, execution in step 308 to the first equipment dispatch order message;
Step 308, first equipment are from the second device downloads upgrading data packet.
Further, when first device downloads after upgrading data packet, promptly after step 305 or step 308, can also may further comprise the steps:
Step 309, first equipment are kept at local storage with upgrading data packet, and have preserved the notification message of this upgrading data packet to the transmission of upgrading control module, represent that oneself can provide the upgrading data packet download service for other equipment;
Step 310, upgrading control module are added first equipment in the list of devices to;
Step 311, after after a while, the first unit deletion upgrading data packet, and send to the upgrading control module and to have deleted the notification message of upgrading data packet represents that oneself no longer provides the upgrading data packet download service for other equipment;
Step 312, upgrading control module are with deletion in the tabulation of the first equipment slave unit.
Present embodiment judges whether and need provide upgrading data packet by the upgrade data memory module by the upgrading control module by upgrade server, if then notify first equipment from upgrade data memory module download and upgrade packet; If not, then notify first equipment from the second device downloads upgrading data packet, changed the mode that focuses on upgrade request by upgrade server, the upgrade request processing is distributed on the equipment, reduced the quantity of upgrade server, improved the service efficiency of upgrade server, reduced the possibility of upgrading failure, the assurance large number quipments is finished upgrading at short notice; Further, when first device downloads after upgrading data packet, can notify the upgrading control module, then it is added in the list of devices by the upgrading control module, make the equipment of winning have the ability of upgrade request sent and processing upgrade request simultaneously, improved the upgrading efficient of software in the equipment greatly.
As shown in Figure 5, schematic diagram for on-line software updating of the present invention system, comprise first equipment 3, second equipment 4 and upgrade server 7, upgrade server 7 comprises upgrading control module 5 and upgrade data memory module 6, wherein first equipment 3 communicates to connect with second equipment 4, upgrading control module 5 and upgrade data memory module 6 respectively, and upgrading control module 5 communicates to connect with upgrade data memory module 6.
First equipment 3 comprises: first sending module 31 is used for sending the notification message of upgrade request/preserved upgrading data packet/deleted the notification message of upgrading data packet to upgrading control module 5; First receiver module 32 is used to receive the notification message that upgrading control module 5 sends; Download module 33 is used for from upgrade data memory module 6 or second equipment, 4 download and upgrade packets.
Upgrading control module 5 comprises: judge module 51, be connected with first sending module 31, and being used to judge whether to provide upgrading data packet by the upgrade data memory module; Second sending module 52 is connected with first receiver module 32 with judge module 51, is used for sending a notification message to first equipment 3.
Upgrade data memory module 6 comprises: first memory module 61 is used to store upgrading data packet; First interface module 62 is connected with download module 33 with first memory module 61, is used to export upgrading data packet.
Second equipment 4 comprises: second memory module 41 is used to store upgrading data packet; Second interface module 42 is connected with download module 33 with second memory module 41, is used to export upgrading data packet.
The upgrading control module can also comprise: inquiry/selection module 53, be connected with second sending module 52 with judge module 51, and be used for the query facility tabulation, therefrom select second equipment that the upgrading data packet download service is provided; Add module 54, be connected, be used for adding first equipment 3 to described list of devices with first sending module 31; Removing module 55 is connected with first sending module 31, is used for first equipment, 3 deletions with list of devices.
Present embodiment is by being judged whether and need be provided upgrading data packet by upgrade data memory module 6 by the judge module 51 in the upgrading control module 5, second interface module 42 in second equipment 4 is used for to first equipment, 3 output upgrading data packet, changed the mode that focuses on (comprising upgrading control module 5 and upgrade data memory module 6) upgrade request by upgrade server, the upgrade request processing is distributed on the equipment, reduced the quantity of upgrade server, improved the service efficiency of upgrade server, reduced the possibility of upgrading failure, the assurance large number quipments is finished upgrading at short notice; Further, after first equipment 3 downloads to upgrading data packet, first sending module 31 can be notified upgrading control module 5, interpolation module 54 by upgrading control module 5 is added it in list of devices to, make the equipment of winning 3 have the ability of upgrade request sent and processing upgrade request simultaneously, improved the upgrading efficient of software in the equipment greatly.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.