Method and Device for Playing Video Stream of Security Camera Device on Web Page

By adding new functions to obtain candidate IP and ports and signaling server communication in the multimedia server, one-to-many streaming and multiple streaming protocol adaptation are realized, and multiple link restrictions, network topology impact and web player adaptability problems in the prior art are solved, achieving higher compatibility and user experience.

CN114827533BActive Publication Date: 2025-06-27ZHUHAI GOTECH INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210334463.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2025-06-27
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

In the video streaming process, the existing technology has problems in which the device cannot carry multiple WEBRTC links, the user-side network topology has a great impact on WEBRTC, and it cannot adapt to various web players and user-side complex processes.

Method used

A new function of obtaining candidate IP and ports is added to the multimedia server. Communication with the security camera device through the signaling server is realized, one-to-many streaming is implemented, and multiple streaming protocols are supported to adapt to different web players, while simplifying the user-side process.

Benefits of technology

Through the multimedia server proxy, it combines two into a signaling channel and media channel, simplifies user processes, improves compatibility, supports multiple users to watch simultaneously, and adapts to various web players.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114827533B_ABST
    Figure CN114827533B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and apparatus for playing a video stream of a security camera device on a web page. The method includes: obtaining candidate IPs and candidate ports of a multimedia server; when receiving a URL request for playing a target video stream sent by a user's player, parsing the URL request to determine user authentication information carried in the URL request, the device ID and channel number of the security camera device for pushing the target video stream, and description information of the target video stream to be played; verifying the user authentication information, and when the verification passes, sending the candidate IPs and candidate ports to the device ID and channel number through a signaling server connected to the multimedia server, so that the security camera device returns the target video stream to be pushed; starting a corresponding playback module according to the description information of the target video stream to be played; after receiving the target video stream pushed by the device, broadcasting it to all playback modules and responding to the user's player.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video transmission, and in particular to a method and device for playing a video stream of a security camera device on a web page. Background Art

[0002] Currently, the most common solution for playing a video stream of an Internet of Things device on a browser is to implement stream data push through WEBRTC. The device side needs to deploy relevant TURN services and STUN services. In some cases, the user side also needs to deploy its own STUN services and TURN services, and a separate signaling channel needs to be built to transmit the candidate IPs and ports collected by each other. At the same time, each successful request will add a corresponding WEBRTC link.

[0003] The disadvantages of the current technology are as follows: 1. The device cannot bear multiple WEBRTC links, which limits the number of viewers; 2. The user-side network topology has a great impact on WEBRTC; 3. It cannot adapt to various web players; 4. The user-side process is too complex. In view of these disadvantages, the present invention adds a multimedia server to the architecture. The multimedia server supports one-to-many streaming to break the link limit and user topology impact, converts various stream protocols to adapt to various web players, and at the same time supports actively pulling stream devices to simplify the user-side process. Summary of the Invention

[0004] To overcome the problems existing in the related art, the present invention provides a method and device for playing a video stream of a security camera device on a web page.

[0005] According to a first aspect of an embodiment of the present invention, there is provided a method for playing a video stream of a security camera device on a web page, which is used for a multimedia server. The method includes:

[0006] Obtain the candidate IP and candidate port of the multimedia server;

[0007] When receiving a URL request for playing a target video stream sent by a user's player, parse the URL request to determine the user authentication information carried in the URL request, the device ID and channel number of the security camera device for pushing the target video stream to be pushed, and the description information of the target video stream to be played;

[0008] Verify the user authentication information. When the verification passes, send the candidate IP and candidate port to the device ID and channel number of the security camera device for pushing the target video stream to be pushed through a signaling server connected to the multimedia server, so that the security camera device returns the target video stream to be pushed;

[0009] Start a corresponding playback module according to the description information of the target video stream to be played;

[0010] After receiving the target video stream pushed by the device, it is broadcast to all playback modules and responds to the user's player.

[0011] In one embodiment, preferably, the destination address of the URL request includes the address of the multimedia server, and the URL request further includes: user authentication information, the device ID and channel number of the security camera device for pushing the target video stream, and the description information of the target video stream to be played, where the description information of the target video stream to be played includes the type, format, quality, and timestamp of the video stream.

