patents.google.com

CN105187796B - A data transmission method, device and system - Google Patents

  • ️Fri Jun 21 2019

Specific embodiment

Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.

The embodiment of the invention provides a kind of data transmission methods, can be applied to client, as shown in Fig. 1, the side Method includes:

101, data acquisition instruction is sent to first server.

Further, the data acquisition instruction may make the first server instruction web camera and second service Device establishes connection.Wherein, the data acquisition instruction is used to indicate the web camera transmission data.The first server For service server, the second server is Relay Server.The service server is the corresponding interconnection of web camera A management resource in network externally provides the high-performance computer of business service.It is logical that computer is listened to by service server Service request in communication network from computer client or client mobile communication end, and service request is responded and located Reason, and then the business service of web camera is provided for computer client or client mobile communication end.The Relay Server It is referred to as video stream server, is sent to client in the corresponding internet transfer hair web camera of web camera Data improve the response speed of primary server so as to mitigate the load of web camera primary server.The network is taken the photograph Camera is a new generation's video camera caused by a kind of combination traditional cameras and network technology, image can be reached by network The other end, and the viewer of distal end is not required to any professional software, as long as the web browser of standard can monitor network shooting Image captured by machine, web camera is generally by camera lens, image, sound transducer, A/D converter (analog/digital conversion Device, Analogue/Digital converter), image, sound, controller network server, external alert, control interface etc. Part forms, and the embodiment of the present invention is without limitation.

Wherein, the data are specifically as follows video data, or video requency frame data, the embodiment of the present invention do not limit It is fixed.Specifically, after the first server receives the data acquisition instruction, data acquisition instruction is converted to described The identifiable data acquisition signaling of web camera, then data acquisition signaling is sent to web camera, the then network Video camera obtains data according to the data acquisition signaling and transmits data.The data that web camera obtains can be taken the photograph for network After camera receives data acquisition instruction, the data acquired in real time allow client to play web camera in real time current The data of acquisition, so as to be monitored in real time to current scene.The data may be that web camera receives After data acquisition instruction, the data in the preset time period of acquisition, wherein what preset time period can obtain for web camera Intraday data, the data etc. in one hour, the embodiment of the present invention without limitation, so as to the view in special time period Frequency is according to being played back.For the embodiment of the present invention, by the predetermined time for transmitting the real time data or acquisition that currently acquire Data in section can be realized the data in client output transmission any time period, so as to carry out according to user demand The transmission and output of video data.

For the embodiment of the present invention, step 101 is specifically as follows: when the web camera icon in client receives touching When sending instructions, client sends data acquisition instruction to first server.Triggering command can be for web camera user actively Send, for example, when web camera user click or striking client on web camera icon when, client is to the One server sends data acquisition instruction;Or condition triggering, for example, when set by user according to web camera Between, specific position etc. triggered, the embodiment of the present invention is without limitation.

Wherein, the data acquisition instruction is one of the control instruction that client is sent, and is taken the photograph for client to network Camera can also carry out other controls, at this point, the control instruction can also be web camera enabled instruction, web camera Volume adjustment instruction, image resolution ratio adjustment instruction etc., the embodiment of the present invention is without limitation.

Further, client can also send other control instructions to first server, with control web camera into Row corresponding operating.For example, web camera enabled instruction can be sent, be used to indicate the web camera starting or closed It closes, image resolution ratio adjustment instruction can be sent, the shooting resolution ratio of control web camera adjustment image can also send net The instruction of network video camera volume adjustment is used to indicate the web camera starting or closes volume, and the embodiment of the present invention is not done It limits.By control instruction, remote operation web camera may be implemented, so as to facilitate user, improve user experience.And And the control instruction that is sent to web camera of client and web camera to the data that client is sent be by different What transmission channel was transmitted, it can be avoided control instruction and there is the case where transmission failure, so as to guarantee client success Control web camera carries out data transmission.

102, connection is established with the second server.

Wherein, it is the video data for being used for transmission web camera acquisition that connection is established with the second server, to protect Demonstrate,prove the transmission speed of video data, it is big that the transmission channel established after connection with the second server will meet volume of transmitted data It is required that therefore, the biggish long connection of volume of transmitted data is generallyd use, for example, TCP (transmission control protocol, Transmission Control Protocol) length connection, the embodiment of the present invention is without limitation.At this point, for the embodiment of the present invention, step 102 tool Body can be with are as follows: and Xiang Suoshu second server sends IP (Internet protocol, Internet Protocol) address request, this When, the second server returns to the corresponding response message of the IP address request message;Then, from the response message, The IP address for obtaining the second server establishes TCP with the second server according to the IP address of the second server Long connection.

