CN105430481B - The automatic test approach and device of code stream subtitle - Google Patents

The automatic test approach and device of code stream subtitle Download PDF

Info

Publication number
CN105430481B
CN105430481B CN201510776708.0A CN201510776708A CN105430481B CN 105430481 B CN105430481 B CN 105430481B CN 201510776708 A CN201510776708 A CN 201510776708A CN 105430481 B CN105430481 B CN 105430481B
Authority
CN
China
Prior art keywords
subtitle
character library
program
test
code stream
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
CN201510776708.0A
Other languages
Chinese (zh)
Other versions
CN105430481A (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.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201510776708.0A priority Critical patent/CN105430481B/en
Publication of CN105430481A publication Critical patent/CN105430481A/en
Priority to PCT/CN2016/084840 priority patent/WO2017080202A1/en
Application granted granted Critical
Publication of CN105430481B publication Critical patent/CN105430481B/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/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream

Abstract

The invention discloses a kind of automatic test approach of code stream subtitle, comprising: decodes actual program code stream to obtain caption information, and the caption information is generated to the program credits text of preset format;The character library type for reading subtitle in control captioned test corresponding with the program credits text, judges whether the character library type of subtitle and the character library type for compareing subtitle in captioned test are consistent in the program credits text;If consistent, according to timestamp and the timestamp for compareing captioned test of the program credits text, progress caption content contrastive test simultaneously exports contrastive test result.The invention also discloses a kind of automatic testing equipments of code stream subtitle.The present invention can automatic test code streams subtitle, and then improve the testing efficiency and test speed of code stream subtitle, while error brought by also avoiding artificially testing, improve the accuracy rate of code stream subtitle test.

Description

The automatic test approach and device of code stream subtitle
Technical field
The present invention relates to digital TV technology more particularly to the automatic test approach and device of code stream subtitle.
Background technique
Subtitle is the text version of TV, film and computer picture explanation, is the common miscellaneous function in video, such as CC subtitle (closed caption) in North American television, the picture and text subtitle etc. in eurovision.The target for developing subtitle is general It is but also to be used in particular circumstances, such as the environment a riot of sound in camera field to there is the personage of obstacle use to hearing In, or subtitle can be read in the place to need peace and quiet as hospital and understand the content of current television.
Since subtitle is the synchronous text explanation to voice in video, therefore it is required that messy code cannot be parsed, error code, or Person be lose character or picture personage the shape of the mouth as one speaks and text it is inconsistent etc., therefore subtitle test is extremely important.And present way It is all usually by playing same code stream, then contrastive test model machine is carried out when playing same test content by human eye Contrastive test.Since human eye judges that speed is slower than the display speed of subtitle, while when artificially judging, point of tester The factors such as the heart, visual fatigue influence, and so as to cause the inefficiency tested for code stream subtitle, test error is big, to need It often tests repeatedly, this greatly reduces the speed to introduce of program and consumes more exploitation test resources.
Summary of the invention
The main purpose of the present invention is to provide the automatic test approach and device of a kind of code stream subtitle, it is intended to which how is solution The technical issues of improving the testing efficiency and test speed of code stream subtitle, while reducing the test error of code stream subtitle.
To achieve the above object, the present invention provides a kind of automatic test approach of code stream subtitle, the code stream subtitle from Dynamic test method includes:
Actual program code stream is decoded to obtain caption information, and the caption information is generated to the program credits of preset format Text;
The character library type for reading subtitle in control captioned test corresponding with the program credits text, judges the section Whether the character library type of subtitle and the character library type for compareing subtitle in captioned test are consistent in mesh captioned test;
When the character library type of subtitle and the character library type for compareing subtitle in captioned test in the program credits text When consistent, according to the timestamp of the program credits text and the timestamp for compareing captioned test, caption content ratio is carried out To testing and export contrastive test result.
Preferably, the decoding actual program code stream is to obtain caption information, and the caption information is generated default lattice Include: before the program credits text of formula
It receives transmission code stream and parses, obtain program stream;
Judge the bit stream data that default character library data packet whether is carried in obtained program stream parsed;
When carrying the bit stream data of default character library data packet in the program stream that parsing obtains, determines and carry out code stream word The automatic test of curtain.
Preferably, the character library class for reading subtitle in control captioned test corresponding with the program credits text Type judges in the program credits text whether are the character library type of subtitle and the character library type for compareing subtitle in captioned test After consistent further include:
When the character library type of subtitle and the character library type for compareing subtitle in captioned test in the program credits text When inconsistent, according to the character library type of subtitle in the control captioned test, obtained from the bit stream data of the word-base data packet The character library of corresponding character library type is taken to update the character library of the program credits text.
Preferably, the character library type according to subtitle in the control captioned test, from the code of the word-base data packet The character library of corresponding character library type is obtained in flow data with the character library for updating the program credits text includes:
According to the character library type of subtitle in the control captioned test, the bit stream data of the word-base data packet is parsed to obtain Take the character library of corresponding character library type;
The storage location and trigger word of the program credits text is written in the character library for the corresponding character library type that will acquire Curtain refresh command, to update the character library of the program credits text.
Preferably, which is characterized in that the progress caption content contrastive test simultaneously exports contrastive test result and includes:
Judge the program credits text subtitle coding format whether with the subtitle coding lattice for compareing captioned test Formula is identical;
When subtitle coding format and the subtitle coding format for compareing the captioned test not phase of the program credits text Meanwhile the subtitle coding format of the program credits text being converted to the subtitle coding format of the control captioned test;
When the subtitle coding format of the program credits text is identical as the control subtitle coding format of captioned test When, whether respectively correspond the subtitle coding value of program credits text described in comparison and the subtitle coding value for compareing captioned test It is equal;
According to the comparison result of subtitle coding value, corresponding subtitle test prompts are exported.
Further, to achieve the above object, the present invention also provides a kind of automatic testing equipment of code stream subtitle, the codes Stream subtitle automatic testing equipment include:
Captioned test generation module, for decoding actual program code stream to obtain caption information, and by the caption information Generate the program credits text of preset format;
Character library type judging module, for reading subtitle in control captioned test corresponding with the program credits text Character library type, judge the character library type of subtitle and the character library for compareing subtitle in captioned test in the program credits text Whether type is consistent;
Caption content test module, for compareing subtitle with described when the character library type of subtitle in the program credits text When the character library type of subtitle is consistent in text, according to the timestamp of the program credits text with it is described compare captioned test when Between stab, carry out caption content contrastive test simultaneously export contrastive test result.
Preferably, the automatic testing equipment of the code stream subtitle further include:
Transmission code stream parsing module obtains program stream for receiving transmission code stream and parsing;
Word-base data packet judgment module, for judging parse in obtained program stream whether carry default character library number According to the bit stream data of packet;
Program stream parsing module, for when the code stream for carrying default character library data packet in the program stream that parsing obtains When data, the automatic test for carrying out code stream subtitle is determined.
Preferably, the automatic testing equipment of the code stream subtitle further include:
Character library type update module, for compareing subtitle with described when the character library type of subtitle in the program credits text In text when the character library Type-Inconsistencies of subtitle, according to the character library type of subtitle in the control captioned test, from the character library The character library of corresponding character library type is obtained in the bit stream data of data packet to update the character library of the program credits text.
Preferably, the character library type update module includes:
Character library acquiring unit parses the character library number for the character library type according to subtitle in the control captioned test The character library of corresponding character library type is obtained according to the bit stream data of packet;
The program credits text is written in character library updating unit, the character library for the corresponding character library type that will acquire Storage location simultaneously triggers subtitle refresh command, to update the character library of the program credits text.
Preferably, the caption content test module includes:
Coded format judging unit, for judging whether the subtitle coding format of the program credits text compares with described The subtitle coding format of captioned test is identical;
Coded format converting unit compares subtitle text with described for the subtitle coding format when the program credits text When this subtitle coding format is not identical, the subtitle coding format of the program credits text is converted into the control subtitle text This subtitle coding format;
Encoded radio comparing unit compares captioned test with described for the subtitle coding format when the program credits text Subtitle coding format it is identical when, respectively correspond the subtitle coding value of program credits text described in comparison with described and compare subtitle text Whether this subtitle coding value is equal;
Test prompts output unit exports corresponding subtitle test prompts for the comparison result according to subtitle coding value.
The present invention generates default lattice by that will decode the caption information obtained using the code stream subtitle test mode of automation The program credits text of formula, so realize with it is preset compare captioned test progress subtitle contrastive test, specifically include subtitle Character library type comparison and caption content comparison.In addition, in the program credits text character library type of subtitle with compare When character library Type-Inconsistencies in captioned test, corresponding character library can be obtained from actual program code stream to update the program The character library of captioned test.The present invention can carry out automatically the test of code stream subtitle, and then improve the testing efficiency of code stream subtitle And test speed, while also avoiding artificially testing brought error, improve the accuracy rate of code stream subtitle test.
Detailed description of the invention
Fig. 1 is the flow diagram of the automatic test approach first embodiment of code stream subtitle of the present invention;
Fig. 2 is the flow diagram of the automatic test approach second embodiment of code stream subtitle of the present invention;
Fig. 3 is the flow diagram that code stream makes an embodiment in the present invention;
Fig. 4 is the flow diagram of the automatic test approach 3rd embodiment of code stream subtitle of the present invention;
Fig. 5 is that step S40 refines flow diagram in Fig. 4;
Fig. 6 is the refinement flow diagram of step S30 in Fig. 1;
Fig. 7 is the functional block diagram of the automatic testing equipment first embodiment of code stream subtitle;
Fig. 8 is the functional block diagram of the automatic testing equipment second embodiment of code stream subtitle;
Fig. 9 is the functional block diagram of the automatic testing equipment 3rd embodiment of code stream subtitle;
Figure 10 is the refinement the functional block diagram of character library type update module in Fig. 9;
Figure 11 is the refinement the functional block diagram of caption content test module in Fig. 7.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the flow diagram of the automatic test approach first embodiment of code stream subtitle of the present invention.This reality It applies in example, the automatic test approach of the code stream subtitle includes:
Step S10 decodes actual program code stream to obtain caption information, and the caption information is generated preset format Program credits text;
It is current to obtain in decoding actual program code stream for the automatic test for being convenient for code stream subtitle in the present embodiment When caption information corresponding to program, the obtained caption information of decoding is generated into the program credits text of preset format, so as to Test is compared in preset control captioned test, and the preset format of captioned test is unlimited, is set with specific reference to actual needs It sets.For example, captioned test can be edited using XML format, such as the setting format of control captioned test as follows.
<xml version=" 1.0 " encoding=" ISO-8859-1 ">
<subtitle>
<font>Calibri</font>
<program>CCTV4</program>
<content time=" 10:10:00 ">Hello world!</content>
</subtitle>
Wherein, encoding indicates that the coded format that the equipment for carrying out subtitle test is supported, such as ISO-8859-1 are compiled Code format, ASCII character coded format, UNICODE code coded format etc.;Font indicates the character library type of control subtitle, such as word Physique formula;Program indicates channel name corresponding to control subtitle;Content indicates the character content of subtitle, and time indicates word The timestamp of curtain namely Subtitle Demonstration time.
Step S20 reads the character library type of subtitle in control captioned test corresponding with the program credits text, sentences Break subtitle in the program credits text character library type and the character library type for compareing subtitle in captioned test it is whether consistent;
In the present embodiment, it should be further noted that preset control captioned test can be preset in execution subtitle In the equipment of test, for example be preset in television set, or be preset in set-top box etc..When in the equipment for executing subtitle test When starting to carry out the automatic test of code stream subtitle, preset corresponding control captioned test is read automatically test is compared.Than Such as, the program credits obtained after current decoding correspond to the program credits of CCTV4 channel, then accordingly obtaining program is CCTV4 The control captioned test of channel starts to carry out the test of code stream subtitle.
The display of subtitle specifically includes the character library type (such as font) of subtitle, the display position of subtitle, Subtitle Demonstration Time and corresponding subtitle content etc., therefore, in the present embodiment, preferably first to the character library class of subtitle in the program credits text of generation Type is judged, to judge whether it is consistent with the character library type of subtitle in corresponding control captioned test.For example, program The character library type of subtitle is the Song typeface in captioned test, and the character library type for compareing subtitle in captioned test is black matrix, then between the two Character library Type-Inconsistencies, if inconsistent, the font type test errors of subtitle, and if consistent, the font type of subtitle Test is correct.
Step S30, when the character library type of subtitle with described compares subtitle in captioned test in the program credits text When character library type is consistent, according to the timestamp of the program credits text and the timestamp for compareing captioned test, word is carried out Curtain content contrastive test simultaneously exports contrastive test result.
When the character library type of subtitle is consistent with the character library type of subtitle in control captioned test in program credits text, then The contrastive test for continuing caption content, with specific reference to timestamp and the time that compares captioned test of program credits text Stamp carries out caption content contrastive test and exports contrastive test result.In the present embodiment, for caption content compare mode not Limit, is configured with specific reference to actual conditions.
For example, program credits text is " hello, world in the caption content of 10:10:00~10:10:20!", and it is right According to captioned test 10:10:00~10:10:20 caption content be " hello, china!", then it respectively corresponds and survey is compared After examination, due in program credits text in caption content character " world " with compare the word in captioned test in caption content Accord with that " china " be not identical, and therefore, mistake occurs for caption content contrastive test, therefore the contrastive test result accordingly exported can be with It is, for example, output " there is wrong subtitle world in program credits text ".
This implementation generates default lattice by that will decode the caption information obtained using the code stream subtitle test mode of automation The program credits text of formula, so realize with it is preset compare captioned test progress subtitle contrastive test, pass through progress code stream The automatic test of subtitle, and then the testing efficiency and test speed of code stream subtitle are improved, while also avoiding artificially testing institute Bring error improves the accuracy rate of code stream subtitle test.In addition, it should be noted that, in the display content of subtitle, by Setting in the display position of subtitle is relatively fixed, and word corresponding to same channel difference program, same program different time The character library type and content of curtain may be not identical, therefore, preferably to the character library type and subtitle of subtitle in the present embodiment Content is tested, but is not limited to test character library type and caption content.
It is the flow diagram of the automatic test approach second embodiment of code stream subtitle of the present invention referring to Fig. 2, Fig. 2.It is based on Above-described embodiment in the present embodiment, includes: before step S10
Step S01 receives transmission code stream and parses, obtains program stream;
Step S02 judges the bit stream data that default character library data packet whether is carried in obtained program stream parsed;
Step S03, when carrying the bit stream data of default character library data packet in the obtained program stream of parsing, determine into The automatic test of row code stream subtitle.
In the present embodiment, for convenient for quickly finding the program for needing to carry out subtitle test, therefore in the NIT table of code stream In, it defines a link and describes sub- Linkage_Descriptor, structure definition such as table 1.
Table 1
Wherein, Service_id is specifically directed towards the program number program_ of the self-defining data in the pat table of code stream The value of Service_id is preferably set as and program number for convenient for quickly positioning the program for needing to carry out subtitle test by number The value of program_number is identical.
As shown in figure 3, in the present embodiment, at the editor end of program, (for example the audio, video data editor at operator end is set It is standby), by preset word-base data packet and with the NIT of linkage descriptor, audiovisual data and other Program Specific Information Together be packed into transmission code stream to be broadcast on network, then using receiving end (such as television set, set-top box) Decoding process and form program stream.In the present embodiment, the program stream institute that will carry the bit stream data of word-base data packet is right The program answered is as the program for needing to carry out code stream subtitle test, wherein and a kind of word-base data packet corresponds to a kind of font type, than Such as, Song typeface data packet, black matrix data packet etc., the setting quantity of word-base data packet, font type etc. are unlimited, with specific reference to practical need It is configured.
In addition, it is necessary to further illustrate, since PID (Packet Identifier, PID Packet Identifier) value of program exists Uniquely exist in code stream, therefore also need the pid value of the pre-defined program for carrying out subtitle test at the editor end of program, passes through The pid value of preset program is the program that can be identified as needing to carry out subtitle test, namely corresponding determining and preset program The bit stream data of default character library data packet is carried in the corresponding data packet of pid value, so parse again program video data, The program stream such as audio data, caption data, to carry out the automatic test of code stream subtitle.The decoding to transmission code stream of receiving end Process approximately as:
Firstly, the link in parsing NIT table describes sub- Linkage_Descriptor, Service_id value is obtained, in turn The program number program_number for needing to carry out the program of subtitle test is obtained according to Service_id;
Secondly, searching pat table according to program number program_number, the program stream that program is corresponded in pmt table is obtained Pid value, and judge the program stream pid value and it is pre-set carry out subtitle test program pid value it is whether equal; If equal, illustrate that parsing is correct, the test of code stream subtitle can be carried out, otherwise prompt error;
Finally, the pid value of the program stream obtained according to parsing parses the video data, audio data, subtitle of program The program stream such as data, to carry out the automatic test of code stream subtitle.
In the present embodiment, word-base data packet is packed into transmission code stream, thus as needing to carry out code stream subtitle test Program a part, by judging the bit stream data for whether carrying default character library data packet in program stream with determination Whether the corresponding program of actual program code stream needs to carry out the test of code stream subtitle.In addition, for judge in program stream whether The mode for carrying the bit stream data of default character library data packet is unlimited, such as presets the code stream for carrying and setting word-base data packet The pid value of the program stream of data by searching NIT table, pat table and pmt table in succession, and then determines what current parsing obtained Whether the pid value of program stream and the pid value of the pre-set program for carrying out subtitle test are equal, if equal, it is determined that section The bit stream data of default character library data packet is carried in mesh code stream, thus needs to carry out the test of code stream subtitle.
It is the flow diagram of the automatic test approach 3rd embodiment of code stream subtitle of the present invention referring to Fig. 4, Fig. 4.It is based on Above-described embodiment, in the present embodiment, after above-mentioned steps S20 further include:
Step S40, when the character library type of subtitle with described compares subtitle in captioned test in the program credits text When character library Type-Inconsistencies, according to the character library type of subtitle in the control captioned test, from the code stream of the word-base data packet The character library of corresponding character library type is obtained in data to update the character library of the program credits text.
The present embodiment is to compare the character library type of subtitle in subtitle as reference standard, when the word of subtitle in program credits text When library type is with the character library Type-Inconsistencies for compareing subtitle in captioned test, by according to control subtitle in subtitle character library type, The identical character library of character library type for being obtained from the bit stream data of word-base data packet and compareing subtitle in subtitle, thus to update The character library of program credits text.
For example, the character library type of subtitle is the Song typeface in program credits text, and compare the character library class of subtitle in captioned test Type is black matrix, and the character library type of subtitle between the two is different, thus needs to obtain black matrix from the bit stream data of word-base data packet Character library, and Song typeface character library of the black matrix character library that will acquire to update program credits text.
In the present embodiment, when the character library type of subtitle and the pre-set character library type for compareing subtitle be not in test code streams When consistent, by the way that word-base data packet to be bundled in transmission code stream, so as to quickly from the bit stream data of word-base data packet The character library of corresponding character library type is directly acquired to update the character library of program credits text, to further realize to such test errors Automatic modification processing, so that testing subtitle of the invention has certain error correction.
It is that step S40 refines flow diagram in Fig. 4 referring to Fig. 5, Fig. 5.Based on the above embodiment, in the present embodiment, step Suddenly S40 includes:
Step S401 parses the code of the word-base data packet according to the character library type of subtitle in the control captioned test Flow data is to obtain the character library of corresponding character library type;
The storage location of the program credits text is written in the character library of step S402, the corresponding character library type that will acquire And subtitle refresh command is triggered, to update the character library of the program credits text.
In the present embodiment, when the character library type of subtitle and the character library class for compareing subtitle in captioned test in program credits text When type is inconsistent, the word-base data packet in code stream is obtained from parsing in the bit stream data of word-base data packet, and analytically obtain The identical character library of character library type for being obtained in word-base data packet and compareing subtitle in captioned test.
Further, since decoded caption information needs audiovisual data to be stored with terminal device (such as machine top Box, television set) in order to showing on the terminal device, it is therefore desirable to end is also written into the character library obtained from word-base data packet The storage location of program credits text in end equipment.Meanwhile the order of trigger word bank refresh is to the word in program credits text Curtain carries out the update processing of character library type, and each module on terminal device is notified to carry out related refresh operation to update program word The character library of curtain text, to finally be updated to by the character library type of subtitles all in program credits text and shine word in captioned test The identical character library type of curtain.The present embodiment further realizes the test errors progress to character library type by obtaining corresponding character library Automatic modification processing, so that testing subtitle of the invention has certain error correction.
It is the refinement flow diagram of step S30 in Fig. 1 referring to Fig. 6, Fig. 6.In the present embodiment, above-mentioned steps S30 includes:
Step S301, judge the program credits text subtitle coding format whether with the word for compareing captioned test Curtain coded format is identical;
Step S302, when subtitle coding format and the subtitle coding for compareing captioned test of the program credits text When format is not identical, the subtitle coding format of the program credits text is converted to the subtitle coding of the control captioned test Format;
Step S303, when subtitle coding format and the subtitle coding for compareing captioned test of the program credits text When format is identical, the subtitle coding value for respectively corresponding program credits text described in comparison is compiled with the subtitle for compareing captioned test Whether code value is equal;
Step S304 exports corresponding subtitle test prompts according to the comparison result of subtitle coding value.
In the present embodiment, it is preferred to use according to the method that the encoded radio of subtitle characters carries out caption content comparison, to program The subtitle of captioned test is tested.In view of carry out the test of code stream subtitle equipment (such as set-top box, TV) there may be The character encoding format that do not support, such as the equipment that certain money carries out the test of code stream subtitle are supported ASCII coding but are not supported UNICODE coded format, the subtitle coding format of preset control captioned test cannot use UNICODE coded format, such as Encoded using ASCII, and if the subtitle coding format of program credits text uses UNICODE coded format, thus due to same Coded format corresponding to character is inconsistent and then causes corresponding encoded radio inconsistent, not can be carried out the standard of character finally Really compare.
Therefore, carry out subtitle comparison when, need to judge program credits text subtitle coding format whether with compare The subtitle coding format of captioned test is identical;If not identical, the subtitle coding format of program credits text is converted into control The subtitle coding format of captioned test, and then make the subtitle coding uniform format of the two;And if they are the same, then directly carry out subtitle Contrastive test, and according to the comparison result of subtitle coding value, corresponding subtitle test prompts are exported, for example, all compare correctly, Then export the prompt that subtitle is successfully tested, and if there is any comparison mistake, export the corresponding character for comparing mistake with And carry out error prompting.
In the present embodiment, it is preferred to use according to the method that the encoded radio of subtitle characters carries out caption content comparison, to program The subtitle of captioned test is tested, but the present invention is not limited to the test modes of above-mentioned caption content, such as Direct Recognition Test is compared in subtitle characters.In the present embodiment, by carrying out automatic comparison test to caption content, and then without passing through people Work vision comparison to improve the speed and efficiency of subtitle test, while also improving the accuracy rate of test, reduces use Error when artificial comparison, to further speed up the speed to introduce of program and reduce more exploitation test resources.
It is the functional block diagram of the automatic testing equipment first embodiment of code stream subtitle referring to Fig. 7, Fig. 7.This implementation In example, the automatic testing equipment of code stream subtitle includes:
Captioned test generation module 10 for decoding actual program code stream to obtain caption information, and the subtitle is believed Breath generates the program credits text of preset format;
It is current to obtain in decoding actual program code stream for the automatic test for being convenient for code stream subtitle in the present embodiment When caption information corresponding to program, the caption information that captioned test generation module 10 obtains decoding generates the section of preset format Mesh captioned test, so that test is compared with preset control captioned test, the preset format of captioned test is unlimited, specific root It is configured according to actual needs.
Character library type judging module 20, for reading word in control captioned test corresponding with the program credits text The character library type of curtain judges the character library type of subtitle and the word for compareing subtitle in captioned test in the program credits text Whether library type is consistent;
In the present embodiment, it should be further noted that preset control captioned test can be preset in execution subtitle In the equipment of test, for example be preset in television set, or be preset in set-top box etc..When in the equipment for executing subtitle test When starting to carry out the automatic test of code stream subtitle, preset corresponding control captioned test is read automatically test is compared.Than Such as, the program credits obtained after current decoding correspond to the program credits of CCTV4 channel, then accordingly obtaining program is CCTV4 The control captioned test of channel starts to carry out the test of code stream subtitle.
The display of subtitle specifically includes the character library type (such as font) of subtitle, the display position of subtitle, Subtitle Demonstration Time and corresponding subtitle content etc., therefore, in the present embodiment, in the program credits text of 20 pairs of character library type judging module generations The character library type of subtitle judged, with judge its whether with the character library type phase one of subtitle in corresponding control captioned test It causes.For example, the character library type of subtitle is the Song typeface in program credits text, and the character library type for compareing subtitle in captioned test is black Body, then character library Type-Inconsistencies between the two, if inconsistent, the font type test errors of subtitle, and if consistent, subtitle Font type test it is correct.
Caption content test module 30, for compareing word with described when the character library type of subtitle in the program credits text When the character library type of subtitle is consistent in curtain text, according to the timestamp of the program credits text and the captioned test that compares Timestamp carries out caption content contrastive test and exports contrastive test result.
When the character library type of subtitle is consistent with the character library type of subtitle in control captioned test in program credits text, then Caption content test module 30 continues the contrastive test of caption content, with specific reference to program credits text timestamp with it is right According to the timestamp of captioned test, carries out caption content contrastive test and export contrastive test result.In the present embodiment, for subtitle The mode that content compares is unlimited, is configured with specific reference to actual conditions.
For example, program credits text is " hello, world in the caption content of 10:10:00~10:10:20!", and it is right According to captioned test 10:10:00~10:10:20 caption content be " hello, china!", then it respectively corresponds and survey is compared After examination, due in program credits text in caption content character " world " with compare the word in captioned test in caption content Accord with that " china " be not identical, and therefore, mistake occurs for caption content contrastive test, therefore the contrastive test result accordingly exported can be with It is, for example, output " there is wrong subtitle world in program credits text ".
This implementation generates default lattice by that will decode the caption information obtained using the code stream subtitle test mode of automation The program credits text of formula, so realize with it is preset compare captioned test progress subtitle contrastive test, pass through progress code stream The automatic test of subtitle, and then the testing efficiency and test speed of code stream subtitle are improved, while also avoiding artificially testing institute Bring error improves the accuracy rate of code stream subtitle test.In addition, it should be noted that, in the display content of subtitle, by Setting in the display position of subtitle is relatively fixed, and word corresponding to same channel difference program, same program different time The character library type and content of curtain may be not identical, therefore, preferably to the character library type and subtitle of subtitle in the present embodiment Content is tested, but is not limited to test character library type and caption content.
It is the functional block diagram of the automatic testing equipment second embodiment of code stream subtitle referring to Fig. 8, Fig. 8.This implementation In example, the automatic testing equipment of code stream subtitle further include:
Transmission code stream parsing module 40 obtains program stream for receiving transmission code stream and parsing;
Word-base data packet judgment module 50, for judging parse in obtained program stream whether carry default character library The bit stream data of data packet;
Subtitle tests determining module 60, for when the code for carrying default character library data packet in the program stream that parsing obtains When flow data, the automatic test for carrying out code stream subtitle is determined.
In the present embodiment, word-base data packet is packed into transmission code stream, thus as needing to carry out code stream subtitle test Program a part, transmission code stream parsing module 40 by the transmission code stream received parse, obtain program stream, then pass through Word-base data packet judgment module 50 judges the bit stream data that default character library data packet whether is carried in program stream, and then passes through Subtitle test determining module 60 determines whether the corresponding program of actual program code stream needs to carry out the test of code stream subtitle.In addition, It is unlimited for the mode for judging whether to carry the bit stream data of default character library data packet in program stream, such as preset and take The pid value of program stream with the bit stream data for setting word-base data packet, by searching NIT table, pat table and pmt table in succession, And then determine that the pid value for currently parsing the pid value and the pre-set program for carrying out subtitle test of obtained program stream is It is no equal, if equal, it is determined that carry the bit stream data of default character library data packet in program stream, thus need to carry out code stream The test of subtitle.
It is the functional block diagram of the automatic testing equipment 3rd embodiment of code stream subtitle referring to Fig. 9, Fig. 9.This implementation In example, the automatic testing equipment of code stream subtitle further include:
Character library type update module 70, for compareing word with described when the character library type of subtitle in the program credits text In curtain text when the character library Type-Inconsistencies of subtitle, according to the character library type of subtitle in the control captioned test, from the word The character library of corresponding character library type is obtained in the bit stream data of library data packet to update the character library of the program credits text.
The present embodiment is to compare the character library type of subtitle in subtitle as reference standard, when the word of subtitle in program credits text When library type is with the character library Type-Inconsistencies for compareing subtitle in captioned test, character library type update module 70 will be according to control subtitle The character library type of middle subtitle obtains identical with the character library type for compareing subtitle in subtitle from the bit stream data of word-base data packet Character library, thus to the character library for updating program credits text.
For example, the character library type of subtitle is the Song typeface in program credits text, and compare the character library class of subtitle in captioned test Type is black matrix, and the character library type of subtitle between the two is different, thus needs to obtain black matrix from the bit stream data of word-base data packet Character library, and Song typeface character library of the black matrix character library that will acquire to update program credits text.
In the present embodiment, when the character library type of subtitle and the pre-set character library type for compareing subtitle be not in test code streams When consistent, by the way that word-base data packet to be bundled in transmission code stream, so as to quickly from the bit stream data of word-base data packet The character library of corresponding character library type is directly acquired to update the character library of program credits text, to further realize to such test errors Automatic modification processing, so that testing subtitle of the invention has certain error correction.
0, Figure 10 is the refinement the functional block diagram of character library type update module in Fig. 9 referring to Fig.1.In the present embodiment, The character library type update module 70 includes:
Character library acquiring unit 701 parses the character library for the character library type according to subtitle in the control captioned test The bit stream data of data packet is to obtain the character library of corresponding character library type;
The program credits text is written in character library updating unit 702, the character library of the corresponding character library type for will acquire This storage location simultaneously triggers subtitle refresh command, to update the character library of the program credits text.
In the present embodiment, when the character library type of subtitle and the character library class for compareing subtitle in captioned test in program credits text When type is inconsistent, character library acquiring unit 701 obtains the word-base data packet in code stream from parsing in the bit stream data of word-base data packet, And it is obtained and the identical character library of character library type that compares subtitle in captioned test in the word-base data packet analytically obtained.
Further, since decoded caption information needs audiovisual data to be stored with terminal device (such as machine top Box, television set) in order to show on the terminal device, therefore character library updating unit 702 needs will be obtained from word-base data packet The storage location of the program credits text on terminal device is also written in the character library taken.Meanwhile character library updating unit 702 triggers character library Refresh command is handled with the update for carrying out character library type to the subtitle in program credits text, and notifies each mould on terminal device Block carries out related refresh operation to update the character library of program credits text, thus finally by subtitles all in program credits text Character library type is updated to character library type identical with subtitle in captioned test is shone.The present embodiment is by obtaining corresponding character library with into one Step, which is realized, carries out automatic modification processing to the test errors of character library type, so that testing subtitle of the invention has certain entangle Wrong function.
1, Figure 11 is the refinement the functional block diagram of caption content test module in Fig. 7 referring to Fig.1.In the present embodiment, The caption content test module 30 includes:
Coded format judging unit 301, for judge the program credits text subtitle coding format whether with it is described The subtitle coding format for compareing captioned test is identical;
Coded format converting unit 302 compares word with described for the subtitle coding format when the program credits text When the subtitle coding format of curtain text is not identical, the subtitle coding format of the program credits text is converted into the control word The subtitle coding format of curtain text;
Encoded radio comparing unit 303 compares subtitle with described for the subtitle coding format when the program credits text When the subtitle coding format of text is identical, the subtitle coding value for respectively corresponding program credits text described in comparison compares word with described Whether the subtitle coding value of curtain text is equal;
Test prompts output unit 304 exports corresponding subtitle test and mentions for the comparison result according to subtitle coding value Show.
In the present embodiment, it is preferred to use according to the method that the encoded radio of subtitle characters carries out caption content comparison, to program The subtitle of captioned test is tested.In view of carry out the test of code stream subtitle equipment (such as set-top box, TV) there may be The character encoding format that do not support, such as the equipment that certain money carries out the test of code stream subtitle are supported ASCII coding but are not supported UNICODE coded format, the subtitle coding format of preset control captioned test cannot use UNICODE coded format, such as Encoded using ASCII, and if the subtitle coding format of program credits text uses UNICODE coded format, thus due to same Coded format corresponding to character is inconsistent and then causes corresponding encoded radio inconsistent, not can be carried out the standard of character finally Really compare.
Therefore, when carrying out the comparison of subtitle, coded format judging unit 301 needs to judge the subtitle of program credits text Whether coded format is identical as the control subtitle coding format of captioned test;If not identical, coded format converting unit 302 will The subtitle coding format of program credits text is converted to the subtitle coding format of control captioned test, and then compiles the subtitle of the two Code uniform format;And if they are the same, then encoded radio comparing unit 303 directly carries out the contrastive test of subtitle, and test prompts output is single Member 304 exports corresponding subtitle test prompts then according to the comparison result of subtitle coding value, for example, all comparing correctly, then surveys Examination prompt output unit 304 exports the prompt that is successfully tested of subtitle, and if there is any comparison mistake, test prompts output Unit 304 exports the corresponding character for comparing mistake and carries out error prompting.
In the present embodiment, it is preferred to use according to the method that the encoded radio of subtitle characters carries out caption content comparison, to program The subtitle of captioned test is tested, but the present invention is not limited to the test modes of above-mentioned caption content, such as Direct Recognition Test is compared in subtitle characters.In the present embodiment, by carrying out automatic comparison test to caption content, and then without passing through people Work vision comparison to improve the speed and efficiency of subtitle test, while also improving the accuracy rate of test, reduces use Error when artificial comparison, to further speed up the speed to introduce of program and reduce more exploitation test resources.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (8)

1. a kind of automatic test approach of code stream subtitle, which is characterized in that the automatic test approach of the code stream subtitle includes:
Decoding actual program code stream is to obtain caption information, and the program credits that the caption information is generated preset format are literary This;
The character library type for reading subtitle in control captioned test corresponding with the program credits text, judges the program word Whether the character library type and the character library type for compareing subtitle in captioned test of subtitle are consistent in curtain text;
When the character library type of subtitle is consistent with the character library type of subtitle in the control captioned test in the program credits text When, according to the timestamp of the program credits text and the timestamp for compareing captioned test, carries out caption content and compare survey It tries and exports contrastive test result;
The caption information is generated the program credits of preset format to obtain caption information by the decoding actual program code stream Include: before text
It receives transmission code stream and parses, obtain program stream;
Judge the bit stream data that default character library data packet whether is carried in obtained program stream parsed;
When carrying the bit stream data of default character library data packet in the program stream that parsing obtains, determines and carry out code stream subtitle Automatic test;
It is described to judge to parse that the step of whether carrying the bit stream data of default character library data packet in obtained program stream includes:
Obtain the PID Packet Identifier value in the program stream that parsing obtains;
Judge whether the PID Packet Identifier value parsed in obtained program stream is identical as the PID Packet Identifier value of preset program stream, Wherein, if they are the same, then determine to parse the bit stream data for carrying default character library data packet in obtained program stream.
2. the automatic test approach of code stream subtitle as described in claim 1, which is characterized in that the reading and the program word The character library type of subtitle, judges the character library class of subtitle in the program credits text in the corresponding control captioned test of curtain text After whether type is consistent with the character library type for compareing subtitle in captioned test further include:
When the character library type of subtitle in the program credits text and the character library type for compareing subtitle in captioned test are different When cause, according to the character library type of subtitle in the control captioned test, phase is obtained from the bit stream data of the word-base data packet The character library of character library type is answered to update the character library of the program credits text.
3. the automatic test approach of code stream subtitle as claimed in claim 2, which is characterized in that described according to the control subtitle The character library type of subtitle in text obtains the character library of corresponding character library type from the bit stream data of the word-base data packet to update The character library of the program credits text includes:
According to the character library type of subtitle in the control captioned test, the bit stream data of the word-base data packet is parsed to obtain phase Answer the character library of character library type;
The character library for the corresponding character library type that will acquire is written the storage location of the program credits text and triggers subtitle brush Newer command, to update the character library of the program credits text.
4. the automatic test approach of code stream subtitle as claimed in any one of claims 1-3, which is characterized in that the carry out word Curtain content contrastive test simultaneously exports contrastive test result and includes:
Judge the program credits text subtitle coding format whether with the subtitle coding format phase for compareing captioned test Together;
When the subtitle coding format of the program credits text and the not identical subtitle coding format for compareing captioned test, The subtitle coding format of the program credits text is converted to the subtitle coding format of the control captioned test;
When the subtitle coding format of the program credits text is identical as the control subtitle coding format of captioned test, point Not Dui Ying the program credits text subtitle coding value and it is described control captioned test subtitle coding value it is whether equal;
According to the comparison result of subtitle coding value, corresponding subtitle test prompts are exported.
5. a kind of automatic testing equipment of code stream subtitle, which is characterized in that the automatic testing equipment of the code stream subtitle includes:
Captioned test generation module for decoding actual program code stream to obtain caption information, and the caption information is generated The program credits text of preset format;
Character library type judging module, for reading the word of subtitle in control captioned test corresponding with the program credits text Library type judges the character library type of subtitle and the character library type for compareing subtitle in captioned test in the program credits text It is whether consistent;
Caption content test module, for compareing captioned test with described when the character library type of subtitle in the program credits text When the character library type of middle subtitle is consistent, according to the timestamp of the program credits text and the time for compareing captioned test Stamp carries out caption content contrastive test and exports contrastive test result;
The automatic testing equipment of the code stream subtitle further include:
Transmission code stream parsing module obtains program stream for receiving transmission code stream and parsing;
Word-base data packet judgment module, for judging parse in obtained program stream whether carry default character library data packet Bit stream data;
Program stream parsing module, for when the bit stream data for carrying default character library data packet in the program stream that parsing obtains When, determine the automatic test for carrying out code stream subtitle;
The word-base data packet judgment module, is further used for:
Obtain the PID Packet Identifier value in the program stream that parsing obtains;
Judge whether the PID Packet Identifier value parsed in obtained program stream is identical as the PID Packet Identifier value of preset program stream, Wherein, if they are the same, then determine to parse the bit stream data for carrying default character library data packet in obtained program stream.
6. the automatic testing equipment of code stream subtitle as claimed in claim 5, which is characterized in that the automatic survey of the code stream subtitle Trial assembly is set further include:
Character library type update module, for compareing captioned test with described when the character library type of subtitle in the program credits text When the character library Type-Inconsistencies of middle subtitle, according to the character library type of subtitle in the control captioned test, from the word-base data The character library of corresponding character library type is obtained in the bit stream data of packet to update the character library of the program credits text.
7. the automatic testing equipment of code stream subtitle as claimed in claim 6, which is characterized in that the character library type update module Include:
Character library acquiring unit parses the word-base data packet for the character library type according to subtitle in the control captioned test Bit stream data to obtain the character library of corresponding character library type;
The storage of the program credits text is written in character library updating unit, the character library for the corresponding character library type that will acquire Subtitle refresh command is simultaneously triggered in position, to update the character library of the program credits text.
8. the automatic testing equipment of the code stream subtitle as described in any one of claim 5-7, which is characterized in that in the subtitle Holding test module includes:
Coded format judging unit, for judging whether the subtitle coding format of the program credits text with described compares subtitle The subtitle coding format of text is identical;
Coded format converting unit, for subtitle coding format and the captioned test that compares when the program credits text When subtitle coding format is not identical, the subtitle coding format of the program credits text is converted into the control captioned test Subtitle coding format;
Encoded radio comparing unit, for subtitle coding format and the word for compareing captioned test when the program credits text When curtain coded format is identical, the subtitle coding value of program credits text described in comparison and the captioned test that compares are respectively corresponded Whether subtitle coding value is equal;
Test prompts output unit exports corresponding subtitle test prompts for the comparison result according to subtitle coding value.
CN201510776708.0A 2015-11-13 2015-11-13 The automatic test approach and device of code stream subtitle Active CN105430481B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510776708.0A CN105430481B (en) 2015-11-13 2015-11-13 The automatic test approach and device of code stream subtitle
PCT/CN2016/084840 WO2017080202A1 (en) 2015-11-13 2016-06-03 Method and device for automatically testing code stream subtitle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510776708.0A CN105430481B (en) 2015-11-13 2015-11-13 The automatic test approach and device of code stream subtitle

Publications (2)

Publication Number Publication Date
CN105430481A CN105430481A (en) 2016-03-23
CN105430481B true CN105430481B (en) 2019-03-12

Family

ID=55508364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510776708.0A Active CN105430481B (en) 2015-11-13 2015-11-13 The automatic test approach and device of code stream subtitle

Country Status (2)

Country Link
CN (1) CN105430481B (en)
WO (1) WO2017080202A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105430481B (en) * 2015-11-13 2019-03-12 深圳Tcl数字技术有限公司 The automatic test approach and device of code stream subtitle
CN106529529B (en) * 2016-10-31 2018-01-30 腾讯科技(深圳)有限公司 A kind of video caption recognition methods and system
CN107197237B (en) * 2017-07-05 2019-01-04 广州视源电子科技股份有限公司 A kind of detection method, device, equipment and the storage medium of picture and text sensitivity

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175167A (en) * 2006-10-31 2008-05-07 株式会社日立制作所 Equipment and method for detecting telecast commutation
CN101404730A (en) * 2008-09-23 2009-04-08 腾讯科技(深圳)有限公司 Method for loading caption in video flow and player thereof
CN102164248A (en) * 2011-02-15 2011-08-24 Tcl集团股份有限公司 Automatic caption testing method and system
CN103686352A (en) * 2013-11-15 2014-03-26 乐视致新电子科技(天津)有限公司 Smart television media player and subtitle processing method thereof, and smart television
CN104661079A (en) * 2015-02-03 2015-05-27 深圳创维数字技术有限公司 Multimedia format testing method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7034863B2 (en) * 2001-04-18 2006-04-25 Sarnoff Corporation Video streams for closed caption testing and the like
US8345159B2 (en) * 2007-04-16 2013-01-01 Caption Colorado L.L.C. Captioning evaluation system
CN101771846B (en) * 2009-01-04 2012-02-29 联想(北京)有限公司 Caption correcting method and electronic equipment
US8826354B2 (en) * 2010-12-01 2014-09-02 At&T Intellectual Property I, L.P. Method and system for testing closed caption content of video assets
CN105430481B (en) * 2015-11-13 2019-03-12 深圳Tcl数字技术有限公司 The automatic test approach and device of code stream subtitle

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175167A (en) * 2006-10-31 2008-05-07 株式会社日立制作所 Equipment and method for detecting telecast commutation
CN101404730A (en) * 2008-09-23 2009-04-08 腾讯科技(深圳)有限公司 Method for loading caption in video flow and player thereof
CN102164248A (en) * 2011-02-15 2011-08-24 Tcl集团股份有限公司 Automatic caption testing method and system
CN103686352A (en) * 2013-11-15 2014-03-26 乐视致新电子科技(天津)有限公司 Smart television media player and subtitle processing method thereof, and smart television
CN104661079A (en) * 2015-02-03 2015-05-27 深圳创维数字技术有限公司 Multimedia format testing method and device

Also Published As

Publication number Publication date
WO2017080202A1 (en) 2017-05-18
CN105430481A (en) 2016-03-23

Similar Documents

Publication Publication Date Title
CN105430481B (en) The automatic test approach and device of code stream subtitle
CN106227335B (en) Interactive learning method for preview lecture and video course and application learning client
CN108133632B (en) The training method and system of English Listening Comprehension
CN114390220B (en) Animation video generation method and related device
KR20150116768A (en) Foreign language learning method and system thereof
CN105979349A (en) Audio frequency data processing method and device
CN104378692A (en) Method and device for processing video captions
US20140176728A1 (en) Receiver and a transmitter
CN103778809A (en) Automatic video learning effect testing method based on subtitles
CN105578290A (en) EPG-based plan video dotting method and device
KR101503082B1 (en) rich media stream management
CN104768052A (en) Method and device for extracting voice frequency and subtitles according to language
KR102307330B1 (en) Reception device and reception method
KR20100133730A (en) Language learning method
US20070087312A1 (en) Method for separating sentences in audio-video display system
CN100401750C (en) Caption coding device
CN108965983A (en) It can closed caption data analytic method, smart television, storage medium and device
CN113595811B (en) Equipment performance testing method and device, storage medium and electronic device
KR20130015918A (en) A device for learning language considering level of learner and text, and a method for providing learning language using the device
CN106993231A (en) Method and system that a kind of video clip is played
CN113497968A (en) Method for acquiring dictation content
Deng et al. Combinatorial testing on implementations of html5 support
CN111753130A (en) Personalized foreign language spoken language learning system
US4466023A (en) Video disk player simulator, method and apparatus
dos Santos et al. Interoperability analysis for Ginga-NCL and HbbTV application players

Legal Events

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