[0012] In one embodiment, preferably, the security camera device pushes the target video stream to the multimedia server through the web instant messaging protocol, or the security camera device pushes the target video stream to the multimedia server through a private encryption protocol, and the signaling server is connected to all security camera devices.

[0013] In one embodiment, preferably, the obtaining of the candidate IP and candidate port of the multimedia server includes:

[0014] Collecting the candidate IP and candidate port through STUN; or

[0015] Detecting the IP and port of the external network as the candidate IP and candidate port.

[0016] In one embodiment, preferably, the method further includes:

[0017] Verifying the user authentication information, and when the verification fails, returning an invalid request to the user's player.

[0018] According to the second aspect of the embodiments of the present invention, there is provided a device for playing a video stream of a security camera device in a web page for a multimedia server, and the device includes:

[0019] An obtaining unit, configured to obtain the candidate IP and candidate port of the multimedia server;

[0020] A determining unit, configured to, when receiving a URL request for playing a target video stream sent by the user's player, parse the URL request to determine the user authentication information, the device ID and channel number of the security camera device for pushing the target video stream, and the description information of the target video stream to be played carried in the URL request;

[0021] A verification unit for verifying the user authentication information. When the verification is passed, the candidate IP and candidate port are sent to the device ID and channel number of the security camera device to which the target video stream is to be pushed through a signaling server connected to the multimedia server, so that the security camera device returns the target video stream to be pushed.

[0022] A start unit for starting a corresponding playback module according to the description information of the target video stream to be played.

[0023] A broadcast unit for, after receiving the target video stream pushed by the device, broadcasting it to all playback modules and responding to the user's player.

[0024] In one embodiment, preferably, the destination address of the URL request includes the address of the multimedia server. The URL request further includes: user authentication information, the device ID and channel number of the security camera device to which the target video stream is to be pushed, and the description information of the target video stream to be played. The description information of the target video stream to be played includes the type, format, quality, and timestamp of the video stream.

[0025] In one embodiment, preferably, the security camera device pushes the target video stream to the multimedia server through the web instant messaging protocol, or the security camera device pushes the target video stream to the multimedia server through a private encryption protocol. The signaling server is connected to all security camera devices.

[0026] In one embodiment, preferably, the obtaining unit is used for:

[0027] Collecting the candidate IP and candidate port through STUN; or

[0028] Detecting the IP and port of the external network as the candidate IP and candidate port.

[0029] In one embodiment, preferably, the device further includes:

[0030] A return unit for verifying the user authentication information. When the verification fails, an invalid request is returned to the user's player.

[0031] According to the third aspect of the embodiments of the present invention, a system for playing a video stream of a security camera device on a web page is provided. The system includes:

[0032] A multimedia server for receiving a video stream playback request from a web page and requesting a target video stream from a corresponding security camera device.

[0033] A signaling server, which is connected to all security camera devices, and the multimedia server sends candidate IPs and candidate ports to the security camera devices by connecting to the signaling server.

[0034] According to a fourth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of any one of the methods in the first aspect are implemented.

[0035] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0036] In the embodiments of the present invention, through the assembly design of the URL and the proxy of the multimedia server, the traditional WEBRTC signaling channel and media channel are combined into one. Users no longer need to establish a signaling channel and a media channel at the same time, and do not need to care about the network topology of the user side, providing greater compatibility, simplifying the user process in one step, making the development of the user side the simplest, and supporting various existing web players, without worrying whether the performance of the device supports multiple users watching simultaneously.

[0037] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.

[0039] Figure 1A is a flowchart of a method for playing a video stream of a security camera device in a web page according to an exemplary embodiment.

[0040] Figure 1B is a specific flowchart of a method for playing a video stream of a security camera device in a web page according to an exemplary embodiment.

[0041] Figure 2 is a block diagram of a device for playing a video stream of a security camera device in a web page according to an exemplary embodiment.

[0042] Figure 3 is a schematic diagram of a system for playing a video stream of a security camera device in a web page according to an exemplary embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0044] Terms and their explanations used in the present invention:

