Summary of the invention
The objective of the invention is to propose a kind of EPG data sheet two-way simultaneous method of reseptance and set-top box thereof, with solve present digital TV set-top box can't compatible with single to receiving set up box data, technical problem that the EPG receiving efficiency is not high.
The method of the set-top box EPG single-direction and dual-direction parallel receive that the present invention proposes comprises the following steps:
One, front end EPG data generate:
Step S101 obtains unidirectional EPG data;
Step S102 distinguishes different types of data in the EPG data, comprises the data of different frequent points, and does not have the data of distinguishing frequency;
Step S103 is according to data type and form spanned file;
Step S104 is with the file mark filename that generates and be saved in the EPG bi-directional data server;
Two, single-direction and dual-direction EPG data parallel receives:
Step S301, the initialization receiving flag receives field (Section) with all and is masked as " not receiving ", in order to judge the data that received in the buffer memory;
Step S302 is provided with unidirectional EPG Data Receiving passage and filter according to the filter information of required reception data, does not comprise the information of designated word segment number (Section Number) data bit in the filter; And from the identical EPG data of EPG bi-directional data server download, unidirectional idling step S302 down, two-way idling step S304 down;
Step S303, when unidirectional EPG Data Receiving passage obtains data, judge receiving flag according to Section Number, if corresponding receiving flag is " not receiving ", deposit in data in the buffer memory and receiving flag is set and be " receiving ", if corresponding receiving flag is " receiving ", then abandon data;
Step S304 receives mark according to current Section, seeks the Section that mark " does not receive ", as the target of two-way EPG Data Receiving;
Step S305, according to the filter information of required reception data and the Section Number spanned file name of target Section, form is identical with step S102, generates simultaneously to distinguish different frequent points and do not have two filenames distinguishing two kinds of data types of frequency;
Step S306 downloads two files from EPG bi-directional data server simultaneously, wherein has one to return success and promptly check receiving flag, if still be " receiving ", depositing in data in the buffer memory and receiving flag is set is " receiving ";
Step S307, whether judgment data receives successfully fully, and as not success, then repeating step S303 and step S304 to S306 receive success fully until data.
The present invention also proposes a kind of set-top box of using said method, comprising:
Front end EPG data generation module is used to obtain unidirectional EPG data, distinguishes the type of different pieces of information in the EPG data, according to data type and form spanned file, and is saved in the EPG bi-directional data server;
Single-direction and dual-direction EPG data parallel receiver module is used for from unidirectional, the two-way file in download arranged side by side of EPG bi-directional data server, and data download is saved in the buffer, receives success fully until data.
Compared with prior art, the present invention has following characteristics:
1, with original technical compatibility, need not transform existing unilateral network, can be in the purpose that guarantees under the situation of net set-top box operate as normal, to realize promoting EPG Data Receiving efficient.
2, the single reception programme that is different from general technology, the present invention can realize independent two-way reception EPG data and single-direction and dual-direction parallel receive EPG data, has higher flexibility and practicality.
3, the present invention is except the reception that can be used for the EPG data, and, reception data frequent application big for other data volume also can be adopted, as browser, and VOD business etc.
Embodiment
The present invention mainly is divided into two parts, at first is that front end EPG data generate, and secondly is the EPG Data Receiving of set-top box.These two parts are interrelated, and the filter parameter that the filename that front end EPG data generate will use in the time of will directly receiving with set-top box is corresponding.In addition, the EPG Data Receiving of set-top box can also be divided into independent bi-directional data reception and the reception of single-direction and dual-direction parallel data.When parallel data receives, because unidirectional reception is the broadcast (sites) in turn data that receive at random, so under the situation that guarantees inbound pacing, can not guarantee to receive each section (Section) one by one from first section (Section) beginning order, so two-way reception receives unidirectional section (Section) that institute does not receive or omits that receive as what replenishing of unidirectional reception can be jumped according to filename, to reach peak efficiency.
The present invention is at first when front end generates the unidirectional EPG data of broadcasting, the EPG data of each frequency are passed through different frequencies, different Table ID, different segment number sign indicating number (Section Number) splits into a lot of small documents, and these files are placed on the EPG bi-directional data server.Set-top box when unidirectional receive path and filter are set, is downloaded identical EPG data from EPG bi-directional data server when needs receive EPG.Unidirectional two-way simultaneous carries out, and is kept in the same buffer memory, and after judging reception fully, the unified application program of giving is handled.
Reception programme described in the invention does not influence fully that existing EPG is unidirectional to broadcast and reception programme, only replenishing as unidirectional reception programme.Unidirectional reception and two-way reception can walk abreast, thereby improve the receiving efficiency of EPG data.Also can not be subjected to the constraint of current C able frequency and EPG dominant frequency point only by two-way reception, the EPG data of reception needs at any time can more significantly improve receiving efficiency for the network environment of unidirectional single EPG frequency.
The specific embodiment of the present invention is as follows:
One, the EPG data of front end generate
Obtain unidirectional EPG data, analyze and distinguish the data of different frequent points in the EPG data and do not have the data of distinguishing frequency, and different SECTION saved as the file that is not more than 4096 bytes, simultaneously described SECTION file is divided into the data file of distinguishing different frequent points and does not have the data file of distinguishing frequency, and the file that is generated is placed on the EPG bi-directional data server.
Detailed method sees also Fig. 1.Front end EPG data creation method comprises the following steps:
Step S101: obtain unidirectional EPG data;
Step S102: the type of distinguishing different pieces of information in the EPC data;
Analyze the data of distinguishing different frequent points in the EPG data, and do not have the data of distinguishing frequency;
For distinguishing the data of different frequent points, according to the program difference of frequency, and data are corresponding with it as data such as SDT_Actual (Table ID 0x42), EIT_PF_Actual;
As BAT, data such as SDT_Other are not for there being the data of distinguishing frequency, and what each frequency was broadcast all is identical data;
Step S103: according to data type and form spanned file; Promptly,, different Section is saved as the file that is not more than 4096 bytes according to set form according to different data types.Wherein,
The data preservation file of distinguishing different frequent points is by name:
[original_network_id]_[transport_stream_id]_[PID]_[table_id]_[table_id_extension]_[section_number].dat
For example: frequency frequency 355MHz, symbol rate 6.875MSym/s, modulation system 64QAM, transport id 10 (0xA), SDT_Actual, first Section saves as file 0_A_11_42_A_0.dat
It is by name not have the data preservation file of distinguishing frequency:
[original_network_id]_[PID]_[table_id]_[table_id_extension]_[section_number].dat
For example: BAT, Bouquet ID 1, first Section saves as file 0_11_4A_1_0.dat
Above-mentioned document generating method is specially: under different frequent points, different Section data save as different files, under each frequency how many different EPG Section are arranged, and just keep what files.After finishing this, under a plurality of frequencies, duplicate Section does not have the frequency point data of differentiation in order to reduce the pressure of storage and transmission, to merge into.
Step S104: the file of all generations is saved in the EPG bi-directional data server.
Two, two-way EPG Data Receiving
See also Fig. 2, two-way EPG data receive method comprises the following steps:
Step S201: according to filter information spanned file name; Promptly generate the filename of the pre-Section of reception according to the filter information of required reception data, form is identical with step S102 during front end EPG data generate, generates two filenames distinguishing different frequent points and do not have two kinds of data types of differentiation frequency simultaneously.
Step S202: from EPG bi-directional data server file in download, can be simultaneously download two files, wherein have one to return success and promptly be saved in the buffer memory from EPG bi-directional data server;
The filename that generates is corresponding with the filename that server generates, but server end because each Section only preserves once, so, two filenames that generate, have only one can file in download, another can return mistake, but as long as a file download successfully and be successfully.
This scheme also can have additional project, and in server and terminal acquiescence the Section of some specific data such as SDT table being used as does not have the frequency of differentiation type, and other all is considered as distinguishing the different frequent points type.Like this, server end is preserved Section according to this strategy, and the set-top box end also generates unique Section filename according to this strategy.Filename just can be corresponding one by one with the data on the server like this.
Step S203: whether judgment data receives successfully fully, if do not have, then repeating step S201 and step S202 receive next Section in proper order, receive success fully until data; If success then counts step 204;
Step S204: check the check information of data in the buffer memory, and give application program and handle deal with data.
Three, single-direction and dual-direction EPG data parallel receives
See also Fig. 3, single-direction and dual-direction EPG data parallel method of reseptance comprises the following steps:
Step S301: the receiving flag of all Section of initialization is " not receiving ", in order to judge the data that received in the buffer memory;
Step S302: the filter information according to required reception data is provided with unidirectional EPG Data Receiving passage and filter, does not comprise the information of specifying Section Number data bit in the filter;
Step S303: when unidirectional EPG Data Receiving passage obtains data, judge receiving flag according to Section Number, if corresponding receiving flag is " receiving ", depositing in data in the buffer memory and receiving flag is set is " receiving "; If corresponding receiving flag is " receiving ", abandon data;
Step S304: receive mark according to current Section, seek the Section that mark " does not receive ", as the target of two-way EPG Data Receiving;
Step S305: according to the filter information of required reception data and the Section Number spanned file name of target Section, form is identical with step S102, generates simultaneously to distinguish different frequent points and do not have two filenames distinguishing two kinds of data types of frequency;
Step S306: download two files from EPG bi-directional data server simultaneously, wherein have one to return success and promptly check receiving flag, if still be " receiving ", depositing in data in the buffer memory and receiving flag is set is " receiving ";
Step S307: whether judgment data receives successfully fully, as does not have, and then repeating step S303 and step S304 to S306 receive success fully until data, and wherein step S303 and step S304 to S306 are parallel;
Step S308: discharge unidirectional EPG Data Receiving passage and filter;
Step S309: check the check information of data in the buffer memory, and give the application program deal with data.
The present invention has also disclosed a kind of set-top box of using said method, comprising:
Front end EPG data generation module is used to obtain unidirectional EPG data, distinguishes the type of different pieces of information in the EPG data, according to data type and form spanned file, and is saved in the EPG bi-directional data server;
Single-direction and dual-direction EPG data parallel receiver module is used for from unidirectional, the two-way file in download arranged side by side of EPG bi-directional data server, and data download is saved in the buffer.
The present invention uses two-way EPG Data Receiving and the compatible with single scheme to the EPG Data Receiving, utilizes bilateral network as the replenishing of the unidirectional reception of EPG, and bilateral network and unilateral network walk abreast, and make two kinds of transmission meanss to have complementary advantages.Because present bilateral network generally is used for the transfer of data of value-added service, when watching radio and television, the user generally is in idle condition, utilize this part transfer resource simultaneously by bilateral network now, the EPG data of acceptance criteria have reached the purpose that improves the EPG receiving efficiency.Simultaneously, also can not be subjected to the constraint of current C able frequency and EPG dominant frequency point only by two-way reception, the EPG data of reception needs at any time can more significantly improve receiving efficiency for the network environment of unidirectional single EPG frequency.