CN103731641A - Video streaming data distribution method and device for monitoring device - Google Patents

Video streaming data distribution method and device for monitoring device Download PDF

Info

Publication number
CN103731641A
CN103731641A CN201410016460.3A CN201410016460A CN103731641A CN 103731641 A CN103731641 A CN 103731641A CN 201410016460 A CN201410016460 A CN 201410016460A CN 103731641 A CN103731641 A CN 103731641A
Authority
CN
China
Prior art keywords
thread
video
send
client
video stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410016460.3A
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 Infinova Ltd
Original Assignee
Shenzhen Infinova Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Infinova Ltd filed Critical Shenzhen Infinova Ltd
Priority to CN201410016460.3A priority Critical patent/CN103731641A/en
Publication of CN103731641A publication Critical patent/CN103731641A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a video streaming data distribution method for a monitoring device. The video streaming data distribution method for the monitoring device comprises steps of S1, detecting whether a video streaming data play request containing a client address and from a client exists or not; S2, judging whether the requested video streaming is requested or not and whether a sending thread is constructed or not when the video streaming play request is detected, carrying out a S4 if yes and carrying out a S3 if not; S3, constructing the sending thread, generating into video streaming data packets through the sending thread and carrying out the S4; S4, adding the client address in the video streaming request to a video streaming sending address list and carrying out a S5; S5, cyclically iterating the video streaming sending address list and sending the data streaming data packets to addresses in the list through the sensing thread. The invention also provides a video streaming data distribution device for the monitoring device. The video streaming data distribution device and the method for the monitoring device have the advantages of achieving multi-address sending with data processing for one time and reducing hardware resource occupation from processing of the video streaming data.

Description

Video stream data distribution method and the device of watch-dog
Technical field
The present invention relates to protection and monitor field, relate in particular to a kind of video stream data distribution method and device of watch-dog.
Background technology
Along with the networking of safety monitoring product, high Qinghua and intellectuality, watch-dog load undoubtedly can be more and more large, and this is mainly reflected in the consumption of live video stream.When the operating state of equipment in high capacity, often can run into following situations: equipment reaction is slow, webpage parameter can not normally show and arrange; Real-time video card pauses, flower screen, frame losing or ask unsuccessful; Intellectual analysis can not normally carry out.Yet, due to the constantly complicated development of watch-dog function, only depend on merely to promote hardware performance to overcome above-mentioned defect be obviously unpractical to meet customer need.
The resource consumption of considering video flowing is large, therefore systematic function is promoted undoubtedly more directly with efficient by reducing the resource consumption of video flowing.
Stream media protocol, as flow host-host protocol, is widely used in various monitoring place.Stream media protocol mainly comprises three quasi-protocols, be RTSP agreement (Real-Time Steaming Potocoal), Real-time Transport Protocol (Real-Time Transport Potocoal) and rtcp protocol (Real-Time Transport Control Potocoal).RTSP agreement, for Signalling exchange, is controlled request and the disconnection of video flowing, supports TCP|UDP|Http protocol transmission, and Real-time Transport Protocol is for transfer of data, and rtcp protocol is for flow control.
The restriction of the MTU of and network link large due to the data volume of video flowing, frame of video must split the requirement that meets MTU before sending, and then through Real-time Transport Protocol, carried and was sent to destination address.When multi-wad join (RTSP over TCP|UDP|Http) is asked same video flowing, existing processing method is: the connection of Wei Mei road creates respectively a send-thread, in thread function, carry out respectively data processing and fractionation, be then packaged as Real-time Transport Protocol bag and be sent to destination address.Because a road video connects thread process (data processing splits and Real-time Transport Protocol package), resource consumption is large, and multi-wad join is separate, causes resource consumption with the increase of same video flowing request amount being to linear growth, and systematic function is sharply declined.
Summary of the invention
The technical problem that the present invention mainly solves is to provide a kind of video stream data distribution method and device of watch-dog, be applicable to data volume large, the more front end watch-dog of way simultaneously connecting can be realized glibly the request of a plurality of equipment to same video flowing under existing hardware condition.
The technical scheme that the present invention adopts is: a kind of video stream data distribution method of watch-dog is provided, comprises step:
Whether S1, detection have the video render request that comprises client address from client;
S2, when video render request being detected, the judgement whether requested mistake of video flowing of asking and created send-thread, if so, performs step S4, if not, performs step S3;
S3, establishment send-thread, by send-thread generating video stream packets, then perform step S4;
S4, the client address in video render request is added into video flowing sends in address list, then perform step S5;
S5, searching loop video flowing send address list, by send-thread, to the address in this list, send video streaming data packet.
Another technical solution used in the present invention is: a kind of video stream data dispensing device of watch-dog is provided, comprises:
Detection module, for detection of whether there being the video render request that comprises client address from client;
Judge module, for when video render request being detected, judges the whether requested mistake of video flowing of asking and has created send-thread, if so, Notify Address adds module executable operations, if not, notifies thread creation module executable operations;
Thread creation module, for creating send-thread, by send-thread generating video stream packets, then Notify Address adds module executable operations;
Module is added in address, for the client address of video render request being added into video flowing, sends in address list, then notifies video flowing sending module executable operations;
Video flowing sending module, sends address list and the address transmission video streaming data packet to this list by send-thread for searching loop video flowing.
The invention has the beneficial effects as follows: the present invention is by changing the connection handling process of video flowing, the logical process of general character is extracted, a video flowing corresponding send-thread in Ji Mei road is responsible for the processing of video stream data and is sent to different destination addresses, one of every like this increase connection to requested video flowing, just deliver to a destination address by the video stream data of processed mistake is multiple, resource consumption can linear growth, the processing of video stream data, unpack multiplexing in same send-thread, thereby realize data processing one time, the object that multi-link address sends, significantly reduced processing the taking hardware resource of video stream data, be conducive to reduce the requirement to hardware.
Accompanying drawing explanation
Fig. 1 is the structured flowchart of an execution mode of the video stream data dispensing device of watch-dog of the present invention;
Fig. 2 is the main flowchart of an execution mode of the video stream data distribution method of watch-dog of the present invention.
Main element symbol description:
100, dispensing device; 10, detection module; 20, judge module; 30, thread creation module; 40, module is added in address; 50, video flowing sending module.
Embodiment
By describing technology contents of the present invention, structural feature in detail, being realized object and effect, below in conjunction with execution mode and coordinate accompanying drawing to be explained in detail.
Refer to Fig. 1, the video stream data dispensing device 100 that present embodiment is a kind of watch-dog, comprising: module 40 and video flowing sending module 50 are added in detection module 10, judge module 20, thread creation module 30, address.
Described detection module 10 is for detection of whether there being the video render request that comprises client address from client.
Described judge module 20 is for when video render request being detected, judge the whether requested mistake of video flowing of asking and created send-thread, if so, Notify Address adds module 40 executable operations, if not, notify thread creation module 30 executable operations.
Thread creation module 30, for creating send-thread, by send-thread generating video stream packets, then Notify Address adds module 40 executable operations.
Module 40 is added in address, for the client address of video render request being added into video flowing, sends in address list, then notifies video flowing sending module 50 executable operations.
Described video flowing sending module 50 sends address list and the address transmission video streaming data packet to this list by send-thread for searching loop video flowing.
Wherein, described detection module 10 specifically comprises: service-creation unit, detecting unit, the first thread creating unit, receiving element, agreement judging unit and the second thread creation unit.
Described service-creation unit is for creating the RTSP agreement Connection Service with Transmission Control Protocol carrying.
Whether described detecting unit is for detection of having client to carry out RTSP agreement connection request.
Described the first thread creating unit is for when the RTSP agreement connection request of client being detected, and the RTSP protocol command that creates the first communication thread execution front end watch-dog and client is mutual.
Described receiving element is for receiving by the first communication thread video render request and the messaging parameter that client sends, and described messaging parameter comprises the port of transport protocol type, RTP and RTCP and identification parameter, time-out time parameter.Wherein, transport protocol type comprises UDP, TCP or HTTP; When host-host protocol is UDP, identifying parameter identification is RTP, the port of the IP address that port parameter is RTP, and when host-host protocol is TCP or HTTP, identifying parameter identification is RTCP, the port numbers of the IP address that port parameter is RTCP; Time-out time parameter is for not receiving the GET_PARAMETER signaling of RTSP or the time interval value of RTCP order, and after this time interval arrives, RTSP disconnects.
Described agreement judging unit is for judging the transport protocol type of video flowing, if transport protocol type is udp protocol, notify the second thread creation unit executable operations, if transport protocol type is Transmission Control Protocol or http protocol, notify described judge module 20 executable operations.
Described judge module 20 executable operations, for creating the communication of second communication thread execution rtcp protocol, are then notified in described the second thread creation unit.
Wherein, described thread creation module 30 specifically comprises: the 3rd thread creation unit, acquiring unit, split cells and encapsulation unit.
Described the 3rd thread creation unit is used for creating send-thread.
Described acquiring unit is for obtaining video stream data by send-thread.
Described split cells is for splitting the frame of video of obtained video stream data.
Described encapsulation unit is for adopting Real-time Transport Protocol encapsulation, generating video stream packets by the video stream data after splitting.
The operation principle of this dispensing device 100 is, when the video acquisition watch-dog of front end is received the video flowing connection request of new client of rear end, dispensing device 100 can first check whether this video flowing has been established send-thread and has sent state in video streaming data packet, if so, multiplexing this send-thread sends to this new client by video streaming data packet; If do not connect, create new send-thread and carry out sending video streaming data packet after data processing.Processing mode compared with legacy equipment, use the connection request of the rear every increase of this device one tunnel to same video flowing, the communication of RTSP|RTCP and the resource consumption that network data sends have only been increased, can not increase the load that system reprocessing same video stream brings, make the efficiency of the data processing of video flowing significantly improve.And, because this device only carries out data processing one time to the request of same video flowing, when deal with data, needn't lock to data buffer zone, avoid a plurality of send-threads to share data buffer zone during deal with data to repeatedly the locking of data buffer zone simultaneously, further improved the efficiency that video stream data is processed.
Below to adopt the front end gunlock of this device and the video flowing of traditional gunlock to send performance test:
Legacy equipment connects three road 8M code streams by RTSP over UDP, and CPU residue is 0%, and the client of rear end there will be flower screen and frame losing phenomenon when checking video;
Equipment with this device connects three road 8M code streams by RTSP over UDP, and the residue of CPU is 24%, and the client of rear end is checking that video code stream is smooth, without Caton phenomenon.
Refer to Fig. 2, the video stream data distribution method that present embodiment is a kind of watch-dog, comprises step:
Whether S1, detection have the video render request that comprises client address from client;
S2, when video render request being detected, the judgement whether requested mistake of video flowing of asking and created send-thread, if so, performs step S4, if not, performs step S3;
S3, establishment send-thread, by send-thread generating video stream packets, then perform step S4;
S4, the client address in video render request is added into video flowing sends in address list, then perform step S5;
S5, searching loop video flowing send address list, by send-thread, to the address in this list, send video streaming data packet.
Wherein, described step S1 specifically comprises:
The RTSP agreement Connection Service that S11, establishment are carried with Transmission Control Protocol;
Whether S12, detection have client to carry out RTSP agreement connection request;
S13, when the RTSP agreement connection request of client being detected, creating the first communication thread, to carry out the RTSP protocol command of front end watch-dog and client mutual;
S13, the video render request and the messaging parameter that by the first communication thread reception client, send, described messaging parameter comprises transport protocol type;
The transport protocol type of S14, judgement video flowing, if transport protocol type is udp protocol, performs step S15, if transport protocol type is Transmission Control Protocol or http protocol, performs step S2;
The communication of S15, establishment second communication thread execution rtcp protocol, then performs step S2.
Wherein, described step S3 specifically comprises:
S31, establishment send-thread;
S32, by send-thread, obtain video stream data;
S33, the frame of video in obtained video stream data is split;
S34, the video stream data after splitting is adopted to Real-time Transport Protocol encapsulation, generating video stream packets.
The invention has the beneficial effects as follows: the present invention is by changing the connection handling process of video flowing, the logical process of general character is extracted, a video flowing corresponding send-thread in Ji Mei road is responsible for the processing of video stream data and is sent to different destination addresses, one of every like this increase connection to requested video flowing, just deliver to a destination address by the video stream data of processed mistake is multiple, resource consumption can linear growth, the processing of video stream data, unpack multiplexing in same send-thread, thereby realize data processing one time, the object that multi-link address sends, significantly reduced processing the taking hardware resource of video stream data, be conducive to reduce the requirement to hardware.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes specification of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (8)