[0045] WEBRTC: An abbreviation for Web Real-Time Communication, which is an API that supports real-time voice or video conversations on web browsers.

[0046] TURN: A traffic relay component of WEBRTC, which is used to proxy data traffic between devices and browsers when the peer-to-peer channel establishment between the device and the browser fails.

[0047] STUN: A peer-to-peer component of WEBRTC, which helps devices collect candidate IPs and ports to establish a peer-to-peer channel.

[0048] Candidate IP and port: The IP and port available for the device to the outside world. Also, because the device is often located in the internal network, there are multiple sets of candidate IPs and ports.

[0049] Figure 1A It is a flowchart of a method for playing a video stream of a security camera device in a web page shown according to an exemplary embodiment. As Figure 1A shown, this method is applied to a multimedia server, and the method includes:

[0050] Step S101, the multimedia server obtains its own candidate IP and candidate port;

[0051] Step S102, when receiving a URL request for playing a target video stream sent by the user's player, parse the URL request to determine the user authentication information carried in the URL request, the device ID and channel number of the security camera device to push the target video stream, and the description information of the target video stream to be played;

[0052] Step S103, verify the user authentication information. When the verification passes, send the candidate IP and candidate port to the device ID and channel number of the security camera device to push the target video stream through the signaling server connected to the multimedia server, so that the security camera device returns the target video stream to be pushed;

[0053] Step S104, start the corresponding playback module according to the description information of the target video stream to be played; for each successful request, the multimedia server will start a corresponding playback module to serve it.

[0054] Step S105, when the target video stream pushed by the device is received, broadcast it to all playback modules and respond to the user's player. The playback module can use different playback protocols to respond to the user's player. When the player is closed or the security camera device is disconnected, it cannot respond to the player and the process ends.

[0055] In one embodiment, preferably, the destination address of the URL request includes the address of the multimedia server, and the URL request further includes: user authentication information, the device ID and channel number of the security camera device for pushing the target video stream, and the description information of the target video stream to be played, where the description information of the target video stream to be played includes the type, format, quality, and timestamp of the video stream. Among them, the user assembles the required URL according to information such as the camera device ID, stream type (live stream or recorded stream), video format, video quality, channel number, timestamp, and authentication signature.

[0056] In one embodiment, preferably, the security camera device pushes the target video stream to the multimedia server through the web instant messaging protocol, or the security camera device pushes the target video stream to the multimedia server through a private encryption protocol, and the signaling server is connected to all security camera devices.

[0057] In one embodiment, preferably, the obtaining of the candidate IP and candidate port of the multimedia server includes:

[0058] Collect the candidate IP and candidate port through STUN; or

[0059] Detect the IP and port of the external network as the candidate IP and candidate port.

[0060] In one embodiment, preferably, the method further includes:

[0061] Verify the user authentication information, and when the verification fails, return an invalid request to the user's player.

[0062] The following uses a specific embodiment to illustrate the above technical solutions of the present invention in detail.

[0063] As Figure 1B shown, the specific steps of the method for playing the video stream of the security camera device on the web page include:

[0064] a) Start the multimedia server.

[0065] b) The multimedia server collects its own candidate IPs and ports; if using WEBRTC to receive the device's pushed stream, it needs to collect all candidate IPs and ports through STUN; if using a private encryption protocol for pushing the stream, it needs to detect the external network IP and port by itself as candidate IPs and ports.

[0066] c) The multimedia server logs in to the signaling server; the signaling server is connected to all security camera devices and can actively push commands to the security camera devices.

[0067] d) Start the response module and wait for user access.

[0068] e) The user assembles the required URL based on information such as the camera device ID, stream type (live stream or recorded stream), video format, video quality, channel number, timestamp, and authentication signature. The destination address of this URL is the address of the multimedia server, and the remaining parts include:

[0069] i. The device ID and channel number of the device to be pushed with the stream;

[0070] ii. The media description information to be played, including the stream type, stream format, stream quality, and timestamp;

[0071] iii. User authentication information;

[0072] f) After the user sends the assembled URL to the player, no other operations are required. The player requests the multimedia server according to the destination address of the URL.

