CN106973307A - A kind of video equipment access method and device - Google Patents

A kind of video equipment access method and device Download PDF

Info

Publication number
CN106973307A
CN106973307A CN201710189397.7A CN201710189397A CN106973307A CN 106973307 A CN106973307 A CN 106973307A CN 201710189397 A CN201710189397 A CN 201710189397A CN 106973307 A CN106973307 A CN 106973307A
Authority
CN
China
Prior art keywords
video
code stream
video equipment
code flow
standard code
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
CN201710189397.7A
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.)
Netposa Technologies Ltd
Original Assignee
Netposa Technologies 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 Netposa Technologies Ltd filed Critical Netposa Technologies Ltd
Priority to CN201710189397.7A priority Critical patent/CN106973307A/en
Publication of CN106973307A publication Critical patent/CN106973307A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/765Media network packet handling intermediate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a kind of video equipment access method and device, this method includes receiving the processing request that client is sent based on preset communication protocol, and the IP address of client and the IP address of target video equipment are carried in above-mentioned processing request;When above-mentioned processing asks to be used for acquisition request video code flow, based on the IP address of target video equipment, above-mentioned processing is obtained from target video equipment and asks asked video code flow;It is determined that standard code stream corresponding with the video code flow got;Based on the IP address of preset communication protocol and client, above-mentioned standard code stream is sent to client.In the present invention, the maintenance cost of server and the cost of client are reduced.

Description

