CN108156481A - A kind of detection method and device of live source - Google Patents

A kind of detection method and device of live source Download PDF

Info

Publication number
CN108156481A
CN108156481A CN201611110290.0A CN201611110290A CN108156481A CN 108156481 A CN108156481 A CN 108156481A CN 201611110290 A CN201611110290 A CN 201611110290A CN 108156481 A CN108156481 A CN 108156481A
Authority
CN
China
Prior art keywords
direct
code stream
broadcasting code
transmission node
live source
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.)
Pending
Application number
CN201611110290.0A
Other languages
Chinese (zh)
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 Excellent Friends Bullock Media Development Co
Original Assignee
Shenzhen Excellent Friends Bullock Media Development Co
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 Excellent Friends Bullock Media Development Co filed Critical Shenzhen Excellent Friends Bullock Media Development Co
Priority to CN201611110290.0A priority Critical patent/CN108156481A/en
Publication of CN108156481A publication Critical patent/CN108156481A/en
Pending legal-status Critical Current

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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2404Monitoring of server processing errors or hardware failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2405Monitoring of the internal components or processes of the server, e.g. server load
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44227Monitoring of local network, e.g. connection or bandwidth variations; Detecting new devices in the local network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4425Monitoring of client processing errors or hardware failure

Abstract

The invention discloses a kind of detection method and device of live source.The method of the present invention includes:Live source detection device receives the direct-broadcasting code stream that the live source coding stream medium data obtains;The detection device detects the attribute of the direct-broadcasting code stream;If it is abnormal that the detection device detects that the attribute of the direct-broadcasting code stream occurs, the detection device determines abnormal for encoding the encoder of stream medium data coding in the live source.The present invention can detect live source failure in time, ensure live broadcast service quality.

Description

