Background technology
The software download technology is a kind of mode of application software online upgrading in the apparatus of digital television receiving, it can guarantee that apparatus of digital television receiving in time upgrades old application software, revise the problem that system program exists, increase new function, make application software more perfect, provide more service to the user.Existing software download process all is the image file of system program at server end (code stream Play Server), control information, be packaged into motion picture expert group (Motion Picture Experts Group-2 together, abbreviation MPEG-2) data flow, adopt the mode of data broadcasting, by playing card data playback is gone out, be input in the multiplexer, after passing through modulators modulate again, transmit by wired network, at the apparatus of digital television receiving end, after apparatus of digital television receiving receives data flow, by demodulation, the demultiplexing program, obtain the image file of system program, replace the old Image Data that are stored in scratch pad memory again, finish the renewal of system program.
Existing software download technology does not have unified standard for data download stream, there are own special-purpose software download program and server end data stream generator in different apparatus of digital television receiving factory commercial cities, only the data flow that oneself generates is received, therefore, have no idea to receive the data downloaded stream of other production firm.
The data flow of software download is transmitted by the mode of data broadcasting, the network of transmission is a unilateral network, there is not return path, whether receiving equipment (apparatus of digital television receiving) not being received data confirms to reply, because the system program data of downloading are divided into different data segments, under in different bags, broadcasting, therefore, the integrality of data can't guarantee, and, the system program of downloading carries out software upgrading (relevant with hardware device) to the apparatus of digital television receiving of appointment, to apparatus of digital television receiving, guarantees that the data that receive are to carry out the designed system program at its hardware device.
Existing software download is a free services, in order to guarantee benefits of operators, can carry out scrambling to data downloaded stream, like this, the software download service is the service of an authority to purchase (AP) with to look audio service the same, after having only this service of purchase, at receiving terminal, apparatus of digital television receiving just can carry out descrambling to the data of scrambling, could realize the upgrading of software.
In addition, in the prior art, apparatus of digital television receiving is in software upgrade process, and accident power-off causes upgrading under the situation of failure, can't realize breakpoint transmission.Just after start, can't on original position, carry out the upgrading of software.
Summary of the invention
Main purpose of the present invention is to provide the method for downloading software in a kind of digital television broadcasting, and data flow is controlled (Digital storage Media Command ﹠amp with the stored digital media; Control, abbreviation DSMCC) double-layer structure encapsulates packing, formation meets the transport stream of MPEG-2, utilize the mode of data carousel to send, at the apparatus of digital television receiving end, the reception program of having only software download is filtered the data flow of DSMCC encapsulation according to the DSMCC standard, just can carry out the online upgrading of software.
Another purpose of the present invention is to provide the method for downloading software in a kind of digital television broadcasting, it has carried out digital signature identification to data downloaded stream, guarantee on the one hand the integrality of the system program downloaded, prevent that data transport stream packets in the process of transmission from losing in transmission course; Guaranteeing the source of data download on the other hand, is the upgrading of the application software of the receiving equipment (apparatus of digital television receiving) at appointment.
A further object of the present invention is to provide the method for downloading software in a kind of digital television broadcasting, and it can carry out breakpoint transmission efficiently and accurately for the improper interruption that occurs in downloading process, improves speed of download.
The objective of the invention is to be achieved through the following technical solutions:
Method for downloading software in a kind of digital television broadcasting, which comprises at least and start the software download program, the memory that reads in the receiving equipment is downloaded flag data, judge whether to need to carry out action, wherein in the regulation of server end according to standard, data flow is encapsulated packing with the DSMCC double-layer structure, with software download service description information and Program Association Table (Program Association Table, be called for short PAT), program map table (Program Map Table, abbreviation PMT) the common transport stream that meets MPEG-2 that forms of map information descriptor, utilize the mode of data carousel to send, at the receiving equipment end, the reception program of software download is filtered the data flow of DSMCC encapsulation according to the DSMCC standard, carries out the online upgrading of software.
Particularly, the double-layer structure of this data flow comprises control channel and data channel, and wherein control channel is provided with software download Image Data descriptor; Data channel comprises module data descriptor and module data two parts, and the module data descriptor is at the module data feature description; Behind the receiving equipment starting up, receiving software is downloaded the reflection descriptor, need to judge whether down loading updating software; During software download, first receiving software is downloaded describing module information in the Image Data, the information of filtering module data description block size, number, and storage data message wherein; Receiver module data message again, the filtering module data, after digital signature verification and cyclic check (CRC32) were all passed through, the storage address data of erasable correspondence were finished renewal.
The present invention has utilized the setting of privately owned section of DSMCC double-layer structure fully, uniquely, has reasonably managed, controlled the download of module data.
In order to guarantee the correctness of transfer of data, the CRC32 verification is all carried out in the pay(useful) load of each packet in the mpeg 2 transport stream, and have a checking data, at receiving terminal, apparatus of digital television receiving for example, special-purpose CRC32 hardware check digital circuit is arranged, data are carried out verification, the data refusal that makes a mistake is handled, and it only carries out verification to load data, and the effective data download in the load data is not carried out verification, therefore, in the DSMCC data Layer, cyclic check (CRC32) data of data download have been increased, to guarantee the correctness of transfer of data.At receiving terminal, filter out CRC32 checking data corresponding in the module data of downloading application software and the module descriptor during software download, verify calculating, checking is passed through, and data are valid data, can handle; Verifying unsanctionedly, is not valid data, does not handle.
Be purposes such as depositing of reasonably management update data, the module descriptor comprises the storage address descriptor, and during software download, receiving terminal obtains memory address information according to the storage address descriptor, deposits more new data.
The breakpoint transmission function of receiving terminal, it is very important function of one of software download program, it can guarantee that apparatus of digital television receiving is in software upgrade process, accident power-off causes upgrading under the situation of failing, after start next time, the software download program can normally start, and carries out the upgrading of software in original position.That is to say, behind the receiving equipment starting up, before the executive system routine, judge new software download service earlier, or the breakpoint transmission download service; If the complete procedure that software upgrading is upgraded is then carried out in new software download; As downloading, then directly carry out the continuous process of carrying that descends of software for breakpoint transmission.
The present invention is provided with the module identification information descriptor by the module descriptor, and this descriptor has comprised the number and/or the module identification information of software integral module data; Behind the receiving equipment starting up, judge module data number or the identifying information that has write down earlier,, then carry out breakpoint transmission and download that the module data that directly will not receive last time filters, downloads if imperfect; If complete, then directly enter executive system routine, or carry out complete more newly downloaded of other new softwares.
According to the technique scheme analysis as can be known, the present invention handles according to the standard of DSMCC the data flow of software download, the hardware device of taking with concrete apparatus of digital television receiving has nothing to do, and only meets the receiving equipment of the standard of DSMCC, can both receive data stream.The data flow of software download comprises digital signature data, and the integrality of the system program of guarantee downloading prevents that packet from losing in transmission course; Guaranteeing the source of data download, is that the receiving equipment (for example apparatus of digital television receiving) at appointment improves the fail safe and the reliability of software upgrading.The twin check of data flow, guarantee the correctness of transfer of data, prevent the generation of misdata, the breakpoint transmission function of apparatus of digital television receiving, it guarantees that receiver is in the process of receiving software, if accident power-off after next receiver restarts, can continue to receive downloaded software in original position.
The present invention can upgrade the systems soft ware of apparatus of digital television receiving, to transport stream packet loss in the software download process, the situation of apparatus of digital television receiving outage is handled in the software upgrade process, and in the time of appointment, can finish the upgrading of apparatus of digital television receiving software, apparatus of digital television receiving after the upgrading is working properly, and every function meets the requirement of appointment.
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing and specific embodiment:
The present invention is the method for downloading software in a kind of digital television broadcasting, and the formation and the process of transmitting of the server end data flow of its software download are as follows:
Referring to Fig. 1 and Fig. 2, software download service with look audio service, other data, services is similar, therefore, Program Specific Information (Program Specific Information is called for short PSI)/business information (Service Information is called for short SI) is all arranged, therefore, in the system program data flow of downloading, comprise the information of these base tables, in Fig. 1, provided the forming process of data flow.
At first, (the Service Description Table of SDT Service Description Table in the MPEG-2 data flow, be called for short SDT) information, in SDT, the software download service must have download service descriptor (the information description information of software download, the replacement descriptor of software download), PAT is also arranged in data flow, PMT information, PAT has bag identifier (the Packet Identifier of PMT, be called for short PID) and corresponding SERVICE_ID, PMT has the initial (DownloadServerInitiate of the download service of DSMCC data flow, be called for short DSI), download message response (DownloadInfoResponse, be called for short DIRES), the PID of downloading data block (DownloadDataBlock is called for short DDB).
In control channel, mainly be DSI information, DSI has the reflection descriptor of the system program of software download, it comprises some descriptor tabulations, the ID that mainly comprises the Image Data that will broadcast, the sign descriptor of software download, release type descriptor, the deferred message descriptor, the compent_tag in PMT.
In data channel, DIRES, DDB information are arranged, descriptor that comprises and data are all produced by the Image Data of system program; Concrete production process is illustrated by Fig. 2: first, the block data size is set, with system program Image Data piecemeal, generation module data and corresponding descriptor, second, each module data, produce CRC32 checking data descriptor, digital signature data descriptor, loading module memory of data (FLASH) address descriptor information, module I D descriptor, data message.All module datas all are bundled among the DDB, the descriptor of Image Data, and the descriptor of each module all is bundled among the DIRES, has formed data channel information.
Referring to Fig. 3, the trigger mechanism and the receiving course of the apparatus of digital television receiving end of software download:
When the apparatus of digital television receiving system program starts and switch frequency, can trigger the software download service, system program at first receives SDT, if receive the software download information descriptor from SDT, illustrated that software download information exists, and then reception hardware version information, the ID of software image data, with these information stores in the flash chip FLASH of appointment, as the hardware version of next software upgrading and the ID of software image data, receiving software is downloaded and is replaced descriptor again, filter out hardware version information, the ID of software image data, if hardware version is identical, the ID of software image data is inequality, and in the Image Data ID of appointment scope, illustrate that software needs to upgrade, next apparatus of digital television receiving begins to carry out the reception of data download after starting.
Apparatus of digital television receiving is receiving the Entitlement Management Message of software download (EntitlementManagement Message, be called for short EMM) during data, also can trigger the software download service, filter out hardware version information, the software image data ID, if hardware version information is identical with hardware version information among the FLASH, the ID of software image data and the ID of the Image Data among the FLASH are inequality, and in the reflection ID of appointment scope, illustrate that software needs to upgrade, replace the hardware version of FLASH data with the hardware version of EMM data, the ID of software image data, when guaranteeing next software download is up-to-date version information, after next time, apparatus of digital television receiving started, begin to carry out the reception of data download.
After the apparatus of digital television receiving start, start the software download program, read and download flag data among the Flash, if system program does not need upgrading, direct start-up system program, otherwise, judge it is new software download service, or the download service of breakpoint transmission again.
Referring to Fig. 4, it is the forming process of server end digital signature data, with the systems soft ware Image Data piecemeal of downloading, utilize Hash (hash) algorithm to produce summary data to each module data, the private cipher key that provides with apparatus of digital television receiving production firm utilizes RSA Algorithm that summary data is encrypted then, again ciphered data is encapsulated among the DIRES, broadcasts away together in company with other stream.
Above-mentioned these data play out by playing card by the mode of data carousel.
Referring to Fig. 4,5, the checking procedure of apparatus of digital television receiving end, as m module: apparatus of digital television receiving is after receiving the DIRES data message, therefrom be filled into m module encrypt data, the public keys that provides with apparatus of digital television receiving production firm is decrypted with RSA Algorithm enciphered data then, obtain data decryption, from DDB, be filled into m module data again, with the hash algorithm m module produced summary data, and then m data decryption and m summary data compared, if identical, illustrate that the verification of m number of modules word signature is correct, other the identical way of module employing is carried out verification.
Referring to Fig. 3,4,5, particularly, the receiving course of new software download service is:
The first step: receive PAT, filter the PID of SERVICE_ID and PMT, receive PMT information with SERVICE_ID and PID again, refilter the DSI among the DSMCC, DIRES, the PID of DDB;
Second step: receive DSI, refilter system program reflection descriptor, the ID of reflection, hardware version information, software version information, from FLASH, read hardware version information, software version information again, if hardware version is identical, software version difference (software version of reception is greater than the software version among the FLASH), the software download initialization is normal, begins to receive data download.
The 3rd step: receive DIRES information, filter the Image Data block size, the number of module refilters the CRC32 data, digital signature data, the FLASH address of mapping, the ID of module, the version of module of every module, stores these data messages again.
The 4th step: receive DDB information, filter the data of every module, carry out CRC32 verification checking and digital signature authentication, if checking meets the requirements the FLASH address date of erasable correspondence.The data verification of every module and erasablely carry out successively, after all Data Update are finished, the start-up system program.
Referring to Fig. 3,6, the software download of breakpoint transmission of the present invention, with the difference of said process be not receive DSI and DIRES, earlier from FLASH, read filtering data, be provided with filter the number parameter after, receive DDB information, filter and do not have received module data last time, concrete proof procedure is with top consistent, upgrade finish after, the start-up system program.
In conjunction with shown in Figure 6, the breakpoint transmission function is meant that apparatus of digital television receiving cuts off the power supply, do not have to cause under signal or other the unusual situation for a long time the software upgrading failure, once more in Sheng Ji the process, can not receive all data download again, but begin to receive from the place that last downloaded finishes, improved the speed of apparatus of digital television receiving software download.
Again referring to Fig. 6, apparatus of digital television receiving before system software upgrading failure the software download process and memory in the distribution condition of data, the systems soft ware of apparatus of digital television receiving is divided into n module, corresponding memory has a plurality of memory spaces, when module data of the every reception of apparatus of digital television receiving, after 32 verifications of digital signature checksum CRC are passed through, data are write corresponding memory block, and in the sequence number of the assigned address mark module of memory, the number of receiver module is downloaded complement mark.Apparatus of digital television receiving upgrading failure has both of these case: a kind of is when having received wherein m module, after 32 verifications of digital signature checksum CRC are passed through, and the data of this m module are write corresponding memory block, and module sequence number, number are downloaded after the sign renewal; Another kind is that apparatus of digital television receiving is when receiving m module.
In the process of system software upgrading once more, if first kind of situation begins to receive m+1 module, another kind of situation begins to receive m module.All receive until all modules, system software upgrading is finished.
The equipment of realizing the inventive method adopts code stream Play Server, modulator, multiplexer, digital receiver and television set.Concrete application process is:
At server end, the test of software download data stream, service data stream generation system program, software image file is generated the data flow (BUG of resolution system program of MPEG-2, increase new function), for the versatility of software download and the utilance of network, be injected into the data flow and the video-voice frequency flow of software download in the multiplexer together, multiplexer with data and video-voice frequency flow multiplexing after, be input in the modulator again, modulator is modulated back (setting frequency and symbol rate) to the signal of input, by wire cable signal modulator is modulated back (setting frequency and symbol rate) to the signal of input, by wire cable signal broadcasting is gone out, the data flow of the generation device that can be re-used is multiplexed in the video-voice frequency flow, also can modulated device modulation back output.
At receiving terminal, digital receiver and television set, apparatus of digital television receiving software initialization (software download program and system program are erasable in FLASH by burning equipment), the test of software download trigger mechanism, play data download stream at server end, when apparatus of digital television receiving start and switching frequency, system program interface display information, notify the user to start apparatus of digital television receiving, the upgrading of beginning software, the test of EMM data-triggered produces the EMM data by CA (condition receives, Conditional Access) system, after apparatus of digital television receiving receives the EMM data, system program interface display information notifies the user to start apparatus of digital television receiving, the beginning system software upgrading.
The apparatus of digital television receiving test of upgrading, play the data downloaded stream of different hardware version and software version at server end, when the hardware version among hardware version that filters in the download stream and the FLASH is inequality, system program interface display information: the apparatus of digital television receiving hardware version is inequality, the restarting systems program.When hardware version is identical, be filled into software version when identical with software version among the FLASH, system program interface display information: the apparatus of digital television receiving program is a new procedures, the restarting systems program.Be filled into software version among software version and the FLASH when inequality, display reminding information: just a moment,please, the beginning software download.After system program has been upgraded, the restarting systems program.After two apparatus of digital television receiving upgradings, every function is tested, the problem of system program has obtained solution, and newly-increased function operation is normal.
It should be noted that at last: above embodiment only in order to the explanation the present invention and and unrestricted technical scheme described in the invention; Therefore, although this specification has been described in detail the present invention with reference to each above-mentioned embodiment,, those of ordinary skill in the art should be appreciated that still and can make amendment or be equal to replacement the present invention; And all do not break away from the technical scheme and the improvement thereof of the spirit and scope of the present invention, and it all should be encompassed in the middle of the claim scope of the present invention.