CN106534981B - A kind of generation method and generating means of the ASCII stream file ASCII of set top box testing - Google Patents

A kind of generation method and generating means of the ASCII stream file ASCII of set top box testing Download PDF

Info

Publication number
CN106534981B
CN106534981B CN201611066780.5A CN201611066780A CN106534981B CN 106534981 B CN106534981 B CN 106534981B CN 201611066780 A CN201611066780 A CN 201611066780A CN 106534981 B CN106534981 B CN 106534981B
Authority
CN
China
Prior art keywords
packet
ascii
source code
code flow
data
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.)
Active
Application number
CN201611066780.5A
Other languages
Chinese (zh)
Other versions
CN106534981A (en
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.)
Hunan Goke Microelectronics Co Ltd
Original Assignee
Hunan Goke Microelectronics Co 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 Hunan Goke Microelectronics Co Ltd filed Critical Hunan Goke Microelectronics Co Ltd
Priority to CN201611066780.5A priority Critical patent/CN106534981B/en
Publication of CN106534981A publication Critical patent/CN106534981A/en
Application granted granted Critical
Publication of CN106534981B publication Critical patent/CN106534981B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/004Diagnosis, testing or measuring for television systems or their details for digital television systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to a kind of generation method of the ASCII stream file ASCII of set top box testing and generating means, comprising: building private data table;The private data table is generated into m data packet, wherein m is the byte number of the private data table and the ratio of data packet length;It replaces the empty packet in source code flow file to be inserted into the source code flow file data packet of the private data table, generates new ASCII stream file ASCII, wherein the source code flow file includes the ASCII stream file ASCII recorded.The generation method of the ASCII stream file ASCII of set top box testing provided in an embodiment of the present invention, private data table is substituted the empty packet in source code flow file to be inserted into the source code flow file, the tables of data being newly inserted into will not influence the time interval of each tables of data in source code flow file, the timeliness and covering dynamics of the new ASCII stream file ASCII generated are able to satisfy the testing requirement of set-top box, and the test result of set-top box is accurate.

Description