103, the data that the web camera exports are obtained from the second server.

For the embodiment of the present invention, step 103 is specifically as follows: the web camera receives client described in After the data acquisition instruction that first server is sent, connection is established with the second server, and send out to the second server Send data, the second server receives and sends the data to client after data, so that client can be from described the Two servers obtain the data of the web camera output.The embodiment of the present invention forwards client to net by first server The control instruction that network video camera is sent, and the data for forwarding web camera to send to client by second server, energy Enough realize that control instruction and web camera that client is sent to web camera pass through difference to the data that client is sent Transmission channel transmitted, so as to avoid control instruction from there is the case where transmission failure, and then can guarantee client Success controls web camera and carries out data transmission.

For the embodiment of the present invention, specific application scenarios can be as follows, but not limited to this, comprising: when holding net The user of network video camera A click or striking customer end B on web camera icon when, customer end B is sent out to service server Data acquisition is sent to instruct.After service server receives the data acquisition instruction, data acquisition letter is sent to web camera A It enables.After web camera A receives data acquisition signaling, data are obtained;IP address request is sent to Relay Server simultaneously to disappear Then breath obtains relay services from the corresponding response message of the IP address request message that the Relay Server returns The IP address of device establishes connection with the Relay Server and to the middle following the service according to the IP address of the Relay Server Business device transmits data.After customer end B is by establishing connection with the Relay Server, receives web camera A and pass through in described After the data of server transport.Compared with the transmission for only carrying out data acquisition instruction and data by Relay Server at present, The embodiment of the present invention carries out the transmission of data acquisition instruction by service server and carries out the biography of data by Relay Server It is defeated, the transmission that data acquisition instruction and data is carried out by a transmission channel is avoided, so as to avoid data acquisition from referring to It enables and there is the case where transmission failure, and then can guarantee that client normal control web camera such as carries out data transmission at the operation.

A kind of data transmission method provided in an embodiment of the present invention, firstly, control instruction is sent to the first clothes by client Business device, is transmitted to web camera for the control instruction by the first server;Then, the web camera and Two servers establish connection and send data to the second server;Finally, the client is built with the second server It is vertical to connect and receive the data that the web camera is exported by the second server.With current client to network shooting The control instruction that machine is sent compared with the data that web camera is sent to client carry out by the same transmission channel transmitting, The control instruction that the embodiment of the present invention forwards client to send to web camera by first server, and pass through the second clothes The data that business device forwarding web camera is sent to client, can be realized the control instruction that client is sent to web camera The data sent from web camera to client are transmitted by different transmission channels, so as to avoid control instruction The case where in the presence of transmission failure, and then can guarantee that client normal control web camera such as carries out data transmission at the operation.

The embodiment of the invention provides another data transmission methods, can be applied to client, described as shown in Fig. 2 Method includes:

201, data acquisition instruction is sent to first server.

Further, the data acquisition instruction may make the first server instruction web camera and second service Device establishes connection.Wherein, the data acquisition instruction is used to indicate the web camera transmission data.The first server For service server, the second server is Relay Server.The concept of the service server and explanation are detailed in step 101 Thin elaboration, details are not described herein.The Relay Server, Relay Server can also become video stream server, in network The corresponding internet transfer hair web camera of video camera is sent to the data of client, so as to mitigate web camera The load of primary server improves the response speed of primary server.Wherein, the data are specifically as follows video data, can also be with For video requency frame data, the embodiment of the present invention is without limitation.

For the embodiment of the present invention, after the first server receives the data acquisition instruction of client transmission, Data acquisition instruction can be encrypted according to preset encryption rule;Then encrypted data acquisition is instructed and is sent out Web camera is given, the last web camera obtains data according to the data acquisition signaling and transmits data.Wherein, Preset encryption rule can be configured according to the actual demand of user, can also be configured according to the default mode of system, The embodiment of the present invention is without limitation.