A kind of video equipment access method and device
Technical field
The present invention relates to communication technical field, in particular to a kind of video equipment access method and device.
Background technology
Video monitoring is the important component of safety precaution, and with the fast development of computer technology, video monitoring is opened Beginning is applied to increasing industry and place, and the realization of video monitoring depends on video monitoring system.And video monitoring system Client, server and image capture device etc. are generally comprised, common customer ends pass through server access image capture device.
One server can access multiple images collecting device, and the image capture device accessed can be by different Manufacturer production, the equipment of different manufacturers has oneself privately owned interface protocol, when the images that client needs access different are adopted When collecting equipment, then need to call interface protocol corresponding with the image capture device, so so that carrying out server maintenance When, it is necessary to analyze the proprietary protocol of multiple producers, and access server and use proprietary protocol, it is impossible to packet capturing point Analysis so that the maintenance cost of server is higher;In addition, the video code flow obtained from image capture device is sent to visitor by server Family end, is decoded by client to the video code flow, obtains the corresponding standard code stream of the video code flow, and for different manufacturers Head portrait collecting device then need to use different decoding processes to be decoded, therefore, each client is required to be stored with many Plant decoding process so that the cost of client is higher.
To sum up, in the prior art in video monitoring system, the maintenance cost of server and the cost of client are very high.
The content of the invention
In view of this, the purpose of the embodiment of the present invention is to provide a kind of video equipment access method and device, to solve The maintenance cost of server and the problem of the very high cost of client in the prior art.
In a first aspect, the embodiments of the invention provide a kind of video equipment access method, wherein, methods described includes:
The processing request that client is sent based on preset communication protocol is received, the visitor is carried in the processing request The IP address at family end and the IP address of target video equipment;
When the processing request is used for acquisition request video code flow, based on the IP address of the target video equipment, from The asked video code flow of the processing request is obtained in the target video equipment;
It is determined that standard code stream corresponding with the video code flow got;
IP address based on the preset communication protocol and the client, the visitor is sent to by the standard code stream Family end.
With reference in a first aspect, the embodiments of the invention provide the possible implementation of the first of above-mentioned first aspect, its In, methods described also includes:
When the processing request is used to ask to control the target video equipment, according to the processing request and the mesh The IP address of video equipment is marked, controls the target video equipment to perform the operation that the processing request is indicated.
With reference in a first aspect, the embodiments of the invention provide the possible implementation of second of above-mentioned first aspect, its In, it is described to determine corresponding with the video code flow got standard code stream, including:
According to the form of the frame head data of the video code flow and the corresponding frame head data of standard code stream, judge to get The video code flow whether be standard code stream;
If it is, the video code flow got is defined as into standard code stream;
Otherwise, according to the corresponding standard code stream format of the standard code stream, the video code flow is converted into standard code stream.
With reference to second of possible implementation of first aspect, the embodiments of the invention provide the of above-mentioned first aspect Three kinds of possible implementations, wherein, it is described according to the corresponding standard code stream format of the standard code stream, by the video code flow Standard code stream is converted into, including:
Search whether there is transcoding mode corresponding with the target video equipment from local, the transcoding mode is by institute State the method that the video code flow of target video equipment transmission is converted into the standard code stream matched with the standard code stream format;
If it is present the video code flow is converted into the standard code stream using the transcoding mode;
Otherwise, the video code flow is converted into standard code stream by the way of default Brute Force.
With reference to the third possible implementation of first aspect, the embodiments of the invention provide the of above-mentioned first aspect Four kinds of possible implementations, wherein, it is described that the video code flow is converted into standard by the way of default Brute Force Code stream, including:
Obtain the data length of the video code flow and the length of the frame head data;
According to the data length of the video code flow and the length of the frame head data, the length of the standard code stream is determined Degree;
According to the length of the standard code stream, the extraction standard code stream from the video code flow.
Any in the 4th kind of possible implementation with reference to first aspect to first aspect, the embodiment of the present invention is provided 5th kind of possible implementation of above-mentioned first aspect, wherein, the IP address based on the target video equipment, from The asked video code flow of the processing request is obtained in the target video equipment, including:
According to the IP address of the target video equipment, the corresponding transmission thread of the target video equipment is created, wherein, The different transmission thread of different target video equipment correspondences;
The video code flow is obtained from the target video equipment by the transmission thread of establishment.
Second aspect, the embodiments of the invention provide a kind of video access methods, wherein, methods described includes:
Processing request is sent to server based on preset communication protocol;
Receive the video code flow correspondence for the processing request request that the server is obtained from target video equipment Standard code stream, and play the standard code stream.
The third aspect, the embodiments of the invention provide a kind of video equipment access mechanism, wherein, described device includes:
Receiving module, for receiving the processing request that client is sent based on preset communication protocol, the processing request In carry the IP address of the client and the IP address of target video equipment;
Acquisition module, for when the processing request is used for acquisition request video code flow, being set based on the target video Standby IP address, obtains the asked video code flow of the processing request from the target video equipment;
Determining module, the corresponding standard code stream of the video code flow for determining with getting;
Sending module, for the IP address based on the preset communication protocol and the client, by the standard code Stream is sent to the client.
With reference to the third aspect, the embodiments of the invention provide the possible implementation of the first of the above-mentioned third aspect, its In, described device also includes:
Control module, for when the processing request is used to ask to control the target video equipment, according to the place Reason request and the IP address of the target video equipment, control the target video equipment to perform the behaviour that the processing request is indicated Make.
With reference to the third aspect, the embodiments of the invention provide the possible implementation of second of the above-mentioned third aspect, its In, the determining module includes:
Judging unit, the lattice for the frame head data according to the video code flow and the corresponding frame head data of standard code stream Formula, judges whether the video code flow got is standard code stream;
Determining unit, if the used video code flow got is standard code stream, by the video got Code stream is defined as standard code stream;
Transcoding units, if the video code flow for getting is not standard code stream, according to the standard code stream Corresponding standard code stream format, standard code stream is converted into by the video code flow.
Fourth aspect, the embodiments of the invention provide a kind of video equipment access mechanism, wherein, described device includes:
Sending module, for sending processing request to server based on preset communication protocol;
Receiving module, the request is asked for receiving the processing that the server is obtained from target video equipment The corresponding standard code stream of video code flow, and play the standard code stream.
In video equipment access method provided in an embodiment of the present invention and device, by pre- between server and client The communication protocol put is communicated, when progress server is safeguarded, by analyzing signaling and preset communication protocols that packet capturing is obtained The signaling of view, facilitates investigation problem, reduces the maintenance cost of server;In addition, by server to the video code flow that gets Decoded, directly being played after client receives code stream just can be so that client need not be in the video codes to receiving Stream is decoded, and therefore, a variety of decoding processes need not be stored in each client, be reduced the cost of client.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate Appended accompanying drawing, is described in detail below.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be attached to what is used required in embodiment Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, therefore is not construed as pair The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this A little accompanying drawings obtain other related accompanying drawings.
Fig. 1 shows the flow chart for the first video equipment access method that the embodiment of the present invention is provided;
Fig. 2 shown in the first video equipment access method that the embodiment of the present invention is provided, it is determined that with getting The flow chart of the corresponding standard code stream of video code flow;
Fig. 3 shows the flow chart for second of video equipment access method that the embodiment of the present invention is provided;
Fig. 4 shows the structural representation for the first video equipment access mechanism that the embodiment of the present invention is provided;
Fig. 5 shows second of structural representation of the first video equipment access mechanism that the embodiment of the present invention is provided Figure;
Fig. 6 shows the structural representation for second of video equipment access mechanism that the embodiment of the present invention is provided.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention Middle accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only It is a part of embodiment of the invention, rather than whole embodiments.The present invention being generally described and illustrated herein in the accompanying drawings is real Applying the component of example can be arranged and be designed with a variety of configurations.Therefore, it is of the invention to what is provided in the accompanying drawings below The detailed description of embodiment is not intended to limit the scope of claimed invention, but is merely representative of the selected reality of the present invention Apply example.Based on embodiments of the invention, the institute that those skilled in the art are obtained on the premise of creative work is not made There is other embodiment, belong to the scope of protection of the invention.
In view of needed in existing video monitoring system, in server storage access in need image capture device Corresponding privately owned interface protocol so that when progress server is safeguarded, it is necessary to analyze the proprietary protocol of multiple producers, And access server uses proprietary protocol, it is impossible to packet capturing point, need to store the image of Servers-all access in client Decoding process corresponding to collecting device, therefore so that the maintenance cost of server and the cost of client are higher.Based on this, The embodiments of the invention provide a kind of video equipment access method and device, it is described below by embodiment.
Video equipment access method provided in an embodiment of the present invention is applied in video monitoring system, video monitoring system one As include client, server and video equipment, client by server obtain video equipment video code flow or pass through Server controls video equipment, is connected, equally, server can also connect specifically, server can be set up with multiple client Enter multiple video equipments, and multiple video equipments of access can be produced by different manufacturers.
With reference to shown in Fig. 1, the embodiments of the invention provide the first video equipment access method, video equipment access side The executive agent of method is server, including step S110-S140, specific as follows.
S110, receives the processing request that client is sent based on preset communication protocol, is carried in processing request State Internet protocol (Internet Protocol Address, IP) address and the IP address of target video equipment of client.
Above-mentioned preset communication protocol can be HTTP (Hyper Text Transport Protocol, HTTP)。
Above-mentioned preset communication protocol can carry out packet capturing analysis.
Above-mentioned preset communication protocol and the explanation document of the preset communication protocol are previously stored with the client, When client needs video device access, then client sends processing request based on preset communication protocol to server.
Above-mentioned client can be computer, tablet personal computer or mobile phone etc..
Above-mentioned target video equipment is one of them in the video equipment of the above-mentioned server of access.
S120, when above-mentioned processing asks to be used for acquisition request video code flow, based on the IP address of target video equipment, from Above-mentioned processing is obtained in target video equipment and asks asked video code flow.
Wherein, the above-mentioned standard agreements such as ONVIF agreements, RTSP agreements, national standard agreement that can be based on are from target video equipment Middle acquisition video code flow, if the target video equipment does not support the standard agreements such as ONVIF agreements, RTSP agreements, national standard agreement When, then video code flow is obtained from above-mentioned target video equipment based on preset communication protocol.
When above-mentioned processing asks to be used for acquisition request video code flow, including following several situations:Live preview target is regarded The video code flow of frequency equipment, the video code flow of searched targets video equipment, request playback target video equipment video code flow with And download the video code flow of target video equipment etc..
Therefore, above-mentioned processing request also includes the field specifically asked, such as, if the request of above-mentioned processor is real-time The video code flow of preview target video equipment, then need to include live preview field, so, when server connects in processing request After the processing request for the video code flow for receiving the live preview target video equipment of client transmission, can parse the processing please Live preview field in asking, at this moment constructs live preview interface, and transfer live preview interface to obtain target video equipment Video code flow.
When above-mentioned processing request is the video code flow of searched targets video equipment, then need to carry visitor in processing request The information such as IP address, the IP address of target video equipment and the video code flow search field at family end, the period for needing retrieval, this Sample, after server receives the processing request of the video code flow of the searched targets video equipment of client transmission, parses this Information in processing request, at this moment constructs video frequency searching interface, and transfer corresponding video frequency searching interface to obtain target video The video code flow of equipment.
When it is the video code flow of request playback target video equipment that above-mentioned processing, which is asked, then need to take in processing request Period that IP address with client, the IP address of target video equipment and video code flow playback field and needs are played back etc. Information, after server receives the processing request of client transmission, parses to above-mentioned processing request, obtains above-mentioned processing Information in request, at this moment, constructs video code flow playback interface, and transfer video code flow playback interface and set to obtain target video Standby video code flow.
When it is to download the video code flow of target video equipment that above-mentioned processing, which is asked, then need to carry visitor in processing request Residing for the video code flow that the IP address at family end, the IP address of target video equipment and video code flow download field, needs are downloaded Period equivalent information, after server receives the processing request of client transmission, parses to above-mentioned processing request, obtains The information in above-mentioned processing request is taken, video code flow download interface is constructed, and transfer video code flow download interface to obtain target The video code flow of video equipment.
Wherein, after server receives the processing request of client transmission, the particular content structure asked according to the processing Make interface, such as live preview interface, video frequency searching interface, video code flow playback interface and video code flow download interface etc., The different function of different interface correspondences, obtains video code flow by calling different interfaces from target video equipment afterwards, After the video code flow of target video equipment transmission is got, then the destructed interface, so reduces the occupancy of server memory.
Specifically, above-mentioned interface can be opening Internet video Interface Forum (Open Network Video Interface Forum, ONVIF) agreement, real time streaming transport protocol (Real Time Streaming Protocol, RTSP) Agreement, international agreement etc., the interaction with target video equipment is realized by above-mentioned interface protocol, is obtained at target video equipment Video code flow.
Wherein, if the server is Windows environment, the socket for transmitting video code flow is added to completing port In, therefore, under a windows environment, when target video equipment transmits video code flow, then call completing port to connect Receive the bit stream data of target video equipment transmission;If the server is Linux environment, the socket of video code flow will be transmitted (socket) is added in epoll, when target video equipment transmits video code flow, then calls epoll ports to receive The bit stream data of target video transmission.
In embodiments of the present invention, the above-mentioned IP address based on target video equipment, is obtained from target video equipment The asked video code flow of processing request is stated, including:
According to the IP address of above-mentioned target video equipment, the corresponding transmission thread of above-mentioned target video equipment is created, wherein, The different transmission thread of different target video equipment correspondences;Obtained by the transmission thread of establishment from above-mentioned target video equipment Take video code flow.
In embodiments of the present invention, one transmission thread of a target video equipment correspondence, so, when server will be obtained During the video code flow of some target video equipment, then need to obtain by the corresponding transmission thread of the target video equipment, Each transmission thread is worked independently from each other, so, when wherein some transmission thread goes wrong, does not interfere with other transmission lines The normal work of journey, realizes the isolation of transmission thread.
In addition, after server receives the processing request of client transmission, then the mesh carried in being asked according to the processing The IP address of video equipment is marked, the transmission thread between server and the target video equipment is created, is set for the target video The transmission of standby video code flow, the corresponding transmission thread of target video equipment is defined as by the transmission thread, when video code flow please At the end of asking, then the thread is destroyed, in such manner, it is possible to reduce the occupancy of server memory.
S130, it is determined that standard code stream corresponding with the video code flow got.
In embodiments of the present invention, above-mentioned standard code stream refers to the video code flow gathered to equipment by the way of standard Encoded, above-mentioned standard coded system has H264, (the Moving Pictures Experts Group- of dynamic image standard -4 4, MPEG4), H263 etc., and meet standard without any information is added in the code stream encoded using standard mode The code stream of code stream form.
With reference to shown in Fig. 2, above-mentioned determination standard code stream corresponding with the video code flow got, including step S210- S230, it is specific as follows:
S210, according to the form of the frame head data of above-mentioned video code flow and the corresponding frame head data of standard code stream, judges Whether the video code flow got is standard code stream;If it is, performing step S220, otherwise, step S230 is performed;
S220, standard code stream is defined as by the video code flow got;
S230, according to the corresponding standard code stream format of above-mentioned standard code stream, standard code stream is converted into by above-mentioned video code flow.
General, the video code flow got at the video equipment of different manufacturers is added at the frame head of video code flow There is the letter such as data length of identifier, the length of frame head data, the frame type of video code flow and video code flow of video code flow Breath, and be then no above- mentioned information for the corresponding frame head data of standard code stream, therefore, in step S210, it will get The form of frame head data frame head data corresponding with standard code stream of video code flow be compared, judge the video codes got It whether there is above- mentioned information in the frame head data of stream, if it does not exist, then the video code flow that explanation is got is exactly standard code stream, At this moment step S220 is directly performed;If the frame head of the video code flow got has above- mentioned information, illustrate to get Video code flow be not standard code stream, therefore, it is desirable to perform step S230, the video code flow got be converted into standard code Stream.
Specifically, it is above-mentioned according to the corresponding standard code stream format of standard code stream, above-mentioned video code flow is converted into standard code Stream, including:
Search whether there is transcoding mode corresponding with target video equipment from local, the transcoding mode is by target video The method that the video code flow that equipment is sent is converted into the standard code stream matched with standard code stream format;If it is present using upper State transcoding mode and above-mentioned video code flow is converted into standard code stream;Otherwise, regarded by the way of default Brute Force by above-mentioned Frequency code circulation changes standard code stream into.
In embodiments of the present invention, it is stored with the corresponding transcoding mode of multiple target video equipment in server local, by , therefore, can be by the access way of video equipment in server local in the different transcoding mode of different access way correspondences Stored correspondingly with transcoding mode, so, after server gets the video code flow of target video equipment, then root According to the access way of the target video equipment, the corresponding transcoding mode of target video equipment is searched.
Specifically, above-mentioned access way refers to the mode of video equipment access server, can be standard agreement access, Such as ONVIF agreements, RTSP agreements, national standard agreement etc. or proprietary protocol access, i.e., the association that each producer provides View.
There is the corresponding transcoding mode of some video equipments not stored in server local, therefore, if in clothes Business device locally finds the corresponding transcoding mode of target video equipment, then using the transcoding mode that finds by the video got Code stream is converted into standard code stream, if not finding the corresponding transcoding mode of target video equipment in server local, says Prescribed server does not store the corresponding transcoding mode of target video equipment locally, at this moment, then using default Brute Force The video code flow got is converted into standard code stream by mode.
In embodiments of the present invention, be stored with default Brute Force mode in server, using default Brute Force Mode video code flow is converted into standard code stream, including:
Obtain the data length of above-mentioned video code flow and the length of frame head data;According to the length of video code flow and frame head number According to length, determine the length of above-mentioned standard code stream;According to the length of standard code stream, the extraction standard code stream from video code flow.
The frame head of the video code flow obtained from target video equipment be stored with the video code flow data length and should The length of frame head data, it is therefore, first when carrying out transcoding to the video code flow got by the way of default Brute Force First, the data length of video code flow and the length of frame head data are obtained at the frame head of the video code flow got.
After the length of the data length and frame head data of determining video code flow, calculate video code flow data length and Length difference between the length of frame head data, the length difference is defined as the length of standard code stream.
After the length of standard code stream is determined, the frame head of the data length of above-mentioned video code flow is removed, then can be obtained The original position of standard code stream is obtained, being extracted according to the original position of standard code stream and the length of standard code stream from video code flow should The code stream of length, standard code stream is defined as by the code stream of the length of extraction.
S140, the IP address based on above-mentioned preset communication protocol and client, client is sent to by above-mentioned standard code stream End.
In step s 130, the video code flow obtained from target video equipment is converted into standard code stream, therefore, clothes The standard code stream being converted to is sent to client by business device by preset communication protocol.
It is above-mentioned that standard code stream can be sent to a client, same standard code stream can also be sent to multiple visitors Family end, it is possible to achieve stream multiplexing.
In embodiments of the present invention, the video code flow got is converted into standard code stream above by server, so Just can directly it be played out after client receives the video code flow of server return, it is not necessary to again to regarding for receiving Frequency code stream is decoded, therefore, and a variety of decoding processes need not be stored in client, reduces the cost of client, meanwhile, Avoid the decoding process stored due to client to mismatch, and cause occur the phenomenons such as blank screen, flower screen and smear when playing.
In embodiments of the present invention, client can obtain the video code flow of target video equipment by server, except this Outside, client can also be by server controls target video equipment, detailed process:
When above-mentioned processing asks to be used to ask control targe video equipment, set according to above-mentioned processing request and target video Standby IP address, control targe video equipment performs the operation that above-mentioned processing request is indicated.
The operation that above-mentioned processing request is indicated can be target video opening of device, closing or rotation etc..
Such as, when user needs control targe video equipment to be rotated by 90 ° to the right, then by client based on preset Communication protocol (communication protocol can be http protocol) sends processing request to server, and client is carried in processing request IP address, the IP address of target video equipment and the particular content of processing request at end, when server receives client hair After the processing request sent, then according to the processing request and the IP address of target video equipment, control targe video equipment is to the right It is rotated by 90 °.
When above-mentioned processing request user's request speech talkback, then server is according to above-mentioned processing request and video equipment IP address, realizes the dialogue with staff at target video equipment.In this case, client can will be in client Staff speech speech code stream target video equipment is sent to by server, by target video device plays, meanwhile, The speech code stream of staff's speech at target video equipment is sent to client by target video equipment by server End, speech talkback is realized with this.
When the alert event for obtaining target video equipment is asked in above-mentioned processing, then server please according to above-mentioned processing The IP address for target video equipment of summing, obtains the alarm events of target video equipment, and above-mentioned alarm events specifically include target The upper offline, input/output (I/O) of video equipment, target video equipment are blocked, the motion perception of target video equipment, mesh The hard disk of mark video equipment is occupied full, the hard disk of target video equipment is unformatted, target video equipment writes hard disk error, target Video equipment cross the border detecting, the region corresponding to target video equipment invaded, the corresponding scene change of target video equipment, mesh The article in the corresponding region of mark video equipment, which is left detecting, the article in the corresponding region of target video equipment and taken, to be detected and mesh Marking the corresponding region of video equipment, the crowd is dense.
In embodiments of the present invention, in order to prevent server from breaking down or collapsing when work and cause can not be normal Work, used video monitoring system is additionally provided with from server, after server is broken down or is collapsed, then by from server Start to take over the work of above-mentioned server, detailed process includes:
Server during work, always and between server keep communication, i.e., at interval of preset time and from Once, above-mentioned preset time can be 1 second, 2 seconds or 5 seconds etc. to server communication.After server is broken down or is collapsed, service Device is then no longer with from server communication, after can not receive the communication of server transmission from server, then starting to take over service The work of device, and client is sent notification to, during informing that client retransmits processing request, then it is transmitted directly to from service Device.
In addition, server obtains video code flow from target video equipment and the video code flow of acquisition is converted into standard code Stream, and by standard code stream be sent to client be very consumption central processing unit (Central Processing Unit, CPU) and The resources such as internal memory, therefore, in order to prevent server load larger, whole workflow can be completed together using multiple servers Journey, i.e., transfer to other servers to perform some functions of above-mentioned server, such as, it will can be obtained from target video equipment Take video code flow and determine that the corresponding standard code stream of video code flow is performed by different servers respectively, so, can drop The load of low server.
Video equipment access method provided in an embodiment of the present invention, passes through preset communication protocols between server and client View is communicated, when carrying out server and safeguarding, by analyzing the signaling of signaling that packet capturing obtains and preset communication protocol, side Just problem is investigated, the maintenance cost of server is reduced;In addition, the video code flow got is decoded by server, when Client receives that directly play after code stream just can be with, and client need not be decoded in the video code flow to receiving, Therefore, a variety of decoding processes need not be stored in each client, reduces the cost of client.
With reference to shown in Fig. 3, the embodiment of the present invention additionally provides second of video equipment access method, and the video equipment is accessed The executive agent of method is client, and the client can be computer, tablet personal computer or mobile phone etc., including step S310- S320, it is specific as follows:
S310, processing request is sent based on preset communication protocol to server.
In embodiments of the present invention, the communication protocol for being stored with preset in client and the preset communication protocol expository writing Shelves, when client needs video device access, then client sends processing request based on preset communication protocol to server.
Set specifically, carrying the IP address of client, target video in the processing request that user end to server is sent Standby IP address and specific request content.
Above-mentioned specific request content can be control targe video equipment or obtain video code flow, above-mentioned acquisition video codes Stream specifically includes video frequency searching, video playback, video download etc..
Certainly, above-mentioned request content can also be speech talkback, i.e. the staff of request and target video equipment end enters Row voice call.
The asked corresponding standard of video code flow is asked in S320, the processing that the reception server is obtained from target video equipment Code stream, and play above-mentioned standard code stream.
Specifically, after server receives the processing request of client transmission, when the processing asks to be used for acquisition request During video code flow, the IP address based on preset communication protocol and target video equipment obtains above-mentioned from target video equipment The asked video code flow of processing request, and the corresponding standard code stream of the video code flow is determined, the standard code stream is sent to visitor Family end.
After client receives the standard code stream of server transmission, the standard code stream is played.
Video equipment access method provided in an embodiment of the present invention, is handled using preset communication protocol to server transmission Request, when carrying out server and safeguarding, by analyzing the signaling of signaling that packet capturing obtains and preset communication protocol, convenient investigation Problem, reduces the maintenance cost of server.
With reference to shown in Fig. 4, the embodiments of the invention provide a kind of video equipment access mechanism, the device can be service Device, for performing the first video equipment access method provided in an embodiment of the present invention, the device includes receiving module 410, obtained Modulus block 420, determining module 430 and sending module 440;
Above-mentioned receiving module 410, for receiving the processing request that client is sent based on preset communication protocol, the processing The IP address of client and the IP address of target video equipment are carried in request;
Above-mentioned acquisition module 420, for when above-mentioned processing asks to be used for acquisition request video code flow, based on target video The IP address of equipment, above-mentioned processing is obtained from above-mentioned target video equipment and asks asked video code flow;
Above-mentioned determining module 430, the corresponding standard code stream of video code flow for determining with getting;
Above-mentioned sending module 440, will be above-mentioned for the IP address based on above-mentioned preset communication protocol and above-mentioned client Standard code stream is sent to client.
In video equipment access mechanism provided in an embodiment of the present invention, in addition to control module;
Control module, for when above-mentioned processing asks to be used to ask control targe video equipment, being asked according to above-mentioned processing The IP address for target video equipment of summing, controls above-mentioned target video equipment to perform the operation that above-mentioned processing request is indicated.
With reference to shown in Fig. 5, above-mentioned determining module 430 determines that standard code stream corresponding with the video code flow got is to pass through What judging unit 431, determining unit 432 and transcoding units 433 were realized, it is specific as follows:
Above-mentioned judging unit 431, for the frame head data according to above-mentioned video code flow and the corresponding frame head of standard code stream The form of data, judges whether the above-mentioned video code flow got is standard code stream;Above-mentioned determining unit 432, if for obtaining The above-mentioned video code flow got is standard code stream, then the above-mentioned video code flow got is defined as into standard code stream;Above-mentioned transcoding Unit 433, if the above-mentioned video code flow for getting is not standard code stream, according to the corresponding standard of above-mentioned standard code stream Code stream form, standard code stream is converted into by above-mentioned video code flow.
In embodiments of the present invention, above-mentioned transcoding units 433, will be above-mentioned according to the corresponding standard code stream format of standard code stream Video code flow, which is converted into standard code stream, to be realized by searching subelement, the first transcoding subelement and the second transcoding subelement, Specifically include:
Above-mentioned lookup subelement, should for searching whether there is transcoding mode corresponding with target video equipment from local Transcoding mode is the side that the video code flow for sending target video equipment is converted into the standard code stream matched with standard code stream format Method;Above-mentioned first transcoding subelement, for when it is local there is target video equipment corresponding transcoding mode when, using above-mentioned transcoding Video code flow is converted into standard code stream by mode;Above-mentioned second transcoding subelement, for target video equipment ought to be locally not present During corresponding transcoding mode, above-mentioned video code flow is converted into standard code stream by the way of default Brute Force.
Specifically, above-mentioned second transcoding subelement is changed above-mentioned video code flow by the way of default Brute Force During into standard code stream, the second transcoding subelement specifically for:
Obtain the data length of above formula video code flow and the length of frame head data;According to the data length of above-mentioned video code flow With the length of frame head data, the length of above-mentioned standard code stream is determined;According to the length of above-mentioned standard code stream, carried from video code flow Take standard code stream.
In embodiments of the present invention, IP address of the above-mentioned acquisition module based on target video equipment, from target video equipment Middle the asked video code flow of above-mentioned processing request that obtains is realized by transmitting thread determining unit and acquiring unit, specifically Including:
Above-mentioned transmission thread determining unit, for the IP address according to above-mentioned target video equipment, determines that above-mentioned target is regarded The corresponding transmission thread of frequency equipment, wherein, the different transmission thread of different target video equipment correspondences;Above-mentioned acquiring unit, For obtaining above-mentioned video code flow from target video equipment by the transmission thread of determination.
Video equipment access mechanism provided in an embodiment of the present invention, by pre- between client and target video equipment The communication protocol put is communicated, when progress server is safeguarded, by analyzing signaling and preset communication protocols that packet capturing is obtained The signaling of view, facilitates investigation problem, reduces the maintenance cost of server;In addition, by server to the video code flow that gets Decoded, directly being played after client receives code stream just can be so that client need not be in the video codes to receiving Stream is decoded, and therefore, a variety of decoding processes need not be stored in each client, be reduced the cost of client.
With reference to shown in Fig. 6, the embodiment of the present invention additionally provides second of video equipment access mechanism, and the video equipment is accessed Device can be client, for performing second of video equipment access method provided in an embodiment of the present invention, including send mould Block 610 and receiving module 620;
Above-mentioned sending module 610, for sending processing request to server based on preset communication protocol;
Above-mentioned receiving module 620, is asked for the above-mentioned processing that the reception server is obtained from target video equipment The corresponding standard code stream of video code flow, and play above-mentioned standard code stream.
Video equipment access mechanism provided in an embodiment of the present invention, is handled using preset communication protocol to server transmission Request, when carrying out server and safeguarding, by analyzing the signaling of signaling that packet capturing obtains and preset communication protocol, convenient investigation Problem, reduces the cost of server.
The video equipment access mechanism that the embodiment of the present invention is provided for the specific hardware in equipment or can be installed on Software or firmware in equipment etc..The technique effect of the device that the embodiment of the present invention is provided, its realization principle and generation is with before State embodiment of the method identical, to briefly describe, device embodiment part does not refer to part, refers to phase in preceding method embodiment Answer content.It is apparent to those skilled in the art that, for convenience and simplicity of description, system described above, The specific work process of device and unit, may be referred to the corresponding process in above method embodiment, will not be repeated here.
, can be by others side in embodiment provided by the present invention, it should be understood that disclosed apparatus and method Formula is realized.Device embodiment described above is only schematical, for example, the division of the unit, only one kind are patrolled Collect function to divide, there can be other dividing mode when actually realizing, in another example, multiple units or component can combine or can To be integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed each other Coupling or direct-coupling or communication connection can be the INDIRECT COUPLING or communication link of device or unit by some communication interfaces Connect, can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in the embodiment that the present invention is provided can be integrated in a processing unit, also may be used To be that unit is individually physically present, can also two or more units it is integrated in a unit.
If the function is realized using in the form of SFU software functional unit and is used as independent production marketing or in use, can be with It is stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially in other words The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, including some instructions are to cause a computer equipment (can be individual People's computer, server, or network equipment etc.) perform all or part of step of each of the invention embodiment methods described. And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi It is defined in individual accompanying drawing, then it further need not be defined and explained in subsequent accompanying drawing, in addition, term " the One ", " second ", " the 3rd " etc. are only used for distinguishing description, and it is not intended that indicating or implying relative importance.
Finally it should be noted that:Embodiment described above, is only the embodiment of the present invention, to illustrate the present invention Technical scheme, rather than its limitations, protection scope of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, it will be understood by those within the art that:Any one skilled in the art The invention discloses technical scope in, it can still modify to the technical scheme described in previous embodiment or can be light Change is readily conceivable that, or equivalent substitution is carried out to which part technical characteristic;And these modifications, change or replacement, do not make The essence of appropriate technical solution departs from the spirit and scope of technical scheme of the embodiment of the present invention.The protection in the present invention should all be covered Within the scope of.Therefore, protection scope of the present invention described should be defined by scope of the claims.

Claims (11)

1. a kind of video equipment access method, it is characterised in that methods described includes:
The processing request that client is sent based on preset communication protocol is received, the client is carried in the processing request IP address and target video equipment IP address;
When the processing request is used for acquisition request video code flow, based on the IP address of the target video equipment, from described The asked video code flow of the processing request is obtained in target video equipment;
It is determined that standard code stream corresponding with the video code flow got;
IP address based on the preset communication protocol and the client, the client is sent to by the standard code stream End.
2. according to the method described in claim 1, it is characterised in that methods described also includes:
When the processing request is used to ask to control the target video equipment, regarded according to the processing request and the target The IP address of frequency equipment, controls the target video equipment to perform the operation that the processing request is indicated.
3. according to the method described in claim 1, it is characterised in that the determination is corresponding with the video code flow got Standard code stream, including:
According to the form of the frame head data of the video code flow and the corresponding frame head data of standard code stream, the institute got is judged Whether state video code flow is standard code stream;
If it is, the video code flow got is defined as into standard code stream;
Otherwise, according to the corresponding standard code stream format of the standard code stream, the video code flow is converted into standard code stream.
4. method according to claim 3, it is characterised in that described according to the corresponding standard code stream lattice of the standard code stream Formula, standard code stream is converted into by the video code flow, including:
Search whether there is transcoding mode corresponding with the target video equipment from local, the transcoding mode is by the mesh The method that the video code flow that mark video equipment is sent is converted into the standard code stream matched with the standard code stream format;
If it is present the video code flow is converted into the standard code stream using the transcoding mode;
Otherwise, the video code flow is converted into standard code stream by the way of default Brute Force.
5. method according to claim 4, it is characterised in that described to be regarded by the way of default Brute Force by described Frequency code circulation changes standard code stream into, including:
Obtain the data length of the video code flow and the length of the frame head data;
According to the data length of the video code flow and the length of the frame head data, the length of the standard code stream is determined;
According to the length of the standard code stream, the extraction standard code stream from the video code flow.
6. the method according to claim any one of 1-5, it is characterised in that the IP based on the target video equipment Address, obtains the asked video code flow of the processing request from the target video equipment, including:
According to the IP address of the target video equipment, the corresponding transmission thread of the target video equipment is created, wherein, it is different The different transmission threads of target video equipment correspondence;
The video code flow is obtained from the target video equipment by the transmission thread of establishment.
7. a kind of video equipment access method, it is characterised in that methods described includes:
Processing request is sent to server based on preset communication protocol;
Receive the corresponding mark of video code flow for the processing request request that the server is obtained from target video equipment Quasi- code stream, and play the standard code stream.
8. a kind of video equipment access mechanism, it is characterised in that described device includes:
Receiving module, for receiving the processing request that client is sent based on preset communication protocol, takes in the processing request The IP address of IP address and target video equipment with the client;
Acquisition module, for when the processing request is used for acquisition request video code flow, based on the target video equipment IP address, obtains the asked video code flow of the processing request from the target video equipment;
Determining module, the corresponding standard code stream of the video code flow for determining with getting;
Sending module, for the IP address based on the preset communication protocol and the client, the standard code stream is sent out Give the client.
9. device according to claim 8, it is characterised in that described device also includes:
Control module, for when it is described processing request be used for ask control the target video equipment when, according to the processing please The IP address for the target video equipment of summing, controls the target video equipment to perform the operation that the processing request is indicated.
10. device according to claim 8, it is characterised in that the determining module includes:
Judging unit, for the form of the frame head data according to the video code flow and the corresponding frame head data of standard code stream, Judge whether the video code flow got is standard code stream;
Determining unit, if the used video code flow got is standard code stream, by the video code flow got It is defined as standard code stream;
Transcoding units, if the video code flow for getting is not standard code stream, according to standard code stream correspondence Standard code stream format, the video code flow is converted into standard code stream.
11. a kind of video equipment access mechanism, it is characterised in that described device includes:
Sending module, for sending processing request to server based on preset communication protocol;
Receiving module, the video of the request is asked for receiving the processing that the server is obtained from target video equipment The corresponding standard code stream of code stream, and play the standard code stream.
CN201710189397.7A 2017-03-27 2017-03-27 A kind of video equipment access method and device Pending CN106973307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710189397.7A CN106973307A (en) 2017-03-27 2017-03-27 A kind of video equipment access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710189397.7A CN106973307A (en) 2017-03-27 2017-03-27 A kind of video equipment access method and device

Publications (1)

Publication Number Publication Date
CN106973307A true CN106973307A (en) 2017-07-21

Family

ID=59335730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710189397.7A Pending CN106973307A (en) 2017-03-27 2017-03-27 A kind of video equipment access method and device

Country Status (1)

Country Link
CN (1) CN106973307A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218756A (en) * 2018-09-28 2019-01-15 广州市协衡网络科技有限公司 A kind of order method of camera shooting and video, device, server and storage medium
CN110300169A (en) * 2019-06-28 2019-10-01 北京中油瑞飞信息技术有限责任公司 A kind of data transmission system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040136388A1 (en) * 2002-12-26 2004-07-15 Schaff Glen D. Video-monitor/recording/playback system
CN101808233A (en) * 2009-02-18 2010-08-18 杭州海康威视数字技术股份有限公司 Universal system for realizing video monitoring of mobile phone and method thereof
CN201839376U (en) * 2010-07-22 2011-05-18 曹峰华 Monitoring system and monitoring video server
CN104284141A (en) * 2013-07-08 2015-01-14 株式会社日立制作所 Video monitoring system
CN104954764A (en) * 2015-07-21 2015-09-30 上海远哲电子技术有限公司 Video monitoring system based on video resource safety gateway

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040136388A1 (en) * 2002-12-26 2004-07-15 Schaff Glen D. Video-monitor/recording/playback system
CN101808233A (en) * 2009-02-18 2010-08-18 杭州海康威视数字技术股份有限公司 Universal system for realizing video monitoring of mobile phone and method thereof
CN201839376U (en) * 2010-07-22 2011-05-18 曹峰华 Monitoring system and monitoring video server
CN104284141A (en) * 2013-07-08 2015-01-14 株式会社日立制作所 Video monitoring system
CN104954764A (en) * 2015-07-21 2015-09-30 上海远哲电子技术有限公司 Video monitoring system based on video resource safety gateway

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218756A (en) * 2018-09-28 2019-01-15 广州市协衡网络科技有限公司 A kind of order method of camera shooting and video, device, server and storage medium
CN110300169A (en) * 2019-06-28 2019-10-01 北京中油瑞飞信息技术有限责任公司 A kind of data transmission system and method
CN110300169B (en) * 2019-06-28 2022-07-08 昆仑数智科技有限责任公司 Data transmission system and method

Similar Documents

Publication Publication Date Title
CN102843442B (en) Method for configuring networked cameras
EP2688296B1 (en) Video monitoring system and method
US11120293B1 (en) Automated indexing of media content
CN107302711B (en) Processing system of media resource
CN104396263A (en) Methods and systems for real-time transmuxing of streaming media content
CN103731631B (en) The method, apparatus and system of a kind of transmitting video image
US10516856B2 (en) Network video recorder cluster and method of operation
CN106559506A (en) ARP entry generation method and device
CN112073543B (en) Cloud video recording method and system and readable storage medium
CN113473086B (en) Video playing method and device, electronic equipment and intelligent high-speed large screen
EP4002854A1 (en) Video surveillance system
CN107027064A (en) Method and device for processing video file in wireless screen transmission
CN106973307A (en) A kind of video equipment access method and device
CN115001846A (en) Method, isolation device, device and medium for cross-network data transmission
CN110324579A (en) The rotating ring video monitoring system and method for real time data and warning information superposition
US9245528B2 (en) Communication system, method, and apparatus
CN108696713A (en) Safety detecting method, device and the test equipment of code stream
JP2014096133A (en) Transmission terminal, transmission system, and program
CN111263113B (en) Data packet sending method and device and data packet processing method and device
CN106231393B (en) Video information processing method, device and system
CN113660540B (en) Image information processing method, system, display method, device and storage medium
CN107979568A (en) A kind of video surveillance applications system
CN103974087B (en) Video image file compressibility, client and method
CN106412661B (en) Method and system for collecting network video playing information of smart television
CN115878379A (en) Data backup method, main server, backup server and storage medium

Legal Events

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

Application publication date: 20170721

RJ01 Rejection of invention patent application after publication