A kind of generation method and generating means of the ASCII stream file ASCII of set top box testing
Technical field
The present invention relates to set top box testing technical field more particularly to a kind of generations of the ASCII stream file ASCII of set top box testing Method and generating means.
Background technique
Currently, the digital TV network front end of operator needs set-top box design to provide the service of customization to client Person tests these services of set-top box when providing the software met the requirements for operator.Set-top box is in test process In, multiple test items need broadcast code flow file to be tested, and ASCII stream file ASCII includes several data packets and several empty packets.
During set top box testing, since various regions operation commercial city has the private data of oneself to define and irregularly changes Dynamic, set top box testing engineer is verifying specification, needs constantly to apply for newest ASCII stream file ASCII to operator, process time-consuming compares It is long, and operator does not allow arbitrarily to modify network data generally, therefore set top box testing mainly passes through recording code stream at present Mode test what intra-company tested by the ASCII stream file ASCII of recording.
But the mode of stream-recording, since private data definition is irregularly changed by operator, when the ASCII stream file ASCII of recording Effect property is poor, while covering that dynamics is also limited, leads to not test certain functions of set-top box or asking for test result inaccuracy Topic.
Summary of the invention
To overcome the problems in correlation technique, the present invention provides a kind of generation of the ASCII stream file ASCII of set top box testing Method and generating means.
According to a first aspect of the embodiments of the present invention, a kind of generation method of the ASCII stream file ASCII of set top box testing is provided, Include:
Construct private data table;
The private data table is generated into m data packet, wherein m is the byte number and data packet of the private data table The ratio of length;
The empty packet in source code flow file is replaced to be inserted into the source code flow file data packet of the private data table, Generate new ASCII stream file ASCII, wherein the source code flow file includes the ASCII stream file ASCII recorded.
Preferably, the data packet by the private data table replaces the empty packet insertion institute in the source code flow file Source code flow file is stated, new ASCII stream file ASCII is generated, comprising:
Calculate the empty packet number T of the source code flow file;
Judge whether the empty packet number T of the source code flow file is greater than m;
As empty packet number T≤m of the source code flow file, by the 1st to T data packet in the private data table by The 1st to T empty packet in the one replacement source code flow file, using replaced ASCII stream file ASCII as new ASCII stream file ASCII.
Preferably, the data packet by the private data table replaces the empty packet insertion institute in the source code flow file Source code flow file is stated, new ASCII stream file ASCII is generated, comprising:
As the empty packet number T=m+1 of the source code flow file, by the 1st in the private data table to m data packet The 1st to m empty packet in the source code flow file is replaced one by one, using replaced ASCII stream file ASCII as new ASCII stream file ASCII.
Preferably, the data packet by the private data table replaces the empty packet insertion institute in the source code flow file Source code flow file is stated, new ASCII stream file ASCII is generated, comprising:
As the empty packet number T > m+1 of the source code flow file, by the 1st in the private data table to m data packet The 1st to m empty packet in the source code flow file is replaced one by one;
Calculate the data break B of m+1 empty packet;
According to the data break B, continue to replace by the data packet of the private data table surplus in source code flow file Remaining empty packet.
Preferably, the data packet by the private data table continues to replace the empty packet of residue in source code flow file, Include:
Judge whether the data break B is X≤B≤Y, wherein X is the code rate of source code flow file and presets privately owned number According to the product of table repetition time, Y is the product of the code rate and default private data table maximum recurrence interval tolerance;
If X≤B≤Y, remaining empty packet number S is calculated, wherein the S=T-m;
As residue sky packet number S≤m+1, the preceding S-1 data packet of the private data table is replaced one by one described original The empty packet of residue in ASCII stream file ASCII since the m+2 empty packet, using replaced ASCII stream file ASCII as new ASCII stream file ASCII;
As residue sky packet number S > m+1, the m data packet of the private data table is replaced into the source code flow one by one M empty packet in file since the m+2 empty packet, and update remaining sky packet number S and data break B;
According to the updated remaining sky packet number S and data break B, continue to replace by the data packet of the private data table Change updated remaining empty packet in source code flow file;
If the data break B is not X≤B≤Y, next empty first sky of the packet away from the source code flow file is calculated Data break between packet, until the data break of first empty packet of next empty packet and the source code flow file is in X to Y Between.
Preferably, the building private data table, comprising:
It is defined according to the private data of operator corresponding to the source code flow file, constructs the private data table.
According to a second aspect of the embodiments of the present invention, a kind of generating means of the ASCII stream file ASCII of set top box testing are provided, Include:
Private data table constructs module, for constructing private data table;
Data packet generation module, for the private data table to be generated m data packet, wherein m is the private data The byte number of table and the ratio of data packet length;
Privately owned table is inserted into module, for replacing the empty packet in source code flow file to insert the data packet of the private data table Enter the source code flow file, generate new ASCII stream file ASCII, wherein the source code flow file includes the ASCII stream file ASCII recorded.
Preferably, the privately owned table insertion module includes:
Empty packet amount calculation unit, for calculating the empty packet number T of the source code flow file;
First judging unit, for judging whether the empty packet number T of the source code flow file is greater than m;
First empty packet replacement unit, for as empty packet number T≤m of the source code flow file, by the private data The 1st to T data packet in table replaces the 1st to T empty packet in the source code flow file one by one, by replaced code stream text Part is as new ASCII stream file ASCII.
Preferably, the privately owned table insertion module includes:
Second empty packet replacement unit, for as the empty packet number T > m+1 of the source code flow file, by the privately owned number The 1st to m empty packet in the source code flow file is replaced one by one according to the 1st in table to m data packet;
Data break computing unit, for calculating the data break B of m+1 empty packet;
First remaining empty packet replacement unit, for according to the data break B, by the private data table data packet after The empty packet of residue in continuous replacement source code flow file.
Preferably, the described first remaining empty packet replacement unit includes:
Judgment sub-unit, for judging whether the data break B is X≤B≤Y, wherein X is source code flow file The product of code rate and default private data table repetition time, Y are that the code rate and default private data table maximum recurrence interval hold The product of difference;
Remaining sky packet computation subunit calculates remaining empty packet number S, wherein the S=T-m if being used for X≤B≤Y;
First empty packet replacement subelement, is used for as residue sky packet number S≤m+1, by the preceding S-1 of the private data table Data packet replaces the empty packet of residue in the source code flow file since the m+2 empty packet one by one, by replaced code stream text Part is as new ASCII stream file ASCII;
Second empty packet replacement subelement, is used for as residue sky packet number S > m+1, by the m data of the private data table Packet replaces m empty packet in the source code flow file since the m+2 empty packet one by one, and updates remaining empty packet number S sum number According to interval B;
Remaining empty packet replacement subelement is used for according to the updated remaining sky packet number S and data break B, by described The data packet of private data table continues to replace updated remaining empty packet in source code flow file;
Sky packet continues to replace subelement, if not being X≤B≤Y for the data break B, calculates next empty packet away from institute The data break between first of source code flow file empty packet is stated, until the of next empty packet and the source code flow file The data break of one empty packet is in X between Y.
The technical solution that the embodiment of the present invention provides can include the following benefits:
The generation method and generating means of a kind of ASCII stream file ASCII of set top box testing provided in an embodiment of the present invention, packet It includes: building private data table;The private data table is generated into m data packet, wherein m is the byte of the private data table Several ratios with data packet length;The data packet of the private data table is replaced described in the empty packet insertion in source code flow file Source code flow file generates new ASCII stream file ASCII, wherein the source code flow file includes the ASCII stream file ASCII recorded.The present invention is real Private data table is substituted the sky in source code flow file by the generation method for applying the ASCII stream file ASCII of the set top box testing of example offer Packet is inserted into the source code flow file, and the tables of data being newly inserted into will not influence the time of each tables of data in source code flow file Interval, the timeliness and covering dynamics of the new ASCII stream file ASCII of generation are able to satisfy the testing requirement of set-top box, the test of set-top box As a result accurate.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of process signal of generation method of the ASCII stream file ASCII of set top box testing provided in an embodiment of the present invention Figure;
Fig. 2 is the method flow schematic diagram that a kind of private data table provided in an embodiment of the present invention is inserted into ASCII stream file ASCII;
Fig. 3 is a kind of method flow schematic diagram of the remaining empty packet of private data table replacement provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of the generating means of the ASCII stream file ASCII of set top box testing provided in an embodiment of the present invention Figure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
The generation method of the ASCII stream file ASCII of a kind of set top box testing provided in an embodiment of the present invention, referring to Fig. 1, comprising:
S100: building private data table.
It is privately owned by constructing for the function or service that source code flow file is unable to test during set top box testing Tables of data is inserted into source code flow file, tests set-top box to form new ASCII stream file ASCII.
In embodiments of the present invention, the building private data table, comprising:
It is defined according to the private data of operator corresponding to the source code flow file, constructs the private data table. The private data definition for obtaining operator corresponding to true form stream file, defines according to private data, assigns to several relevant parameters Value constructs private data table.In the specific implementation process, several parameters include regional code, match bit array, intelligent card numbers Deng.
S200: the private data table is generated into m data packet.
The private data table constructed in step S100 is generated into m data packet, wherein m is the private data table Byte number and data packet length ratio, in the specific implementation process, the data packet length include 188 bytes.
S300: the empty packet in source code flow file is replaced to be inserted into the source code flow data packet of the private data table File generates new ASCII stream file ASCII.
The empty packet in source code flow file is replaced to be inserted into the source code flow file data packet of the private data table, Generate new ASCII stream file ASCII, wherein the source code flow file includes the ASCII stream file ASCII recorded.
In the specific implementation process, the step S300 can also include following detailed step:
S301: the empty packet number T of the source code flow file is calculated.
The source code flow file includes tables of data and the empty packet of a part, calculates the empty packet number T of the source code flow file.
S302: judge whether the empty packet number T of the source code flow file is greater than m.
Judge whether the empty packet number T of the source code flow file is greater than m, the m is that private data table is raw in step S200 At data packet quantity.
S303: as empty packet number T≤m of the source code flow file, by the 1st to T number in the private data table The 1st to T empty packet in the source code flow file is replaced one by one according to packet, using replaced ASCII stream file ASCII as new code stream text Part.
It, will be described privately owned as empty packet number T≤m of the source code flow file in the first possible embodiment The 1st to T data packet in tables of data replaces the 1st to T empty packet in the source code flow file one by one, by replaced code Stream file is as new ASCII stream file ASCII.For example, the private data table generates 5 data packets, i.e. m=5, the source code flow file Empty packet number T=3, T≤m, replaces the source code flow for the 1st to 3 data packet in the private data table one by one at this time The 1st to 3 empty packet in file, using replaced ASCII stream file ASCII as new ASCII stream file ASCII.
In second of possible embodiment, the data packet by the private data table replaces the source code flow Empty packet in file is inserted into the source code flow file, generates new ASCII stream file ASCII, comprising:
As the empty packet number T=m+1 of the source code flow file, by the 1st in the private data table to m data packet The 1st to m empty packet in the source code flow file is replaced one by one, using replaced ASCII stream file ASCII as new ASCII stream file ASCII.Example Such as, the private data table generates 5 data packets, i.e. m=5, the empty packet number T=6 of the source code flow file will be described privately owned The 1st to 5 data packet in tables of data replaces the 1st to 5 empty packet in the source code flow file, replaced code stream one by one File is there is also 1 remaining empty packet, and replacement terminates at this time, using replaced ASCII stream file ASCII as new ASCII stream file ASCII.
In the third possible embodiment, the data packet by the private data table replaces the source code flow Empty packet in file is inserted into the source code flow file, generates new ASCII stream file ASCII, embodiments thereof can be found in shown in Fig. 2, comprising:
S310: as the empty packet number T > m+1 of the source code flow file, by the 1st to m in the private data table Data packet replaces the 1st to m empty packet in the source code flow file one by one.
As the empty packet number T > m+1 of the source code flow file, first by the 1st to m number in the private data table The 1st to m empty packet in the source code flow file is replaced one by one according to packet, at this point, the empty packet number of the source code flow file is greater than 1。
S320: the data break B of m+1 empty packet is calculated.
The 1st data break B of the empty packet away from the m+1 empty packet in the source code flow file is calculated, is being embodied In the process, the data packet in the source code flow file and sky Bao Jun have serial number, the meter of the data break B of described m+1 empty packet Calculation method are as follows: the product of the difference and the data packet length of the m+1 empty serial number wrapped and the serial number of the 1st empty packet.
S330: according to the data break B, continue to replace in source code flow file by the data packet of the private data table The empty packet of residue.
In a kind of possible embodiment, the data packet by the private data table continues to replace source code flow text The empty packet of residue in part, embodiments thereof can be found in shown in Fig. 3, comprising:
S321: judge whether the data break B is X≤B≤Y.
Judge whether the data break B is X≤B≤Y, wherein X is the code rate of source code flow file and presets privately owned number According to the product of table repetition time, Y is the product of the code rate and default private data table maximum recurrence interval tolerance.If the number It is X≤B≤Y according to interval B, executes step S322;If the data break B is not X≤B≤Y, step S326 is executed.
After constructing private data table, user can be preset between private data table repetition time and the repetition of private data table maximum Every tolerance, according to the default private data table repetition time and private data table maximum recurrence interval tolerance, according between data It determines whether the private data table is repeatable every B to be inserted into the source code flow file.
S322: remaining empty packet number S is calculated.
If X≤B≤Y, remaining empty packet number S is calculated, wherein the S=T-m.
As X≤B≤Y, the source code flow file calculates remaining empty after m empty packet is substituted by private data table Packet number S, determines whether remaining empty packet can be continued to replace by private data table.
S323: as residue sky packet number S≤m+1, the preceding S-1 data packet of the private data table is replaced one by one described in The empty packet of residue in source code flow file since the m+2 empty packet, using replaced ASCII stream file ASCII as new ASCII stream file ASCII.
As X≤B≤Y, and when residue sky packet number S≤m+1, carries out second and replace, by the preceding S-1 of the private data table A data packet replaces the empty packet of residue in the source code flow file since the m+2 empty packet one by one, by replaced code stream File is as new ASCII stream file ASCII.
In a kind of application scenarios, the empty packet number T of source code flow file is 10, for the data packet that private data table generates Number m is 5, and 5 empty packets are substituted by the private data table in step s310, at this point, the empty packet of the residue of source code flow file Number S is 5, remaining sky packet number S≤m+1, at this point, preceding 4 data packets of the private data table are replaced the source code one by one From the 7th empty packet to the 10th empty packet in stream file, using replaced ASCII stream file ASCII as new ASCII stream file ASCII.
S324: as residue sky packet number S > m+1, the m data packet of the private data table is replaced one by one described original M empty packet in ASCII stream file ASCII since the m+2 empty packet, and update remaining sky packet number S and data break B.
As residue sky packet number S > m+1, the m data packet of the private data table is replaced into the source code flow one by one It from the m+2 empty packet to the 2m+1 empty packet in file, this time replaces and m empty packet is substituted altogether, and update remaining empty packet number S With data break B.The calculation method of updated data break B are as follows: by the m+2 empty packet in source code flow file as more The 1st empty packet after new, the m+2 empty packet are successively derived as updated 2nd empty packet, and the 2m+2 empty packet is as more The m+1 empty packet after new, calculates the data of updated 1st empty packet to the updated the m+1 empty packet of empty packet this m+1 It is spaced B.
In a kind of application scenarios, the empty packet number T of source code flow file is 13, for the data packet that private data table generates Number m is 5, after 5 empty packets are substituted by the private data table in step s310, the empty packet number S of the residue of source code flow file It is 8, remaining sky packet number S > m+1, at this point, 5 data packets of the private data table are replaced the source code flow file one by one In from the 7th empty packet to the 11st empty packet replace 5 empty packets altogether, there remains 2 empty packets at this time, update remaining empty packet number S=2, To continue to judge whether updated remaining empty packet can continue to replace.
S325: according to the updated remaining sky packet number S and data break B, by the data packet of the private data table Continue to replace updated remaining empty packet in source code flow file.
According to the updated remaining sky packet number S and data break B, continue to replace by the data packet of the private data table Updated remaining empty packet in source code flow file is changed, data break B is the m+2 in true form stream file empty packet away from 2m at this time The data break of+2 empty packets, return step S321 are continued to replace source code flow file by the data packet of the private data table In updated remaining empty packet.
S326: calculating the data break between first empty packet of next empty packet away from the source code flow file, until The data break of first empty packet of next empty packet and the source code flow file, between Y, enters step S322 in X.
If the data break B is not X≤B≤Y, in order to guarantee that the private data table being inserted into meets the number of user preset According to the table repetition time, the data break between first empty packet of next empty packet away from the source code flow file is calculated, until The data break of first empty packet of next empty packet and the source code flow file is in X between Y.If until the source code The last one sky packet of stream file, the data break of calculating is not in X between Y, and replacement terminates at this time, by replaced code stream File is as new ASCII stream file ASCII;If with the data break of first of the source code flow file empty packet in X to described between Y Also free packet after sky packet, calculates and the data break of first empty packet of the source code flow file is in X to the sky between Y The empty packet number of residue after packet, updates remaining empty packet number S, is continued to replace source code flow file by the data packet of the private data table In updated remaining empty packet.
In a kind of application scenarios, the empty packet number T of source code flow file is 13, for the data packet that private data table generates Number m is 5, and 5 empty packets, the 1st empty packet in the source code flow file is substituted by the private data table in step s310 To the 6th empty packet data break B not in X between Y, at this point, other after calculating the 1st empty packet to the 6th empty packet are empty Whether X is between Y for the data break of packet, and such as data break X of the 1st empty packet to the 9th empty packet is between Y, at this point, the 9th There are also 4 empty packets after sky packet, residue sky packet number S is updated to 4, by preceding 4 data packets of private data table one by one from the 10th Sky packet starts replacement to the 13rd empty packet, and replacement terminates, using replaced ASCII stream file ASCII as new ASCII stream file ASCII.
The generation method of the ASCII stream file ASCII of a kind of set top box testing provided in an embodiment of the present invention, comprising: building is privately owned Tables of data;The private data table is generated into m data packet, wherein m is the byte number and long data packet of the private data table The ratio of degree;The empty packet in source code flow file is replaced to be inserted into the source code flow text data packet of the private data table Part generates new ASCII stream file ASCII, wherein the source code flow file includes the ASCII stream file ASCII recorded.It is provided in an embodiment of the present invention Private data table is substituted the empty packet in source code flow file and is inserted into institute by the generation method of the ASCII stream file ASCII of set top box testing It states in source code flow file, the tables of data being newly inserted into will not influence the time interval of each tables of data in source code flow file, generate New ASCII stream file ASCII timeliness and covering dynamics be able to satisfy the testing requirement of set-top box, the test result of set-top box is accurate.
Based on the same technical idea, the embodiment of the invention also provides a kind of lifes of the ASCII stream file ASCII of set top box testing At device, referring to fig. 4, comprising: private data table constructs module 100, data packet generation module 200 and privately owned table and is inserted into module 300。
The private data table constructs module 100, for constructing private data table.
The data packet generation module 200, for the private data table to be generated m data packet, wherein m is described The byte number of private data table and the ratio of data packet length.
The privately owned table is inserted into module 300, for replacing the data packet of the private data table in source code flow file Empty packet be inserted into the source code flow file, generate new ASCII stream file ASCII, wherein the source code flow file includes the code stream recorded File.
In the first possible embodiment, the privately owned table insertion module includes: sky packet amount calculation unit, first sentences Disconnected unit and the first empty packet replacement unit.
The sky packet amount calculation unit, for calculating the empty packet number T of the source code flow file.
First judging unit, for judging whether the empty packet number T of the source code flow file is greater than m.
The first empty packet replacement unit will be described privately owned for as empty packet number T≤m of the source code flow file The 1st to T data packet in tables of data replaces the 1st to T empty packet in the source code flow file one by one, by replaced code Stream file is as new ASCII stream file ASCII.
In second of possible embodiment, the privately owned table insertion module includes: between the second empty packet replacement unit, data Every the remaining empty packet replacement unit of computing unit and first.
The second empty packet replacement unit, for as the empty packet number T > m+1 of the source code flow file, by the private There is the in tables of data the 1st to replace the 1st to m sky in the source code flow file one by one to m data packet to wrap.
The data break computing unit, for calculating the data break B of m+1 empty packet.
Described first remaining empty packet replacement unit, is used for according to the data break B, by the data of the private data table Packet continues to replace the empty packet of residue in source code flow file.
In a kind of possible embodiment, the described first remaining empty packet replacement unit includes: judgment sub-unit, remaining empty packet Computation subunit, the first empty packet replacement subelement, the second empty packet replacement subelement, remaining empty packet replacement subelement and sky Bao Jixu Replace subelement.
The judgment sub-unit, for judging whether the data break B is X≤B≤Y, wherein X is source code flow text The product of the code rate of part and default private data table repetition time, Y are between the code rate and the repetition of default private data table maximum Every the product of tolerance.
The remaining empty packet computation subunit calculates remaining empty packet number S, wherein the S=T-m if being used for X≤B≤Y.
Described first empty packet replacement subelement, is used for as residue sky packet number S≤m+1, before the private data table S-1 data packet replaces the empty packet of residue in the source code flow file since the m+2 empty packet one by one, by replaced code Stream file is as new ASCII stream file ASCII.
Described second empty packet replacement subelement, is used for as residue sky packet number S > m+1, by the m of the private data table Data packet replaces m empty packet in the source code flow file since the m+2 empty packet one by one, and updates remaining empty packet number S With data break B.
The remaining empty packet replacement subelement, for according to the updated remaining sky packet number S and data break B, by The data packet of the private data table continues to replace updated remaining empty packet in source code flow file.
The empty packet continues to replace subelement, if not being X≤B≤Y for the data break B, calculates next empty packet Data break between first empty packet away from the source code flow file, until next empty packet and the source code flow file First empty packet data break in X between Y.
Those skilled in the art will readily occur to of the invention its after considering specification and the disclosure invented here of practice Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (2)