Wherein, preset encryption rule can be the rule encrypted by preset Encryption Algorithm, preset Encryption Algorithm tool Body can be rivest, shamir, adelman, can also be with symmetric encipherment algorithm, and the embodiment of the present invention is without limitation.Rivest, shamir, adelman It can be RSA Algorithm, DSA algorithm (Digital Signature Algorithm, Digital Signature Algorithm), ECC (elliptic curve Cipher system, Elliptic Curve Cryptosystem) algorithm, Diffie-Hellman algorithm, the embodiment of the present invention is not It limits.Symmetric encipherment algorithm can for DES (data encryption standards, Data Encryption Standard), 3DES, can also Think AES (high-level data encryption standard, Advanced Encryption Standard) and Blowfish algorithm, the present invention Embodiment is without limitation.The encryption key that the Encryption Algorithm uses is first server configuration.If described first Server encrypts data acquisition instruction using rivest, shamir, adelman, adds to data acquisition instruction Before close, first acquisition public private key pair, then by the public-key cryptography generation encryption key to the data acquisition instruct into Row encryption, so that after web camera receives the data acquisition instruction decruption key can be generated according to private cipher key Data acquisition instruction is decrypted.After data acquisition instruction is encrypted by first server, then to net Network video camera sends the data acquisition instruction, and the data acquisition instruction transmitted between client and IP Camera can be improved Safety, reduce security risk present in transmission data acquisition instruction.

For the embodiment of the present invention, the first server can be referred to encrypted data acquisition by signal server Order is sent to web camera.Specifically, the instruction of encrypted data acquisition is sent to signal server by first server, so Afterwards, data acquisition instruction is converted to the data acquisition signaling that the web camera can identify by signal server, and Data acquisition signaling is encrypted according to above-mentioned preset encryption rule.Finally, encrypted data acquisition signaling is sent to Network server.

For the embodiment of the present invention, step 201 is specifically as follows: passing through HTTPS (hypertext Encryption Transmission Protocol, Hyper Text Transfer Protocol over Secure Socket Layer) the Xiang Suoshu first server transmission data Acquisition instruction.Wherein, the HTTPS is safely for the channel HTTP of target (Hyper Text Transfer Protocol, hypertext transfer protocol), be the safe version of HTTP, i.e. be added under HTTP SSL (Secure Socket Layer, Secure Socket Layer) layer, due to, using SSL, sending the data to the first server by HTTPS in HTTPS Acquisition instruction can further promote the safety of control signaling transmission process.

Further, when sending data acquisition instruction to the first server by HTTPS, institute can be opened State the strong verifying function of HTTPS.Wherein, the strong verifying function of the HTTPS can for pass through HTTPS carry out signalling when institute The additional function of configuration can be used for protecting the safety for carrying out signalling by HTTPS.For the embodiment of the present invention, logical Cross HTTPS by the data acquisition instruction be sent to the web camera before, open the strong verifying function of the HTTPS, The safety that data acquisition instruction transmission is carried out by HTTPS can be improved, the safety for reducing transmission data acquisition instruction is hidden Suffer from.

Specifically, when carrying out the data acquisition instruction transmission by HTTPS, the strong verification function of the HTTPS is opened Can, can determine the data of data acquisition instruction there are in the case where security risk, data acquisition described in force termination The transmission of instruction;If being not turned on the strong verifying function of the HTTPS, when unlatching be the weak verifying function of the HTTPS when, Data acquisition instruction transmission is being carried out by HTTPS, the case where determining the data of data acquisition instruction there are security risks Under, the prompt information about security risk can be exported, user can be according to the prompt information about security risk The no operation for terminating the data acquisition instruction transmission, but there are security risks in the data for determining the data acquisition instruction While, it will continue to the transmission for carrying out data acquisition instruction, and then the safety of data acquisition instruction transmission can be reduced.

For the embodiment of the present invention, directly transmitting mode that data acquisition instructs to first server can be with are as follows: by with The long connection that the first server is established sends the data acquisition instruction of the encryption to the first server.

Wherein, the long connection is that a kind of first establish communicates to connect, and connection does not turn off after establishing, and then can repeat The connection type that message sends and receives.By establishing long connection with the first server, it can guarantee that data acquisition instructs The timeliness of transmission and the processing capacity for increasing data acquisition instruction error of transmission.

202, judge whether that the data acquisition instruction for receiving the first server forwarding is corresponding to respond successfully Message.

Wherein, it is sent when the response success message web camera gets data acquisition instruction. The response success message is described for notifying web camera described in client to establish connection with the second server Responding success message can be acoustic frequency response success message, text response success message, video response success message, and the present invention is real Apply example without limitation.The response success message is sent to first server by web camera, and then first server is by institute It states response success message and is transmitted to client, can guarantee that client establishes connection with second server in time and obtains data, When so as to avoid web camera from not having normal output data, client and second server carry out unnecessary connection.

If the data acquisition for 203, receiving the first server forwarding instructs corresponding response success message, Connection is established with the second server.