A kind of detection method and device of live source
Technical field
The present invention relates to video technique field more particularly to a kind of detection method and device of live source.
Background technology
With the fusion development of Streaming Media, WiMAX, mobile communication technology and Internet technology, live broadcast service is gradually Form hot spot.In live broadcast service, one or more encoder streaming media data progress Real Time Compression, coding is needed to obtain straight Code stream is broadcast, streaming media server receives direct-broadcasting code stream from encoder, and direct-broadcasting code stream is pushed to client in real time.
However existing most of live broadcast system is when providing live broadcast service, detection and disposition for live broadcast service It is not fine, is broadcast live if unstable networks in transmission process and will appear problem, these situations includes packet loss, network prolongs Late, error in data etc., it is abnormal that these situations can cause live play effect to occur, such as picture interim card, Hua Ping, audio and video are different Situations such as step, generally requires human intervention and can restore normal if error, and always waits until to play and flower screen, interim card occur Or audio and video it is asynchronous phenomena such as when just by manually being intervened, can not only miss best processing time, also affect live streaming Effect.In addition, in the prior art, for the live source of failure, also there is no good processing means, often only letters Single resetting live streaming coded system also results in player and picture pause occurs or break phenomenon in this way.
Therefore, how to solve the problems, such as that live source failure can not be detected in time in the prior art, ensure live broadcast service quality, User experience is improved, is that industry is urgently studied and solved the problems, such as.
Invention content
The embodiment of the present invention provides a kind of detection method and device of live source, to solve in the prior art can not be timely The problem of detecting live source failure ensures live broadcast service quality.
In a first aspect, the embodiment of the present invention provides a kind of detection method of live source, the method includes:
Live source detection device receives the direct-broadcasting code stream that the live source coding stream medium data obtains;
The detection device detects the attribute of the direct-broadcasting code stream;
If it is abnormal that the detection device detects that the attribute of the direct-broadcasting code stream occurs, the detection device determines described It is abnormal for encoding the encoder of stream medium data coding in live source.
It can be seen that the detection scheme for the live source that the above embodiment of the present invention is provided can be by setting live source Detection device performs the detection process to live source coding stage.Live source detection device can be by direct-broadcasting code stream attribute Detection to achieve the purpose that be detected live source coding stage, can be specifically by live source detection device receive be broadcast live The direct-broadcasting code stream that source code stream medium data obtains, if detecting that exception occurs in the attribute of direct-broadcasting code stream, it is determined that encoder Coding is abnormal, so as to solve the problems, such as to lead to the reduction of live broadcast service quality or event due to that can not find live source real-time coding in time The problem of barrier.
In a kind of possible realization method, the detection device determines to be used to encode stream medium data in the live source Encoder coding exception after, the method further includes:The detection device is according to the abnormal attribute class of the direct-broadcasting code stream Type is adjusted the encoder.
It can be seen that the detection scheme for the live source that the above embodiment of the present invention is provided, live source detection device can be with It is handled accordingly immediately when detecting that live source coding stage occurs abnormal, according to the exception of the direct-broadcasting code stream detected Attribute type is adjusted encoder, so as to solve live source real-time coding abnormal problem in time, avoids live broadcast service Quality reduces or failure.
In a kind of possible realization method, the encoder is adjusted, including:Indicate that the encoder opens again It is dynamic;Alternatively, indicate the encoder adjustment coding parameter;Alternatively, indicate that the encoder recompiles stream medium data.
In a kind of possible realization method, the abnormal attribute type of the direct-broadcasting code stream is including following any or more Kind:The PTS of the direct-broadcasting code stream is discontinuous;The DTS of the direct-broadcasting code stream is discontinuous;The PCR intervals of the direct-broadcasting code stream are more than Given threshold;The TS sync byte mistakes of the direct-broadcasting code stream;The continuous counter of the direct-broadcasting code stream is discontinuous;The live streaming The PMT id of code stream change;
The detection device is adjusted the encoder according to the abnormal attribute type of the direct-broadcasting code stream, including:
If the PTS and/or DTS of the direct-broadcasting code stream are discontinuous, the detection device indicates that the encoder opens again It is dynamic;
If the PCR intervals of the direct-broadcasting code stream are more than given threshold, the detection device indicates the encoder adjustment PCR generates spacing parameter;
If the TS sync bytes mistake of the direct-broadcasting code stream and/or the continuous counter of the direct-broadcasting code stream are discontinuous, The detection device indicates that the encoder recompiles the stream medium data;
If the PMT id of the direct-broadcasting code stream change, data packet of the detection device in the direct-broadcasting code stream is again When discontinuous after sequence, indicate that the encoder recompiles the stream medium data.
In a kind of possible realization method, the method further includes:
The detection device detects the Network status for the transmission node that the direct-broadcasting code stream is used for transmission in the live source;
If it is abnormal that the detection device detects that the network of the transmission node occurs, the detection device determines described The transmission node transmission abnormality of live source.
It can be seen that the detection scheme for the live source that the above embodiment of the present invention is provided, live source detection device may be used also Reach what the live streaming source network output stage was detected to be detected by the Network status to live source transmission node There is Network Abnormal in purpose, the transmission node that live source detection device can be used for transmission direct-broadcasting code stream in live source is detected When, the transmission node transmission abnormality of live source is determined, so as to solve due to that can not find that live source output network is asked in time The problem of inscribing and leading to the reduction of live broadcast service quality or failure.
In a kind of possible realization method, the detection device determine the live source transmission node transmission abnormality it Afterwards, the method further includes:The detection device is according to the Network Abnormal type of the transmission node, to the biography of the live source Defeated node is adjusted.
It can be seen that the detection scheme for the live source that the above embodiment of the present invention is provided, live source detection device may be used also To be handled accordingly immediately when detecting that the live streaming source network output stage occurs abnormal, according to the Network Abnormal detected Type is adjusted the transmission node of live source, so as to solve the problems, such as that live source exports Network Abnormal in time, avoids straight Broadcast quality of service reduction or failure.
In a kind of possible realization method, the transmission node of the live source is adjusted, including:It indicates described straight The source of broadcasting is switched to direct-broadcasting code stream described in alternate transmission node-node transmission;Alternatively, indicate the live source by the direct-broadcasting code stream again It is sent to the transmission node.
In a kind of possible realization method, the Network Abnormal type of the transmission node is including following any or more Kind:The transmission node does not receive direct-broadcasting code stream in preset duration threshold value;The live streaming code that the transmission node receives It flows imperfect;The direct-broadcasting code stream that the transmission node receives is discontinuous.
The detection device carries out the transmission node of the live source according to the Network Abnormal type of the transmission node Adjustment, including:
If the transmission node does not receive direct-broadcasting code stream in preset duration threshold value, the detection device indicates institute It states live source and is switched to direct-broadcasting code stream described in alternate transmission node-node transmission;
If the direct-broadcasting code stream that the transmission node receives is imperfect, the detection device indicates the live source by institute Direct-broadcasting code stream is stated to retransmit to the transmission node;
If the direct-broadcasting code stream that the transmission node receives is discontinuous, the detection device is in the direct-broadcasting code stream When still discontinuous after data packet rearrangement, indicate that the live source retransmits the direct-broadcasting code stream to the transmission section Point.
Second aspect, the embodiment of the present invention provide a kind of detection device of live source, and described device includes:
Receiving module, for receiving the direct-broadcasting code stream that the live source coding stream medium data obtains;
First detection module, for detecting the attribute of the direct-broadcasting code stream;
First determining module, for detecting that it is abnormal that the attribute of the direct-broadcasting code stream occurs in the first detection module When, it determines abnormal for encoding the encoder of stream medium data coding in the live source.
In a kind of possible realization method, described device further includes:
The first adjustment module for the abnormal attribute type according to the direct-broadcasting code stream, is adjusted the encoder.
In a kind of possible realization method, the first adjustment module is specifically used for:Indicate that the encoder opens again It is dynamic;Alternatively, indicate the encoder adjustment coding parameter;Alternatively, indicate that the encoder recompiles stream medium data.
In a kind of possible realization method, the abnormal attribute type of the direct-broadcasting code stream is including following any or more Kind:The PTS of the direct-broadcasting code stream is discontinuous;The DTS of the direct-broadcasting code stream is discontinuous;The PCR intervals of the direct-broadcasting code stream are more than Given threshold;The TS sync byte mistakes of the direct-broadcasting code stream;The continuous counter of the direct-broadcasting code stream is discontinuous;The live streaming The PMT id of code stream change;
The first adjustment module, is specifically used for:
If the PTS and/or DTS of the direct-broadcasting code stream are discontinuous, it indicates that the encoder restarting;
If the PCR intervals of the direct-broadcasting code stream are more than given threshold, it indicates that the encoder adjustment PCR generations interval ginseng Number;
If the TS sync bytes mistake of the direct-broadcasting code stream and/or the continuous counter of the direct-broadcasting code stream are discontinuous, Indicate that the encoder recompiles the stream medium data;
It is discontinuous after the data packet rearrangement in the direct-broadcasting code stream if the PMT id of the direct-broadcasting code stream change When, indicate that the encoder recompiles the stream medium data.
In a kind of possible realization method, described device further includes:
Second detection module, for detecting the network for the transmission node that the direct-broadcasting code stream is used for transmission in the live source Situation;
Second determining module, for detecting that it is abnormal that the network of the transmission node occurs in second detection module When, determine the transmission node transmission abnormality of the live source.
In a kind of possible realization method, described device further includes:
Second adjustment module, for the Network Abnormal type according to the transmission node, to the transmission section of the live source Point is adjusted.
In a kind of possible realization method, the second adjustment module is specifically used for:Indicate that the live source is switched to Direct-broadcasting code stream described in alternate transmission node-node transmission;Alternatively, indicate that the live source retransmits the direct-broadcasting code stream to described Transmission node.
In a kind of possible realization method, the Network Abnormal type of the transmission node is including following any or more Kind:The transmission node does not receive direct-broadcasting code stream in preset duration threshold value;The live streaming code that the transmission node receives It flows imperfect;The direct-broadcasting code stream that the transmission node receives is discontinuous;
The second adjustment module, is specifically used for:
If the transmission node does not receive direct-broadcasting code stream in preset duration threshold value, it indicates that the live source switching To direct-broadcasting code stream described in alternate transmission node-node transmission;
If the direct-broadcasting code stream that the transmission node receives is imperfect, it indicates that the live source is by the direct-broadcasting code stream weight Newly it is sent to the transmission node;
If the direct-broadcasting code stream that the transmission node receives is discontinuous, the data packet in the direct-broadcasting code stream is arranged again When still discontinuous after sequence, indicate that the live source retransmits the direct-broadcasting code stream to the transmission node.
Based on same inventive concept, since the detection device of live source that the above embodiment of the present invention is provided solves the problems, such as Principle and advantageous effect may refer to above-mentioned first aspect and first aspect each possible live source detection method Embodiment and caused advantageous effect, therefore the reality of the detection device of live source that the above embodiment of the present invention is provided The implementation for the method for may refer to is applied, overlaps will not be repeated.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for this For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is the structure diagram of current stream media live service system;
Fig. 2 is the flow diagram of the detection method of live source that some embodiments of the invention provide;
Fig. 3 is the flow diagram of the detection method of live source that some embodiments of the invention provide;
Fig. 4 is the schematic diagram that live source detection device detects direct-broadcasting code stream attribute in some embodiments of the invention;
Fig. 5 is that live source detection device continues to detect the flow diagram of network in some embodiments of the invention;
Fig. 6 is that live source detection device continues to detect the flow diagram of network in some embodiments of the invention;
Fig. 7 is that live source detection device has to coding generation direct-broadcasting code stream rank in live source in some embodiments of the invention The schematic diagram of section and the detection function in network output direct-broadcasting code stream stage;
Fig. 8 is that live source detection device has to coding generation direct-broadcasting code stream rank in live source in some embodiments of the invention Section and the testing process schematic diagram in network output direct-broadcasting code stream stage;
Fig. 9 is that live source detection device has to coding generation direct-broadcasting code stream rank in live source in some embodiments of the invention Section and the network output detection in direct-broadcasting code stream stage and process flow schematic diagram;
Figure 10 is that live source detection device generates stage and net to direct-broadcasting code stream in live source in some embodiments of the invention The specific flow diagram detected and handle in network output stage;
Figure 11 is the structure diagram of live source detection device that some embodiments of the invention provide.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is made below in conjunction with attached drawing into It is described in detail to one step, it is clear that the described embodiments are only some of the embodiments of the present invention rather than whole implementation Example.Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without making creative work All other embodiment, shall fall within the protection scope of the present invention.
The defects of can not detecting live source failure in time in the prior art to overcome, an embodiment of the present invention provides one kind The detection method and device of live source.The detection scheme for the live source that the embodiment of the present invention is provided can reach timely detection The purpose of live source failure, and then can avoid leading due to that can not find live source real-time coding problem in time in the prior art The problem of causing the reduction of live broadcast service quality or failure, ensures live broadcast service quality, improves user experience.
It, below will be first to current in order to more clearly describe the detection scheme for the live source that the embodiment of the present invention is provided Stream media live service system structure illustratively introduced.
Fig. 1 shows the structure diagram of current stream media live service system.
As shown in Figure 1, it is deployed with live source 101 in the illustrative stream media live service system, edge Streaming Media is put down Platform 102 and terminal device 103.
Specifically, the encoder for encoding stream medium data generation direct-broadcasting code stream is mainly included in live source 101 1011 and it is used for transmission the transmission node 1012 of direct-broadcasting code stream.For example, encoder 1011 can specifically include to encode The encoder of audio, video data, transmission node 1012 can be specifically streaming media servers.As live broadcast service direct-broadcasting code stream Transmission source, live source 101 mainly in real time compress the stream medium data of acquisition by encoder 1011, are encoded, being obtained To usable real-time transport protocol (Real Time Streaming Protocol, RTSP) or User Datagram Protocol The direct-broadcasting code stream of (User Datagram Protocol, UDP) transmission, and then direct-broadcasting code stream is sent to transmission node 1012, Transmission node 1012 mode will by unicast or multicast can be broadcast live in real time after encoder 1011 receives direct-broadcasting code stream Bit stream is to edge steaming media platform 102.
Specifically, the streaming media service for continuing to transmit direct-broadcasting code stream is mainly included in edge steaming media platform 102 Device 1021, streaming media server 1021 comes direct-broadcasting code stream from the relaying of live source 101, then again with unicast or the side of multicast Live data code stream is pushed to terminal device 103 by formula, and live broadcast service is provided so as to fulfill for terminal device 103.If live streaming The direct-broadcasting code stream in source 101 is abnormal, and being relayed to the edge steaming media platform 102 of the live source can directly stop setting to terminal Standby 103 provide live broadcast service.
Example based on stream media live service system as shown in Figure 1, it can be seen that whether live source 101 normally transports Can row be to determine provide the key factor for stablizing normal live broadcast service.If the encoder 1011 in live source 101 is run Unstable rule will appear the problems such as asynchronous such as audio and video, blank screen or sound are lost;If the transmission section in live source 101 Unstable networks can then lead to such as packet loss, network delay, error in data at point 1012,;These situations all can be one Determine to cause the reduction of live broadcast service quality in degree, abnormal, such as picture interim card, Hua Ping, audio and video occurs in live play effect It is asynchronous etc..
In order to solve the problems, such as that live source failure can not be detected in time in the prior art, avoid because live source goes wrong And the defects of causing live broadcast service degradation or even live broadcast service that can not realize, the embodiment of the present invention propose a kind of live source Detection scheme can detect live source failure in time, ensure the quality of live broadcast service, improve user experience.
Below with reference to attached drawing and embodiment, the present invention will be described in further detail.It should be appreciated that this place is retouched The embodiment of the present invention stated does not limit the present invention only to explain the present invention.
Fig. 2 shows the flow diagrams of the detection method of live source that some embodiments of the invention provide.
Specifically, as shown in Fig. 2, in some embodiments of the invention, can by set live source detection device come Realize flow as shown in Figure 2, live source detection device can be realized by software programming or the combination of software and hardware, for example can be had Body is embodied as being able to carry out combination of the collection of programs of flow as shown in Figure 2, software module or software and hardware etc., live source inspection Survey device can be realized to be coupled for individual device with live source, can also be integrated into live source, the application detects live source The specific implementation of device is not construed as limiting.
As shown in Fig. 2, the flow can include having the following steps:
Step 201:Live source detection device receives the direct-broadcasting code stream that live source coding stream medium data obtains;
Step 202:Live source detection device detects the attribute of direct-broadcasting code stream
Step 203:If it is abnormal that detection device detects that the attribute of direct-broadcasting code stream occurs, detection device is determined in live source It is abnormal for encoding the encoder of stream medium data coding.
It can be seen that some embodiments of the invention are provided and encoder in live source are compiled by flow as shown in Figure 2 Code generates the real-time detection function in direct-broadcasting code stream stage, the function mainly live streaming by being encoded to encoder in live source Code stream carries out detection of attribute, so as to judge whether the encoder in live source works normally, reaches and finds live source failure in time Purpose.
Specifically, in some embodiments of the invention, live source detection device encoder can encode in live source The stage of direct-broadcasting code stream is generated, the direct-broadcasting code stream that live source coding stream medium data obtains is received in real time, so as to realize Real-time detection to encoder cataloged procedure.For example, live source detection device can start work or detect encoder After starting coding, direct-broadcasting code stream is obtained according to the setting period, so as to when the attribute for detecting current live code stream is normal, keep It performs subsequently to the reception of direct-broadcasting code stream and detection, in the attribute abnormal for detecting current live code stream, it is corresponding to be transferred to execution Exception handling procedure, while can suspend or continue to execute the reception to follow-up direct-broadcasting code stream and detection.
Further, in some embodiments of the invention, as detection device determines that the encoder coding of live source is different It often, then can also be according further to the abnormal attribute type of direct-broadcasting code stream, to encoding stream medium data in live source Encoder is adjusted, and so as to realize the timely processing to encoder operation irregularity in live source, ensures direct broadcast service matter Amount.Such as based on testing process shown in Fig. 2, technical solution that the step 301 in Fig. 3 is provided by some embodiments of the invention The further process step under the encoder coding abnormal conditions for detecting live source.
Specifically, there are the obtained direct-broadcasting code stream of encoder coding stream medium data some can characterize this in live source Whether direct-broadcasting code stream is by the property parameters of normal encoding, for example is used to characterize what whether current live code stream itself was properly encoded Property parameters, for characterizing property parameters of continuity or consistency between current live code stream and front and rear stream etc..Specific ratio Such as, in some embodiments of the invention, the property parameters of direct-broadcasting code stream can such as play reference time stamp (Presentation Time Stamp, PTS), Decoded Reference timestamp (Decoding Time Stamp, DTS) etc..Thus, In some embodiments of the invention, live source detection device can by the direct-broadcasting code stream that receives is carried out attributive analysis come Determine whether live streaming source code exception occurs, and can be when finding that live streaming source code occurs abnormal in time to the volume in live source Code device performs corresponding adjustment processing, so as to solve live broadcast service quality to be caused to drop since live source real-time coding goes wrong The problem of low or failure.
Specifically, in some embodiments of the invention, when the encoder for finding live source encodes abnormal to live source In the adjustment that is carried out of encoder can include:Indicate encoder restarting;Alternatively, instruction encoder adjustment coding ginseng Number;Alternatively, instruction encoder recompiles stream medium data;Etc..
Specifically, in some embodiments of the invention, live source detection device is directed to the category of direct-broadcasting code stream itself Property information is detected, such as (wherein, the main function of encapsulation format is video code flow and audio code stream to Document encapsulation form According to certain form storage in one file, the specific ratio of existing encapsulation format is if any TS, MP4 etc.), audio/video coding lattice Formula, resolution ratio, code check etc..According to these attributes of direct-broadcasting code stream, live source detection device can learn live streaming code by analysis Whether stream there is exception, the problems such as if there is data-bag lost or division format mistake can with OnNow abnormality processing, So as to solve live streaming source code go wrong and lead to problems such as be broadcast live image quality reduce or audio and video it is asynchronous.
Specifically, in some embodiments of the invention, if live source detection device receives live streaming after work is started Code stream can then differentiate Document encapsulation form first, then obtain a series of attributes of direct-broadcasting code stream, for example include audio and video Coded format, code check, resolution ratio, frame per second etc., live source detection device can store accessed attribute, and These attributes are periodically read in subsequent lasting detection process to be compared, so as to find whether attribute changes, and It is changing, is carrying out correspondingly abnormality processing.
For example, Fig. 4 shows the flow of live source detection device detection video stream attribute in some embodiments of the present invention Schematic diagram.
As shown in figure 4, it in some embodiments of the invention, after live source detection device can start work, receives straight Broadcast the video stream data (401) of source code generation;The attribute (402) of video flowing can be read after video stream data by receiving, than The attribute of such as video flowing includes audio/video coding form, code check, resolution ratio, frame per second;It and then can be according to being read Whether the determined property current video stream of video flowing is normal, if detecting that video flowing is normal, continues to execute to subsequent video The reception and detection of flow data;If detecting video throat floater, corresponding abnormality processing (403) is performed, while continue to hold Reception and detection of the row to subsequent video flow data.
In some embodiments of the invention, it can characterize whether direct-broadcasting code stream can specifically be wrapped by the attribute of normal encoding It has included:PTS;DTS;Reference data clock (Program Clock Reference, PCR) is played to be spaced;Transport stream (Transport Stream, TS) sync byte;Continuous counter (Continue Counter);Program Association Table identifies (Program Association Table identification, PMT id);Etc..
Based on the attribute of direct-broadcasting code stream listed above, for the PTS or DTS of direct-broadcasting code stream, due to PTS and/or DTS It shows respectively when decoder is decoded and shows frame relative to the timestamp of System Clock Reference, if direct-broadcasting code stream PTS or DTS are discontinuous, then and the direct-broadcasting code stream will will appear the problems such as such as audio and video are asynchronous when decoding and playing, thus, In some embodiments of the invention, the PTS of direct-broadcasting code stream discontinuously can as a kind of abnormal attribute type of direct-broadcasting code stream, The DTS of direct-broadcasting code stream discontinuously can also be used as a kind of abnormal attribute type of direct-broadcasting code stream.
In some embodiments of the invention, since the PTS of direct-broadcasting code stream is discontinuous and/or DTS discontinuously belongs to live streaming The abnormal attribute type of code stream, and direct-broadcasting code stream PTS is discontinuous and/or DTS is discontinuously often as encoder work Caused by abnormal, thus, live source detection device can detect the PTS of the direct-broadcasting code stream to the direct-broadcasting code stream that receives And/or whether DTS is continuous, if detecting that the PTS and/or DTS of the direct-broadcasting code stream are discontinuous, then it is considered that the live source In encoder coding generate direct-broadcasting code stream when there is exception, and then live source detection device can be indicated in live source Encoder restarts, to regenerate the direct-broadcasting code stream with correct PTS and DTS.
Accordingly for the PCR of direct-broadcasting code stream, since the PCR of direct-broadcasting code stream is as unit of the System Clock Reference period Have recorded the temporal information of source for audio and video quality be mutually delayed and synchronize play key effect, if live streaming code The PCR intervals of stream are more than given threshold, then the direct-broadcasting code stream can be caused to generate the asynchronous grade of audio and video when decoding and playing and showed As, thus, in some embodiments of the invention, the PCR intervals of direct-broadcasting code stream can also be used as live streaming code more than given threshold A kind of abnormal attribute type of stream.
In some embodiments of the invention, since the PCR intervals of direct-broadcasting code stream belong to direct-broadcasting code stream more than given threshold Abnormal attribute type, and the PCR of direct-broadcasting code stream is typically to be generated by encoder when coding generates direct-broadcasting code stream, because And live source detection device can detect the PCR intervals of the direct-broadcasting code stream, if detecting this to the direct-broadcasting code stream received The PCR intervals of direct-broadcasting code stream are more than given threshold, then it is considered that the encoder in the live source generates live streaming code in coding Produce abnormal PCR during stream, and then live source detection device can be indicated between the encoder adjustment PCR generations in live source Every parameter, with direct-broadcasting code stream of the coding generation with correct PCR.
Accordingly for the TS sync bytes of direct-broadcasting code stream, since the value of the TS sync bytes of direct-broadcasting code stream is usually 0x47, if the TS sync byte mistakes of direct-broadcasting code stream, then illustrate that the data in direct-broadcasting code stream are surrounded by loss or mistake, this will It can cause the direct-broadcasting code stream that can not solve complete signal when decoding and playing, phenomena such as blank screen, frozen frame or picture be not smooth occur, Thus, in some embodiments of the invention, the TS sync byte mistakes of direct-broadcasting code stream can also be used as one kind of direct-broadcasting code stream Abnormal attribute type.
In some embodiments of the invention, since the TS sync byte mistakes of direct-broadcasting code stream belong to the exception of direct-broadcasting code stream Attribute type, and the TS sync bytes mistake of direct-broadcasting code stream usually represents that the data in the direct-broadcasting code stream are surrounded by loss or mistake Accidentally, thus, live source detection device can detect the TS sync bytes of the direct-broadcasting code stream to the direct-broadcasting code stream that receives, if Detect the TS sync byte mistakes of the direct-broadcasting code stream, then it is considered that the data in the direct-broadcasting code stream are surrounded by loss or mistake Accidentally, and then live source detection device may be used the method trial that packet loss retransmits and give for change, can be specifically in instruction live source Encoder recompiles stream medium data, to generate the direct-broadcasting code stream with correct TS sync bytes.
Further, in some embodiments of the invention, if live source detection device is detecting direct-broadcasting code stream TS sync byte mistakes, and when indicating that the encoder in live source recompiles stream medium data, the direct-broadcasting code stream institute generated The TS sync bytes having are still incorrect or it can be appreciated that giving failure for change, then it is considered that currently being encoded Stream medium data it is abnormal, thus can further to upper strata transmission node reacquire normal stream medium data or Switching upper layer transport node is can be regarded as, then the stream medium data got is encoded, to obtain having correct TS to synchronize The direct-broadcasting code stream of byte.
Accordingly for the continuous counter of direct-broadcasting code stream, since the continuous counter of direct-broadcasting code stream is illustrated with phase With the number order of the transport stream TS packet of id, for example, the Continue Counter fields of MPEG-TS forms value range 0 It is recycled successively between to 15, if the continuous counter of direct-broadcasting code stream is discontinuous, then illustrate direct-broadcasting code stream it is possible that there is data Packet loss, and then be likely to result in the direct-broadcasting code stream and phenomena such as blank screen, frozen frame or picture be not smooth occur when decoding and playing, because And in some embodiments of the invention, the continuous counter of direct-broadcasting code stream discontinuously can also be used as one kind of direct-broadcasting code stream Abnormal attribute type.
In some embodiments of the invention, since the continuous counter of direct-broadcasting code stream discontinuously belongs to the different of direct-broadcasting code stream Normal attribute type, and the continuous counter of direct-broadcasting code stream discontinuously represents may there is data-bag lost in the direct-broadcasting code stream, because And live source detection device can detect the continuous counter of the direct-broadcasting code stream, if detected to the direct-broadcasting code stream received The continuous counter of the direct-broadcasting code stream is discontinuous, then the method trial that packet loss re-transmission may be used in live source detection device is looked for It returns, specifically can stream medium data be recompiled by the encoder indicated in live source, it is continuous to generate continuous counter Direct-broadcasting code stream.
Further, in some embodiments of the invention, if live source detection device is detecting direct-broadcasting code stream Continuous counter is discontinuous, and when indicating that the encoder in live source recompiles stream medium data, the direct-broadcasting code stream generated Continuous counter it is still discontinuous or it can be appreciated that giving failure for change, then it is considered that the current stream encoded Media data is abnormal, thus further can reacquire normal stream medium data to upper strata transmission node or can manage It solves to switch upper layer transport node, then the stream medium data got is encoded, it is continuously straight to obtain continuous counter Broadcast code stream.
Accordingly for the PMT id of direct-broadcasting code stream, since the PMT id of direct-broadcasting code stream illustrate the id of storage transport stream Number, if the PMT id of direct-broadcasting code stream are changed, then illustrate that switching action has occurred in live source, thus, in the present invention Some embodiments in, the PMT id of direct-broadcasting code stream change can also be used as a kind of abnormal attribute type of direct-broadcasting code stream.
In some embodiments of the invention, since the PMT id of direct-broadcasting code stream changes belong to the abnormal attribute of direct-broadcasting code stream Type, and the PMT id of direct-broadcasting code stream change expression live source and switching action have occurred, thus, the docking of live source detection device The direct-broadcasting code stream received, can detect the PMT id of the direct-broadcasting code stream, if detecting that the PMT id of the direct-broadcasting code stream change, that Live source detection device can resequence to the direct-broadcasting code stream according to the serial number of data packet, be arranged again if detected The serial number of data packet still discontinuously changes in direct-broadcasting code stream after sequence, then the method supplement output of packet loss re-transmission, tool may be used Body can indicate that encoder recompiles stream medium data, to generate correct direct-broadcasting code stream.
For example, the abnormal attribute type based on the described direct-broadcasting code stream of the above embodiment of the present invention, the following table shows this Live source detection device is to the detection method of live streaming source code generation direct-broadcasting code stream and corresponding in some embodiments of invention Adjust processing means:
It can be seen that the detection scheme for the live source that some embodiments of the present invention are provided is provided in live source Encoder coding generates the real-time detection function in direct-broadcasting code stream stage, and further provides and detecting that encoder coding is different To the Adjusted Option of encoder when often, so as to solve to lead to live broadcast service matter since live source real-time coding goes wrong The problem of amount reduction or failure.
Further, since direct-broadcasting code stream is typically based on transmission control protocol/Internet Protocol on the internet (Transmission Control Protocol/Internet Protocol, TCP/IP) agreement is transmitted, and direct-broadcasting code stream is wide An important factor for stability transmitted in the net environment of domain is also decision live broadcast service quality, thus, in some implementations of the present invention In example, live source detection device can also have the function being detected to live source network transmission, by straight in live source The stage for broadcasting code stream output is detected the Network status of transmission node in live source, so as to find that live source passes in time It during the exception of defeated network and takes and correspondingly handles, to ensure that live source can correctly transmit direct-broadcasting code stream.
Specifically, in some embodiments of the invention, live source detection device can also be to being used for transmission in live source The Network status of the transmission node of direct-broadcasting code stream is detected, if detecting the transmission that direct-broadcasting code stream is used for transmission in live source There is exception in the network of node, then can determine the transmission node transmission abnormality of live source.Fig. 5 shows some realities of the invention Apply the flow diagram that live source detection device in example further detects Network status.
As shown in figure 5, live source detection device can be detected the network output of direct-broadcasting code stream in live source, specifically Following steps can be included:
Step 501:The network-like of the transmission node of direct-broadcasting code stream is used for transmission in live source detection device detection live source Condition;
Step 502:If it is abnormal that live source detection device detects that the network of the transmission node occurs, live source detection dress Put the transmission node transmission abnormality of determining live source.
It can be seen that some embodiments of the invention are further provided by flow as shown in Figure 5 for live source Network exports the detection function in direct-broadcasting code stream stage, which mainly passes through the transmission to being used for transmission direct-broadcasting code stream in live source Node carries out Network status detection, normally, reaches the mesh for finding live source failure in time so as to judge whether transmission node transmits 's.
Specifically, in some embodiments of the invention, live source detection device, which can be directed in live source, transmits section Spot net transmission is detected, for example the network of transmission node in current live source can be detected by way of waiting-timeout is It is no delay fault occur;Can for another example be detected by way of data check the data of direct-broadcasting code stream in transmission process whether It loses;Whether the data that for another example can detect direct-broadcasting code stream by way of data continuity verification occur in transmission process It is out of order;Deng.
It in some embodiments of the invention, specifically can be by sending and receiving setting time-out time to data come real Now to the detection of transmission node network delay, it can determine whether delay fault occur for network when not receiving data for a long time; In some embodiments of the present invention, specifically the live streaming received to transmission node can be realized using CRC cyclic checks method The data check of code stream, and then judge whether data lose in transmission process;In some embodiments of the invention, specifically may be used Continuous serial number is set when sending with the minimum unit to data transmission, is tested at transmission node to serial number straight to realize The continuity verification of code stream is broadcast, is believed that at transmission node that transmitted data on network occurs disorderly if non-continuous event occurs in serial number Sequence.
Further, in some embodiments of the invention, as detection device determines the transmission node transmission of live source It is abnormal, then the transmission node of live source can also be adjusted according further to the Network Abnormal type of transmission node, from And can realize the timely processing to transmission node transmission abnormality in live source, ensure direct broadcast service quality.Such as based on Fig. 5 institutes The testing process shown, the step 601 in Fig. 6 are detecting live source by the technical solution that some embodiments of the invention provide Further process step in the case of transmission node transmission abnormality.
Specifically, in some embodiments of the invention, in the transmission node transmission abnormality for finding live source to live streaming The adjustment that the transmission node in source is carried out can include:Instruction live source is switched to alternate transmission node-node transmission direct-broadcasting code stream; Alternatively, the direct-broadcasting code stream is retransmitted and gives the transmission node by instruction live source;Etc..
For example, corresponding to the detection means listed above for network transmission, in some embodiments of the invention, The Network Abnormal type of transmission node can include following any one or more:Transmission node in preset duration threshold value not Direct-broadcasting code stream is received, the type may be considered the network for showing current transmission node and delay fault occurs;Transmission node The direct-broadcasting code stream received is imperfect, and the type, which may be considered, to be shown direct-broadcasting code stream and have data-bag lost in the transmission;It passes The direct-broadcasting code stream that defeated node receives is discontinuous, the type may be considered show direct-broadcasting code stream occur in the transmission it is out of order Phenomenon;Etc..
Specifically, in some embodiments of the invention, since transmission node does not receive in preset duration threshold value There is delay fault in the network that direct-broadcasting code stream shows current transmission node, thus, if live source detection device detects Transmission node does not receive direct-broadcasting code stream in preset duration threshold value, then it is considered that current transmission node has occurred Delay phenomenon, and then live source detection device can indicate that live source is switched to alternate transmission node-node transmission direct-broadcasting code stream, to protect Demonstrate,prove the normal transmission of direct-broadcasting code stream.
Specifically, in some embodiments of the invention, the direct-broadcasting code stream that is received due to transmission node is imperfect to be shown Direct-broadcasting code stream has a data-bag lost in transmission process, thus, if live source detection device detects that transmission node receives The direct-broadcasting code stream arrived is imperfect, then live source detection device can indicate that live source retransmits direct-broadcasting code stream and give the transmission Node, for example can be specifically that the number for indicating live source according to data packet retransmits the data packet for sending failure to output node, To ensure that live source transmits correct direct-broadcasting code stream.
Specifically, in some embodiments of the invention, since the direct-broadcasting code stream that transmission node receives discontinuously shows Direct-broadcasting code stream occur in the transmission it is out of order, thus, if live source detection device detects that transmission node receives straight It is discontinuous to broadcast code stream, then live source detection device can first be ranked up the data packet in direct-broadcasting code stream according to serial number, After the data packet rearrangement in direct-broadcasting code stream, if detect that the serial number of data packet is still discontinuous, it can indicate to be broadcast live Direct-broadcasting code stream is retransmitted and gives the transmission node (for example supplement and export by packet loss retransmission mechanism) by source, to ensure that live source passes Defeated correct direct-broadcasting code stream.
For example, based on the described Network Abnormal type of the above embodiment of the present invention, the following table shows some of the present invention Live source detection device is to the detection method of transmission node network in live source and corresponding processing means in embodiment:
It can be seen that the detection scheme for the live source that some embodiments of the present invention are provided is being provided in live source Coding is generated on the basis of the real-time detection function in direct-broadcasting code stream stage, it is further provided network in live source is exported straight The detection function in code stream stage is broadcast, and is provided when detecting transmission node transmission abnormality to the Adjusted Option of transmission node, So as to solve the problems, such as since live source output network goes wrong and leads to the reduction of live broadcast service quality or failure.
Specifically, Fig. 7 shows that live source detection device synthesis has in live source in some embodiments of the present invention Coding generates the testing process schematic diagram of the detection function in direct-broadcasting code stream stage and network output direct-broadcasting code stream stage.
As shown in fig. 7, include in the testing process that the live source detection device is realized:Detect that mistake occur in data (701), and then misjudgment type (702), if it is determined that being that direct-broadcasting code stream coding is abnormal, then encoder in live source is carried out Corresponding processing (703a) if it is determined that being network output abnormality, then adjusts the network output (703b) of live source.
Specifically for example, showing in some embodiments of the present invention and being broadcast live based on Fig. 2 and flow chart shown in fig. 5, Fig. 8 Source detection device synthesis has the detection that direct-broadcasting code stream stage and network output direct-broadcasting code stream stage are generated to coding in live source The testing process schematic diagram of function.As shown in figure 8, include the inspection that the direct-broadcasting code stream stage (801) is generated in coding in the flow Survey process is specifically included just like step 201 illustrated in fig. 2 to step 203;It further exports and is broadcast live in network in the flow The detection process in code stream stage (802), specifically includes just like step 501 illustrated in fig. 5 and step 502.
For another example, based on Fig. 3 and flow chart shown in fig. 6, Fig. 9 shows live source in some embodiments of the present invention Detection device synthesis has the detection work(that direct-broadcasting code stream stage and network output direct-broadcasting code stream stage are generated to coding in live source Can and Adjusted Option when an exception is detected detection procedure schematic diagram.As shown in figure 9, include in the flow Coding generate the direct-broadcasting code stream stage (901) detection and processing procedure, specifically include just like step 201 illustrated in fig. 3 to Step 203 and step 301;Further the detection in direct-broadcasting code stream stage (902) is exported in network and process in the flow Journey is specifically included just like step 501 illustrated in fig. 6, step 502 and step 601.
Specifically, Figure 10 shows that live source detection device is to direct-broadcasting code stream in live source in some embodiments of the present invention Generation stage and the specific flow diagram detected and handle in network output stage.
As shown in Figure 10, live source detection device is detected during direct-broadcasting code stream is generated from coding to output, Once pinpoint the problems to be handled immediately, ensure that the stabilization of live broadcast service is normal with this.It is encoded in direct-broadcasting code stream and generates rank Section is broadcast live the direct-broadcasting code stream by audio/video coding (1001) attributive analysis (1002) of code stream, if it find that abnormal Respective handling (1003) then is carried out to the encoder in live source;And further during live streaming source network output then to net Network situation is monitored, and data are carried out with every verification, that is, carries out network transmission detection (1004), if it find that abnormal then adopt Modes such as (1005) are retransmitted with packet loss to be handled, the normal externally output (1006) if normal.
By above description as can be seen that in the detection method of the live source provided in embodiments of the present invention, Ke Yitong Setting live source detection device is crossed to perform the detection process to live source coding stage.Live source detection device can be by right The detection of direct-broadcasting code stream attribute to achieve the purpose that be detected live source coding stage, is detected by live source Device receives the direct-broadcasting code stream that live source coding stream medium data obtains, if detecting that exception occurs in the attribute of direct-broadcasting code stream, It then determines that encoder coding is abnormal, leads to live broadcast service quality so as to solve the problems, such as can not to find live source real-time coding in time The problem of reduction or failure.
Further, in the detection method of the live source provided in embodiments of the present invention, live source detection device is being examined It can be handled accordingly immediately when measuring live source coding stage appearance exception, according to the exception of the direct-broadcasting code stream detected Attribute type is adjusted encoder, from that can solve live source real-time coding abnormal problem in time, ensures live broadcast service matter Amount.
Further, in the detection method of the live source provided in embodiments of the present invention, live source detection device may be used also Reach what the live streaming source network output stage was detected to be detected by the Network status to live source transmission node There is Network Abnormal in purpose, the transmission node that live source detection device can be used for transmission direct-broadcasting code stream in live source is detected When, the transmission node transmission abnormality of live source is determined, so as to solve due to that can not find that live source output network is asked in time The problem of inscribing and leading to the reduction of live broadcast service quality or failure.
Further, in the detection method of the live source provided in embodiments of the present invention, live source detection device is being examined It can also be handled accordingly immediately when measuring live streaming source network output stage appearance exception, according to the Network Abnormal detected Type is adjusted the transmission node of live source, so as to solve the problems, such as that live source exports Network Abnormal in time, ensures straight Broadcast quality of service.
It is generated directly in conclusion the detection scheme for the live source that the embodiment of the present invention is provided can detect live streaming source code The process that code stream is exported to direct-broadcasting code stream is broadcast, and the respective handling to live source can be performed in time when an exception is detected, So as to ensure that live source correct coding generation direct-broadcasting code stream can simultaneously ensure that live source correctly exports direct-broadcasting code stream, Jin Erneng Enough guarantees realized to live broadcast service quality, solve the problems, such as that live source failure can not be detected in time in the prior art, can Avoid because live source goes wrong and cause live broadcast service degradation even live broadcast service can not realize the defects of, Neng Gouti High user experience.
Based on identical technical concept, the embodiment of the present invention also provides a kind of live source detection device, live source detection Device can perform above method embodiment of the present invention, the live source detection device can by software programming or the combination of software and hardware come Realize, for example, can be implemented as being able to carry out the collection of programs of above method embodiment flow of the present invention, software module or Combination of software and hardware etc., live source detection device can be realized to be coupled for individual device with live source, can also be integrated into live streaming In source.
Figure 11 shows the structure diagram for the live source detection device that some embodiments of the invention provide.
As shown in figure 11, which includes:
Receiving module 1101, for receiving the direct-broadcasting code stream that the live source coding stream medium data obtains;
First detection module 1102, for detecting the attribute of the direct-broadcasting code stream;
First determining module 1103, for detecting that it is different that the attribute of the direct-broadcasting code stream occurs in first detection module 1102 Chang Shi is determined abnormal for encoding the encoder of stream medium data coding in the live source.
It can further include in the live source detection device that some embodiments of the invention are provided:
The first adjustment module 1104 for the abnormal attribute type according to the direct-broadcasting code stream, carries out the encoder Adjustment.
In some embodiments of the invention, the first adjustment module 1104 can be specifically used for:
Indicate the encoder restarting;Alternatively, indicate the encoder adjustment coding parameter;Alternatively, described in instruction Encoder recompiles stream medium data.
Specifically, the abnormal attribute type of direct-broadcasting code stream can include following any one or more:The direct-broadcasting code stream PTS is discontinuous;The DTS of the direct-broadcasting code stream is discontinuous;The PCR intervals of the direct-broadcasting code stream are more than given threshold;The live streaming The TS sync byte mistakes of code stream;The continuous counter of the direct-broadcasting code stream is discontinuous;The PMT id of the direct-broadcasting code stream change;
In some embodiments of the invention, the first adjustment module 1104 can be specifically used for:
If the PTS and/or DTS of the direct-broadcasting code stream are discontinuous, it indicates that the encoder restarting;
If the PCR intervals of the direct-broadcasting code stream are more than given threshold, it indicates that the encoder adjustment PCR generations interval ginseng Number;
If the TS sync bytes mistake of the direct-broadcasting code stream and/or the continuous counter of the direct-broadcasting code stream are discontinuous, Indicate that the encoder recompiles the stream medium data;
It is discontinuous after the data packet rearrangement in the direct-broadcasting code stream if the PMT id of the direct-broadcasting code stream change When, indicate that the encoder recompiles the stream medium data.
It can further include in the live source detection device that some embodiments of the invention are provided:
Second detection module 1105, for detecting the transmission node that the direct-broadcasting code stream is used for transmission in the live source Network status;
Second determining module 1106, for detecting that it is different that the network of the transmission node occurs in the second detection module 1105 Chang Shi determines the transmission node transmission abnormality of the live source.
It can further include in the live source detection device that some embodiments of the invention are provided:
Second adjustment module 1107, for the Network Abnormal type according to the transmission node, to the biography of the live source Defeated node is adjusted.
In some embodiments of the invention, second adjustment module 1107 can be specifically used for:
Indicate that the live source is switched to direct-broadcasting code stream described in alternate transmission node-node transmission;Alternatively, indicate the live source The direct-broadcasting code stream is retransmitted to the transmission node.
Specifically, the Network Abnormal type of transmission node includes following any one or more:The transmission node is default Duration threshold value in do not receive direct-broadcasting code stream;The direct-broadcasting code stream that the transmission node receives is imperfect;The transmission node The direct-broadcasting code stream received is discontinuous;
In some embodiments of the invention, second adjustment module 1107 can be specifically used for:
If the transmission node does not receive direct-broadcasting code stream in preset duration threshold value, it indicates that the live source switching To direct-broadcasting code stream described in alternate transmission node-node transmission;
If the direct-broadcasting code stream that the transmission node receives is imperfect, it indicates that the live source is by the direct-broadcasting code stream weight Newly it is sent to the transmission node;
If the direct-broadcasting code stream that the transmission node receives is discontinuous, the data packet in the direct-broadcasting code stream is arranged again When still discontinuous after sequence, indicate that the live source retransmits the direct-broadcasting code stream to the transmission node.
Based on same inventive concept, performed by the live source detection device that some embodiments of the invention described above are provided Detailed process, the principle solved the problems, such as and advantageous effect may refer to the description of preceding method embodiment of the present invention, embodiment party Formula and caused advantageous effect, the application will not be described in great detail herein.
For software implementation, these technologies can use module (such as program, the function etc. for realizing function described herein Deng) realize.Software code can store in a memory cell, and be performed by processor.Memory cell can handled It realizes in device or outside the processor.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided The processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices is generated for real The device of function specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps are performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation Property concept, then additional changes and modifications may be made to these embodiments.So appended claims be intended to be construed to include it is excellent It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (12)

1. a kind of detection method of live source, which is characterized in that this method includes:
Live source detection device receives the direct-broadcasting code stream that the live source coding stream medium data obtains;
The detection device detects the attribute of the direct-broadcasting code stream;
If it is abnormal that the detection device detects that the attribute of the direct-broadcasting code stream occurs, the detection device determines the live streaming It is abnormal for encoding the encoder of stream medium data coding in source.
2. the method as described in claim 1, which is characterized in that the detection device determines to be used for encoding stream in the live source After the encoder coding exception of media data, further include:
The detection device is adjusted the encoder according to the abnormal attribute type of the direct-broadcasting code stream;
The encoder is adjusted, including:Indicate the encoder restarting;Alternatively, indicate the encoder adjustment Coding parameter;Alternatively, indicate that the encoder recompiles stream medium data.
3. method as claimed in claim 2, which is characterized in that the abnormal attribute type of the direct-broadcasting code stream includes following any Kind is a variety of:
The broadcasting reference time stamp PTS of the direct-broadcasting code stream is discontinuous;
The Decoded Reference timestamp DTS of the direct-broadcasting code stream is discontinuous;
The broadcasting reference data clock PCR intervals of the direct-broadcasting code stream are more than given threshold;
The transport stream TS sync byte mistake of the direct-broadcasting code stream;
The continuous counter of the direct-broadcasting code stream is discontinuous;
The Program Association Table mark PMT id of the direct-broadcasting code stream change;
The detection device is adjusted the encoder according to the abnormal attribute type of the direct-broadcasting code stream, including:
If the PTS and/or DTS of the direct-broadcasting code stream are discontinuous, the detection device indicates the encoder restarting;
If the PCR intervals of the direct-broadcasting code stream are more than given threshold, the detection device indicates the encoder adjustment PCR lifes Parameter at interval;
If the TS sync bytes mistake of the direct-broadcasting code stream and/or the continuous counter of the direct-broadcasting code stream are discontinuous, described Detection device indicates that the encoder recompiles the stream medium data;
If the PMT id of the direct-broadcasting code stream change, data packet rearrangement of the detection device in the direct-broadcasting code stream When discontinuous afterwards, indicate that the encoder recompiles the stream medium data.
4. method as claimed any one in claims 1 to 3, which is characterized in that further include:
The detection device detects the Network status for the transmission node that the direct-broadcasting code stream is used for transmission in the live source;
If it is abnormal that the detection device detects that the network of the transmission node occurs, the detection device determines the live streaming The transmission node transmission abnormality in source.
5. method as claimed in claim 4, which is characterized in that the detection device determines that the transmission node of the live source passes After defeated exception, further include:
The detection device adjusts the transmission node of the live source according to the Network Abnormal type of the transmission node It is whole;
The transmission node of the live source is adjusted, including:Indicate that the live source is switched to alternate transmission node-node transmission The direct-broadcasting code stream;Alternatively, indicate that the live source retransmits the direct-broadcasting code stream to the transmission node.
6. method as claimed in claim 5, which is characterized in that the Network Abnormal type of the transmission node includes following any Kind is a variety of:
The transmission node does not receive direct-broadcasting code stream in preset duration threshold value;
The direct-broadcasting code stream that the transmission node receives is imperfect;
The direct-broadcasting code stream that the transmission node receives is discontinuous;
The detection device adjusts the transmission node of the live source according to the Network Abnormal type of the transmission node It is whole, including:
If the transmission node does not receive direct-broadcasting code stream in preset duration threshold value, the detection device instruction is described straight The source of broadcasting is switched to direct-broadcasting code stream described in alternate transmission node-node transmission;
If the direct-broadcasting code stream that the transmission node receives is imperfect, the detection device indicates that the live source will be described straight Code stream is broadcast to retransmit to the transmission node;
If the direct-broadcasting code stream that the transmission node receives is discontinuous, data of the detection device in the direct-broadcasting code stream When still discontinuous after packet rearrangement, indicate that the live source retransmits the direct-broadcasting code stream to the transmission node.
7. a kind of live source detection device, which is characterized in that the device includes:
Receiving module, for receiving the direct-broadcasting code stream that the live source coding stream medium data obtains;
First detection module, for detecting the attribute of the direct-broadcasting code stream;
First determining module, during for detecting that the attribute of the direct-broadcasting code stream occurs abnormal in the first detection module, really It is abnormal for encoding the encoder of stream medium data coding in the fixed live source.
8. device as claimed in claim 7, which is characterized in that further include:
The first adjustment module for the abnormal attribute type according to the direct-broadcasting code stream, is adjusted the encoder;
The first adjustment module, is specifically used for:Indicate the encoder restarting;Alternatively, indicate the encoder adjustment Coding parameter;Alternatively, indicate that the encoder recompiles stream medium data.
9. device as claimed in claim 8, which is characterized in that the abnormal attribute type of the direct-broadcasting code stream includes following any Kind is a variety of:
The PTS of the direct-broadcasting code stream is discontinuous;
The DTS of the direct-broadcasting code stream is discontinuous;
The PCR intervals of the direct-broadcasting code stream are more than given threshold;
The TS sync byte mistakes of the direct-broadcasting code stream;
The continuous counter of the direct-broadcasting code stream is discontinuous;
The PMT id of the direct-broadcasting code stream change;
The first adjustment module, is specifically used for:
If the PTS and/or DTS of the direct-broadcasting code stream are discontinuous, it indicates that the encoder restarting;
If the PCR intervals of the direct-broadcasting code stream are more than given threshold, it indicates that the encoder adjustment PCR generation spacing parameters;
If the TS sync bytes mistake of the direct-broadcasting code stream and/or the continuous counter of the direct-broadcasting code stream are discontinuous, it indicates that The encoder recompiles the stream medium data;
If the PMT id of the direct-broadcasting code stream change, when discontinuous after the data packet rearrangement in the direct-broadcasting code stream, Indicate that the encoder recompiles the stream medium data.
10. the device as described in any one of claim 7 to 9, which is characterized in that further include:
Second detection module, for detect be used for transmission in the live source direct-broadcasting code stream transmission node it is network-like Condition;
Second determining module, during for detecting that the network of the transmission node occurs abnormal in second detection module, really The transmission node transmission abnormality of the fixed live source.
11. device as claimed in claim 10, which is characterized in that further include:
Second adjustment module, for the Network Abnormal type according to the transmission node, to the transmission node of the live source into Row adjustment;
The second adjustment module, is specifically used for:The live source is indicated to be switched to described in alternate transmission node-node transmission, code is broadcast live Stream;Alternatively, indicate that the live source retransmits the direct-broadcasting code stream to the transmission node.
12. device as claimed in claim 11, which is characterized in that the Network Abnormal type of the transmission node includes following It is one or more:
The transmission node does not receive direct-broadcasting code stream in preset duration threshold value;
The direct-broadcasting code stream that the transmission node receives is imperfect;
The direct-broadcasting code stream that the transmission node receives is discontinuous;
The second adjustment module, is specifically used for:
If the transmission node does not receive direct-broadcasting code stream in preset duration threshold value, it indicates that the live source is switched to standby Transmission node is selected to transmit the direct-broadcasting code stream;
If the direct-broadcasting code stream that the transmission node receives is imperfect, it indicates that the live source sends out the direct-broadcasting code stream again Give the transmission node;
If the direct-broadcasting code stream that the transmission node receives is discontinuous, after the data packet rearrangement in the direct-broadcasting code stream When still discontinuous, indicate that the live source retransmits the direct-broadcasting code stream to the transmission node.
CN201611110290.0A 2016-12-02 2016-12-02 A kind of detection method and device of live source Pending CN108156481A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611110290.0A CN108156481A (en) 2016-12-02 2016-12-02 A kind of detection method and device of live source

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611110290.0A CN108156481A (en) 2016-12-02 2016-12-02 A kind of detection method and device of live source

Publications (1)

Publication Number Publication Date
CN108156481A true CN108156481A (en) 2018-06-12

Family

ID=62468225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611110290.0A Pending CN108156481A (en) 2016-12-02 2016-12-02 A kind of detection method and device of live source

Country Status (1)

Country Link
CN (1) CN108156481A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385637A (en) * 2020-03-18 2020-07-07 Oppo广东移动通信有限公司 Media data encoding method and device and electronic equipment
CN111711833A (en) * 2020-07-28 2020-09-25 广州华多网络科技有限公司 Live video stream push control method, device, equipment and storage medium
WO2021036551A1 (en) * 2019-08-29 2021-03-04 中兴通讯股份有限公司 Power consumption adjustment method and device, and computer-readable storage medium
CN112449212A (en) * 2019-08-28 2021-03-05 杭州海康威视系统技术有限公司 Audio and video code stream processing method and device and control equipment
CN113810768A (en) * 2021-08-06 2021-12-17 新浪网技术(中国)有限公司 Method and system for monitoring quality of live program
CN113923483A (en) * 2021-09-30 2022-01-11 北京金山云网络技术有限公司 Live broadcast exception processing method and device, electronic equipment and storage medium
WO2023213096A1 (en) * 2022-05-05 2023-11-09 上海哔哩哔哩科技有限公司 Live streaming anomaly detection and processing method and apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000148711A (en) * 1998-11-10 2000-05-30 Victor Co Of Japan Ltd Dynamic image server system
CN1710911A (en) * 2004-06-19 2005-12-21 三星电子株式会社 Method and apparatus for processing transmission errors in dmb systems
CN101068155A (en) * 2006-09-20 2007-11-07 腾讯科技(深圳)有限公司 Coordinate connection stream media direct broadcasting system and collection server thereof
CN101350740A (en) * 2007-12-21 2009-01-21 华为技术有限公司 Method and system for detecting diathesis caused abnormal QoS
CN102739417A (en) * 2011-04-01 2012-10-17 华为技术有限公司 Streaming media service processing system, method and network equipment thereof
CN103813182A (en) * 2014-01-28 2014-05-21 苏州工业园区科升通讯有限公司 System and method for QOS (quality of service) monitoring of IPTV (internet protocol television) services

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000148711A (en) * 1998-11-10 2000-05-30 Victor Co Of Japan Ltd Dynamic image server system
CN1710911A (en) * 2004-06-19 2005-12-21 三星电子株式会社 Method and apparatus for processing transmission errors in dmb systems
CN101068155A (en) * 2006-09-20 2007-11-07 腾讯科技(深圳)有限公司 Coordinate connection stream media direct broadcasting system and collection server thereof
CN101350740A (en) * 2007-12-21 2009-01-21 华为技术有限公司 Method and system for detecting diathesis caused abnormal QoS
CN102739417A (en) * 2011-04-01 2012-10-17 华为技术有限公司 Streaming media service processing system, method and network equipment thereof
CN103813182A (en) * 2014-01-28 2014-05-21 苏州工业园区科升通讯有限公司 System and method for QOS (quality of service) monitoring of IPTV (internet protocol television) services

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112449212A (en) * 2019-08-28 2021-03-05 杭州海康威视系统技术有限公司 Audio and video code stream processing method and device and control equipment
CN112449212B (en) * 2019-08-28 2022-11-04 杭州海康威视系统技术有限公司 Audio and video code stream processing method and device and control equipment
WO2021036551A1 (en) * 2019-08-29 2021-03-04 中兴通讯股份有限公司 Power consumption adjustment method and device, and computer-readable storage medium
CN112449241A (en) * 2019-08-29 2021-03-05 中兴通讯股份有限公司 Power consumption adjusting method and device and computer readable storage medium
CN111385637A (en) * 2020-03-18 2020-07-07 Oppo广东移动通信有限公司 Media data encoding method and device and electronic equipment
CN111711833A (en) * 2020-07-28 2020-09-25 广州华多网络科技有限公司 Live video stream push control method, device, equipment and storage medium
CN113810768A (en) * 2021-08-06 2021-12-17 新浪网技术(中国)有限公司 Method and system for monitoring quality of live program
CN113810768B (en) * 2021-08-06 2023-10-31 新浪技术(中国)有限公司 Method and system for monitoring quality of live program
CN113923483A (en) * 2021-09-30 2022-01-11 北京金山云网络技术有限公司 Live broadcast exception processing method and device, electronic equipment and storage medium
WO2023213096A1 (en) * 2022-05-05 2023-11-09 上海哔哩哔哩科技有限公司 Live streaming anomaly detection and processing method and apparatus

Similar Documents

Publication Publication Date Title
CN108156481A (en) A kind of detection method and device of live source
US10382512B2 (en) Distributed fragment timestamp synchronization
US10104406B2 (en) Transmission apparatus, transmission method, reproduction apparatus, reproduction method and reception apparatus
CN108809893A (en) A kind of video quality evaluation method and equipment
US8181077B2 (en) Methods and devices for the dynamic management of transmission errors by network points of interconnections
CN105264846A (en) Transmission apparatus, transfer stream transmission method and processing apparatus
EP2754301A1 (en) Streaming of multimedia data from multiple sources
EP1379051B1 (en) Data sending/receiving system and method for a defect-free data transmission
KR20130040090A (en) Apparatus and method for delivering multimedia data in hybrid network
JP6743192B2 (en) Video service quality evaluation method and apparatus
CN104284135B (en) Video transmission method and equipment
CN104735473A (en) Video stream playing detection method and device
EP3325116A1 (en) Method and telecommunications network for streaming and for reproducing applications
US10097506B2 (en) Address assignment for various client types
US20200351213A1 (en) Method and apparatus for transmitting and receiving packet in communication system
CN106411894A (en) Video transmission method and system
CN109756744B (en) Data processing method, electronic device and computer storage medium
CN105357229A (en) Video processing method and device
CN103813175A (en) Transmission apparatus, transmission method, reception apparatus, reception method, and computer program
CN105916011A (en) Video real-time playing method and device
WO2002056549A1 (en) Communication device and communication method
KR101145078B1 (en) Media distribution switching method, receiving device and transmitting device
JP2009188674A (en) Transmitting apparatus, receiving apparatus, moving image sound transmission quality evaluating method, and moving image sound transmission quality evaluation program
JP2009077108A (en) Receiver, receiving method and computer program
CN110620943B (en) Control method and device based on multimedia interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180612