CN114363643B - Intelligent high-speed large-screen real-time video stream playing method and device - Google Patents

Intelligent high-speed large-screen real-time video stream playing method and device Download PDF

Info

Publication number
CN114363643B
CN114363643B CN202111513816.0A CN202111513816A CN114363643B CN 114363643 B CN114363643 B CN 114363643B CN 202111513816 A CN202111513816 A CN 202111513816A CN 114363643 B CN114363643 B CN 114363643B
Authority
CN
China
Prior art keywords
stream
real
information
webpage
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111513816.0A
Other languages
Chinese (zh)
Other versions
CN114363643A (en
Inventor
刘少耿
王雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apollo Zhilian Beijing Technology Co Ltd
Original Assignee
Apollo Zhilian Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apollo Zhilian Beijing Technology Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN202111513816.0A priority Critical patent/CN114363643B/en
Publication of CN114363643A publication Critical patent/CN114363643A/en
Application granted granted Critical
Publication of CN114363643B publication Critical patent/CN114363643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/64Addressing
    • H04N21/6402Address allocation for clients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Abstract

The application discloses a method and a device for intelligently playing a high-speed large-screen real-time video stream, relates to the technical field of computers, and particularly relates to the field of information flow and the field of intelligent transportation. The specific implementation scheme is as follows: the method comprises the steps that a back-end server responds to a received pull stream request sent by a webpage front end, and target camera information and identification information of the webpage front end carried in the pull stream request are obtained; sending stream pushing information to a live stream server according to the target camera information and the identification information, enabling the live stream server to pull video stream data of the target camera to a video service platform based on the stream pushing information, and transcoding the video stream data into real-time video stream data based on a real-time message transmission protocol; receiving a live streaming playing address of real-time video streaming data sent by a live streaming server; and based on the identification information, sending the live streaming playing address to the front end of the webpage, and enabling the front end of the webpage to pull real-time video streaming data from a live streaming server for playing based on the live streaming playing address.

Description

Intelligent high-speed large-screen real-time video stream playing method and device
Technical Field
The application relates to the technical field of computers, in particular to the field of information flow and the field of intelligent transportation, and particularly relates to a method and a device for intelligently playing a high-speed large-screen real-time video stream.
Background
Surveillance video is a main means for security at high speed, where the video source comes from a roadside camera. In the related art, video monitoring is usually implemented in a relatively traditional manner, for example, a multi-level multi-domain networking architecture is adopted, and video data are uploaded step by step according to a four-level networking structure of "department of transportation center-provincial monitoring center-road segment monitoring center-basic level monitoring unit". However, this method often has problems such as large video delay.
Disclosure of Invention
The application provides a method and a device for intelligently playing a high-speed large-screen real-time video stream.
According to a first aspect of the present application, there is provided a method for playing a smart high-speed large-screen real-time video stream, comprising:
responding to a pull stream request sent by a webpage front end, and acquiring target camera information carried in the pull stream request and identification information of the webpage front end;
sending stream pushing information to a live stream server according to the target camera information and the identification information, enabling the live stream server to pull video stream data of the target camera to a video service platform based on the stream pushing information, and transcoding the video stream data into real-time video stream data based on a real-time message transmission protocol;
receiving a live streaming playing address of the real-time video streaming data sent by the live streaming server;
and sending the live streaming playing address to the webpage front end based on the identification information, and enabling the webpage front end to pull the real-time video streaming data from the live streaming server for playing based on the live streaming playing address.
According to a second aspect of the present application, there is provided a method for playing a smart high-speed large-screen real-time video stream, comprising:
sending a pull flow request of a webpage front end to a back end server; the stream pulling request carries target camera information and identification information of the webpage front end, and is used for indicating the back-end server to send stream pushing information to a live stream server according to the target camera information and the identification information, so that the live stream server pulls video stream data of the target camera to a video service platform based on the stream pushing information and transcodes the video stream data into real-time video stream data based on a real-time message transmission protocol;
determining a live broadcast stream playing address of the real-time video stream data;
and pulling the real-time video stream data from the live stream server to play based on the live stream playing address.
According to a third aspect of the present application, there is provided a large-screen real-time video stream playing apparatus for smart high-speed, comprising:
the acquisition module is used for responding to a pull stream request sent by a webpage front end and acquiring target camera information carried in the pull stream request and identification information of the webpage front end;
the stream pushing module is used for sending stream pushing information to a live stream server according to the target camera information and the identification information, enabling the live stream server to pull video stream data of the target camera to a video service platform based on the stream pushing information, and transcoding the video stream data into real-time video stream data based on a real-time message transmission protocol;
the first receiving module is used for receiving a live broadcast stream playing address of the real-time video stream data sent by the live broadcast stream server;
and the sending module is used for sending the live streaming playing address to the webpage front end based on the identification information, and enabling the webpage front end to pull the real-time video streaming data from the live streaming server for playing based on the live streaming playing address.
According to a fourth aspect of the present application, there is provided a large screen real-time video stream playing device for smart high speed, comprising:
the first sending module is used for sending a pull flow request of the front end of the webpage to the back-end server; the stream pulling request carries target camera information and identification information of the webpage front end, and is used for indicating the back-end server to send stream pushing information to a live stream server according to the target camera information and the identification information, so that the live stream server pulls video stream data of the target camera to a video service platform based on the stream pushing information and transcodes the video stream data into real-time video stream data based on a real-time message transmission protocol;
the determining module is used for determining a live broadcast stream playing address of the real-time video stream data;
and the playing module is used for pulling the real-time video stream data from the live stream server to play based on the live stream playing address.
According to a fifth aspect of the present application, there is provided a highway video monitoring system comprising: the large-screen real-time video stream playing device according to the third aspect; the large-screen real-time video stream playing device according to the fourth aspect; a live streaming server and a video service platform.
According to a sixth aspect of the present application, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the large-screen real-time video stream playing method of the first aspect or the large-screen real-time video stream playing method of the second aspect.
According to a seventh aspect of the present application, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to execute the large-screen real-time video stream playing method of the foregoing first aspect or execute the large-screen real-time video stream playing method of the foregoing second aspect.
According to an eighth aspect of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, performs the steps of the method of the aforementioned first aspect, or the steps of the method of the aforementioned second aspect.
According to the technical scheme of the application, the problem of large video delay in the traditional video monitoring system can be solved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a schematic diagram of an architecture of a highway video monitoring system according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of another method for intelligent high-speed large-screen real-time video stream playback according to an embodiment of the present application;
fig. 3 is an exemplary diagram of a screen display effect of a large-screen display device provided in an embodiment of the present application;
fig. 4 is a schematic diagram of an architecture of another highway video surveillance system according to an embodiment of the present application;
fig. 5 is a schematic diagram of an architecture of another highway video surveillance system according to an embodiment of the present application;
FIG. 6 is a flowchart of another method for intelligent high-speed large-screen real-time video stream playback according to an embodiment of the present application;
FIG. 7 is a block diagram of an intelligent high-speed large-screen real-time video stream playback device according to an embodiment of the present application;
FIG. 8 is a block diagram of another embodiment of an intelligent high-speed large-screen real-time video stream playback device;
FIG. 9 is a block diagram of another embodiment of an intelligent high-speed large-screen real-time video stream playing apparatus;
FIG. 10 is a block diagram of another embodiment of an intelligent high-speed large-screen real-time video stream playing apparatus;
fig. 11 is an interaction diagram of a highway video monitoring system according to an embodiment of the present application;
fig. 12 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application to assist in understanding, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in the description of the present application, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Where in the description of the present application, "/" indicates an OR meaning, for example, A/B may indicate A or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In order to better understand the method for playing the intelligent high-speed large-screen real-time video stream disclosed in the embodiment of the present application, first, a highway video monitoring system suitable for the embodiment of the present application is described below.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an architecture of a highway video monitoring system according to an embodiment of the present disclosure. The highway video monitoring system can comprise, but is not limited to, a webpage front end, a back end server, a live streaming server and a video service platform. The number and form of the devices shown in fig. 1 are only examples and do not limit the embodiments of the present application, and two or more web page front ends may be included in practical applications. The highway video monitoring system shown in fig. 1 includes a web front end 101, a back end server 102, a live streaming server 103 and a video service platform 104. As an example, the live streaming server 103 may be integrated on the backend server 102, and it is understood that the backend server may control the live streaming server as a unified outlet of the traffic.
It should be noted that, the front end of the web page in the embodiment of the present application may be distributed in the large-screen display device. The large screen display device has an expressway map display area and a web page front end display area. The front end of the web page can be understood as the web page displayed to the user for browsing by running on a browser such as a large-screen display device, that is, the real-time video stream of a certain camera is played in the display area on the large-screen display device based on the web page. Optionally, the expressway map has camera identifiers of various expressway sides, and by clicking the camera identifiers on the expressway map, real-time video streams corresponding to the cameras can be displayed in a webpage front-end display area, so that the purpose of instant display is achieved.
It should be further noted that, in the embodiment of the present application, the highway video monitoring system is in a local area network architecture, so that the security of the highway video monitoring system can be ensured.
It can be understood that the highway video monitoring system described in the embodiment of the present application is for more clearly illustrating the technical solution of the embodiment of the present application, and does not constitute a limitation to the technical solution provided in the embodiment of the present application, and as a person having ordinary skill in the art knows that with the evolution of the system architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
The following describes the method and apparatus for playing a smart high-speed large-screen real-time video stream in detail with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flowchart of a method for playing a smart high-speed large-screen real-time video stream according to an embodiment of the present application. It should be noted that the large-screen real-time video stream playing method according to the embodiment of the present application can be applied to the large-screen real-time video stream playing device according to the embodiment of the present application, and the large-screen real-time video stream playing device can be configured on an electronic device.
It should be further noted that the large-screen real-time video stream playing method according to the embodiment of the present application may be described from a back-end server side. As shown in fig. 2, the large-screen real-time video stream playing method may include, but is not limited to, the following steps.
Step 201, in response to receiving a pull stream request sent by a web front end, acquiring target camera information and identification information of the web front end carried in the pull stream request.
It should be noted that, in some embodiments of the present application, the back-end server may first acquire the camera information through the video service platform, and store the acquired camera information in the database. For example, the video service platform is connected to a camera on the high-speed road side, and the video service platform has information related to each camera, where the information related to each camera may include, but is not limited to, information such as a camera IP (Internet Protocol) address, a camera ID (Identity), an RTSP (Real Time Streaming Protocol) live Streaming address, and the like.
In an embodiment of the present application, the front end of the web page may send a camera information acquisition request to the back end server. When receiving a camera information acquisition request sent by the webpage front end, the back-end server can send all camera information stored in the database to the webpage front end, so that the webpage front end can know which cameras are available. Therefore, the front end of the webpage can carry certain camera information to send a stream pulling request to the back end server, namely, the real-time video stream of the certain camera is requested to be played.
In the embodiment of the application, when receiving a pull stream request carrying camera information sent by a web page front end, a back end server can obtain target camera information and identification information of the web page front end from the pull stream request. The target camera information can be understood as the camera information of the camera real-time video stream to be acquired at the front end of the webpage; the identification information can be understood as a unique identification for distinguishing the front end of the web page.
Step 202, sending stream pushing information to a live stream server according to the target camera information and the identification information, enabling the live stream server to pull video stream data of the target camera to a video service platform based on the stream pushing information, and transcoding the video stream data into real-time video stream data based on a real-time message transmission protocol.
In the embodiment of the present application, the target camera information may include, but is not limited to, a target camera IP address and/or a target camera ID, or the like, or the target camera information may further include an RTSP live stream address of the target camera video stream.
For example, after obtaining the target camera information and the identification information of the web page front end carried in the stream pulling request sent by the web page front end, the stream pushing to the live streaming server may be started according to the target camera IP address and/or the target camera ID in the target camera information, the RTSP live streaming address carrying the target camera video stream, and the identification information of the web page front end, that is, the stream pushing information is sent to the live streaming server. The stream pushing information may include, but is not limited to, identification information of a front end of a web page, an RTSP live streaming address of the target camera video stream, and a streaming media transport protocol used by the front end of the web page when playing the target camera video stream. When receiving the stream pushing information, the live streaming server can acquire an RTSP live streaming address of the video stream of the target camera from the stream pushing information, and pull the video stream data of the target camera from the video service platform based on the RTSP live streaming address. The live streaming server can transcode the video streaming data of the target camera, which is pulled from the video service platform, into real-time video streaming data corresponding to the streaming media transmission protocol based on the streaming media transmission protocol used by the front end of the webpage for playing the video stream of the target camera.
In some embodiments of the present application, the Real-Time Messaging Protocol includes, but is not limited to, at least any one of RTMP (Real Time Messaging Protocol) and WebRTC (Web Real-Time Communication) protocols. The WebRTC can realize a web-based video conference, the standard is a WHATWG protocol, and the Real-Time communication (RTC) capability can be achieved by providing simple javascript through a browser.
For example, taking the real-time messaging protocol as the RTMP as an example, the live streaming server pulls the target camera video stream based on the RTSP live streaming address of the target camera video stream, wherein the target camera video stream may be transmitted based on the RTSP protocol. In order to reduce delay, when the live streaming server obtains target camera video stream data, the target camera video stream data can be transcoded into RTMP-based real-time video stream data, and an RTMP live streaming playing address of the real-time video stream data is determined.
In an embodiment of the present application, the live streaming server may send the live streaming play address to the backend server. Or, the live streaming server may further send the live streaming play address to the web front end based on the web front end interactive communication, so that the web front end pulls the corresponding real-time video streaming data from the live streaming server for playing based on the live streaming play address.
It should be noted that, the live streaming server in the embodiment of the present application may be an SRS (Simple real-time video service) live streaming server. The SRS is a simple and efficient real-time video server, and supports RTMP/WebRTC/HLS (HTTP Live Streaming, adaptive code rate Streaming media transmission protocol based on HTTP)/HTTP-FLV (code stream transfer protocol which carries load information such as RTMP on the HTTP protocol)/SRT (Secure Reliable Transport protocol).
Step 203, receiving a live streaming playing address of the real-time video streaming data sent by the live streaming server.
Optionally, the live streaming server may send the live streaming play address to the backend server, so that the backend server may receive the live streaming play address of the real-time video streaming data sent by the live streaming server.
And step 204, based on the identification information, sending the live streaming playing address to the webpage front end, and enabling the webpage front end to pull real-time video streaming data from the live streaming server for playing based on the live streaming playing address.
Optionally, the live streaming playing address of the real-time video streaming data may be sent to the front end of the webpage based on the identification information of the front end of the webpage. When the webpage front end obtains the live streaming playing address, the webpage front end can pull real-time video streaming data from a live streaming server to play based on the live streaming playing address.
In some embodiments of the present application, the number of the web page front ends may be multiple, and the multiple web page front ends may be distributed on the same large-screen display device, or the multiple web page front ends may be distributed on different large-screen display devices, respectively. For example, as shown in fig. 3, the large-screen display device has an expressway map display area and a web page front end display area. The webpage front end display area can be provided with a plurality of display sub-areas, and each display sub-area is used for placing a webpage front end, so that the purpose of split-screen display of the webpage front ends is achieved. As shown in fig. 3, because each front end of the web page has its own identification information, the front end of the web page can obtain its own requested video stream of the camera when requesting for stream pushing, thereby achieving the purpose of monitoring video streams of different cameras for multiple screens.
In some embodiments of the present application, the identification information of the web page front end may include a network identification and timestamp information of a large screen display device where the web page front end is located; the timestamp information may be current timestamp information when the pull request is first sent by the front end of the web page. The network identifier may include, but is not limited to, any one or more of a Media Access Control (MAC) Address, an IP Address, and the like.
For example, when the page of the front end of the web page is restarted, the front end of the web page may be considered to send a pull request to the back end server for the first time. At this time, the web page front end may generate an MD5 (Message Digest Algorithm MD 5) value according to the MAC address and the current millisecond value of the large screen display device where the web page front end is located, and regard the MD5 value as the identification information of the web page front end. Therefore, each request of the webpage front end carries the MD5 value to be sent to the back-end server, the MD5 value is cached by the back-end server, and the MD5 value can be used as the session ID between the webpage front end and the back-end server subsequently.
The method for playing the large-screen real-time video stream can be applied to intelligent high speed, when a webpage front end starts to request stream pushing, target camera information carried by the webpage front end based on the request and identification information of the webpage front end are obtained, the target camera real-time video stream is obtained from a live stream server according to the target camera information and the identification information of the webpage front end, the real-time video stream is real-time video stream data based on an RTMP or WebRTC transmission protocol, a live stream playing address of the target camera real-time video stream is sent to the webpage front end based on the identification information, the webpage front end pulls the real-time video stream data from the live stream server based on the live stream playing address to play, and therefore real-time video stream playing based on the webpage can be achieved, and the purpose of intelligent high-speed real-time monitoring is achieved. In addition, the real-time video stream is played by the webpage front end based on the RTMP or WebRTC transmission protocol, so that the low video delay can be ensured, and the problem of large video delay in the traditional video monitoring system can be solved.
It should be noted that when the number of cameras and the number of requests are increased, the stream pushing operation of the back-end server is also increased, and the resources and performance of the live streaming server can reach a bottleneck, so that an effective limitation measure needs to be taken, otherwise, as the occupation rates of a Central Processing Unit (CPU) and a memory are increased, the live streaming server is broken down, and the whole highway video monitoring system is in a paralysis state.
In order to solve the problem, an effective strategy is provided in the application, namely, the back-end server can cache the mapping relation between the camera identification and the webpage front-end identification, so that when the back-end server receives a pull stream request of the webpage front-end, whether the same camera is pushed or not can be judged based on target camera information, identification information and the mapping relation carried in the request, if yes, a push stream operation is not required to be added, a live stream playing address of the camera is directly sent to the webpage front-end, and the webpage front-end pulls the stream. As shown in fig. 4, the method for playing a smart high-speed large-screen real-time video stream may include, but is not limited to, the following steps.
Step 401, in response to receiving a pull stream request sent by a web page front end, obtaining target camera information and identification information of the web page front end carried in the pull stream request.
In the embodiment of the present application, step 401 may be implemented by using any one of the embodiments of the present application, which is not limited herein and is not described in detail herein.
And 402, acquiring a mapping relation between the cached camera identification and the webpage front end identification.
It should be noted that the back-end server may cache a mapping relationship between the camera identifier and the web page front-end identifier. For example, when the front end a of the web page starts to request for stream pushing, the MD5 identifier of the front end a of the web page is carried to obtain a real-time video of a certain camera, and the back end server starts to stream the live streaming server, and caches the mapping relationship between the camera id and the MD 5. The front end of the webpage pulls the video stream from the live streaming server to start playing. And by analogy, if the pull stream of one path of camera is added, the back-end server will start a push stream, and cache a mapping relation between the camera id and the MD 5. Namely the mapping relation between the camera id and the MD5 is 1 to many.
And so on, when the webpage front end B starts to request for the push stream, the above operations are performed in the same way, but during the push, the back end server may obtain the mapping relationship between the currently cached camera id and the webpage front end id, that is, the mapping relationship between the cached camera id and the MD 5.
And step 403, determining whether the same camera is pushed according to the target camera information, the identification information and the mapping relation.
Optionally, since the mapping relationship has a corresponding relationship between the camera id and the identification information, the back-end server may determine whether the same camera has been pushed based on the target camera information, the identification information, and the mapping relationship. If the same camera is pushed to flow, executing step 406; if there is no identical camera that has been pushed, then step 404 is performed.
And step 404, in response to that the same camera is not pushed, sending stream pushing information to the live stream server according to the target camera information and the identification information, enabling the live stream server to pull the video stream data of the target camera to the video service platform based on the stream pushing information, and transcoding the video stream data into real-time video stream data based on a real-time message transmission protocol.
Optionally, after determining that the same camera has not been pushed, the live streaming server may send, according to the target camera information and the identification information, stream pushing information to the live streaming server, so that the live streaming server pulls, to the video service platform, video stream data of the target camera based on the stream pushing information, and transcodes the video stream data into real-time video stream data based on the real-time message transport protocol. Step 405 may then be performed.
In the embodiments of the present application, the step "sending, according to the target camera information and the identification information, stream pushing information to a live streaming server, so that the live streaming server pulls, to a video service platform, video stream data of a target camera based on the stream pushing information, and transcodes the video stream data into real-time video stream data based on a real-time message transfer protocol" may be implemented by any one of the embodiments of the present application, and this is not limited in the embodiments of the present application and is not described again.
In some embodiments of the present application, in response to that there is the same camera that has been pushed, the step of sending the live stream play address to the front end of the web page based on the identification information, that is, step 406, is directly performed.
Step 405, receiving a live streaming playing address of real-time video streaming data sent by a live streaming server.
In the embodiment of the present application, step 405 may be implemented by using any one of the embodiments of the present application, which is not limited in this embodiment and is not described again.
And step 406, sending the live broadcast stream playing address to the front end of the webpage based on the identification information, and enabling the front end of the webpage to pull real-time video stream data from the live broadcast stream server for playing based on the live broadcast stream playing address.
In the embodiment of the present application, step 406 may be implemented by using any one of the embodiments of the present application, which is not limited in this embodiment and is not described again.
For example, when the front end a of the web page starts to request for stream pushing, the MD5 identifier of the front end a of the web page is carried to obtain a real-time video of a certain camera, and the back end server starts to stream the live streaming server, and caches the mapping relationship between the camera id and the MD 5. The front end of the webpage pulls the video stream from the live streaming server to start playing. And by analogy, if the pull stream of one path of camera is added, the back-end server will start a push stream, and cache a mapping relation between the camera id and the MD 5. That is, the mapping relationship between the camera id and the MD5 is 1 to many.
And by analogy, when the webpage front end B starts to request for stream pushing, the operations are executed in the same way, only when the stream is pushed, the back-end server needs to judge whether the same camera id is already pushed or not, if the stream pushing is started, the stream pushing operation does not need to be added, the live stream playing address of the camera is directly sent to the webpage front end B, the stream is pulled by the webpage front end B, but the mapping relation between the camera id and the MD5 is also added. Therefore, the occupation ratio of a CPU and a memory of the live streaming server can be reduced, and the live streaming server can be prevented from being crashed due to the fact that the number of cameras and the number of request books are increased.
According to the large-screen real-time video stream playing method, the normal operation of the expressway video monitoring system can be ensured, and the occupation rate of a CPU (central processing unit) and a memory of the live stream server can be reduced, so that the breakdown of the live stream server caused by the increase of the number of cameras and request books can be avoided.
In order to further ensure the robust operation of the push streaming service, optionally, in some embodiments of the present application, on the basis of the foregoing embodiment, as shown in fig. 5, the method for playing a large-screen real-time video stream in an embodiment of the present application may further include the following steps:
step 501, receiving a keep-alive request periodically sent by a front end of a webpage.
For example, after the stream pushing is started, the front end of the web page can carry the identification information to periodically send the keep-alive request to the back end server, so that the back end server can receive the keep-alive request periodically sent by the front end of the web page.
Step 502, in response to the currently received keep-alive request sent by the webpage front end, determining whether other webpage front end requests to push streams of the camera corresponding to the target camera information exist according to the mapping relationship between the cached camera identifier and the webpage front end identifier when the distance from the last received keep-alive request sent by the webpage front end exceeds the preset time length.
Optionally, when receiving the keep-alive request sent by the web page front end, the back end server may determine whether the last keep-alive request for example exceeds a preset time (e.g., 2 minutes), and if so, it means that all pull flows of the Session between the web page front end and the back end server stop. The back-end server needs to judge whether the camera push flow on the Session needs to be stopped, and when the camera does not exist in the mapping relation between the Session of the back-end server and the front end of other web pages, the push flow operation of the camera can be stopped.
And step 503, in response to that no other webpage front end request exists for pushing the stream of the camera corresponding to the target camera information, stopping the stream pushing operation of the camera corresponding to the target camera information.
Therefore, the robust operation of the stream pushing service can be further ensured by using a keep-alive mechanism.
It can be understood that the above embodiments describe the implementation manner of the intelligent high-speed large-screen real-time video stream playing method according to the embodiments of the present application from the back-end server side. The embodiment of the present application further provides another method for playing a smart high-speed large-screen real-time video stream, and an implementation of the method for playing a smart high-speed large-screen real-time video stream will be described below from a front end side of a web page. Referring to fig. 6, fig. 6 is a flowchart of another method for intelligently playing a large-screen real-time video stream at high speed according to an embodiment of the present application. It should be noted that the method for playing a large-screen real-time video stream at an intelligent high speed according to the embodiment of the present application can be applied to a front end of a web page. As shown in fig. 6, the method for playing a smart high-speed large-screen real-time video stream may include, but is not limited to, the following steps.
Step 601, sending a pull stream request of the front end of the webpage to the back end server.
In the embodiment of the application, the pull stream request carries target camera information and identification information of a webpage front end. The stream pulling request can be used for instructing a back-end server to send stream pushing information to a live stream server according to the target camera information and the identification information, so that the live stream server pulls video stream data of the target camera to a video service platform based on the stream pushing information and transcodes the video stream data into real-time video stream data based on a real-time message transmission protocol.
In some embodiments of the present application, the real-time messaging protocol includes, but is not limited to, at least any one of the RTMP and WebRTC protocols, and the like. The WebRTC can realize a web-based video conference, the standard is a WHATWG protocol, and the purpose is to achieve real-time communication capability by providing simple javascript through a browser.
In some embodiments of the present application, the identification information of the web page front end may include a network identification and timestamp information of a large screen display device where the web page front end is located; the timestamp information may be current timestamp information when the pull request is first sent by the front end of the web page. The network identifier may include, but is not limited to, any one or more of a MAC address, an IP address, and the like.
In one implementation, a pull request for a front end of a web page is sent to a back-end server in response to a page restart of the front end of the web page. For example, when the page of the front end of the web page is restarted, the front end of the web page may be considered to send a pull request to the back end server for the first time. At this time, the web page front end can generate an MD5 value through the MAC address of the large screen display device where the web page front end is located and the current millisecond value, and the MD5 value is regarded as the identification information of the web page front end. Therefore, each request of the webpage front end carries the MD5 value to be sent to the back-end server, the MD5 value is cached by the back-end server, and the MD5 value can be used as the session ID between the webpage front end and the back-end server subsequently.
In another implementation, in response to a trigger operation on a target camera on the expressway map, a webpage front end is created in a target area in a video stream playing interface on the large-screen display device, and a pull stream request of the webpage front end is sent to a back-end server. For example, as shown in fig. 3, the large-screen display device has an expressway map display area and a web page front end display area. The webpage front end display area can be provided with a plurality of display sub-areas, and each display sub-area is used for placing a webpage front end, so that the purpose of split-screen display of the webpage front ends is achieved. As shown in fig. 3, since each web page front end has its own identification information, when a user selects a trigger operation for target image capture on the expressway map, the large-screen display device may create a web page front end in a sub-area of a web page front end display area, and send a pull stream request of the web page front end to the back end server based on the web page front end.
Step 602, determining a live streaming playing address of real-time video streaming data.
In an embodiment of the application, when receiving webpage front-end stream pushing information sent by a back-end server, a live streaming server may obtain an RTSP live streaming address of a target camera video stream from the stream pushing information, and pull video streaming data of the target camera from a video service platform based on the RTSP live streaming address. The live streaming server can transcode the video streaming data of the target camera, which is pulled from the video service platform, into real-time video streaming data corresponding to the streaming media transmission protocol based on the streaming media transmission protocol used by the front end of the webpage for playing the video stream of the target camera. In an embodiment of the present application, the live streaming server may send the live streaming play address to the backend server. Or, the live streaming server may further send the live streaming play address to the web front end based on the web front end interactive communication, so that the web front end pulls the corresponding real-time video streaming data from the live streaming server for playing based on the live streaming play address.
Step 603, pulling real-time video stream data from the live streaming server for playing based on the live streaming playing address.
In one implementation, real-time video stream data may be pulled from a live stream server based on a live stream play address and played at a target area based on a web front end. The target area can be understood as an area of the front end of the web page on the large-screen display device for presenting the front end of the web page.
The method for playing the large-screen real-time video stream can be applied to intelligent high speed, when a webpage front end starts to request stream pushing, target camera information carried by the webpage front end based on the request and identification information of the webpage front end are obtained, the target camera real-time video stream is obtained from a live stream server according to the target camera information and the identification information of the webpage front end, the real-time video stream is real-time video stream data based on an RTMP or WebRTC transmission protocol, a live stream playing address of the target camera real-time video stream is sent to the webpage front end based on the identification information, the webpage front end pulls the real-time video stream data from the live stream server based on the live stream playing address to play, and therefore real-time video stream playing based on the webpage can be achieved, and the purpose of intelligent high-speed real-time monitoring is achieved. In addition, the real-time video stream is played by the webpage front end based on the RTMP or WebRTC transmission protocol, so that the low video delay can be ensured, and the problem of large video delay in the traditional video monitoring system can be solved.
Optionally, in some embodiments of the present application, a keep-alive request may be periodically sent to the back-end server, so that the back-end server determines whether to stop the stream pushing of the target camera based on the keep-alive request periodically received.
For example, after the plug flow is started, the front end of the web page may carry the identification information to periodically send the keep-alive request to the back end server, so that the back end server can receive the keep-alive request periodically sent by the front end of the web page. When receiving a keep-alive request sent by a front-end web page, a back-end server can determine whether the last keep-alive request of a current keep-alive request example exceeds a preset time (for example, 2 minutes), and if so, all pull flows of Session between the front-end web page and the back-end server stop. The back-end server needs to judge whether the camera push flow on the Session needs to be stopped, and when the camera does not exist in the mapping relation between the Session of the back-end server and the front end of other web pages, the push flow operation of the camera can be stopped. Therefore, the robust operation of the stream pushing service can be further ensured by using the keep-alive mechanism.
In the embodiments provided in the present application, the methods provided in the embodiments of the present application are introduced from the perspective of the back-end server and the front-end of the web page, respectively. In order to implement the functions in the method provided by the embodiment of the present application, the back-end server and the front-end of the web page may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Some of the above functions may be implemented by a hardware structure, a software module, or a hardware structure plus a software module.
Fig. 7 is a block diagram of a smart high-speed large-screen real-time video stream playback device according to an embodiment of the present application. As shown in fig. 7, the apparatus for playing a smart high-speed large-screen real-time video stream may include: the device comprises an acquisition module 701, a stream pushing module 702, a first receiving module 703 and a sending module 704.
The obtaining module 701 is configured to, in response to receiving a pull stream request sent by a web front end, obtain target camera information and identification information of the web front end, which are carried in the pull stream request.
In the embodiment of the application, the number of the front ends of the web pages is multiple, and the multiple front ends of the web pages are distributed on the same large-screen display device, or the multiple front ends of the web pages are distributed on different large-screen display devices.
In the embodiment of the application, the identification information comprises a network identification and timestamp information of a large-screen display device where the front end of the webpage is located; the timestamp information is the current timestamp information when the pull stream request is sent by the front end of the webpage for the first time.
The stream pushing module 702 is configured to send stream pushing information to the live stream server according to the target camera information and the identification information, so that the live stream server pulls video stream data of the target camera to the video service platform based on the stream pushing information, and transcodes the video stream data into real-time video stream data based on the real-time message transmission protocol.
In one implementation, the plug flow module 702 is specifically configured to: acquiring a mapping relation between the cached camera identification and the webpage front end identification; determining whether the same camera is pushed according to the target camera information, the identification information and the mapping relation; and responding to the situation that the same camera is pushed without streaming, and sending streaming pushing information to the live streaming server according to the target camera information and the identification information.
In the embodiments of the present application, the real-time messaging protocol includes at least any one of, but is not limited to, a real-time messaging protocol RTMP, a web real-time communication WebRTC protocol, and the like. Wherein, the real-time message transmission protocol has the characteristic of low delay.
The first receiving module 703 is configured to receive a live streaming play address of real-time video streaming data sent by a live streaming server.
The sending module 704 is configured to send the live streaming play address to the web front end based on the identification information, so that the web front end pulls real-time video streaming data from the live streaming server for playing based on the live streaming play address.
In a possible implementation manner, the sending module 704 may be further configured to directly execute the step of sending the live stream playing address to the front end of the web page based on the identification information in response to that the same camera has been pushed.
The large-screen real-time video stream playing device can be applied to intelligent high speed, when a webpage front end starts to request stream pushing, target camera information carried by the webpage front end based on a request and identification information of the webpage front end are obtained, a target camera real-time video stream is obtained from a live stream server according to the target camera information and the identification information of the webpage front end, the real-time video stream is real-time video stream data based on an RTMP or WebRTC transmission protocol, a live stream playing address of the target camera real-time video stream is sent to the webpage front end based on the identification information, the webpage front end pulls the real-time video stream data from the live stream server based on the live stream playing address to play, and therefore real-time video stream playing based on the webpage can be achieved, and the purpose of intelligent high-speed real-time monitoring is achieved. In addition, the real-time video stream is played through the webpage front end based on an RTMP or WebRTC transmission protocol, so that low video delay can be ensured, and the problem of large video delay in the traditional video monitoring system can be solved.
In order to further ensure the robust operation of the push streaming service, optionally, in some embodiments of the present application, on the basis of the foregoing embodiment, as shown in fig. 8, the large-screen real-time video stream playing apparatus according to the embodiment of the present application may further include: a second receiving module 805, a determining module 806 and a stopping module 807.
The second receiving module 805 is configured to receive a keep-alive request periodically sent by the front end of the web page;
the determining module 806 is configured to, in response to currently receiving a keep-alive request sent by the web page front end, determine whether there is a camera stream pushed by another web page front end request to the target camera information according to a mapping relationship between the cached camera identifier and the web page front end identifier when the distance from the last received keep-alive request sent by the web page front end exceeds a preset time length;
the stopping module 807 is configured to stop a stream pushing operation of a camera corresponding to the target camera information in response to that no other web page front-end request exists for pushing a stream to the camera corresponding to the target camera information. Wherein 801-804 in fig. 8 and 701-704 in fig. 7 have the same function and structure.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
The embodiment of the application also provides another large-screen real-time video stream playing device for intelligent high speed.
Fig. 9 is a block diagram of another smart high-speed large-screen real-time video stream playback device according to an embodiment of the present application. As shown in fig. 9, the apparatus for playing a smart high-speed large-screen real-time video stream may include: a first sending module 901, a determining module 902 and a playing module 903.
The first sending module 901 is configured to send a pull request of a front end of a web page to a backend server; the stream pulling request carries target camera information and identification information of a webpage front end, and is used for indicating a rear-end server to send stream pushing information to a live stream server according to the target camera information and the identification information, enabling the live stream server to pull video stream data of a target camera to a video service platform based on the stream pushing information, and transcoding the video stream data into real-time video stream data based on a real-time message transmission protocol.
In the embodiment of the application, the number of the front ends of the web pages is multiple, and the multiple front ends of the web pages are distributed on the same large-screen display device, or the multiple front ends of the web pages are distributed on different large-screen display devices.
In the embodiment of the application, the identification information comprises a network identification and timestamp information of a large-screen display device where the front end of the webpage is located; the timestamp information is the current timestamp information when the pull stream request is sent by the front end of the webpage for the first time.
In an embodiment of the present application, the real-time message transfer protocol at least includes any one of a real-time message transfer protocol RTMP and a web real-time communication WebRTC protocol.
In one implementation, the first sending module 901 sends a pull request of the front end of the web page to the backend server in response to a page restart of the front end of the web page.
In another implementation, the first sending module 901 creates a front end of a web page in a target area in a video stream playing interface on a large-screen display device in response to a triggering operation on a target camera on an expressway map, and sends a pull stream request of the front end of the web page to a backend server.
The determining module 902 is configured to determine a live stream playing address of the real-time video stream data.
The playing module 903 is configured to pull real-time video stream data from a live streaming server for playing based on a live streaming playing address. In one implementation, the play module 903 may pull the real-time video stream data from the live stream server based on the live stream play address and play the real-time video stream data based on the web page front end at the target area.
The large-screen real-time video stream playing device can be applied to intelligent high speed, when a webpage front end starts to request stream pushing, target camera information carried by the webpage front end based on a request and identification information of the webpage front end are obtained, a target camera real-time video stream is obtained from a live stream server according to the target camera information and the identification information of the webpage front end, the real-time video stream is real-time video stream data based on an RTMP or WebRTC transmission protocol, a live stream playing address of the target camera real-time video stream is sent to the webpage front end based on the identification information, the webpage front end pulls the real-time video stream data from the live stream server based on the live stream playing address to play, and therefore real-time video stream playing based on the webpage can be achieved, and the purpose of intelligent high-speed real-time monitoring is achieved. In addition, the real-time video stream is played by the webpage front end based on the RTMP or WebRTC transmission protocol, so that the low video delay can be ensured, and the problem of large video delay in the traditional video monitoring system can be solved.
In order to further ensure the robust operation of the push streaming service, optionally, in some embodiments of the present application, on the basis of the foregoing embodiment, as shown in fig. 10, the large-screen real-time video stream playing apparatus according to the embodiment of the present application may further include: a second sending module 1004. The second sending module is used for sending the keep-alive request to the back-end server periodically, and enabling the back-end server to determine whether the stream pushing of the target camera needs to be stopped or not based on the keep-alive request received periodically. Wherein 1001-1003 in fig. 10 and 901-903 in fig. 9 have the same function and structure.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
To facilitate a clearer understanding of the present application by those skilled in the art, the following describes an interaction process of the lower highway video monitoring system in detail with reference to fig. 11.
As shown in fig. 11, the backend server 1102 acquires the camera information through the video service platform 1104 and stores the camera information in the database DB, where the camera information includes information such as a camera IP address, a camera ID, and an RTSP live streaming address (S1). The web front-end 1101 initiates a request to obtain all camera information from the back-end server 1102. The web page front end 1101 may initiate a pull request to the back end server 1102 carrying target camera information (S2). The back-end server 1102 starts streaming to the live streaming server 1103 by a request initiated by the web front-end 1101 according to the target camera information and carrying the RTSP live streaming address (S3). The live streaming server 1103 starts pulling the video stream to the video service platform 1104 and transcodes into the specified RTMP protocol (S4). The front-end 1101 obtains the RTMP live streaming playing address of the camera video stream from the back-end server 1102 (S5). The web page front end 1101 pulls the corresponding real-time video stream data from the live streaming server 1103 based on the RTMP live streaming playback address and plays it (S7).
When the number of cameras and the number of requests are increased, the number of pushed streams of the server is increased, the resources and the performance of the live streaming server can reach a bottleneck, effective limiting measures need to be taken, otherwise, the live streaming server can crash along with the increase of the occupation ratio of a CPU (Central processing Unit) and a memory, and the whole video playing system can be in a paralyzed state. Therefore, in order to solve this problem, an effective set of strategies is proposed. The method comprises the following specific steps:
when the interface of the front end 1101 of the web page is restarted, as a first request, MD5 is generated by the MAC address + current millisecond value, such as 3c 06.
When the webpage front end A starts to request for stream pushing, the MD5 identification is carried to acquire a real-time video of a certain camera, the rear end starts to push the stream to a live stream server, meanwhile, the mapping relation between camera _ id and MD5 is cached, and the webpage front end A pulls the video stream from the live stream server to start playing. And the like, if the pull stream of one path of camera is added, the back end will open a push stream, and cache a mapping relation between camera _ id and MD 5. That is, the mapping relationship between MD5 and camera _ id is many pairs 1.
And so on, when the webpage front end B starts to request for stream pushing, the operations are executed in the same way, when pushing, the back end server needs to judge whether the same camera _ id is already pushed or not, if the stream pushing starts, the stream pushing operation does not need to be added, the live stream playing address is directly sent to the webpage front end B, the stream is pulled by the webpage front end B, but the mapping relation between MD5 and camera _ id is also added.
In order to further ensure the robust operation of the streaming service, after the streaming service is started, the webpage front end carries the MD5 to periodically send a keep-alive request to the back-end server, the back-end server judges that when the keep-alive request is more than 2 minutes away from the last request, all the streaming of the Session is stopped, the back-end server needs to judge whether the streaming of the camera on the Session needs to be stopped, and when the camera does not exist in the mapping of other sessions, the streaming operation can be stopped.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 12 is a block diagram of an electronic device according to an embodiment of the present application, which illustrates a method for playing a large-screen real-time video stream. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 12, the electronic apparatus includes: one or more processors 1201, memory 1202, and interfaces for connecting the various components, including a high speed interface and a low speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 12 illustrates an example of one processor 1201.
Memory 1202 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by at least one processor, so that the at least one processor executes the method for playing the large-screen real-time video stream provided by the application. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the large screen real-time video stream playback method provided by the present application.
The memory 1202, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the large screen real-time video stream playing method in the embodiments of the present application. The processor 1201 executes various functional applications of the server and data processing by running non-transitory software programs, instructions and modules stored in the memory 1202, so as to implement the large-screen real-time video stream playing method in the above method embodiment.
The memory 1202 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the electronic device for large-screen real-time video stream playback, and the like. Further, the memory 1202 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 1202 may optionally include memory located remotely from processor 1201, which may be connected to XXX electronic devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device for implementing the large-screen real-time video stream playing method may further include: an input device 1203 and an output device 1204. The processor 1201, the memory 1202, the input device 1203, and the output device 1204 may be connected by a bus or other means, and the bus connection is exemplified in fig. 12.
The input device 1203 may receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic device for large screen real-time video streaming, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, and the like. The output devices 1204 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (25)

1. A large-screen real-time video stream playing method for intelligent high speed includes:
responding to a pull stream request sent by a webpage front end, and acquiring target camera information carried in the pull stream request and identification information of the webpage front end;
sending stream pushing information to a live stream server according to the target camera information and the identification information, enabling the live stream server to pull video stream data of the target camera to a video service platform based on the stream pushing information, and transcoding the video stream data into real-time video stream data based on a real-time message transmission protocol;
receiving a live streaming playing address of the real-time video streaming data sent by the live streaming server;
based on the identification information, sending the live streaming playing address to the webpage front end, and enabling the webpage front end to pull the real-time video streaming data from the live streaming server for playing based on the live streaming playing address;
the identification information comprises a network identification and timestamp information of a large-screen display device where the front end of the webpage is located; the timestamp information is the current timestamp information when the pull stream request is sent by the front end of the webpage for the first time;
the sending of stream pushing information to a live stream server according to the target camera information and the identification information comprises:
acquiring a mapping relation between the cached camera identification and the webpage front end identification;
determining whether the same camera is pushed according to the target camera information, the identification information and the mapping relation;
responding to the situation that the same camera is pushed without streaming, and sending streaming pushing information to the live streaming server according to the target camera information and the identification information;
the method further comprises the following steps: and receiving a keep-alive request sent by the webpage front end, and determining whether the push flow of the target camera needs to be stopped or not based on the received keep-alive request.
2. The method of claim 1, wherein the web page front ends are multiple, and the multiple web page front ends are distributed on the same large-screen display device, or the multiple web page front ends are distributed on different large-screen display devices.
3. The method of claim 1, further comprising:
and responding to the situation that the same camera is pushed to flow, and directly executing the step of sending the live streaming playing address to the front end of the webpage based on the identification information.
4. The method of claim 1, further comprising:
receiving a keep-alive request periodically sent by the front end of the webpage;
responding to a keep-alive request sent by the webpage front end currently received, determining whether other webpage front end requests push streams to a camera corresponding to the target camera information exist according to a mapping relation between the cached camera identification and the webpage front end identification when the distance from the last keep-alive request sent by the webpage front end exceeds a preset time;
and responding to the situation that other webpage front ends do not request to carry out stream pushing on the camera corresponding to the target camera information, and stopping the stream pushing operation of the camera corresponding to the target camera information.
5. The method according to any one of claims 1 to 4, wherein the real-time messaging protocol comprises at least any one of a real-time messaging protocol (RTMP) and a web real-time communication (WebRTC).
6. A method for playing a smart high-speed large-screen real-time video stream comprises the following steps:
sending a pull flow request of a webpage front end to a back end server; the stream pulling request carries target camera information and identification information of the webpage front end, and is used for indicating the back-end server to send stream pushing information to a live stream server according to the target camera information and the identification information, so that the live stream server pulls video stream data of the target camera to a video service platform based on the stream pushing information and transcodes the video stream data into real-time video stream data based on a real-time message transmission protocol;
determining a live broadcast stream playing address of the real-time video stream data;
based on the live streaming playing address, pulling the real-time video streaming data from the live streaming server for playing;
the identification information comprises a network identification and timestamp information of a large-screen display device where the front end of the webpage is located; the timestamp information is the current timestamp information when the pull stream request is sent by the front end of the webpage for the first time;
periodically sending a keep-alive request to the back-end server, and enabling the back-end server to determine whether the stream pushing of the target camera needs to be stopped or not based on the periodically received keep-alive request;
the back-end server sends stream pushing information to a live stream server according to the target camera information and the identification information, and the method comprises the following steps:
acquiring a mapping relation between the cached camera identification and the webpage front end identification;
determining whether the same camera is pushed according to the target camera information, the identification information and the mapping relation;
and responding to the situation that the same camera is not pushed, and sending stream pushing information to the live stream server according to the target camera information and the identification information.
7. The method of claim 6, wherein the number of the web page front ends is multiple, and the multiple web page front ends are distributed on the same large-screen display device, or the multiple web page front ends are distributed on different large-screen display devices.
8. The method of claim 6, wherein the sending the pull request of the front end of the web page to the back end server comprises:
and sending a pull flow request of the front end of the webpage to a back end server in response to the page restart of the front end of the webpage.
9. The method of claim 6, wherein the sending a pull request to a backend server for a front end of a web page comprises:
and responding to the trigger operation of a target camera on the expressway map, creating the webpage front end in a target area in a video stream playing interface on a large-screen display device, and sending a stream pulling request of the webpage front end to the back-end server.
10. The method of claim 9, wherein the pulling the real-time video stream data from the live streaming server for playback based on the live streaming playback address comprises:
pulling the real-time video stream data from the live stream server based on the live stream playing address;
playing the real-time video stream data based on the webpage front end at the target area.
11. The method according to any one of claims 6 to 10, the real-time messaging protocol comprising at least any one of a real-time messaging protocol (RTMP) and a web real-time communication (WebRTC).
12. A large screen real-time video stream playback device for smart high speed comprising:
the acquisition module is used for responding to a received pull stream request sent by a webpage front end and acquiring target camera information carried in the pull stream request and identification information of the webpage front end;
the stream pushing module is used for sending stream pushing information to a live stream server according to the target camera information and the identification information, enabling the live stream server to pull video stream data of the target camera to a video service platform based on the stream pushing information, and transcoding the video stream data into real-time video stream data based on a real-time message transmission protocol;
the first receiving module is used for receiving a live streaming playing address of the real-time video streaming data sent by the live streaming server;
a sending module, configured to send the live streaming play address to the web front end based on the identification information, so that the web front end pulls the real-time video stream data from the live streaming server for playing based on the live streaming play address;
the identification information comprises a network identification and timestamp information of a large-screen display device where the front end of the webpage is located; the timestamp information is the current timestamp information when the pull stream request is sent by the front end of the webpage for the first time;
wherein, the plug flow module is specifically configured to:
acquiring a mapping relation between the cached camera identification and the webpage front end identification;
determining whether the same camera is pushed according to the target camera information, the identification information and the mapping relation;
responding to the situation that the same camera is pushed without streaming, and sending streaming pushing information to the live streaming server according to the target camera information and the identification information;
the device further comprises: and receiving a keep-alive request sent by the webpage front end, and determining whether the push flow of the target camera needs to be stopped or not based on the received keep-alive request.
13. The apparatus of claim 12, wherein the plurality of web page front ends are distributed on a same large screen display device, or are distributed on different large screen display devices.
14. The apparatus of claim 12, wherein the means for transmitting is further configured to:
and responding to the situation that the same camera is pushed to flow, and directly executing the step of sending the live streaming playing address to the front end of the webpage based on the identification information.
15. The apparatus of claim 12, further comprising:
the second receiving module is used for receiving the keep-alive request periodically sent by the webpage front end;
the determining module is used for responding to the currently received keep-alive request sent by the webpage front end, determining whether other webpage front end requests push streams to the camera corresponding to the target camera information according to the mapping relation between the cached camera identification and the webpage front end identification when the distance from the last received keep-alive request sent by the webpage front end exceeds the preset time length;
and the stopping module is used for responding to the situation that no other webpage front end requests push streams to the camera corresponding to the target camera information, and stopping the pushing stream operation of the camera corresponding to the target camera information.
16. The apparatus according to any one of claims 12 to 15, wherein the real-time messaging protocol comprises at least any one of a real-time messaging protocol RTMP and a web real-time communication WebRTC protocol.
17. A large screen real-time video stream playback device for smart high speed, comprising:
the first sending module is used for sending a pull flow request of the front end of the webpage to the back-end server; the stream pulling request carries target camera information and identification information of the front end of the webpage, and is used for indicating the back-end server to send stream pushing information to a live streaming server according to the target camera information and the identification information, so that the live streaming server pulls video stream data of the target camera to a video service platform based on the stream pushing information and transcodes the video stream data into real-time video stream data based on a real-time message transmission protocol;
the determining module is used for determining a live broadcast stream playing address of the real-time video stream data;
the playing module is used for pulling the real-time video stream data from the live stream server to play based on the live stream playing address;
the identification information comprises a network identification and timestamp information of a large-screen display device where the front end of the webpage is located; the timestamp information is the current timestamp information when the pull stream request is sent by the front end of the webpage for the first time;
the second sending module is used for sending a keep-alive request to the back-end server periodically, and enabling the back-end server to determine whether the stream pushing of the target camera needs to be stopped or not based on the keep-alive request received periodically;
the back-end server sends stream pushing information to a live stream server according to the target camera information and the identification information, and the method comprises the following steps:
acquiring a mapping relation between the cached camera identification and the webpage front end identification;
determining whether the same camera is pushed according to the target camera information, the identification information and the mapping relation;
and responding to the situation that the same camera is pushed without streaming, and sending streaming pushing information to the live streaming server according to the target camera information and the identification information.
18. The apparatus of claim 17, wherein the plurality of web page front ends are distributed on a same large screen display device, or the plurality of web page front ends are distributed on different large screen display devices.
19. The apparatus of claim 17, wherein the first transmitting module is specifically configured to:
and responding to the page restart of the front end of the webpage, and sending a pull flow request of the front end of the webpage to a back end server.
20. The apparatus of claim 17, wherein the first transmitting module is specifically configured to:
and responding to the triggering operation of a target camera on the expressway map, creating the webpage front end in a target area in a video stream playing interface on a large-screen display device, and sending a stream pulling request of the webpage front end to the back-end server.
21. The apparatus according to claim 20, wherein the playing module is specifically configured to:
pulling the real-time video stream data from the live stream server based on the live stream playing address;
playing the real-time video stream data based on the webpage front end at the target area.
22. The apparatus according to any one of claims 17 to 21, the real-time message transfer protocol comprising at least any one of a real-time message transfer protocol, RTMP, and a web real-time communication, webRTC, protocol.
23. A highway video surveillance system comprising:
the large-screen real-time video stream playing device according to any one of claims 12 to 16;
the large-screen real-time video stream playing device according to any one of claims 17 to 22;
a live streaming server and a video service platform.
24. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of playing a large screen real-time video stream of any one of claims 1 to 5 or the method of playing a large screen real-time video stream of any one of claims 6 to 11.
25. A non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the large screen real-time video stream playing method of any one of claims 1 to 5 or the large screen real-time video stream playing method of any one of claims 6 to 11.
CN202111513816.0A 2021-12-10 2021-12-10 Intelligent high-speed large-screen real-time video stream playing method and device Active CN114363643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111513816.0A CN114363643B (en) 2021-12-10 2021-12-10 Intelligent high-speed large-screen real-time video stream playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111513816.0A CN114363643B (en) 2021-12-10 2021-12-10 Intelligent high-speed large-screen real-time video stream playing method and device

Publications (2)

Publication Number Publication Date
CN114363643A CN114363643A (en) 2022-04-15
CN114363643B true CN114363643B (en) 2022-12-30

Family

ID=81099948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111513816.0A Active CN114363643B (en) 2021-12-10 2021-12-10 Intelligent high-speed large-screen real-time video stream playing method and device

Country Status (1)

Country Link
CN (1) CN114363643B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002081B (en) * 2022-05-30 2023-12-26 重庆紫光华山智安科技有限公司 Media stream transmission method and related device
CN115484494B (en) * 2022-09-15 2024-04-02 云控智行科技有限公司 Digital twin video stream processing method, device and equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110233984A (en) * 2018-03-06 2019-09-13 北京视联动力国际信息技术有限公司 A kind of monitoring system and method based on view networking
CN110446010A (en) * 2019-08-02 2019-11-12 江西航天鄱湖云科技有限公司 Video monitoring method, device, storage medium, server and system based on web
CN210721850U (en) * 2019-11-18 2020-06-09 河南省高速公路联网监控收费通信服务有限公司 Highway road conditions intellectual detection system
CN111464816B (en) * 2020-04-03 2020-11-17 广东利通科技投资有限公司 Expressway video monitoring system
CN111404966B (en) * 2020-04-03 2020-12-15 广东利通科技投资有限公司 Data processing method of expressway video monitoring system
CN112367531B (en) * 2020-10-30 2021-08-27 腾讯科技(深圳)有限公司 Video stream display method, processing method and related equipment
CN113473086B (en) * 2021-07-06 2022-09-06 阿波罗智联(北京)科技有限公司 Video playing method and device, electronic equipment and intelligent high-speed large screen

Also Published As

Publication number Publication date
CN114363643A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
JP6698755B2 (en) Streaming segmented content
CN114363643B (en) Intelligent high-speed large-screen real-time video stream playing method and device
US11895342B2 (en) Video analysis method and system
US8489760B2 (en) Media file storage format and adaptive delivery system
US8190674B2 (en) Variable rate media delivery system
US8219711B2 (en) Dynamic variable rate media delivery system
CN110933517B (en) Code rate switching method, client and computer readable storage medium
WO2015120766A1 (en) Video optimisation system and method
EP3059945A1 (en) Method and system for video surveillance content adaptation, and central server and device
JP7465370B2 (en) Information sharing method, device, electronic device, and storage medium
KR101942269B1 (en) Apparatus and method for playing back and seeking media in web browser
US20240121455A1 (en) Method, apparatus, electronic device and storage medium for video bitrate switching
CN110582012A (en) Video switching method, video processing device and storage medium
CN104010228A (en) Apparatus and method for level-based self-adjusting peer-to-peer media streaming
CN112104893A (en) Video stream management method and device for realizing plug-in-free playing of webpage end
EP4013018A2 (en) Method for transmitting stream, streaming server and streaming system
CN112044078A (en) Access method, device, equipment and storage medium for virtual scene application
CN102802041B (en) Implement method for intelligent streaming media server supporting a plurality of real-time dynamic data sources
CN112235642B (en) Video data processing method, device, equipment and storage medium
CN105812839B (en) Video stream data acquisition, page data transmission method, system and network server
US10638202B1 (en) State synchronization and management for two-way connected consumer electronic devices
CN113824689B (en) Edge computing network, data transmission method, device, equipment and storage medium
US20150326686A1 (en) Method, Apparatus and System for Processing User Generated Content
CN114338830B (en) Data transmission method, device, computer readable storage medium and computer equipment
CN115460184A (en) Methods, systems, and media for delivering non-manifest streaming media content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant