Summary of the invention
For addressing the above problem, the invention provides a kind of detection method and detection system of remote media play signal time delay, it can detect the time delay of the remote media play signal between server end and client exactly.
For this reason, the invention provides a kind of detection method of remote media play signal time delay, it comprises the steps: server end signal sampling step: the remote media play signal that N each that play in stream of server end is play stream is carried out a plurality of samplings, and wherein N is the integer more than or equal to 1; The First Characteristic code generates step: all generate corresponding First Characteristic code for each sampled data that obtains in described server end signal sampling step; First Characteristic code storing step: play stream corresponding to each, will with each First Characteristic code corresponding to this broadcasts stream, and corresponding each sampling instant of each First Characteristic code store with corresponding to each other; Client signal sampling step: at client sampling instant Ts2 ', the remote media play signal of the current broadcast of client is sampled; The Second Characteristic code generates step: generate the Second Characteristic code according to the sampled data that obtains in described client signal sampling step; Server end sampling instant obtaining step: the corresponding server end signal sampling of the First Characteristic code that obtains to be complementary with it based on described Second Characteristic code is Ts1 constantly; And signal time delay obtains step: based on described server end signal sampling Ts1, described client signal sampling instant Ts2 ' constantly, and obtain client and server for the signal time delay Td of same remote media play signal.
Wherein, in described server end sampling instant obtaining step, based on the broadcast traffic identifier that comprises in described Second Characteristic code and the broadcast that identify customer end is play at described client signal sampling instant Ts2 ' stream; Search each First Characteristic code corresponding with this broadcast stream in the data of storing in described First Characteristic code storing step, and search First Characteristic code and the Ts1 of the corresponding server end signal sampling moment of this First Characteristic code that is complementary with described Second Characteristic code in described each First Characteristic code.
Wherein, described server end sampling instant obtaining step is completed by server end, and based on the corresponding server end signal sampling of the First Characteristic code that obtains to be complementary with it from the described Second Characteristic code of client Ts1 constantly; Perhaps described server end sampling instant obtaining step is completed by client, and based on being used for obtaining server end signal sampling data and described Second Characteristic code constantly from server end, obtain the corresponding server end signal sampling of First Characteristic code that is complementary with described Second Characteristic code Ts1 constantly, describedly comprise with each and play each corresponding First Characteristic code of stream, each sampling instant corresponding with each First Characteristic code be used to obtaining server end signal sampling data constantly.
Wherein, obtain in step at described signal time delay, when take the clock signal of server end during as reference clock signal, client signal sampling instant Ts2 ' is converted to the with it corresponding indicated client sampling instant Ts2 of server end clock signal, and based on formula Td=Ts2-Ts1 and picked up signal time delay Td; Perhaps obtain in step at described signal time delay, when take the clock signal of client during as reference clock signal, with the server end signal sampling constantly Ts1 be converted to the corresponding with it indicated server end sampling instant Ts1 ' of client clock signal, and based on formula Td=Ts2 '-Ts1 ' and picked up signal time delay Td.
Wherein, the detection method of this remote media play signal time delay also comprises the step of calculating this network delay when there is network delay in the transfer of data between server end and client, and rejects described network delay when described signal time delay obtains to calculate described signal time delay in step.
Wherein, described First Characteristic code is consistent with the data type of Second Characteristic code, and described data type comprises the combination of finger image or audio-frequency fingerprint or finger image and audio-frequency fingerprint.
Wherein, described client sampling instant Ts2 ' switches the moment of playing stream corresponding to client.
Wherein, described client comprises intelligent television, PC, set-top box, mobile phone or panel computer for resolving the smart machine of remote media play signal.
As another aspect, the present invention also provides a kind of detection system of remote media play signal time delay, it comprises: server end signal sampling unit, be used for N the remote media play signal of playing each broadcast stream of stream of server end carried out a plurality of samplings, wherein N is the integer more than or equal to 1; First Characteristic code generation unit is used for all generating corresponding First Characteristic code for each sampled data from server end signal sampling unit; The first memory cell is used for playing stream corresponding to each, will with each First Characteristic code corresponding to this broadcasts stream, and corresponding each sampling instant of each First Characteristic code store with corresponding to each other; The client signal sampling unit is used at client sampling instant Ts2 ', and the remote media play signal of the current broadcast of client is sampled; Second Characteristic code generation unit is used for generating the Second Characteristic code according to the sampled data from the client signal sampling unit; Server end sampling instant acquiring unit is used for the Ts1 of the corresponding server end signal sampling moment of First Characteristic code that obtains to be complementary with it based on described Second Characteristic code; And signal time delay obtains the unit, is used for based on described server end signal sampling Ts1, described client signal sampling instant Ts2 ' constantly, and obtains client and server for the signal time delay Td of same remote media play signal.
Wherein, described server end sampling instant acquiring unit comprises to be play the stream identification module and searches module, and described broadcast stream identification module is used for the broadcast traffic identifier that comprises based on described Second Characteristic code and the broadcast stream that identify customer end is play at described client signal sampling instant Ts2 '; The described module of searching is used for searching each First Characteristic code corresponding with this broadcast stream in the data of described the first cell stores, and searches First Characteristic code and the Ts1 of the corresponding server end signal sampling moment of this First Characteristic code that is complementary with described Second Characteristic code in described each First Characteristic code.
Wherein, described server end sampling instant acquiring unit is arranged on server end, and based on the corresponding server end signal sampling of the First Characteristic code that obtains to be complementary with it from the described Second Characteristic code of client Ts1 constantly; Perhaps described server end sampling instant acquiring unit is arranged on client, and based on being used for obtaining server end signal sampling data and described Second Characteristic code constantly from server end, obtain the corresponding server end signal sampling of First Characteristic code that is complementary with described Second Characteristic code Ts1 constantly, describedly comprise with each and play each corresponding First Characteristic code of stream, each sampling instant corresponding with each First Characteristic code be used to obtaining server end signal sampling data constantly.
Wherein, the detection system of remote media play signal time delay provided by the invention also comprises the clock reference converting unit, this clock reference converting unit is arranged on server end or client, be used for take the clock signal of server end during as reference clock signal, client signal sampling instant Ts2 ' is converted to the with it corresponding indicated client sampling instant Ts2 of server end clock signal, and based on formula Td=Ts2-Ts1 and picked up signal time delay Td; Perhaps take the clock signal of client during as reference clock signal, with the server end signal sampling constantly Ts1 be converted to the corresponding with it indicated server end sampling instant Ts1 ' of client clock signal, and based on formula Td=Ts2 '-Ts1 ' and picked up signal time delay Td.
Wherein, the detection system of remote media play signal time delay provided by the invention also comprises the network delay computing unit, be used for calculating this network delay when there is network delay in the transfer of data between server end and client, and described signal time delay obtains the unit reject described network delay when the described signal time delay of calculating.
Wherein, described First Characteristic code is consistent with the data type of Second Characteristic code, and described data type comprises the combination of finger image or audio-frequency fingerprint or finger image and audio-frequency fingerprint.
Wherein, described server end signal sampling unit and described client signal sampling unit are Image Data Acquisition Card and/or audio data collecting card.
Wherein, described client sampling instant Ts2 ' switches the moment of playing stream corresponding to client.
Wherein, described client comprises intelligent television, PC, set-top box, mobile phone or panel computer for resolving the smart machine of remote media play signal.
With respect to prior art, the present invention has following beneficial effect:
In the detection method and detection system of remote media play signal time delay provided by the invention, by at server end and client, same remote media play signal being sampled, and based on the difference in these two sampling times and obtain the time delay of remote media play signal.Particularly, server end carries out a plurality of samplings to the remote media play signal that N each that play in stream play stream, and play stream corresponding to each, all each corresponding with it First Characteristic code, each sampling instant corresponding with each First Characteristic code are stored with corresponding to each other; Client is sampled to the remote media play signal of current broadcast at client sampling instant Ts2 ' and the Second Characteristic code that generates; Then by obtaining the corresponding server end signal sampling of the First Characteristic code that is complementary with the Second Characteristic code in above-mentioned each First Characteristic code Ts1 constantly, and based on server end signal sampling constantly Ts1, client signal sampling instant Ts2 ' and obtain client and server for the signal time delay Td of same remote media play signal, thereby can realize effectively and exactly detecting the time delay of remote media play signal.
Embodiment
For making those skilled in the art understand better technical scheme of the present invention, be described in detail below in conjunction with detection method and the detection system of accompanying drawing to remote media play signal time delay provided by the invention.For convenience of explanation, in the application, be denoted as T take the clock signal of server end as the determined moment of benchmark, be denoted as T ' take the clock signal of client as the determined moment of benchmark.And in the application, client comprises the smart machine of any can parsings such as intelligent television, PC, set-top box, mobile phone, panel computer " real time remote multimedia stream signal " (Realtime Remote Multimedia Broadcasting Stream Signal), for ease of describing, incite somebody to action " real time remote multimedia stream signal " referred to as " remote media play signal ".So-called remote media play signal can comprise the live signal that the various transfer modes such as live signal of live signal, the network delivery of anolog TV signals, digital television signal, set-top box transmission transmit, and the so-called stream of playing can comprise the various channels that transmit the content flow such as live signal such as television channel, radio station (receiving station) channel, network direct broadcasting channel.
See also Fig. 1, the block diagram of the detection system of the remote media play signal time delay that shown in it, first embodiment of the invention provides.In the present embodiment, signal time delay obtains the unit and is arranged on server end.
As shown in Figure 1, the detection system of the remote media play signal time delay in the present embodiment comprises server end 10 and client 20.Server end 10 comprises that server end signal sampling unit 11, First Characteristic code generation unit 12, the first memory cell 13, server end sampling instant acquiring unit 14 and signal time delay obtain unit 15; Client 20 comprises client signal sampling unit 21 and Second Characteristic code generation unit 22.
Wherein, server end signal sampling unit 11 be used for that to server end 10 N play stream each play the remote media play signal that flows and carry out a plurality of samplings, wherein N is the integer more than or equal to 1.Server end signal sampling unit 11 can be the capture card consistent with being sampled remote media play signal type, for example, when being sampled remote media play signal type and being picture signal and/or audio signal, this capture card can be correspondingly picture signal capture card and/or audio signal sample card.
First Characteristic code generation unit 12 is used for all generating corresponding First Characteristic code for each sampled data from server end signal sampling unit 11.The data type of First Characteristic code comprises the combination of finger image or audio-frequency fingerprint or finger image and audio-frequency fingerprint.
The first memory cell 13 is used for playing stream corresponding to each, will with each First Characteristic code corresponding to this broadcasts stream, and corresponding each sampling instant of each First Characteristic code store with corresponding to each other.
Client signal sampling unit 21 is used at client sampling instant Ts2 ', and the remote media play signal of client 20 current broadcasts is sampled.Be similar to server end signal sampling unit 11, this client signal sampling unit 21 also can be the capture card consistent with being sampled remote media play signal type.
Second Characteristic code generation unit 22 is used for generating the Second Characteristic code according to the sampled data from client signal sampling unit 21.The data type of Second Characteristic code is consistent with the data type of First Characteristic code.
Server end sampling instant acquiring unit 14 is used for based on the corresponding server end signal sampling of First Characteristic code that obtains to be complementary with it from the Second Characteristic code of client 20 Ts1 constantly.
Signal time delay obtains unit 15, is used for based on the server end signal sampling moment Ts1, client signal sampling instant Ts2 ', and obtains client 20 and the signal time delay Td of server end 10 for same remote media play signal.
In actual applications, server end sampling instant acquiring unit 14 and signal time delay acquisition unit 15 can carry out the equipment that data are processed for microprocessor, CPU, single-chip microcomputer etc.
It is to be noted, First Characteristic code and Second Characteristic code all refer to: based on transformed by the picture material in the remote media play signal of the broadcast that gathered stream and/or audio content obtain, can characterize the characteristics of image of this remote media play signal and/or the numeric data code of audio frequency characteristics, preferably make it have certain antijamming capability, for example, can resist the conversion of picture format and audio format, the conversion of antagonism image resolution ratio size etc.
be understandable that, although the server end sampling instant acquiring unit 14 in the present embodiment is arranged on server end 10, but in actual applications, it also can be arranged on client 20, and based on the Second Characteristic code be used for obtaining server end signal sampling data constantly from server end 10, the corresponding server end signal sampling of the First Characteristic code that acquisition and Second Characteristic code are complementary is Ts1 constantly, wherein, comprise with each for the data of obtaining the first sampling instant and play each corresponding First Characteristic code of stream, and each sampling instant corresponding with each First Characteristic code.And, server end sampling instant acquiring unit 14 can comprise to be play the stream identification module and searches the module (not shown), wherein, play the stream identification module and be used for the broadcast traffic identifier that comprises based on the Second Characteristic code and the broadcast stream that identify customer end 20 is play at client signal sampling instant Ts2 '; Searching module is used for searching each First Characteristic code corresponding with this broadcast stream in the data that the first memory cell 13 is stored, and search the First Characteristic code that is complementary with this Second Characteristic code in each First Characteristic code, and search the corresponding server end signal sampling of this First Characteristic code Ts1 constantly.
It will also be appreciated that, in actual applications, first communication unit that can communicate with client 20 that can arrange that its unit shares at server end 10, in the second communication unit that can communicate with server end 10 that client 20 arranges that its unit shares, and communicating by letter between the unit of the unit of realizing server end 10 by means of the first communication unit and second communication unit and client 20; Perhaps, at server end 10, the first communication unit that its unit shares is not set, and in client 20, the second communication unit that its unit shares is not set, but for the unit of wanting in server end 10 to communicate with client 20 arranges communication function and these unit are directly communicated with client 20, and communication function is set and the direct and server end 10 in these unit is communicated for the unit of wanting in client 20 to communicate with server end 10.
Describe the course of work of the detection system of the remote media play signal time delay that first embodiment of the invention provides in detail below in conjunction with Fig. 2.
In server end signal sampling step 110, each plays the remote media play signal of stream by unit 11 collections of server end signal sampling, then samples frame by frame or key frame is sampled.At this, so-called key frame refers to stable sample frame, and it can resist the change of form or resolution.
In the step 120 that generates the First Characteristic code, First Characteristic code generation unit 12 generates corresponding First Characteristic code according to each frame signal of sampling.
In the step 130 of storage First Characteristic code, by the first memory cell 13, each First Characteristic code, each sampling instant and the corresponding broadcast stream corresponding with each First Characteristic code are stored with corresponding to each other.
In client signal sampling step 140, by client signal sampling unit 21 at the Ts2 ' of client clock signal indication constantly, the remote media play signal of client 20 current broadcasts is sampled.The sample mode that is appreciated that client 20 need to be consistent with server end 10, and for example, when server end 10 adopted the key frame sampling, client 20 also should synchronously be used the key frame sampling.
In the step 150 that generates the Second Characteristic code, generate corresponding Second Characteristic code by Second Characteristic code generation unit 22.
In the step 160 of obtaining the server end sampling instant, set up server end 10 and are connected bipartite connection with client, and the corresponding server end signal sampling of First Characteristic code that obtains to be complementary with it based on the Second Characteristic code by server end sampling instant acquiring unit 14 Ts1 constantly.
Particularly, at first, by client 20, the Second Characteristic code is sent to server end 10; Then, by server end 10 based on the broadcast traffic identifier that comprises in the Second Characteristic code and the broadcast that identify customer end 20 is play at client signal sampling instant Ts2 ' stream; At last, searched First Characteristic code and the Ts1 of the corresponding server end signal sampling moment of this First Characteristic code that is complementary with this Second Characteristic code by server end 10 in each First Characteristic code corresponding with this broadcast stream that it is stored.Perhaps, be sent to client 20 with what store for obtaining server end signal sampling data constantly by server end 10, wherein, be used for obtaining server end signal sampling data constantly and comprise each First Characteristic code corresponding with each broadcast stream, each sampling instant corresponding with each First Characteristic code; Then, by client 20 based on the broadcast traffic identifier that comprises in the Second Characteristic code and the broadcast that identify customer end 20 is play at client signal sampling instant Ts2 ' stream; At last, search First Characteristic code and the Ts1 of the corresponding server end signal sampling moment of this First Characteristic code that is complementary with this Second Characteristic code by client 20 in server end 10 each First Characteristic code corresponding with this broadcast stream that store.
Obtain in step 170 at signal time delay, obtain unit 15 based on the server end signal sampling moment Ts1, client signal sampling instant Ts2 ' by signal time delay, and obtain client 20 and the signal time delay Td of server end 10 for same remote media play signal.
It is to be noted, because the clock signal of client 20 and server end 10 is often asynchronous, therefore just need to clock reference converting unit (not shown) be set in client 20 or server end 10, and determine take client 20 or the clock signal of server end 10 as benchmark, in order to obtain remote media play signal time delay Td based on the server end signal sampling moment and the client signal sampling instant corresponding to reference clock.Particularly, take the clock signal of server end 10 during as reference clock signal, the clock reference converting unit is converted to the corresponding with it indicated client sampling instant Ts2 of server end clock signal with client signal sampling instant Ts2 ', and signal time delay obtains unit 15 based on formula Td=Ts2-Ts1 and picked up signal time delay Td; Perhaps take the clock signal of client 20 during as reference clock signal, the clock reference converting unit is converted to the corresponding with it indicated server end sampling instant Ts1 ' of client clock signal with server end signal sampling moment Ts1, and signal time delay obtains unit 15 based on formula Td=Ts2 '-Ts1 ' and picked up signal time delay Td.
It is pointed out that also above-mentioned First Characteristic code is consistent with the data type of Second Characteristic code, and data type comprises the combination of finger image or audio-frequency fingerprint or finger image and audio-frequency fingerprint.That is to say, above-mentioned sampled signal can be vision signal or audio signal, also combination both can be, as long as it is consistent with the signal type that the Second Characteristic code adopts to guarantee to generate the First Characteristic code, and continuous sampling need to be carried out for audio signal.
In addition, when there is network delay in the Internet Transmission between client 20 and server end 10, the detection system of this remote media play signal time delay also need to arrange network delay computing unit (not shown) at server end 10 or client 20, is used for the network delay of the transfer of data between calculation server end 10 and client 20.In addition, in order to reduce flow, only switch in client 20 and (for example play stream, for TV signal, only at switching TV channel) time, the detection system of remote media play signal time delay is just worked, i.e. client signal sampling instant Ts2 ' switches the moment of playing stream corresponding to client 20.
It is pointed out that further the data connection request between server end 10 and client 20 can be initiated by the either party in both.And in the computational process of signal time delay Td, any one party in server end 10 and client 20 can be as Square.When server end 10 is Square (that is, remote media play signal time delay Td calculates and obtains at server end 10), is sent to server end 10 by client 20 and calculate the required data of signal time delay Td; When client 20 is Square (that is, remote media play signal time delay Td calculates and obtains in client 20), is sent to client 20 by server end 10 and calculate the required data of signal time delay Td.
See also Fig. 3, the block diagram of the detection system of the remote media play signal time delay that shown in it, second embodiment of the invention provides.In the present embodiment, the remote media play signal is TV signal, play stream and be television channel, and take the clock signal of server end as reference clock signal, signal time delay obtains the unit and is arranged on server end.
In the present embodiment, the detection system of remote media play signal time delay comprises server end 10 and client 20.Wherein, server end 10 comprises that server end signal sampling unit 11, First Characteristic code generation unit 12, the first memory cell 13, server end sampling instant acquiring unit 14, signal time delay obtain unit 15, the first communication unit 16, clock reference converting unit 17 and network delay computing unit 18, and server end sampling instant acquiring unit 14 comprises and plays stream identification module 141 and search module 142; Client 20 comprises client signal sampling unit 21, Second Characteristic code generation unit 22, the second memory cell 23 and second communication unit 26.Wherein, the first communication unit 16 and second communication unit 26 can adopt existing any applicable wired or wireless communication transport module to realize.The function class of other units and module is similar to aforementioned in conjunction with Fig. 1 illustration, does not repeat them here.
Describe the course of work of the detection system of the remote media play signal time delay that the present embodiment provides in detail below in conjunction with Fig. 4.
As shown in Figure 3 and Figure 4, at node S21, client 20 sends connection requests via its second communication unit 26 to server end 10.
At node S22, server end 10 receives the connection request from client 20, writes down the indicated moment T1 of current server end clock signal, and returns to via the first communication unit 16 the confirmation signal of accepting connection request to client 20.
At node S23, server end signal sampling unit 11 is in the indicated Ts1 moment of server end clock signal, TV signal to N channel is carried out a plurality of samplings, and wherein N is the integer more than or equal to 1, then sampling data transmitting is delivered to First Characteristic code generation unit 12.
First Characteristic code generation unit 12 all generates corresponding First Characteristic code for each sampling, and sends it to the first memory cell 13.
The first memory cell 13 is stored each First Characteristic code, corresponding server end sampling time Ts1 and corresponding channel with corresponding to each other.
At node S24, client 20 is delayed during through dt_s2c from moment T1, the connection confirmation signal that receives from server end 10 by its second communication unit 26.
Client signal sampling unit 21 at the indicated Ts2 ' of client clock signal is constantly sampled to the TV signal of client 20 current broadcasts, and sampling data transmitting is delivered to Second Characteristic code generation unit 22.
Second Characteristic code generation unit 22 generates the Second Characteristic code according to the sampled data from client signal sampling unit 21, and Second Characteristic code and corresponding client sampling instant Ts2 ' are sent to the second memory cell 23.
The second memory cell 23 is stored Second Characteristic code and corresponding client sampling instant Ts2 '.
At node S25, client 20 rises from Ts2 ' constantly and delays when passing through dt1, by second communication unit 26, the data such as Second Characteristic code and dt1 is sent to server end 10.
At node S26, when sending the data such as Second Characteristic codes and dt1 through dt_c2s to server end 10 from client 20, server end 10 delays, receive the data such as Second Characteristic code and dt1 by the first communication unit 16, and record the indicated moment T2 of current server end clock signal.
Broadcast stream identification module 141 in server end sampling instant acquiring unit 14, based on the Second Characteristic code and utilize the TV station symbol recognition technology of television channel to identify the television channel that client 20 is play at client signal sampling instant Ts2 ', and recognition result is sent to searches module 142.Search module 142 comparing with corresponding each First Characteristic code of this television channel storage in Second Characteristic code and the first memory cell 13, search the First Characteristic code that is complementary, and after finding the First Characteristic code that is complementary, further search the server end signal sampling corresponding with this First Characteristic code Ts1 constantly, then Ts1 is sent to signal time delay and obtains unit 15.
Signal time delay obtains unit 15 and calculates client 20 and the signal time delay Td=Ts2-Ts1=T1/2+T2/2-dt1/2-Ts1 of server end 10 with respect to same TV signal based on Ts1, T1, T2 and dt1.
The concrete computational process of signal time delay Td is as follows:
At first, computing network time delay.For convenience of explanation and calculate, in the present embodiment, suppose that the network delay dt_c2s that client 20 arrives server end 10 equates with the network delay dt_s2c of server end 10 to client 20, and represent with dt_c2s.
dt_c2s=(T2-T1-dt1)/2
Then, the client sampling instant Ts2 ' that the client clock signal is indicated is converted to the corresponding with it indicated client sampling instant Ts2 of server end clock signal.Conversion method one according to formula Ts2=T2-dt_c2s-dt1, obtains Ts2=T1/2+T2/2-dt1/2; Conversion method two according to formula Ts2=T1+dt_c2s, obtains Ts2=T1/2+T2/2-dt1/2.
At last, obtain client 20 and the signal time delay Td of server end 10 with respect to same TV signal based on Ts1 and Ts2, wherein, Td=Ts2-Ts1=T1/2+T2/2-dt1/2-Ts1.
Certainly, also can utilize formula Td=dt_c2s-(Ts1-T1) computing client end 20 and the signal time delay Td of server end 10 with respect to same TV signal, can obtain signal time delay Td=T1/2+T2/2-dt1/2-Ts1 equally.
See also Fig. 5, the block diagram of the detection system of the remote media play signal time delay that shown in it, third embodiment of the invention provides.In the present embodiment, so-called remote media play signal is TV signal, and the so-called stream of playing is television channel, and take the clock signal of server end as reference clock signal, signal time delay obtains the unit and is arranged on client.
In the present embodiment, the detection system of remote media play signal time delay comprises server end 10 and client 20.Wherein, server end 10 comprises server end signal sampling unit 11, First Characteristic code generation unit 12, the first memory cell 13, server end sampling instant acquiring unit 14 and the first communication unit 16, and server end sampling instant acquiring unit 14 comprises and plays stream identification module 141 and search module 142; Client 20 comprises that client signal sampling unit 21, Second Characteristic code generation unit 22, the second memory cell 23, signal time delay obtain unit 15, second communication unit 26, clock reference converting unit 27 and network delay computing unit 28.The function class of unit and module is similar to aforementioned in conjunction with Fig. 1 and Fig. 3 illustration, does not repeat them here.Describe the course of work of the detection system of the remote media play signal time delay that the present embodiment provides in detail below in conjunction with Fig. 6.
As shown in Figure 5 and Figure 6, at node S31, at the indicated Ts1 of server end clock signal constantly sample to the TV signal of each channel, and sampled data transferred to First Characteristic code generation unit 12 in server end signal sampling unit 11.
First Characteristic code generation unit 12 is converted into corresponding First Characteristic code with each frame signal, and with each First Characteristic code, corresponding server end sampling time Ts1 and corresponding channel transmission to the first memory cell 13.
The first memory cell 13 is stored each First Characteristic code, corresponding server end sampling time Ts1 and corresponding channel with corresponding to each other.
At node S32, client signal sampling unit 21 at the indicated Ts2 ' of client clock signal is constantly sampled to the TV signal of client 20 current broadcasts, and sampled data is transferred to Second Characteristic code generation unit 22.
Second Characteristic code generation unit 22 generates corresponding Second Characteristic code according to the sampled data from client signal sampling unit 21, and sampling instant Ts2 ' and Second Characteristic code are transferred to the second memory cell 23.
The second memory cell 23 reaches corresponding with it sampling instant Ts2 ' with the Second Characteristic code and stores.
At node S33, client 20 is delayed when constantly Ts2 ' rises through dt1, by second communication unit 26 to server end 10 transmission connection requests.
At node S34, server end 10 is delayed during through dt_c2s from client 20 sends connection requests, receive this connection request by the first communication unit 16, record the indicated moment T1 of current server end clock signal, and return to by the first communication unit 16 the confirmation signal of accepting connection request to client 20.
At node S35, client 20 is delayed during through dt_s2c from moment T1, the connection confirmation signal that receives from server end 10 by second communication unit 26, and send the Second Characteristic codes by second communication unit 26 to server end 10, and calculate signal time delay Td desired datas to server end 10 requests.
At node S36, server end 10 is delayed during through dt_c2s from client 20 sends request of data, receives Second Characteristic code and this request of data by the first communication unit 16, records the indicated moment T2 of current server end clock signal.
Broadcast stream identification module 141 in server end sampling instant acquiring unit 14, based on the Second Characteristic code and utilize the TV station symbol recognition technology of television channel to identify the television channel that client 20 is play at client signal sampling instant Ts2 ', and recognition result is sent to searches module 142.Search module 142 with comparing with corresponding each First Characteristic code of this television channel in Second Characteristic code and the first memory cell 13, search the First Characteristic code that is complementary and the server end signal sampling corresponding with this First Characteristic code Ts1 constantly.And server end 10 sends to client 20 by the first communication unit 16 with data such as sampling time Ts1, T1 and T2.
At node S37, client 20 is delayed during through dt_s2c from moment T2, receives from data such as Ts1, the T1 of server end 10 and T2 by second communication unit 26.
In client 20, network delay computing unit 28 is by calculating network delay dt_c2s=(T2-T1)/2; Clock reference converting unit 27 is according to formula Ts2=T1-dt_c2s-dt1, and the client sampling instant Ts2 ' that the client clock signal is indicated is converted to the corresponding with it indicated client sampling instant Ts2 of server end clock signal; Signal time delay obtains unit 16 and obtains signal time delay Td=3T1/2-T2/2-dt1-Ts1 according to data such as T1, T2, dt1 and Ts1.
At node S38, client 20 by second communication unit 26 to server end 10 transmitted signal time delay Td, in order to the follow-up use of server end 10.
So-called follow-up use comprises to television set, set-top box or PC application program and some application that are associated with TV signal of embedding during WEB uses etc.For example, server end 10 can be set the time that sends advertisement to client 20 according to this signal time delay Td.
The below describes the detailed process of calculating signal time delay Td in the present embodiment in detail.
At first, computing network time delay.For convenience of explanation and calculate, adopt and be similar to aforementioned the second described method of embodiment and obtain network delay dt_c2s=(T2-T1)/2.
Then, the client sampling instant Ts2 ' that the client clock signal is indicated is converted to the corresponding with it indicated client sampling instant Ts2 of server end clock signal, specifically can adopt formula Ts2=T1-dt_c2s-dt1 to realize this conversion.
At last, obtain client 20 and the signal time delay Td of server end 10 with respect to same TV signal based on Ts1 and Ts2, wherein, Td=Ts2-Ts1=3T1/2-T2/2-dt1-Ts1.
Certainly, also can utilize formula Td=T1-Ts1-dt_c2s-dt1 to come computing client end 20 and the signal time delay Td of server end 10 with respect to same TV signal, can obtain signal time delay Td=3T1/2-T2/2-dt1-Ts1 equally.
The course of work of the detection system of the remote media play signal time delay that the present embodiment provides is not limited to shown in aforementioned sequential chart, but can adjust according to actual needs work schedule.For example, the detection system of the remote media play signal time delay that provides of the present embodiment also can be according to sequential working shown in Figure 7.
As Fig. 5 and shown in Figure 7, at node S41, at the indicated Ts1 of server end clock signal constantly sample to the TV signal of each channel, and sampled data transferred to First Characteristic code generation unit 12 in server end signal sampling unit 11.
First Characteristic code generation unit 12 is converted into corresponding First Characteristic code with each frame signal, and with each First Characteristic code, corresponding server end sampling time Ts1 and corresponding channel transmission to the first memory cell 13.
The first memory cell 13 is stored each First Characteristic code, corresponding server end sampling time Ts1 and corresponding channel with corresponding to each other.
At node S42, client signal sampling unit 21 at the indicated Ts2 ' of client clock signal is constantly sampled to the TV signal of client 20 current broadcasts, and sampled data is transferred to Second Characteristic code generation unit 22.
Second Characteristic code generation unit 22 generates corresponding Second Characteristic code according to the sampled data from client signal sampling unit 21, and sampling instant Ts2 ' and Second Characteristic code are transferred to the second memory cell 23.
The second memory cell 23 reaches corresponding with it sampling instant Ts2 ' with the Second Characteristic code and stores.
At node S43, server end 10 is delayed during through dt1 from moment Ts1, sends connection requests by the first communication unit 16 to client 20, and records the indicated moment T3 of current server end clock signal.
At node S44, client 20 is delayed during through dt s2c from server end 10 sends connection requests, receive this connection request by second communication unit 26, record the indicated moment T1 ' of active client clock signal, and return to the confirmation signal of accepting connection request to server end 10.
At node S45, server end 10 receives connection confirmation signal from client 20 by the first communication unit 16 after constantly T1 ' rises through time delay dt_c2s, and to client 20 transmission request of data.
At node S46, client 20 is delayed during through dt_s2c from server end 10 sends request of data, receive this request of data by second communication unit 26, record the indicated moment T2 ' of active client clock signal, and by second communication unit 26, the Second Characteristic code is sent to server end 10, and calculate signal time delay Td desired datas to server end 10 requests.
At node S47, delay when passing through dt_c2s from moment T2 ', server end 10 receives Second Characteristic code and this request of data, utilization is similar to method in the node S26 of above-mentioned the second embodiment and determines the First Characteristic code that is complementary with this Second Characteristic code and the corresponding server end signal sampling of this First Characteristic code Ts1 constantly, and the data such as T3, dt1 and sampling time Ts1 are sent to client 20.
At node S48, when sending the data such as T3, dt1 and sampling time Ts1 through dt_c2s from server end 10, client 20 delays, client 20 receives the data from server end 10, and calculate client 20 and the signal time delay Td of server end 10 with respect to same TV signal based on Ts1, T3, dt1 and Ts2 ', then client 20 is sent to server end 10 with signal time delay Td data, for the follow-up use of server end 10.
The below describes the detailed process of calculating signal time delay Td in the present embodiment in detail.
At first, computing network time delay.For convenience of explanation and calculate, network delay computing unit 28 adopts and is similar to aforementioned the second described method of embodiment and obtains network delay dt_c2s=(T2 '-T1 ')/2.
Then, clock reference converting unit 27 is utilized formula T3 '=T1 '-dt_s2c, and the moment T3 that the server end clock signal is indicated is converted to the corresponding with it indicated moment T3 ' of client clock signal.
Afterwards, clock reference converting unit 27 is utilized formula T3 '-Ts1 '=T3-Ts1, and the client sampling instant Ts1 that the server end clock signal is indicated is converted to the corresponding with it indicated client sampling instant Ts1 ' of client clock signal.
At last, signal time delay obtains unit 16 based on Td=Ts2 '-Ts1 ', obtains client 20 and the signal time delay Td of server end 10 with respect to same TV signal.
Be understandable that, the connection between client 20 and server end 10 can be before 10 pairs of remote media play signal samplings of client 20 and server end, set up afterwards or simultaneously.And in actual applications, also can exist to 20 samplings of same remote media play signal client front, server end 10 samplings after situation, the detection method of signal time delay Td in this case is similar to previous embodiment, does not repeat them here.
See also Fig. 8, the block diagram of the detection system of the remote media play signal time delay that shown in it, fourth embodiment of the invention provides.In the present embodiment, so-called remote media play signal is TV signal, and the so-called stream of playing is television channel, and take the clock signal of server end as reference clock signal, signal time delay obtains the unit and is arranged on client.
In the present embodiment, the detection system of remote media play signal time delay comprises server end 10 and client 20.Wherein, server end 10 comprises server end signal sampling unit 11, First Characteristic code generation unit 12, the first memory cell 13 and the first communication unit 16; Client 20 comprises that client signal sampling unit 21, Second Characteristic code generation unit 22, the second memory cell 23, server end sampling instant acquiring unit 24, signal time delay obtain unit 25, second communication unit 26, clock reference converting unit 27 and network delay computing unit 28, and server end sampling instant acquiring unit 24 comprises and plays stream identification module 241 and search module 242.The function class of unit and module is similar to aforementioned in conjunction with Fig. 1, Fig. 3 and Fig. 5 illustration, does not repeat them here.
The course of work of the detection system of the remote media play signal time delay that the present embodiment provides is similar to the detection system in aforementioned the 3rd embodiment, thereby also can be according to the testing of sequential settling signal time delay shown in Figure 6, just the detection system in the present embodiment and the detection system in aforementioned the 3rd embodiment are slightly different in the action of node S35 to S37, only these three nodes are elaborated at this.
In the present embodiment, at node S35, client 20 is delayed during through dt_s2c from moment T1, the connection confirmation signal that receives from server end 10 by second communication unit 26, and calculate signal time delay Td desired datas to server end 10 requests.
At node S36, server end 10 is delayed during through dt_c2s from client 20 sends request of data, receive this request of data by the first communication unit 16, record the indicated moment T2 of current server end clock signal, and each First Characteristic code, corresponding server end sampling time Ts1 and the data such as corresponding channel, T1 and T2 of storing in the first memory cell 13 are sent to client 20.
At node S37, client 20 is delayed during through dt_s2c from moment T2, each First Characteristic code, corresponding server end sampling time Ts1 and the data such as corresponding channel, T1 and T2 of storing in the first memory cell 13 that receives from server end 10 by second communication unit 26
In client 20, broadcast stream identification module 241 in server end sampling instant acquiring unit 24, based on the Second Characteristic code and utilize the TV station symbol recognition technology of television channel to identify the television channel that client 20 is play at client signal sampling instant Ts2 ', and recognition result is sent to searches module 242.Search module 242 with comparing with corresponding each First Characteristic code of this television channel of storing in Second Characteristic code and the first memory cell 13, search the First Characteristic code that is complementary and the server end signal sampling corresponding with this First Characteristic code Ts1 constantly.
Network delay computing unit 28 is by calculating network delay dt_c2s=(T2-T1)/2; Clock reference converting unit 27 is according to formula Ts2=T1-dt_c2s-dt1, and the client sampling instant Ts2 ' that the client clock signal is indicated is converted to the corresponding with it indicated client sampling instant Ts2 of server end clock signal; Signal time delay obtains unit 25 and obtains signal time delay Td=3T1/2-T2/2-dt1-Ts1 according to data such as T1, T2, dt1 and Ts1.
Be understandable that, although detection system and the detection method of the remote media play signal time delay that the front provides the specific embodiment of the invention to system shown in Figure 8 block diagram and working timing figure in conjunction with Fig. 1 have been described in detail, but in actual applications, detection system and the detection method of remote media play signal time delay are not limited to shown in aforementioned block diagram, flow chart and sequential chart, but can adjust according to actual needs unit and work schedule thereof in block diagram.
Will also be appreciated that above execution mode is only the illustrative embodiments that adopts for principle of the present invention is described, yet the present invention is not limited thereto.For those skilled in the art, without departing from the spirit and substance in the present invention, can make various modification and improvement, these modification and improvement also should be comprised in protection scope of the present invention.