For the embodiment of the present invention, establishing connection with the second server is to be used for transmission the view of web camera acquisition Frequency evidence, for the transmission speed for guaranteeing video data, the transmission channel established after connection with the second server will meet number According to the big requirement of transmission quantity, therefore, the biggish long connection of volume of transmitted data is generallyd use, at this point, step 203 is specifically as follows: If the data acquisition for receiving the first server forwarding instructs corresponding response success message, with second clothes Being engaged in, device foundation is long to be connected.By establishing long connection with the second server, the big requirement of volume of transmitted data can satisfy, simultaneously It can guarantee the timeliness of data transmission and increase the processing capacity of data transmission fault.

204, the data that the web camera exports are obtained from the second server.

For the embodiment of the present invention, step 204 is specifically as follows: obtaining from the second server and is added by presetting rule The data of web camera output after close.The second server is in the data for receiving the web camera output Afterwards, firstly, being encrypted according to the data that the presetting rule exports the web camera, so that client can obtain Pass through the data of the encrypted web camera output of presetting rule.Wherein, presetting rule can be according to the reality of user Demand is configured, and can also be configured according to the default mode of system, the embodiment of the present invention is without limitation.For example, second Server can divide the data that web camera exports according to preset division rule, be divided into multiple data cells, Then the multiple video data unit is encrypted respectively by preset encryption rule.Wherein, preset division rule can be with It is configured, can also be configured according to the default mode of system, the embodiment of the present invention is not done according to the actual demand of user It limits.Such as divide according to the sequence number of data.Preset encryption rule can according to the actual demand of user into Row setting, can also be configured, the embodiment of the present invention is without limitation according to the default mode of system.For example, preset encryption rule It then can be the rule encrypted by preset Encryption Algorithm, preset Encryption Algorithm is specifically as follows rivest, shamir, adelman, Can also be with symmetric encipherment algorithm, the embodiment of the present invention is without limitation.

Specifically, if the data of web camera output are video data, video data can be divided into multiple videos Frame data;Sequence of positions where adjusting the multiple video requency frame data in the video data according to preset ordering rule, Wherein, preset ordering rule can be configured according to the actual demand of user, can also be carried out according to the default mode of system Setting, for example, preset ordering rule can be randomly ordered rule;Then, the original series of each video requency frame data are obtained Number;According to the original sequence number of the private key of the preset symmetric cryptography rule and each video requency frame data, generate respectively with The corresponding encryption key of each video requency frame data, finally according to the corresponding encryption of each video requency frame data The multiple video requency frame data of key pair is encrypted.For the embodiment of the present invention, pass through export the web camera Data are encrypted after dividing, and can generate volume after can be avoided data encryption while guaranteeing the safety of data transmission Outer data, so as to reduce the occupied Internet resources of processing extra data and the occupied cpu resource of extra data.

For the embodiment of the present invention, specific application scenarios can be as follows, but not limited to this, comprising: when holding net The user of network video camera A click or striking customer end B on web camera icon when, customer end B is sent out to service server Data acquisition is sent to instruct.It, can be by RSA cryptographic algorithms to the number after service server receives the data acquisition instruction It is encrypted according to acquisition instruction;Then the instruction of encrypted data acquisition is sent to signal server, then, signal server Data acquisition instruction is converted into the data acquisition signaling that the web camera can identify, and is calculated by AES encryption Method encrypts data acquisition signaling.Finally, encrypted data acquisition signaling is sent to network server.Pass through business After server is encrypted data acquisition instruction, then the data acquisition is sent to web camera and is instructed, Ke Yiti The safety for the data acquisition instruction transmitted between high client and IP Camera reduces the transmission data acquisition instruction Present in security risk.

After web camera A receives encrypted data acquisition signaling, decruption key is generated by private key, data are obtained Order of winning the confidence is decrypted;Then according to the data acquisition signaling after decryption, video data is obtained;Meanwhile it being sent out to Relay Server IP address request message is sent, then, the corresponding response message of the IP address request message returned from the Relay Server The middle IP address for obtaining Relay Server establishes long connect with the Relay Server according to the IP address of the Relay Server It connects and to the Relay Server transmitting video data.The Relay Server is in the view for receiving the web camera output Frequency, firstly, the video data that web camera exports is divided according to preset division rule, is divided into multiple views after Then frequency frame data encrypt the multiple video requency frame data by des encryption algorithm respectively.By the way that the network is taken the photograph The video data of camera output is encrypted after dividing, and can be kept away while guaranteeing the safety of video data transmission Additional data are generated after exempting from video data encryption, so as to reduce the occupied Internet resources of processing extra data and volume The outer occupied cpu resource of data.