1. a kind of generation method of the ASCII stream file ASCII of set top box testing characterized by comprising
The private data definition for obtaining operator corresponding to true form stream file, defines according to private data, to several related ginsengs Number assignment, constructs private data table;
The private data table is generated into m data packet, wherein m is the byte number and data packet length of the private data table Ratio;
It replaces the empty packet in source code flow file to be inserted into the source code flow file data packet of the private data table, generates New ASCII stream file ASCII, wherein the source code flow file includes the ASCII stream file ASCII recorded;
Calculate the empty packet number T of the source code flow file;
Judge whether the empty packet number T of the source code flow file is greater than m;
As empty packet number T≤m of the source code flow file, the 1st to T data packet in the private data table is replaced one by one The 1st to T empty packet in the source code flow file is changed, using replaced ASCII stream file ASCII as new ASCII stream file ASCII;
As empty packet number T=m+1 of the source code flow file, one by one to m data packet by the 1st in the private data table The 1st to m empty packet in the source code flow file is replaced, using replaced ASCII stream file ASCII as new ASCII stream file ASCII;
As the empty packet number T > m+1 of the source code flow file, one by one to m data packet by the 1st in the private data table Replace the 1st to m empty packet in the source code flow file;
Calculate the data break B of m+1 empty packet;
The data break B is the serial number of the m+1 empty packet and the difference of serial number and multiplying for the data packet length of the 1st empty packet Product;
Judge whether the data break B is X≤B≤Y, wherein X is the code rate and default private data table of source code flow file The product of repetition time, Y are the product of the code rate and default private data table maximum recurrence interval tolerance;
If X≤B≤Y, remaining empty packet number S is calculated, wherein S=T-m;
As residue sky packet number S≤m+1, the preceding S-1 data packet of the private data table is replaced into the source code flow one by one The empty packet of residue in file since the m+2 empty packet, using replaced ASCII stream file ASCII as new ASCII stream file ASCII;
As residue sky packet number S > m+1, the m data packet of the private data table is replaced into the source code flow file one by one In start since the m+2 empty packet m it is empty wrap, and update residue sky packet number S and data break B;
According to the updated remaining sky packet number S and data break B, it is former that replacement is continued by the data packet of the private data table Updated remaining empty packet in beginning ASCII stream file ASCII;
If the data break B is not X≤B≤Y, first empty packet of next empty packet away from the source code flow file is calculated Between data break, until the data break of next empty packet and first empty packet of the source code flow file X to Y it Between.
2. a kind of generating means of the ASCII stream file ASCII of set top box testing characterized by comprising
Private data table constructs module, and the private data for obtaining operator corresponding to true form stream file defines, according to private There is data definition, to several relevant parameter assignment, constructs private data table;
Data packet generation module, for the private data table to be generated m data packet, wherein m is the private data table The ratio of byte number and data packet length;
Privately owned table is inserted into module, for the data packet of the private data table to be replaced to the empty packet insertion institute in source code flow file Source code flow file is stated, new ASCII stream file ASCII is generated, wherein the source code flow file includes the ASCII stream file ASCII recorded;
Empty packet amount calculation unit, for calculating the empty packet number T of the source code flow file;
First judging unit, for judging whether the empty packet number T of the source code flow file is greater than m;
First empty packet replacement unit will be in the private data table for as empty packet number T≤m of the source code flow file The 1st to T data packet replace the 1st to T in the source code flow file empty packet one by one, replaced ASCII stream file ASCII is made For new ASCII stream file ASCII;
Second empty packet replacement unit, for as the empty packet number T > m+1 of the source code flow file, by the private data table In the 1st replace in the source code flow file the 1st to m empty packet one by one to m data packet;
Data break computing unit, data break B, the data break B for calculating m+1 empty packet are the m+1 empty packet Serial number and the 1st empty packet serial number difference and the data packet length product;
Judgment sub-unit, for judging whether the data break B is X≤B≤Y, wherein X is the code rate of source code flow file With the product of default private data table repetition time, Y is the code rate and default private data table maximum recurrence interval tolerance Product;
Remaining sky packet computation subunit calculates remaining empty packet number S, wherein S=T-m if being used for X≤B≤Y;
First empty packet replacement subelement, is used for as residue sky packet number S≤m+1, by the preceding S-1 data of the private data table Packet replaces the empty packet of residue in the source code flow file since the m+2 empty packet one by one, and replaced ASCII stream file ASCII is made For new ASCII stream file ASCII;
Second empty packet replacement subelement, for as residue sky packet number S > m+1, by the m data packet of the private data table by M empty packet in the one replacement source code flow file since the m+2 empty packet, and update between remaining sky packet number S and data Every B;
Remaining empty packet replacement subelement is used for according to the updated remaining sky packet number S and data break B, by described privately owned The data packet of tables of data continues to replace updated remaining empty packet in source code flow file;
Sky packet continues to replace subelement, if not being X≤B≤Y for the data break B, calculates next empty packet away from the original Data break between the empty packet of first of beginning ASCII stream file ASCII, until next empty first wrapped with the source code flow file The data break of sky packet is in X between Y.
CN201611066780.5A 2016-11-28 2016-11-28 A kind of generation method and generating means of the ASCII stream file ASCII of set top box testing Active CN106534981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611066780.5A CN106534981B (en) 2016-11-28 2016-11-28 A kind of generation method and generating means of the ASCII stream file ASCII of set top box testing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611066780.5A CN106534981B (en) 2016-11-28 2016-11-28 A kind of generation method and generating means of the ASCII stream file ASCII of set top box testing