1. the video stream data distribution method of watch-dog, is characterized in that, comprises step:
Whether S1, detection have the video render request that comprises client address from client;
S2, when video render request being detected, the judgement whether requested mistake of video flowing of asking and created send-thread, if so, performs step S4, if not, performs step S3;
S3, establishment send-thread, by send-thread generating video stream packets, then perform step S4;
S4, the client address in video render request is added into video flowing sends in address list, then perform step S5;
S5, searching loop video flowing send address list, by send-thread, to the address in this list, send video streaming data packet.
2. the video stream data distribution method of watch-dog according to claim 1, is characterized in that, described step S1 specifically comprises:
The RTSP agreement Connection Service that S11, establishment are carried with Transmission Control Protocol;
Whether S12, detection have client to carry out RTSP agreement connection request;
S13, when the RTSP agreement connection request of client being detected, creating the first communication thread, to carry out the RTSP protocol command of front end watch-dog and client mutual;
S13, the video render request and the messaging parameter that by the first communication thread reception client, send, described messaging parameter comprises transport protocol type;
The transport protocol type of S14, judgement video flowing, if transport protocol type is udp protocol, performs step S15, if transport protocol type is Transmission Control Protocol or http protocol, performs step S2;
The communication of S15, establishment second communication thread execution rtcp protocol, then performs step S2.
3. the video stream data distribution method of watch-dog according to claim 2, is characterized in that, described messaging parameter also comprises the port of RTP and RTCP and identification parameter, time-out time parameter.
4. the video stream data distribution method of watch-dog according to claim 1, is characterized in that, described step S3 specifically comprises:
S31, establishment send-thread;
S32, by send-thread, obtain video stream data;
S33, the frame of video in obtained video stream data is split;
S34, the video stream data after splitting is adopted to Real-time Transport Protocol encapsulation, generating video stream packets.
5. the video stream data dispensing device of watch-dog, is characterized in that, comprising:
Detection module, for detection of whether there being the video render request that comprises client address from client;
Judge module, for when video render request being detected, judges the whether requested mistake of video flowing of asking and has created send-thread, if so, Notify Address adds module executable operations, if not, notifies thread creation module executable operations;
Thread creation module, for creating send-thread, by send-thread generating video stream packets, then Notify Address adds module executable operations;
Module is added in address, for the client address of video render request being added into video flowing, sends in address list, then notifies video flowing sending module executable operations;
Video flowing sending module, sends address list and the address transmission video streaming data packet to this list by send-thread for searching loop video flowing.
6. the video stream data dispensing device of watch-dog according to claim 5, is characterized in that, described detection module specifically comprises:
Service-creation unit, for creating the RTSP agreement Connection Service with Transmission Control Protocol carrying;
Whether detecting unit, for detection of having client to carry out RTSP agreement connection request;
The first thread creating unit, for when the RTSP agreement connection request of client being detected, the RTSP protocol command that creates the first communication thread execution front end watch-dog and client is mutual;
Receiving element, for receiving by the first communication thread video render request and the messaging parameter that client sends, described messaging parameter comprises transport protocol type;
Agreement judging unit, for judging the transport protocol type of video flowing, if transport protocol type is udp protocol, notifies the second thread creation unit executable operations, if transport protocol type is Transmission Control Protocol or http protocol, notifies described judge module executable operations;
The second thread creation unit, for creating the communication of second communication thread execution rtcp protocol, then notifies described judge module executable operations.
7. the video stream data dispensing device of watch-dog according to claim 6, is characterized in that, described messaging parameter also comprises RTP parameter, RTCP port/identification parameter and time-out time parameter.
8. the video stream data dispensing device of watch-dog according to claim 5, is characterized in that, described thread creation module specifically comprises:
The 3rd thread creation unit, for creating send-thread;
Acquiring unit, for obtaining video stream data by send-thread;
Split cells, splits for the frame of video of the video stream data to obtained;
Encapsulation unit, for adopting Real-time Transport Protocol encapsulation, generating video stream packets by the video stream data after splitting.
CN201410016460.3A 2014-01-14 2014-01-14 Video streaming data distribution method and device for monitoring device Pending CN103731641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410016460.3A CN103731641A (en) 2014-01-14 2014-01-14 Video streaming data distribution method and device for monitoring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410016460.3A CN103731641A (en) 2014-01-14 2014-01-14 Video streaming data distribution method and device for monitoring device

Publications (1)

Publication Number Publication Date
CN103731641A true CN103731641A (en) 2014-04-16

Family

ID=50455548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410016460.3A Pending CN103731641A (en) 2014-01-14 2014-01-14 Video streaming data distribution method and device for monitoring device

Country Status (1)

Country Link
CN (1) CN103731641A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108173861A (en) * 2017-12-29 2018-06-15 北京奇虎科技有限公司 A kind of method, apparatus of net cast and live streaming distribution connector
CN109005381A (en) * 2018-06-06 2018-12-14 北京世纪东方通讯设备有限公司 Streaming media service based on Railway Integrated Video monitoring divides retransmission method and device
CN111010615A (en) * 2019-12-03 2020-04-14 深圳市创维群欣安防科技股份有限公司 Video stream transmission method, system and storage medium
CN111225228A (en) * 2020-01-15 2020-06-02 北京拙河科技有限公司 Video live broadcast method, device, equipment and medium
CN112153338A (en) * 2020-09-23 2020-12-29 平安国际智慧城市科技股份有限公司 Video distribution method and device, electronic equipment and storage medium
CN112671810A (en) * 2021-03-18 2021-04-16 紫光恒越技术有限公司 Data processing method and device, electronic equipment, server and storage equipment
CN114225364A (en) * 2020-09-14 2022-03-25 成都拟合未来科技有限公司 Real-time interaction method and system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108173861A (en) * 2017-12-29 2018-06-15 北京奇虎科技有限公司 A kind of method, apparatus of net cast and live streaming distribution connector
CN109005381A (en) * 2018-06-06 2018-12-14 北京世纪东方通讯设备有限公司 Streaming media service based on Railway Integrated Video monitoring divides retransmission method and device
CN111010615A (en) * 2019-12-03 2020-04-14 深圳市创维群欣安防科技股份有限公司 Video stream transmission method, system and storage medium
CN111225228A (en) * 2020-01-15 2020-06-02 北京拙河科技有限公司 Video live broadcast method, device, equipment and medium
CN111225228B (en) * 2020-01-15 2022-04-12 深圳拙河科技有限公司 Video live broadcast method, device, equipment and medium
CN114225364A (en) * 2020-09-14 2022-03-25 成都拟合未来科技有限公司 Real-time interaction method and system
CN112153338A (en) * 2020-09-23 2020-12-29 平安国际智慧城市科技股份有限公司 Video distribution method and device, electronic equipment and storage medium
CN112671810A (en) * 2021-03-18 2021-04-16 紫光恒越技术有限公司 Data processing method and device, electronic equipment, server and storage equipment
CN112671810B (en) * 2021-03-18 2021-06-01 紫光恒越技术有限公司 Data processing method and device, electronic equipment, server and storage equipment

Similar Documents

Publication Publication Date Title
CN103731641A (en) Video streaming data distribution method and device for monitoring device
CN101953139B (en) DHCP in response to Internet connectedness initializes
US9860931B2 (en) Method, system and terminal for realizing network access via Wi-Fi®
CN103067218B (en) A kind of express network packet content analytical equipment
US20140222960A1 (en) Method and Apparatus for Rapid Data Distribution
CN110808873B (en) Method and device for detecting link failure
CN102377640A (en) Message processing apparatus, message processing method and preprocessor
CN102497297A (en) System and method for realizing deep packet inspection technology based on multi-core and multi-thread
WO2016086890A1 (en) Method and device for detecting connectivity
CN101316203B (en) Method for monitoring embedded IP terminal internetwork connection condition
CN102868759B (en) The system of server controls browser interface Refresh Data and method thereof
CN107592554A (en) Live video retransmission method and device
CN112671810B (en) Data processing method and device, electronic equipment, server and storage equipment
CN105337850A (en) Internet of Things data processing method and internet of Things gateway
CN104113510A (en) Virtual desktop system and message data transmitting method thereof
CN107454141B (en) Method for resolving port conflicts and computer-readable storage medium
CN102917212A (en) 3G (The 3rd Generation Telecommunication) wireless video monitoring implementation method and 3G wireless video monitoring system based on RTP (Real Time Protocol) and RTSP (Real Time Streaming Protocol)
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN103763150A (en) Data acquisition system
CN106230658A (en) A kind of method and apparatus monitoring the network equipment
CN102970191A (en) Method and device for realizing detection protocol in distribution type system
CN103078865A (en) Network server communication model based on transmission control protocol (TCP)
CN103297480A (en) System and method for automatically detecting application service
CN112667359B (en) Data transparent transmission method, electronic equipment and storage medium
CN107483384B (en) Network data interaction method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140416