After web camera A obtains the video data, to service server returning response success message, service server The returning response success message is sent to customer end B.After customer end B receives the returning response success message, with institute It states Relay Server and establishes connection, after establishing successful connection with the Relay Server, receive web camera A described in The video data of Relay Server transmission.By the way that the response success message is transmitted to client, can guarantee client and When establish connection and obtain video data with second server, so as to avoid web camera from not exporting video counts normally According to when, client and second server carry out unnecessary connection.Refer to only data acquisition is carried out by Relay Server at present Order compares with the transmission of data, the embodiment of the present invention, carries out the transmission of data acquisition instruction by service server and passes through Relay Server carries out the transmission of data, avoids the transmission that data acquisition instruction and data is carried out by a transmission channel, So as to avoid data acquisition instruction from there is the case where transmission failure, and then it can guarantee client normal control network shooting Machine such as carries out data transmission at the operation.

Another kind data transmission method provided in an embodiment of the present invention, firstly, control instruction is sent to first by client The control instruction is transmitted to web camera by the first server by server;Then, the web camera with Second server establishes connection and sends data to the second server;Finally, the client and the second server It establishes connection and receives the data that the web camera is exported by the second server.It is taken the photograph with current client to network The data that the control instruction that camera is sent is sent with web camera to client carry out transmission phase by the same transmission channel Than the control instruction that, the embodiment of the present invention forwards client to send to web camera by first server, and pass through the The data that two servers forwarding web camera is sent to client, can be realized the control that client is sent to web camera The data sent from web camera to client are instructed to be transmitted by different transmission channels, so as to avoid controlling There is the case where transmission failure in instruction, and then can guarantee that client normal control web camera such as carries out data transmission at the behaviour Make.

The embodiment of the invention provides another data transmission methods, can be applied to web camera, as shown in figure 3, The described method includes:

301, the data acquisition instruction that first server is sent is received.

Wherein, the data acquisition instruction is used to indicate web camera to client transmissions data.The first service Device is service server.The concept of the service server and explanation are in the detailed elaboration of step 101, and details are not described herein.Institute Stating client may be mounted on terminal device, and terminal device can be mobile phone or tablet computer, and the present invention is implemented Example is without limitation.The operating system of the corresponding terminal device of client can be Android system, or apple iOS system, The embodiment of the present invention is without limitation.

302, connection is established with second server.

Wherein, the second server is Relay Server, video stream server is referred to as, in web camera pair The internet transfer hair web camera answered is sent to the data of client, so as to mitigate web camera primary server Load, improve the response speed of primary server.

303, Xiang Suoshu second server sends the data.

Wherein, the data are for being obtained and being exported by the client.The data can be web camera The data acquired in real time, or the data in the preset time period of web camera acquisition, the embodiment of the present invention do not limit It is fixed.

For the embodiment of the present invention, step 303 is specifically as follows: web camera sends to the second server and acquires Real time data or web camera acquisition preset time period in data.The real time data or pre- acquired by transmission If the data in the period, it can be realized the data in client output transmission any time period, so as to promote user's Experience.

Another data transmission method provided in an embodiment of the present invention, firstly, control instruction is sent to first by client The control instruction is transmitted to web camera by the first server by server;Then, the web camera with Second server establishes connection and sends data to the second server;Finally, the client and the second server It establishes connection and receives the data that the web camera is exported by the second server.It is taken the photograph with current client to network The data that the control instruction that camera is sent is sent with web camera to client carry out transmission phase by the same transmission channel Than the control instruction that, the embodiment of the present invention forwards client to send to web camera by first server, and pass through the The data that two servers forwarding web camera is sent to client, can be realized the control that client is sent to web camera The data sent from web camera to client are instructed to be transmitted by different transmission channels, so as to avoid controlling There is the case where transmission failure in instruction, and then can guarantee that client normal control web camera such as carries out data transmission at the behaviour Make.

The embodiment of the invention provides another data transmission methods, can be applied to web camera, as shown in figure 4, The described method includes:

401, the data acquisition instruction that first server is sent is received.

Wherein, the data acquisition instruction is used to indicate web camera to client transmissions data.The first service Device is service server, and the second server is Relay Server.The concept of the service server and Relay Server and Explain that details are not described herein in the detailed elaboration of step 101.

For the embodiment of the present invention, step 401 is specifically as follows: receiving what the first server was sent by HTTPS Data acquisition instruction.Wherein, the HTTPS is for the channel HTTP of target, to be the safe version of HTTP safely, i.e. under HTTP It is added SSL layers.Refer to due to using SS in HTTPS therefore passing through HTTPS to the first server transmission data acquisition It enables, can further promote the safety of control signaling transmission process

For the embodiment of the present invention, step 401 specifically can be with are as follows: receives the first server and passes through HTTPS and sends Instructed according to the encrypted data acquisition of presetting rule.