Publications (2)

Publication Number Publication Date
CN106534981A CN106534981A (en) 2017-03-22
CN106534981B true CN106534981B (en) 2019-07-16

Family

ID=58357753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611066780.5A Active CN106534981B (en) 2016-11-28 2016-11-28 A kind of generation method and generating means of the ASCII stream file ASCII of set top box testing

Country Status (1)

Country Link
CN (1) CN106534981B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590071B (en) * 2017-08-25 2021-05-11 湖南国科微电子股份有限公司 Data modification method and device for code stream file for set top box test

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1551640A (en) * 2003-05-13 2004-12-01 ���ǵ�����ʽ���� Test stream generating method and apparatus for supporting various standards and testing levels
CN101098445A (en) * 2006-06-30 2008-01-02 株式会社日立制作所 Television program receiving equipment and method for receiving and broadcasting television program
CN101521833A (en) * 2009-04-14 2009-09-02 北京牡丹视源电子有限责任公司 Processing method and processing device of transport stream for test
CN102647619A (en) * 2012-04-16 2012-08-22 辛欣 Information service system and method based on digital television system or IPTV (Internet Protocol television) system
CN103108214A (en) * 2013-01-29 2013-05-15 辛欣 Method for identifying test set (TS) packet with information in empty packet replacing process
CN105657457A (en) * 2016-04-01 2016-06-08 浙江创佳数字技术有限公司 TS (transport stream) file adjusting method and TS file adjusting system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100803581B1 (en) * 2000-10-26 2008-02-15 삼성전자주식회사 Apparatus for automatic generating test data and method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1551640A (en) * 2003-05-13 2004-12-01 ���ǵ�����ʽ���� Test stream generating method and apparatus for supporting various standards and testing levels
CN101098445A (en) * 2006-06-30 2008-01-02 株式会社日立制作所 Television program receiving equipment and method for receiving and broadcasting television program
CN101521833A (en) * 2009-04-14 2009-09-02 北京牡丹视源电子有限责任公司 Processing method and processing device of transport stream for test
CN102647619A (en) * 2012-04-16 2012-08-22 辛欣 Information service system and method based on digital television system or IPTV (Internet Protocol television) system
CN103108214A (en) * 2013-01-29 2013-05-15 辛欣 Method for identifying test set (TS) packet with information in empty packet replacing process
CN105657457A (en) * 2016-04-01 2016-06-08 浙江创佳数字技术有限公司 TS (transport stream) file adjusting method and TS file adjusting system