[0073] g) After receiving the URL, the response module of the multimedia server parses out the user authentication information, the device ID and channel number of the device to be pushed with the stream, and the media description information to be played.

[0074] h) The response module of the multimedia server sends the authentication information to the user authentication module for verification. If the verification fails, the process is interrupted and an invalid request is returned; if the verification is successful, the following process is executed:

[0075] i. Send the candidate IPs and ports of the multimedia server to the device ID and channel number of the device to be pushed with the stream through the signaling server, and then start the proxy module to be responsible for receiving the pushed stream data of the device;

[0076] ii. At the same time, it will start the corresponding playback module according to the media description information to be played to serve this playback request, and each successful request will start a corresponding playback module to serve it;

[0077] i) After receiving the candidate IPs and ports of the multimedia server, the device starts to push the stream, and the pushing protocol can use the general WEBRTC or a private encryption protocol.

[0078] j) After the proxy module of the multimedia server receives the video stream push, it broadcasts it to all playback modules, and the playback modules can respond to the user's player using different playback protocols.

[0079] Figure 2 It is a block diagram of a device for playing a video stream of a security camera device in a web page shown according to an exemplary embodiment.

[0080] As Figure 2 shown, according to the second aspect of the embodiments of the present invention, there is provided a device for playing a video stream of a security camera device in a web page for a multimedia server, and the device includes:

[0081] An obtaining unit 21, configured to obtain candidate IPs and candidate ports of the multimedia server;

[0082] A determining unit 22, configured to, when receiving a URL request for playing a target video stream sent by the user's player, parse the URL request to determine user authentication information, a device ID and a channel number of a device to push the target video stream, and description information of the target video stream to be played carried in the URL request;

[0083] A verifying unit 23, configured to verify the user authentication information, and when the verification passes, send the candidate IPs and candidate ports to the device ID and channel number of the device to push the target video stream through a signaling server connected thereto, so that the device returns the target video stream to be pushed;

[0084] A starting unit 24, configured to start a corresponding playback module according to the description information of the target video stream to be played;

[0085] A broadcasting unit 25, configured to, when receiving the target video stream pushed by the device, broadcast it to all playback modules and respond to the user's player.

[0086] In one embodiment, preferably, the destination address of the URL request includes the address of the multimedia server, and the URL request further includes: user authentication information, a device ID and a channel number of a device to push the target video stream, and description information of the target video stream to be played, and the description information of the target video stream to be played includes the type, format, quality and timestamp of the video stream.

[0087] In one embodiment, preferably, the security camera device pushes the target video stream to the multimedia server through a web page instant messaging protocol, or the security camera device pushes the target video stream to the multimedia server through a private encryption protocol, and the signaling server is connected to all security camera devices.

[0088] In one embodiment, preferably, the obtaining unit is configured to:

[0089] Collect the candidate IP and candidate port through STUN; or

[0090] Detect the IP and port of the external network as the candidate IP and candidate port.

[0091] In one embodiment, preferably, the device further includes:

[0092] A return unit, configured to verify the user authentication information, and when the verification fails, return an invalid request to the user's player.

[0093] As Figure 3 shown, according to the third aspect of the embodiments of the present invention, there is provided a system for playing a video stream of a security camera device on a web page, the system including:

[0094] A multimedia server, configured to receive a video stream playback request from a web page, and request a target video stream from a corresponding security camera device;

[0095] A signaling server, the signaling server is connected to all security camera devices, and the multimedia server sends candidate IP and candidate port to the security camera device by connecting to the signaling server.

[0096] According to the fourth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of any method in the first aspect are implemented.

[0097] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0098] In the embodiments of the present invention, through the assembly design of the URL and the proxy of the multimedia server, the traditional WEBRTC signaling channel and media channel are combined into one. Users do not need to establish a signaling channel and a media channel at the same time, and do not need to care about the network topology of the user side, providing greater compatibility, simplifying the user process in one step, making the user-side development the simplest, and supporting various existing web players, without worrying about whether the performance of the device supports multiple users watching at the same time.

[0099] It can be further understood that in the present invention, "a plurality of" means two or more, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. The singular forms of "a", "" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0100] It can be further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present invention, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0101] It can be further understood that although the operations are described in a specific order in the drawings in the embodiments of the present invention, it should not be construed as requiring these operations to be performed in the specific order shown or in a serial order, or requiring all the operations shown to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.

[0102] Those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include known common knowledge or conventional technical means in the technical field not disclosed by the present invention. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present invention are pointed out by the following claims.

[0103] It should be understood that the present invention is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.

Claims

1. A method for playing a video stream of a security camera device on a web page, characterized in that, For a multimedia server, the method includes: Obtaining candidate IP and candidate port of the multimedia server; When receiving a URL request for playing a target video stream sent by a user's player, parsing the URL request to determine user authentication information carried in the URL request, the device ID and channel number of the security camera device for pushing the target video stream, and the description information of the target video stream to be played; Verifying the user authentication information, and when the verification passes, sending the candidate IP and candidate port to the device ID and channel number of the security camera device for pushing the target video stream through a signaling server connected to the multimedia server, so that the security camera device returns the target video stream to be pushed; Starting a corresponding playback module according to the description information of the target video stream to be played; When receiving the target video stream pushed by the security camera device, broadcasting it to all playback modules and responding to the user's player.

2. The method according to claim 1, characterized in that, The destination address of the URL request includes the address of the multimedia server, and the URL request further includes: user authentication information, the device ID and channel number of the security camera device for pushing the target video stream, and the description information of the target video stream to be played, and the description information of the target video stream to be played includes the type, format, quality and timestamp of the video stream.

3. The method according to claim 1, characterized in that, The security camera device pushes the target video stream to the multimedia server through the web instant messaging protocol, or the security camera device pushes the target video stream to the multimedia server through a private encryption protocol, and the signaling server is connected to all security camera devices.

4. The method according to claim 3, wherein The obtaining of the candidate IP and candidate port of the multimedia server includes: Collecting the candidate IP and candidate port through STUN; or Detecting the IP and port of the external network as the candidate IP and candidate port.

5. The method according to claim 1, wherein The method further includes: Verifying the user authentication information, and when the verification fails, returning an invalid request to the user's player.

6. A device for playing a video stream of a security camera device on a web page, characterized in that, For a multimedia server, the device includes: An obtaining unit, configured to obtain candidate IP and candidate port of the multimedia server; A determining unit, configured to parse the URL request when receiving a URL request for playing a target video stream sent by a user's player, to determine user authentication information carried in the URL request, the device ID and channel number of the security camera device for pushing the target video stream, and the description information of the target video stream to be played; A verifying unit, configured to verify the user authentication information, and when the verification passes, sending the candidate IP and candidate port to the device ID and channel number of the security camera device for pushing the target video stream through a signaling server connected thereto, so that the security camera device returns the target video stream to be pushed; A starting unit, configured to start a corresponding playback module according to the description information of the target video stream to be played; A broadcasting unit, configured to broadcast to all playback modules and respond to the user's player when receiving the target video stream pushed by the security camera device through a proxy module.

7. The device according to claim 6, characterized in that, The destination address of the URL request includes the address of the multimedia server, and the URL request further includes: user authentication information, the device ID and channel number of the security camera device for the target video stream to be pushed, and the description information of the target video stream to be played, where the description information of the target video stream to be played includes the type, format, quality, and timestamp of the video stream.

8. The device according to claim 6, characterized in that, The security camera device pushes the target video stream to the multimedia server through the web instant messaging protocol, or the security camera device pushes the target video stream to the multimedia server through a private encryption protocol, and the signaling server is connected to all security camera devices.

9. The device according to claim 8, characterized in that, The obtaining unit is configured to: Collect the candidate IP and candidate port through STUN; or Detect the IP and port of the external network as the candidate IP and candidate port.

10. The device according to claim 6, characterized in that, The device further includes: A returning unit, configured to verify the user authentication information, and when the verification fails, return an invalid request to the user's player.

Citation Information

Patent Citations

  • System, method and device for transmitting streaming media data

    CN101702725A

  • Communication method based on media data and articulated naturality web system

    CN110166832A

  • Media on-demand method, system and device

    CN111818360A