For the embodiment of the present invention, step 401 specifically can be with are as follows: is connect by establishing length with the first server Receive the data acquisition instruction that the first server is sent.For the embodiment of the present invention, by being established with the first server Long connection can guarantee the timeliness of data acquisition instruction transmission and increase the processing capacity of data acquisition instruction error of transmission.

402, long connection is established with second server.

It is big that volume of transmitted data can satisfy by establishing long connection with the second server for the embodiment of the present invention Requirement, while can guarantee data transmission timeliness and increase data transmission fault processing capacity.

403, referred to by establishing long connection with the first server to the first server transmission data acquisition Enable corresponding response success message.

Wherein, the response success message is connected with judging whether to establish with the second server for the client It connects.Wherein, it is sent when the response success message web camera gets the data.Described respond successfully disappears Breath is for notifying web camera described in client to establish connection with the second server.

Visitor can be guaranteed by sending the response success message to the first server for the embodiment of the present invention Family end establishes connection with second server in time and obtains data, so as to avoid web camera from not having normal output data When, client and second server carry out unnecessary connection.In addition, by establishing long connection, energy with the first server Enough guarantee the timeliness of the response success message transmission.

For the embodiment of the present invention, step 403 is specifically as follows: the institute sent by HTTPS to the first server It states data acquisition and instructs corresponding response success message.For the embodiment of the present invention, by sending institute to the first server State response success message, it is ensured that the safety for responding successfully message transmitting procedure.

404, Xiang Suoshu second server sends the data.

Wherein, the data for the client to be exported.Wherein, the data with for the client into Row output.The data that the data can be acquired in real time for web camera, or web camera acquisition it is default when Between data in section, the embodiment of the present invention is without limitation.

Another data transmission method provided in an embodiment of the present invention, firstly, control instruction is sent to first by client The control instruction is transmitted to web camera by the first server by server;Then, the web camera with Second server establishes connection and sends data to the second server;Finally, the client and the second server It establishes connection and receives the data that the web camera is exported by the second server.It is taken the photograph with current client to network The data that the control instruction that camera is sent is sent with web camera to client carry out transmission phase by the same transmission channel Than the control instruction that, the embodiment of the present invention forwards client to send to web camera by first server, and pass through the The data that two servers forwarding web camera is sent to client, can be realized the control that client is sent to web camera The data sent from web camera to client are instructed to be transmitted by different transmission channels, so as to avoid controlling There is the case where transmission failure in instruction, and then can guarantee that client normal control web camera such as carries out data transmission at the behaviour Make.

Further, the specific implementation as Fig. 1 the method, the embodiment of the invention provides a kind of clients, such as Fig. 5 Shown, the client includes: transmission unit 51, establishes unit 52, acquiring unit 53.

Transmission unit 51 can be used for sending data acquisition instruction to first server.

Further, so that first server instruction web camera and second server establish connection, the number The web camera transmission data are used to indicate according to acquisition instruction.

Unit 52 is established, can be used for establishing connection with the second server.

Acquiring unit 53 can be used for obtaining the data of the web camera output from the second server.

It should be noted that other of each functional unit involved by a kind of client provided in an embodiment of the present invention are accordingly retouched It states, can be with reference to the corresponding description in Fig. 1, details are not described herein.

A kind of client provided in an embodiment of the present invention is led to firstly, control instruction is sent to first server by client It crosses the first server and the control instruction is transmitted to web camera;Then, the web camera and second service Device establishes connection and sends data to the second server;Finally, the client and the second server establish connection And receive the data that the web camera is exported by the second server.It is sent with current client to web camera Control instruction compared with the data that web camera is sent to client carry out by the same transmission channel transmission, the present invention The control instruction that embodiment forwards client to send to web camera by first server, and turned by second server The data that hair web camera is sent to client, can be realized the control instruction and network that client is sent to web camera The data that video camera is sent to client are transmitted by different transmission channels, are passed so as to avoid control instruction from existing The case where defeated failure, and then can guarantee that client normal control web camera such as carries out data transmission at the operation.

Further, the specific implementation as Fig. 2 the method, the embodiment of the invention provides a kind of clients, such as Fig. 6 Shown, the client includes: transmission unit 61, establishes unit 62, acquiring unit 63.

Transmission unit 61 can be used for sending data acquisition instruction to first server.

Further, the data acquisition instruction may make the first server instruction web camera and second server Connection is established, the data acquisition instruction is used to indicate the web camera transmission data.

Unit 62 is established, can be used for establishing connection with the second server.

Acquiring unit 63 can be used for obtaining the data of the web camera output from the second server.

The client further include: judging unit 64.