Also Published As

Publication number Publication date
CN106534981A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN103956167A (en) Visual sign language interpretation method and device based on Web
CN104837037B (en) A kind of generation method and device of video carousel list
CN110673585B (en) Test method, test device and test system for train air conditioning system
CN106095376A (en) A kind of implementation method of quick configuration monitoring picture
CN104657039A (en) Interface subject display method and system as well as service equipment
CN109100943A (en) Speaker and TV at the control method of system, device, equipment and medium
CN106534981B (en) A kind of generation method and generating means of the ASCII stream file ASCII of set top box testing
CN104008055B (en) The method of software test, equipment and system
CN109671429A (en) Voice interactive method and equipment
CN105933309A (en) Content processing method and device between we-media platforms
CN111445906A (en) Big data-based voice generation method, device, equipment and medium
CN108572809B (en) Display layout adjusting method and device of spliced display screen
CN104216982A (en) Information processing method and electronic equipment
CN104219583A (en) Method and system for operating user interface of television through mobile terminal
CN109348242B (en) Live network scheduling method, device, medium and electronic equipment
CN117148960A (en) Design method for meta-universe interaction narrative
CN112911601B (en) Cognitive radio spectrum allocation protocol evaluation method and system
CN105744433B (en) A kind of volume adjusting method of voice box group, device and intelligent sound box
CN107493587A (en) A kind of WMG method of testing, apparatus and system
CN106302728A (en) Household equipment long-range control method and device
CN107066444B (en) Corpus generation method and apparatus based on multi-round interaction
CN104917810B (en) A kind of connection method and attachment device of the user equipment based on global variable
WO2013178129A1 (en) Voice scrawling implementation method, device and terminal
CN106934655A (en) Advertisement sending method and device based on user feedback
CN109827590A (en) A kind of control method of robot, device, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant