A method, device, medium and product for real-time video monitoring
The webrtc client component of the web application server obtains and sends audio and video stream data without the need for audio and video equipment at the monitoring end, which solves the limitation of the existing technology that the monitoring end requires audio and video equipment, and reduces costs and complexity. and the expansion of application scope.
Patent Information
- Application Number
- CN202410483030.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-04-22
AI Technical Summary
The existing video surveillance system based on webrtc needs to be equipped with audio and video equipment, which increases the system cost and complexity. Video surveillance cannot be implemented on devices without audio and video equipment such as desktop computers, which limits the scope of application.
Real-time communication with the webrtc client component through the web page of the web application server, sending a connection request to the webrtc server or monitoring end, obtaining and sending the audio and video stream data collected by the target monitoring device, and realizing video monitoring without the need for audio and video equipment on the monitoring end. .
It reduces the cost and usage complexity of the video surveillance system, expands the scope of application, enables more devices to implement video surveillance, and improves the convenience of surveillance.
Smart Images

Figure CN118413633B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video surveillance technology, and in particular to a method, device, medium and product for real-time video surveillance. Background Art
[0002] With the development of the Internet and industrial Internet of Things technology, video surveillance has become a common system component in industrial Internet of Things systems. Traditional video surveillance systems usually require special hardware devices, such as cameras, encoders, decoders, etc. These devices are expensive, complicated to install, and require professional technicians to maintain. In order to solve these problems, a video surveillance system based on web real-time communication (webrtc) came into being. Webrtc is an open source real-time communication protocol that can realize real-time audio and video communication between browsers without installing any plug-ins, which greatly simplifies the deployment and use of video surveillance systems. Prior art solutions: In existing webrtc-based video surveillance systems, the monitoring end usually needs to be equipped with audio and video equipment, such as cameras and microphones, to achieve two-way audio and video transmission. In this way, the monitoring end can collect audio and video information on the scene through the camera and microphone, and send it to the monitored end through the network. At the same time, the monitored end can also receive audio and video information from the monitoring end in the same way, thereby realizing real-time video surveillance.
[0003] Problems with the existing technology: In the existing video surveillance system based on WebRTC, firstly, the monitoring end needs to be equipped with audio and video equipment, which not only increases the cost of the system, but also increases the complexity of use. Secondly, if the monitoring end is a device that is not equipped with audio and video equipment, such as a desktop computer, then video surveillance cannot be achieved. This limits the application scope of the video surveillance system based on WebRTC to a certain extent. Therefore, how to achieve video surveillance based on WebRTC without the need for audio and video equipment is a problem that needs to be solved urgently. Summary of the invention
[0004] The purpose of this application is to provide a method, device, medium and product for real-time video monitoring, so as to realize how the monitoring end can realize video monitoring based on WebRTC without the need for audio and video equipment, solve the problem that audio and video configuration is required for WebRTC-based monitoring, and improve the cost performance when applied to industrial Internet of Things systems.
[0005] To achieve the above object, an embodiment of the present application provides a method for real-time video monitoring, which is applied to a web application server, comprising:
[0006] The network web application service component of the web application server receives a monitoring request sent by the monitoring terminal, wherein the monitoring request includes indication information of a target monitoring device;
[0007] Requesting the audio and video stream data collected by the target monitoring device from the webrtc server through the web real-time communication webrtc client component of the web application server;
[0008] Sending a first webrtc connection request to a webrtc server or a monitoring terminal through a webrtc client component of the web application server; the first webrtc connection request is used to request the webrtc server to initiate a webrtc connection to the monitoring terminal or directly initiate a webrtc connection with the monitoring terminal;
[0009] The audio and video stream data collected by the target monitoring device is sent to the monitoring terminal through the WebRTC connection between the WebRTC client component of the web application server and the monitoring terminal.
[0010] Optionally, the web application service component includes a front-end service and a back-end service in a mutually separated mode;
[0011] The backend service is used to provide a hypertext transfer protocol (http) interface to the outside world, including at least one functional module of user management, role management, authority management, camera management, monitoring grouping, monitoring priority management, receiving video monitoring requests, file storage, and identity authentication;
[0012] The front-end service includes at least one functional component among a user management component, a role management component, a permission management component, a camera registration component, a video monitoring component, a file management component, a webrtc client component, a monitoring camera component, a monitoring video component, and a geographic information system (GIS) component.
[0013] Optionally, after the network web application service component of the web application server receives the monitoring request sent by the monitoring terminal, the method further includes:
[0014] Determine the number of connected connections to monitor;
[0015] If the number of connected connections is greater than or equal to a preset threshold, disconnecting the monitored end with the lowest priority in the current connection;
[0016] If the number of connected connections is less than the preset threshold, the step of obtaining the audio and video stream data collected by the target monitoring device through the web real-time communication webrtc client component of the web application server is executed according to the monitored end parameters carried in the monitoring request.
[0017] Optionally, the audio and video stream data collected by the target monitoring device is obtained through a web real-time communication webrtc client component of the web application server, including:
[0018] Sending a first acquisition request to a webrtc server, wherein the first acquisition request is used to instruct the webrtc server to acquire the audio and video stream data collected by the target monitoring device through a streaming media server; or,
[0019] A second acquisition request is sent to the streaming media server, where the second acquisition request is used to instruct the streaming media server to acquire the audio and video stream data collected by the target monitoring device.
[0020] To achieve the above object, an embodiment of the present application provides a method for real-time video monitoring, comprising:
[0021] Sending a monitoring request to a network web application service component of a web application server;
[0022] Receive a webrtc connection request sent by a webrtc client component of a web application server;
[0023] After establishing a connection with the webrtc client component, receive the audio and video stream data collected by the target monitoring device and sent by the webrtc client component.
[0024] Optionally, sending a monitoring request to a network web application service component of the web application server includes:
[0025] Obtain the number of split screens and the identity information of the monitored terminal corresponding to each split screen;
[0026] According to the identity information of the monitored terminal corresponding to each split screen, set the monitored terminal parameters corresponding to each split screen;
[0027] According to the sending of the monitoring request to the network web application service component of the web application server, the monitoring request carries the monitored terminal parameters corresponding to each split screen.
[0028] Optionally, after receiving the audio and video stream data collected by the target monitoring device and sent by the webrtc client component, the method further includes:
[0029] Performing monitoring and adjustment operations on the audio and video stream data; the monitoring and adjustment operations include at least one of group display, monitoring zoom-in, monitoring zoom-out, automatically adjusting monitoring resolution according to bandwidth and number of split screens, taking photos, recording videos, uploading files, previewing media files, and downloading files;
[0030] After monitoring for a preset period of time, a disconnect request is sent to the webrtc client component.
[0031] To achieve the above object, an embodiment of the present application provides a device for real-time video monitoring, comprising:
[0032] A first receiving module, used for a network web application service component of a web application server to receive a monitoring request sent by a monitoring terminal, wherein the monitoring request includes indication information of a target monitoring device;
[0033] A first acquisition module is used to acquire the audio and video stream data collected by the target monitoring device through a web real-time communication webrtc client component of the web application server;
[0034] A first sending module is used to send a first webrtc connection request to a webrtc server or to a monitoring terminal through a webrtc client component of the web application server; the first webrtc connection request is used to request the webrtc server to initiate a webrtc connection to the monitoring terminal or directly initiate a webrtc connection with the monitoring terminal;
[0035] The first processing module is used to send the audio and video stream data collected by the target monitoring device to the monitoring terminal through the WebRTC connection between the WebRTC client component of the web application server and the monitoring terminal.
[0036] To achieve the above object, an embodiment of the present application provides a device for real-time video monitoring, comprising:
[0037] A second sending module is used to send a monitoring request to a network web application service component of the web application server;
[0038] The second receiving module is used to receive a webrtc connection request sent by a webrtc client component of the web application server;
[0039] The second processing module is used to receive the audio and video stream data collected by the target monitoring device and sent by the webrtc client component after establishing a connection with the webrtc client component.
[0040] To achieve the above objectives, an embodiment of the present application provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps in the method described above are implemented.
[0041] To achieve the above objective, an embodiment of the present application provides a computer program product, including computer instructions, which implement the steps of the above method when executed by a processor.
[0042] The beneficial effects of the above technical solution of the present application are as follows:
[0043] The method of the embodiment of the present application includes: a network web application service component of a web application server receives a monitoring request sent by a monitoring terminal, the monitoring request including indication information of a target monitoring device; obtaining audio and video stream data collected by a target monitoring device through a webrtc client component of a web application server in real-time communication; sending a first webrtc connection request to a webrtc server or to a monitoring terminal through a webrtc client component of the web application server; the first webrtc connection request is used to request the webrtc server to initiate a webrtc connection to the monitoring terminal or to directly initiate a webrtc connection with the monitoring terminal; sending audio and video stream data collected by a target monitoring device to the monitoring terminal through a webrtc connection between a webrtc client component of the web application server and the monitoring terminal. The present application implements sending a connection request from a monitored terminal to a monitoring terminal through a webrtc client component of a web application server, and video monitoring based on webrtc can be implemented without setting up audio and video devices, thereby improving the convenience of monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 One of the flow charts of the method for real-time video monitoring provided in an embodiment of the present application;
[0045] Figure 2 A structural diagram of the architecture of real-time video monitoring provided in an embodiment of the present application.
[0046] Figure 3 One of the complete video surveillance flow charts provided for this application;
[0047] Figure 4 for Figure 3 The corresponding video surveillance timing flow chart;
[0048] Figure 5 The second complete video surveillance flow chart provided for this application;
[0049] Figure 6 Flow chart 2 of the method for real-time video monitoring provided in an embodiment of the present application;
[0050] Figure 7 One of the flow charts of the device for real-time video monitoring provided in an embodiment of the present application;
[0051] Figure 8 The second flowchart of the device for real-time video monitoring provided in the embodiment of the present application; DETAILED DESCRIPTION
[0052] In order to make the technical problems, technical solutions and advantages to be solved by the present application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0053] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0054] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0055] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0056] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0057] The embodiments of the present application provide a method, device, medium and product for real-time video monitoring. The method and device are based on the same application concept. Since the method and device solve the problem in a similar principle, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0058] like Figure 1 As shown, a method for real-time video monitoring is provided for an embodiment of the present application, which is applied to a web application server, including:
[0059] Step 11, the network web application service component of the web application server receives the monitoring request sent by the monitoring terminal, wherein the monitoring request includes indication information of the target monitoring device;
[0060] Step 12, through the web application server's web real-time communication webrtc client component, request the webrtc server for the audio and video stream data collected by the target monitoring device.
[0061] Here, the target monitoring device is the monitored end.
[0062] Step 13, sending a first webrtc connection request to the webrtc server or to the monitoring end through the webrtc client component of the web application server; the first webrtc connection request is used to request the webrtc server to initiate a webrtc connection to the monitoring end or directly initiate a webrtc connection with the monitoring end.
[0063] After this step, it also includes: receiving a second webrtc connection request sent by the monitoring end through the webrtc client component of the web application server, and establishing a webrtc connection with the monitoring end.
[0064] Step 14, sending the audio and video stream data collected by the target monitoring device to the monitoring terminal through the WebRTC connection between the WebRTC client component of the web application server and the monitoring terminal.
[0065] It should be noted that the web application server of the present application is constructed in advance for the present application. The web application server includes a web application service component and a webrtc client component. The web application service component and the webrtc client component of the present application are virtual components. It can also be understood that the web application server constructed by the present application is a virtual server.
[0066] In an embodiment of the present application, a web application service component of a web application server is used to receive a monitoring request sent by a monitoring terminal. The monitoring request may carry identity information, address information, video parameter requirement information, etc. of the monitored terminal. After receiving the monitoring request through the web application service component, the web application server's web real-time communication webrtc client component is used to obtain the audio and video stream data collected by the target monitoring device, and a connection request is sent to the monitoring terminal through the webrtc client component, thereby achieving the purpose of the monitored terminal sending a connection to the monitoring terminal, rather than the scheme of the monitoring terminal sending a connection to the monitored terminal in the related art. A connection request is sent through the webrtc client component of the present application, and after establishing a connection with the monitoring terminal, the audio and video stream data collected by the target monitoring device is sent to the monitoring terminal.
[0067] Compared with the prior art, the solution of the present application can solve the following technical problems: how the monitoring end can realize video monitoring based on WebRTC without the need for audio and video equipment; it can reduce the cost and usage complexity of the video monitoring system based on WebRTC; it can expand the application scope of the video monitoring system based on WebRTC, so that more devices, such as desktop computers, can also realize video monitoring and other technical problems.
[0068] The solution of this application can be adopted Figure 2As shown in the network architecture diagram, optionally, the web application service component includes a front-end service and a back-end service in a mutually separated mode;
[0069] The backend service is used to provide a hypertext transfer protocol (http) interface to the outside world, including at least one functional module of user management, role management, authority management, camera management, monitoring grouping, monitoring priority management, receiving video monitoring requests, file storage, and identity authentication;
[0070] The front-end service includes at least one functional component among a user management component, a role management component, a permission management component, a camera registration component, a video monitoring component, a file management component, a webrtc client component, a monitoring camera component, a monitoring video component, and a geographic information system (GIS) component.
[0071] In this application, Figure 2 The client shown in Figure 1 In the scheme shown, no setting is required. The client is an optional device, and the client can be understood as the monitored end of the browser. It should be understood that other devices with cameras and capable of supporting webrtc clients, such as laptops, mobile phones, etc., can also be used as monitored ends. In some temporary video surveillance scenarios, there is no need to install a camera.
[0072] In the embodiment of the present application, the web application service adopts the front-end and back-end separation mode, and the back-end service provides an http interface to the outside, including functions such as user management module, role management, authority management module, camera registration module, camera location management module, monitoring grouping module, monitoring priority management module, receiving video monitoring request module, file storage module, identity authentication module, etc. The front-end service includes user management component, role management component, authority management component, camera registration component, video monitoring component, file management component, webrtc client component, monitoring camera component, monitoring video component, GIS component, etc.
[0073] The functional description may refer to the following Table 1.
[0074] Table 1: Functional description of web application services
[0075]
[0076]
[0077] The webrtc client component of this application includes core functions such as webrtc client initialization, audio and video acquisition, and initiating wertc point-to-point communication.
[0078] In this application, the application Figure 2The architecture diagram provides a specific implementation method, where the monitored end uses a camera as the monitoring source, including:
[0079] Step 1: Use the current mature technical solutions to deploy a video surveillance platform that supports GB / T2818, including a Session Initiation Protocol (SIP) signaling server and a streaming media server.
[0080] Step 2: Use the current mature technical solutions to deploy the server components required by webrtc, namely the webrtc server, which includes a streaming media conversion server, a TURN server, a STURN server, and a signaling server. STURN (Session Traversal Utilities for NAT) and TURN (Traversal Using Relays around NAT) are two data transmission protocols used to solve NAT (Network Address Translation Q) problems. NAT is a network technology port used to connect private networks to public networks. However, NAT will affect the reliability and speed of network connections, especially in real-time communication scenarios such as video conferencing, real-time voice, games, live broadcasts, etc.
[0081] Allows to cross NAT or firewall on TCP or UDP lines. Three methods of connecting webrtc sessions between browsers (peer):
[0082] A. Directly connect via local network:
[0083] If both devices are on a local network, then they don't need to do anything special to connect to each other using peer-to-peer. That is, if one device has the local IP address of the other device, then they can communicate directly with each other.
[0084] B. Direct connection via public IP address Internet:
[0085] In this way, webrtc is directly connected through the public IP address obtained by STUN. When the devices are not in the same local network, they can only access each other through the public IP address. Therefore, our devices do not know the public IP address. This is where the STUN service comes in handy. It enables the device to ask the STUN server "What is my public IP address?"
[0086] C. Routing the media connection via the webrtc TURN server:
[0087] Using TURN to relay media to connect to our webrtc, in this case knowing the public IP address would be nice, but it might still be enough.
[0088] Step 3. This application develops and deploys a WEB application server, including a web application service component and a webrtc client component, which provides functions such as monitoring web pages, receiving monitoring commands, and simulating webrtc clients.
[0089] Step 4: This application is going to select a camera that supports GB / T 2818 and register it to the video surveillance platform in step 1.
[0090] Step 5. Prepare a desktop computer with a browser as the monitoring terminal, open the monitoring terminal web page, and initialize the webrtc client.
[0091] Step 6: Select the camera to be monitored and send a start monitoring command to the web application server.
[0092] Step 7. The web application server receives the start monitoring command, actively establishes a connection with the monitoring party's webrtc client, and retrieves the video stream of the video monitoring platform and pushes it to the monitoring end.
[0093] Step 8: After the monitoring end receives the audio and video data forwarded by the server, it will preview it in real time in the browser. Users can view different monitoring screens by adjusting the size and position of the preview window.
[0094] Step 9: If you need to end monitoring, you can click the "Stop Monitoring" button in the browser of the monitoring end to send a request to stop monitoring to the server. The server will notify the monitored end to stop recording audio and video data and close the channel used for audio and video data transmission.
[0095] In an optional embodiment, after the above step 11, the method of the present application further includes:
[0096] Determine the number of connected connections to monitor;
[0097] If the number of connected connections is greater than or equal to a preset threshold, disconnecting the monitored end with the lowest priority in the current connection;
[0098] If the number of connected connections is less than the preset threshold, the step of obtaining the audio and video stream data collected by the target monitoring device through the web real-time communication webrtc client component of the web application server is executed according to the monitored end parameters carried in the monitoring request.
[0099] After receiving a monitoring request through a web application service, the present application determines the number of connected connections for monitoring. For example, the currently monitored end has ten cameras, and the monitoring end can only monitor eight monitoring screens. The preset threshold is determined based on the maximum upper limit that the monitoring end can monitor. If it is determined that the number of connected monitoring connections is nine, which is greater than the preset threshold, the monitored end with the lowest priority among all current connections is deleted from the monitored end, and the connection with the lowest priority is disconnected. The priority information can be determined through the request information, which also carries the monitored end parameters. The monitored end parameters include the resolution parameters of each monitored end, the identity information of the monitored end, such as the camera ID, etc. When the number of monitoring connections is less than or equal to the preset threshold, the above-mentioned step 12 is executed according to the monitored end parameters carried in the monitoring request.
[0100] In an optional embodiment, the above step 12 includes:
[0101] Sending a first acquisition request to a webrtc server, wherein the first acquisition request is used to instruct the webrtc server to acquire the audio and video stream data collected by the target monitoring device through a streaming media server; or,
[0102] A second acquisition request is sent to the streaming media server, where the second acquisition request is used to instruct the streaming media server to acquire the audio and video stream data collected by the target monitoring device.
[0103] In the embodiment of the present application, if the network architecture used is Figure 2 In the network architecture, that is, when there is a webrtc server in the network architecture, the webrtc client component sends a request to the webrtc server to pull audio and video, and the webrtc server pulls the audio and video stream from the streaming server, and the streaming server pulls the audio and video stream from the monitored end, so as to obtain the audio and video stream data collected by the target monitoring device. In another network architecture, there is no webrtc server, that is, no webrtc server is set. Figure 2 Similarly, in this implementation, the webrtc client component directly pulls the audio and video streams from the media server, and the streaming media server then pulls the audio and video streams from the monitored end. The media server pulls the audio and video streams, and the streaming media server then pulls the audio and video streams from the monitored end.
[0104] Specifically, refer to Figure 3 The process interaction diagram of multiple entities shown and Figure 4 The corresponding Figure 3In the initiation video monitoring sequence diagram of the interactive schematic diagram, this application pulls the audio and video stream from the streaming media server through the webrtc server, and after the streaming media server pulls the audio and video stream from the monitored end, it sends a webrtc connection request to the monitoring end. After establishing a webrtc connection with the monitored end, it sends the audio and video stream data collected by the target monitoring device to the monitored end. Among them, the web application service will monitor the flow limit and give priority to the monitored end that is monitored. For example, when the current network fluctuation is large, only the network communication of the monitored end with the highest priority is guaranteed. The monitoring end can realize at least one function such as monitoring split screen, group display, monitoring zoom in, monitoring zoom out, automatic adjustment of monitoring resolution according to bandwidth and number of split screens, automatic reconnection after monitoring disconnection, taking pictures, recording, uploading files, media file preview, and file downloading according to the audio and video stream data. Among them, the way to disconnect the connection can be that the monitored end initiates a disconnection request, or the connection duration can be preset in advance. After the connection duration is met, the monitored end actively disconnects from the monitoring end.
[0105] Specifically, refer to Figure 5 In the process interaction diagram of multiple entities shown, when there is a webrtc server in this application, after the monitoring end logs in through the browser and initializes the webrtc client, it initiates a registration request to the webrtc server, or uses the registered account and password to log in to the webrtc server, and sets the number of split screens on the monitoring end. Select the camera (monitored end) to be monitored, and initiate a monitoring request based on the client's daunt bandwidth and the number of split screens. The monitoring request carries multiple information such as the webrtc client account, camera ID, and monitoring video resolution. After receiving the monitoring request through the web application service, the number of monitoring connections is determined, and the step of obtaining the number of audio and video is executed. That is, after logging in to the webrtc client component using the webrtc client account, the webrtc client component is used to send a request to pull audio and video (carrying the camera ID and monitoring video resolution) to the webrtc server, and the audio and video stream is pulled from the streaming media server through the webrtc server. The streaming media server can pull the audio and video stream from the monitored end based on the camera ID and the monitoring video resolution, so as to obtain the audio and video stream data collected by the target monitoring device.
[0106] Furthermore, a first connection request is sent to the webrtc server through the webrtc client component, in which the webrtc account information of the monitoring end is written, and then a second connection request is sent to the monitoring end through the webrtc server, and the second connection request is to establish a webrtc connection with the monitoring end. Here, it can also be understood that the monitored end initiates a connection request to the monitoring end.
[0107] After establishing a connection with the monitoring end, the monitoring end can realize at least one function such as monitoring split screen, group display, monitoring zoom in, monitoring zoom out, automatic adjustment of monitoring resolution according to bandwidth and number of split screens, automatic reconnection after monitoring disconnection, photo taking, video recording, file upload, media file preview, file download, etc. according to the audio and video stream data. Among them, the disconnection method can be that the monitored end initiates a disconnection request, or the connection time can be preset in advance. After the connection time is met, the monitored end actively disconnects from the monitoring end.
[0108] Here, when the file upload function is applied, the monitoring end uploads the file (picture, text or video) to the web application server.
[0109] It should be noted that the present application can be applied to any technical field of "video transmission", "audio transmission", "network communication", "emergency command and dispatch", "smart park", and "smart factory". Through the technical solution of the present application, it can be widely used in application fields such as smart park, smart factory, emergency command and dispatch, etc. The technical solution of the present application can solve the problem that traditional video surveillance systems require special hardware equipment, reducing monitoring costs and complexity of use. At the same time, even if the monitoring end is not equipped with audio and video equipment, video surveillance can be realized, which greatly expands the application scope of video surveillance. Secondly, it enables monitoring personnel to remotely monitor, monitor with mobile devices, etc., which improves the convenience of monitoring.
[0110] In summary, through the above-mentioned processing method, this application can realize one-way audio and video transmission based on WebRTC technology, so that the monitoring party does not need to be equipped with audio and video equipment, reducing system costs and usage complexity.
[0111] Reference Figure 6 As shown, the embodiment of the present application provides a method for real-time video monitoring, which is applied to a monitoring end and includes:
[0112] Step 61, sending a monitoring request to the network web application service component of the web application server;
[0113] Step 62, receiving a webrtc connection request sent by a webrtc client component of the web application server;
[0114] Step 63, after establishing a connection with the webrtc client component, receiving the audio and video stream data collected by the target monitoring device sent by the webrtc client component.
[0115] In the embodiment of the present application, the monitoring end sends a monitoring request to the network web application service component of the web application server, and the identity information, address information, video parameter requirement information, etc. of the monitored end are carried in the monitoring request. The web application server of the present application is constructed in advance for the present application, and the web application server includes a web application service component and a webrtc client component. The web application service component and the webrtc client component of the present application are virtual components, and it can also be understood that the web application server constructed by the present application is a virtual server. After the webrtc client component sends a webrtc connection request to the monitoring end, the monitoring end establishes a connection with the webrtc client component after receiving the webrtc connection request, that is, establishes a connection with the web application server, and then can receive the audio and video stream data collected by the target monitoring device sent by the webrtc client component.
[0116] Optionally, sending a monitoring request to a network web application service component of the web application server includes:
[0117] Obtain the number of split screens and the identity information of the monitored terminal corresponding to each split screen;
[0118] According to the identity information of the monitored terminal corresponding to each split screen, set the monitored terminal parameters corresponding to each split screen;
[0119] According to the sending of the monitoring request to the network web application service component of the web application server, the monitoring request carries the monitored terminal parameters corresponding to each split screen.
[0120] In the present application, the identity information of the monitored end can be the identity ID information of the monitored end and the name of the computer room configuration page, and the number of split screens can be set on the monitoring end. For example, the staff can enter the number of split screens and the name of the computer room configuration page corresponding to each split screen in the page. Exemplarily, the staff can choose whether to split the screen in the display interface of the monitoring end. If not, the entire screen only displays the configuration page of a single computer room; if so, select the number of split screens and the name of the computer room configuration page to be displayed. Among them, the left frame displays the name of the existing computer room configuration page, and the right frame displays the name of the computer room configuration page selected by the staff, that is, the name of the computer room configuration page to be displayed. The staff can select a name in the left frame, and then click the button ">>" or double-click, etc., and the name will be displayed in the right frame; similarly, the staff selects a name in the right frame, and then clicks the button "<<" or double-clicks, etc., and the selected name will return to the left frame. Finally, the number of names in the right frame should be consistent with the number of split screens.
[0121] In some possible implementations, the monitoring pages of each computer room can be displayed in order on the screen according to the order selected by the user. Based on the computer room configuration page name corresponding to each split screen selected by the user, the configuration monitoring page data corresponding to each split screen can be obtained. In this embodiment, the size of each split screen can be determined according to a certain rule based on the number of split screens and the page size used for displaying all split screens.
[0122] The sizes of the split screens can be the same. When the entire display screen is used to display the computer room monitoring page, the page size used for displaying all the split screens is the size of the entire display screen; when part of the entire display screen (for example, only the browser is used for display) is used to display the computer room monitoring page, the page size used for displaying all the split screens is the size of the part of the screen.
[0123] For example, assuming that the number of split screens is 4, the length of each split screen is the length of the page displayed by all split screens / 2, and the width of each split screen is the width of the page displayed by all split screens / 2. Assuming that the number of split screens is 6, the length of each split screen is the length of the page displayed by all split screens / 3, and the width of each split screen is the width of the page displayed by all split screens / 2, and so on.
[0124] The present application sets the monitored end parameters corresponding to each split screen, and the monitored end parameters can be the resolution, sound parameters, etc. of displaying each monitored end video, and sends a monitoring request to the network web application service component of the web application server, and carries the monitored end parameters corresponding to each split screen in the monitoring request, that is, the parameters corresponding to each split screen are not the same, such as the key monitored video can be set with a higher resolution, and when the network bandwidth is not good, the key monitored video is displayed preferentially according to the preset priority. Among them, the priority information can be carried in the monitoring request, and the priority can be set to correspond to different priorities by different numbers, bit information, etc., and the present application does not limit this.
[0125] Optionally, after receiving the audio and video stream data collected by the target monitoring device and sent by the webrtc client component, the method further includes:
[0126] Performing monitoring and adjustment operations on the audio and video stream data; the monitoring and adjustment operations include at least one of group display, monitoring zoom-in, monitoring zoom-out, automatically adjusting monitoring resolution according to bandwidth and number of split screens, taking photos, recording videos, uploading files, previewing media files, and downloading files;
[0127] After monitoring for a preset period of time, a disconnect request is sent to the webrtc client component.
[0128] After the application establishes a connection with the webrtc client component of the web application server, the monitoring end can realize at least one function such as monitoring split screen, group display, monitoring zoom in, monitoring zoom out, automatic adjustment of monitoring resolution according to bandwidth and number of split screens, automatic reconnection after monitoring disconnection, photo taking, video recording, file upload, media file preview, file download, etc. according to the audio and video stream data. Among them, the disconnection method can be that the monitored end initiates a disconnection request, or the connection duration can be preset in advance. After the connection duration is met, the monitored end actively disconnects from the monitoring end. Here, when the file upload function is applied, the monitoring end uploads the file (picture, text or video) to the file storage service of the web application server.
[0129] In summary, through the above-mentioned processing method, this application can realize one-way audio and video transmission based on WebRTC technology, so that the monitoring party does not need to be equipped with audio and video equipment, reducing system costs and usage complexity.
[0130] Reference Figure 7 As shown, the embodiment of the present application also provides a device for real-time video monitoring, including:
[0131] A first receiving module 71, used for a network web application service component of a web application server to receive a monitoring request sent by a monitoring terminal, wherein the monitoring request includes indication information of a target monitoring device;
[0132] A first acquisition module 72 is used to acquire the audio and video stream data collected by the target monitoring device through a web real-time communication webrtc client component of the web application server;
[0133] The first sending module 73 is used to send a first webrtc connection request to the webrtc server or to the monitoring end through the webrtc client component of the web application server; the first webrtc connection request is used to request the webrtc server to initiate a webrtc connection to the monitoring end or directly initiate a webrtc connection with the monitoring end;
[0134] The first processing module 74 is used to send the audio and video stream data collected by the target monitoring device to the monitoring terminal through the WebRTC connection between the WebRTC client component of the web application server and the monitoring terminal.
[0135] Optionally, in the embodiment of the present application, the web application service component includes a front-end service and a back-end service in a mutually separated mode;
[0136] The backend service is used to provide a hypertext transfer protocol (http) interface to the outside world, including at least one functional module of user management, role management, authority management, camera management, monitoring grouping, monitoring priority management, receiving video monitoring requests, file storage, and identity authentication;
[0137] The front-end service includes at least one functional component among a user management component, a role management component, a permission management component, a camera registration component, a video monitoring component, a file management component, a webrtc client component, a monitoring camera component, a monitoring video component, and a geographic information system (GIS) component.
[0138] Optionally, in the embodiment of the present application, the device of the present application further includes:
[0139] A first determination module is used to determine the number of connected connections to be monitored;
[0140] A third processing module, configured to disconnect the monitored end with the lowest priority in the current connection if the number of the connected connections is greater than or equal to a preset threshold;
[0141] The fourth processing module is used to execute the step of obtaining the audio and video stream data collected by the target monitoring device through the web real-time communication webrtc client component of the web application server according to the monitored end parameters carried in the monitoring request if the number of connected connections is less than the preset threshold.
[0142] Optionally, the fourth processing module of the present application includes:
[0143] A first processing unit is configured to send a first acquisition request to a webrtc server, wherein the first acquisition request is configured to instruct the webrtc server to acquire audio and video stream data collected by a target monitoring device through a streaming media server; or
[0144] The second processing unit is used to send a second acquisition request to the streaming media server, where the second acquisition request is used to instruct the streaming media server to acquire the audio and video stream data collected by the target monitoring device.
[0145] Among them, the above Figure 1 The implementation embodiments of the method for real-time video monitoring shown are all applicable to the embodiments of the device for real-time video monitoring, and can achieve the same technical effects.
[0146] Reference Figure 8 As shown, the device for real-time video monitoring in the embodiment of the present application includes:
[0147] The second sending module 81 is used to send a monitoring request to the network web application service component of the web application server;
[0148] The second receiving module 82 is used to receive a webrtc connection request sent by a webrtc client component of a web application server;
[0149] The second processing module 83 is used to receive the audio and video stream data collected by the target monitoring device and sent by the webrtc client component after establishing a connection with the webrtc client component.
[0150] Optionally, in the embodiment of the present application, the second sending module 81 includes:
[0151] A first acquisition unit is used to acquire the number of split screens and the identity information of the monitored terminal corresponding to each split screen;
[0152] The third processing unit is used to set the monitored terminal parameters corresponding to each split screen according to the monitored terminal identity information corresponding to each split screen;
[0153] The fourth processing unit is used to send a monitoring request to the network web application service component of the web application server according to the monitoring request, wherein the monitoring request carries the monitored terminal parameters corresponding to each split screen.
[0154] Optionally, in the embodiment of the present application, the device of the present application further includes:
[0155] A fourth processing module is used to perform monitoring and adjustment operations on the audio and video stream data; the monitoring and adjustment operations include at least one of group display, monitoring zoom-in, monitoring zoom-out, automatic adjustment of monitoring resolution according to bandwidth and number of split screens, photo taking, video recording, file uploading, media file preview, and file downloading;
[0156] The fifth processing module is used to send a disconnect request to the webrtc client component after monitoring for a preset period of time.
[0157] Among them, the above Figure 6 The implementation embodiments of the method for real-time video monitoring shown are all applicable to the embodiments of the device for real-time video monitoring, and can achieve the same technical effects.
[0158] A readable storage medium in an embodiment of the present application stores a program or instruction thereon. When the program or instruction is executed by a processor, the steps in the method for real-time video monitoring as described above are implemented and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0159] The processor is the processor in the method for real-time video monitoring described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0160] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 or Figure 6 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0161] In the embodiment of the present application, module can be implemented with software so that it can be executed by various types of processors. For example, an executable code module of an identification can include one or more physical or logical blocks of computer instructions, for example, it can be constructed as an object, process or function. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different positions, and when these instructions are logically combined together, it constitutes a module and realizes the specified purpose of the module.
[0162] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed among different programs, and distributed across a plurality of memory devices. Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form. The operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0163] When a module can be implemented by software, considering the level of existing hardware technology, a person skilled in the art can build a corresponding hardware circuit to implement the corresponding function of the module that can be implemented by software without considering the cost. The hardware circuit includes a conventional very large scale integration (VLSI) circuit or gate array and existing semiconductors such as logic chips, transistors, or other discrete components. The module can also be implemented by a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, etc.
[0164] The above exemplary embodiments are described with reference to the accompanying drawings, and many different forms and embodiments are feasible without departing from the spirit and teachings of the present application. Therefore, the present application should not be constructed as a limitation of the exemplary embodiments proposed herein. More specifically, these exemplary embodiments are provided so that the present application will be perfect and complete, and the scope of the present application will be conveyed to those who are familiar with the technology. In these figures, the component sizes and relative sizes may be exaggerated for clarity. The terms used here are only based on the purpose of describing specific exemplary embodiments and are not intended to be limiting. As used herein, unless the text clearly indicates otherwise, the singular forms "one", "an" and "the" are intended to include these multiple forms. It will be further understood that the terms "comprising" and / or "including" when used in this specification indicate the presence of the features, integers, steps, operations, components and / or components, but do not exclude the presence or increase of one or more other features, integers, steps, operations, components, components and / or their groups. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of that range and any subranges therebetween.
[0165] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for real-time video monitoring, characterized in that: Applicable to web application servers, including: The network web application service component of the web application server receives a monitoring request sent by the monitoring terminal, wherein the monitoring request includes indication information of a target monitoring device; A first acquisition request is sent to a webrtc server through a web real-time communication webrtc client component of the web application server, wherein the first acquisition request is used to instruct the webrtc server to obtain the audio and video stream data collected by the target monitoring device through a streaming media server, and the webrtc server returns the audio and video stream data to the webrtc client component; a webrtc connection request is sent to the webrtc server by using the webrtc client component, and after a connection is established between the webrtc client component and the webrtc server, the webrtc server sends a connection request to the monitoring terminal, and after a connection is established between the webrtc server and the monitoring terminal, the audio and video stream data is sent to the monitoring terminal through the webrtc client component; or Through the web application server's web real-time communication webrtc client component, a second acquisition request is sent to the streaming media server, and the second acquisition request is used to instruct the streaming media server to obtain the audio and video stream data collected by the target monitoring device; the webrtc client component is used to send a webrtc connection request to the monitoring end, and the webrtc connection request is used to instruct the webrtc client component to directly initiate a webrtc connection with the monitoring end; through the webrtc connection between the webrtc client component and the monitoring end, the audio and video stream data is sent to the monitoring end.
2. The method according to claim 1, characterized in that The web application service component includes a front-end service and a back-end service in a mutually separated mode; The backend service is used to provide a hypertext transfer protocol (http) interface to the outside world, including at least one functional module of user management, role management, authority management, camera management, monitoring grouping, monitoring priority management, receiving video monitoring requests, file storage, and identity authentication; The front-end service includes at least one functional component among a user management component, a role management component, a permission management component, a camera registration component, a video monitoring component, a file management component, a webrtc client component, a monitoring camera component, a monitoring video component, and a geographic information system (GIS) component.
3. The method according to claim 1, characterized in that After the network web application service component of the web application server receives the monitoring request sent by the monitoring terminal, the method further includes: Determine the number of connected connections to monitor; If the number of connected connections is greater than or equal to a preset threshold, disconnecting the monitored end with the lowest priority in the current connection; If the number of connected connections is less than the preset threshold, the step of obtaining the audio and video stream data collected by the target monitoring device through the web real-time communication webrtc client component of the web application server is executed according to the monitored end parameters carried in the monitoring request.
4. A method for real-time video monitoring, characterized in that: Applied to the monitoring end, including: Sending a monitoring request to a network web application service component of a web application server; After a connection is established between the webrtc client component of the web application server and the webrtc server, a connection request sent by the webrtc server to the monitoring terminal is received, and after a connection is established between the webrtc server and the monitoring terminal, the audio and video stream data collected by the target monitoring device and sent by the webrtc client component to the monitoring terminal is received; wherein, a first acquisition request is sent to the webrtc server through the webrtc client component of the web application server, and the first acquisition request is used to instruct the webrtc server to obtain the audio and video stream data collected by the target monitoring device through the streaming media server, and the webrtc server returns the audio and video stream data to the webrtc client component; a webrtc connection request is sent to the webrtc server by using the webrtc client component, and after a connection is established between the webrtc client component and the webrtc server, the webrtc server sends a connection request to the monitoring terminal, and after a connection is established between the webrtc server and the monitoring terminal, the audio and video stream data is sent to the monitoring terminal through the webrtc client component; or, Receive a webrtc connection request sent by the webrtc client component to the monitoring end, wherein the webrtc connection request is used to instruct the webrtc client component to directly initiate a webrtc connection with the monitoring end; receive the audio and video stream data sent by the webrtc client component to the monitoring end through the webrtc connection between the webrtc client component and the monitoring end; wherein, through the web application server's web real-time communication webrtc client component, send a second acquisition request to the streaming media server, wherein the second acquisition request is used to instruct the streaming media server to obtain the audio and video stream data collected by the target monitoring device.
5. The method according to claim 4, characterized in that Sending a monitoring request to the network web application service component of the web application server includes: Obtain the number of split screens and the identity information of the monitored terminal corresponding to each split screen; According to the identity information of the monitored terminal corresponding to each split screen, set the monitored terminal parameters corresponding to each split screen; According to the sending of the monitoring request to the network web application service component of the web application server, the monitoring request carries the monitored terminal parameters corresponding to each split screen.
6. The method according to claim 4, characterized in that After receiving the audio and video stream data collected by the target monitoring device sent by the webrtc client component, the method further includes: Performing monitoring and adjustment operations on the audio and video stream data; the monitoring and adjustment operations include at least one of group display, monitoring zoom-in, monitoring zoom-out, automatically adjusting monitoring resolution according to bandwidth and number of split screens, taking photos, recording videos, uploading files, previewing media files, and downloading files; After monitoring for a preset period of time, a disconnect request is sent to the webrtc client component.
7. A device for real-time video monitoring, characterized in that: include: A first receiving module, used for a network web application service component of a web application server to receive a monitoring request sent by a monitoring terminal, wherein the monitoring request includes indication information of a target monitoring device; A first acquisition module is used to acquire the audio and video stream data collected by the target monitoring device through a web real-time communication webrtc client component of the web application server; A first sending module is used to send a webrtc connection request to a webrtc server through the webrtc client component, wherein the webrtc connection request is used to request the webrtc server to initiate a webrtc connection to the monitoring terminal; or, to send a webrtc connection request to the monitoring terminal through the webrtc client component, wherein the webrtc connection request is used to instruct the webrtc client component to directly initiate a webrtc connection with the monitoring terminal; A first processing module, configured to send the audio and video stream data collected by the target monitoring device to the monitoring terminal through a webrtc connection between the webrtc client component and the monitoring terminal; wherein, through the webrtc client component, a first acquisition request is sent to the webrtc server, the first acquisition request is used to instruct the webrtc server to obtain the audio and video stream data collected by the target monitoring device through the streaming media server, and the webrtc server returns the audio and video stream data to the webrtc client component; using the webrtc client component to send a webrtc connection request to the webrtc server, and after a connection is established between the webrtc client component and the webrtc server, the webrtc server sends a connection request to the monitoring end, and after a connection is established between the webrtc server and the monitoring end, the webrtc client component sends the audio and video stream data to the monitoring end; or, Through the web application server's web real-time communication webrtc client component, a second acquisition request is sent to the streaming media server, wherein the second acquisition request is used to instruct the streaming media server to obtain the audio and video stream data collected by the target monitoring device; the webrtc client component is used to send a webrtc connection request to the monitoring end; and the audio and video stream data is sent to the monitoring end through the webrtc connection between the webrtc client component and the monitoring end.
8. A device for real-time video monitoring, characterized in that: include: A second sending module is used to send a monitoring request to a network web application service component of the web application server; The second receiving module is used to receive a webrtc connection request sent by a webrtc client component of the web application server; A second processing module is used to receive the audio and video stream data collected by the target monitoring device and sent by the webrtc client component after establishing a connection with the webrtc client component; wherein, after a connection is established between a webrtc client component of the web application server and a webrtc server, a connection request sent by the webrtc server to a monitoring terminal is received, and after a connection is established between the webrtc server and the monitoring terminal, audio and video stream data collected by a target monitoring device and sent by the webrtc client component to the monitoring terminal is received; wherein, a first acquisition request is sent to the webrtc server through the webrtc client component of the web application server, and the first acquisition request is used to instruct the webrtc server to obtain the audio and video stream data collected by the target monitoring device through a streaming media server, and the webrtc server returns the audio and video stream data to the webrtc client component; a webrtc connection request is sent to the webrtc server using the webrtc client component, and after a connection is established between the webrtc client component and the webrtc server, the webrtc server sends a connection request to the monitoring terminal, and after a connection is established between the webrtc server and the monitoring terminal, the audio and video stream data is sent to the monitoring terminal through the webrtc client component; or, Receive a webrtc connection request sent by the webrtc client component to the monitoring end, wherein the webrtc connection request is used to instruct the webrtc client component to directly initiate a webrtc connection with the monitoring end; receive the audio and video stream data sent by the webrtc client component to the monitoring end through the webrtc connection between the webrtc client component and the monitoring end; wherein, through the web application server's web real-time communication webrtc client component, send a second acquisition request to the streaming media server, wherein the second acquisition request is used to instruct the streaming media server to obtain the audio and video stream data collected by the target monitoring device.
9. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps in the method according to any one of claims 1 to 3 are implemented.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 4 to 6.
Citation Information
Patent Citations
Streaming media data playing method and system based on HTML5, and storage device
CN111147506A
Remote monitoring method and device
CN116095060A