The judging unit 64 can be used for judging whether receiving the data acquisition of the first server forwarding Corresponding response success message is instructed, the response success message is that the web camera gets the data acquisition instruction When send.

It is described to establish unit 62, if the data acquisition that specifically can be used for receiving the first server forwarding refers to Corresponding response success message is enabled, then establishes connection with the second server.

The transmission unit 61 specifically can be used for sending the data acquisition to the first server by HTTPS Instruction.

The acquiring unit 63 specifically can be used for obtaining from the second server according to the encrypted institute of presetting rule State the data of web camera output.

It is described to establish unit 62, it specifically can be also used for establishing long connection with the second server.

The transmission unit 61 specifically can be also used for by establishing long connection to described first with the first server Server sends data acquisition instruction.

Wherein, the first server is service server, and the second server is Relay Server.

It should be noted that other of each functional unit involved by another kind client provided in an embodiment of the present invention are corresponding Description, can be with reference to the corresponding description in Fig. 2, and details are not described herein.

Another kind client provided in an embodiment of the present invention, firstly, control instruction is sent to first server by client, The control instruction is transmitted to web camera by the first server;Then, the web camera and the second clothes Business device establishes connection and sends data to the second server;Finally, the client and the second server are established and are connected Connect and receive the data that the web camera is exported by the second server.It is sent out with current client to web camera The control instruction sent is compared with the data that web camera is sent to client carry out transmission by the same transmission channel, this hair The control instruction that bright embodiment forwards client to send to web camera by first server, and pass through second server The data that forwarding web camera is sent to client, can be realized the control instruction and net that client is sent to web camera The data that network video camera is sent to client are transmitted by different transmission channels, so as to avoid control instruction from existing The case where transmission failure, and then can guarantee that client normal control web camera such as carries out data transmission at the operation.

Further, the specific implementation as Fig. 3 the method, the embodiment of the invention provides a kind of web camera, As shown in fig. 7, the web camera includes: receiving unit 71, unit 72, transmission unit 73 are established.

Receiving unit 71 can be used for receiving the data acquisition instruction of first server transmission, the data acquisition instruction It is used to indicate web camera transmission data.

Unit 72 is established, can be used for establishing connection with second server.

Transmission unit 73 can be used for sending the data to the second server, and the data are used for by the visitor Family end is obtained and is exported.

It should be noted that other phases of each functional unit involved by a kind of web camera provided in an embodiment of the present invention It should describe, can be with reference to the corresponding description in Fig. 3, details are not described herein.

A kind of web camera provided in an embodiment of the present invention, firstly, control instruction is sent to first service by client The control instruction is transmitted to web camera by the first server by device;Then, the web camera and second Server establishes connection and sends data to the second server;Finally, the client and the second server are established Connect and receive the data that the web camera is exported by the second server.With current client to web camera The control instruction of transmission is compared with the data that web camera is sent to client carry out transmission by the same transmission channel, originally The control instruction that inventive embodiments forward client to send to web camera by first server, and pass through second service The data that are sent to client of device forwarding web camera, can be realized control instruction that client is sent to web camera and The data that web camera is sent to client are transmitted by different transmission channels, so as to avoid control instruction from depositing The case where transmitting failure, and then it can guarantee that client normal control web camera such as carries out data transmission at the operation.

Further, the specific implementation as Fig. 4 the method, the embodiment of the invention provides another network shootings Machine establishes unit 82, transmission unit 83 as shown in figure 8, the web camera includes: receiving unit 81.

Receiving unit 81 can be used for receiving the data acquisition instruction of first server transmission, the data acquisition instruction It is used to indicate web camera transmission data.

Unit 82 is established, can be used for establishing connection with second server and obtains data.

Transmission unit 83 can be used for sending the data to the second server, and the data are used for by the visitor Family end is obtained and is exported.

The receiving unit 81 specifically can be used for receiving the data acquisition that the first server is sent by HTTPS Instruction.

The receiving unit 81, specifically can be also used for receiving the first server by HTTPS send according to pre- Set the encrypted data acquisition instruction of rule.

The transmission unit 83 can be also used for by establishing long connection to the first service with the first server Device sends the data acquisition and instructs corresponding response success message, and the response success message for the client to judge Whether with the second server connection is established.

The transmission unit 83 specifically can be used for obtaining by the data that HTTPS is sent to the first server The corresponding response success message of instruction fetch.

It is described to establish unit 83, it specifically can be used for establishing long connection with the second server.

The receiving unit 81 specifically can be also used for receiving described the by establishing long connection with the first server One server is by establishing the data acquisition instruction that long connection is sent.

Wherein, the first server is service server, and the second server is Relay Server.

It should be noted that other of each functional unit involved by another kind web camera provided in an embodiment of the present invention Corresponding description, can be with reference to the corresponding description in Fig. 4, and details are not described herein.

Another kind web camera provided in an embodiment of the present invention, firstly, control instruction is sent to the first clothes by client Business device, is transmitted to web camera for the control instruction by the first server;Then, the web camera and Two servers establish connection and send data to the second server;Finally, the client is built with the second server It is vertical to connect and receive the data that the web camera is exported by the second server.With current client to network shooting The control instruction that machine is sent compared with the data that web camera is sent to client carry out by the same transmission channel transmitting, The control instruction that the embodiment of the present invention forwards client to send to web camera by first server, and pass through the second clothes The data that business device forwarding web camera is sent to client, can be realized the control instruction that client is sent to web camera The data sent from web camera to client are transmitted by different transmission channels, so as to avoid control instruction The case where in the presence of transmission failure, and then can guarantee that client normal control web camera such as carries out data transmission at the operation.

Further, the embodiment of the invention provides a kind of data transmission systems, as shown in figure 9, the system comprises: visitor Family end 91, service server 92, web camera 93, Relay Server 94.

Client 91 can be used for sending data acquisition instruction to service server 92.

Service server 92 can be used for sending the data acquisition instruction to web camera 93.

Web camera 93 can be used for establishing connection with Relay Server 94 and send number to the Relay Server 94 According to.

The service server 92 can be also used for receiving the data acquisition instruction that the web camera 93 is sent Corresponding response success message and the corresponding response success message of data acquisition instruction sent to the client 91.

The Relay Server 94 can be also used for establishing connection with the client 91 and send to the client 91 The data.

For the embodiment of the present invention, signal server can also be increased in above-mentioned data transmission system, at this point it is possible to as schemed Shown in 10, the system comprises client 1001, service server 1002, signal server 1003, web camera 1004, Relay Server 1005.

Client 1001 can be used for sending data acquisition instruction to service server 1002.

Service server 1002 can be used for sending the data acquisition instruction to signal server 1003.

Signal server 1003 can be used for sending the data acquisition signaling to web camera 1004.

Web camera 1004 can be used for establishing connection with Relay Server 1005 and to the Relay Server 1005 Send data.

The service server 1002 can be also used for receiving the data acquisition that the web camera 1004 is sent It instructs corresponding response success message and the data acquisition sent to the signal server 1003 instructs corresponding response Success message.

The signal server 1003 can be also used for the data acquisition instruction pair sent to the client 1001 The response success message answered.

The Relay Server 1005 can be also used for establishing connection with the client 1001 and to the client 1001 send the data.

Data transmission system provided in an embodiment of the present invention, firstly, control instruction is sent to first server by client, The control instruction is transmitted to web camera by the first server;Then, the web camera and the second clothes Business device establishes connection and sends data to the second server;Finally, the client and the second server are established and are connected Connect and receive the data that the web camera is exported by the second server.It is sent out with current client to web camera The control instruction sent is compared with the data that web camera is sent to client carry out transmission by the same transmission channel, this hair The control instruction that bright embodiment forwards client to send to web camera by first server, and pass through second server The data that forwarding web camera is sent to client, can be realized the control instruction and net that client is sent to web camera The data that network video camera is sent to client are transmitted by different transmission channels, so as to avoid control instruction from existing The case where transmission failure, and then can guarantee that client normal control web camera such as carries out data transmission at the operation.

In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.

It is understood that the correlated characteristic in the above method and device can be referred to mutually.In addition, in above-described embodiment " first ", " second " etc. be and not represent the superiority and inferiority of each embodiment for distinguishing each embodiment.

It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.

Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.

In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.

Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.

Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.

In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed Meaning one of can in any combination mode come using.

Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize data transmission method according to an embodiment of the present invention, network shooting The some or all functions of some or all components in machine, client and data transmission system.The present invention can also be real Now for for executing some or all device or device programs of method as described herein (for example, computer journey Sequence and computer program product).It is such to realize that program of the invention can store on a computer-readable medium, or can be with In the form of one or more signals.Such signal can be downloaded from an internet website to obtain, or believe in carrier It provides, or is provided in any other form on number.

It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" or " comprising " are not arranged Except there are element or steps not listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of more A such element.The present invention can be by means of including the hardware of several different elements and by means of properly programmed calculating Machine is realized.In the unit claims listing several devices, several in these devices can be by same Hardware branch embodies.The use of word first, second, and third does not indicate any sequence.It can be by these word solutions It is interpreted as title.