CN112188245B - Front-end camera real-time video-on-demand method and device and electronic equipment - Google Patents

Front-end camera real-time video-on-demand method and device and electronic equipment Download PDF

Info

Publication number
CN112188245B
CN112188245B CN202011068974.5A CN202011068974A CN112188245B CN 112188245 B CN112188245 B CN 112188245B CN 202011068974 A CN202011068974 A CN 202011068974A CN 112188245 B CN112188245 B CN 112188245B
Authority
CN
China
Prior art keywords
real
time video
demand
http
sip
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
CN202011068974.5A
Other languages
Chinese (zh)
Other versions
CN112188245A (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.)
Wuhan Zhongke Tongda High New Technology Co Ltd
Original Assignee
Wuhan Zhongke Tongda High New 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 Wuhan Zhongke Tongda High New Technology Co Ltd filed Critical Wuhan Zhongke Tongda High New Technology Co Ltd
Priority to CN202011068974.5A priority Critical patent/CN112188245B/en
Publication of CN112188245A publication Critical patent/CN112188245A/en
Application granted granted Critical
Publication of CN112188245B publication Critical patent/CN112188245B/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/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/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/21805Source of audio or video content, e.g. local disk arrays enabling multiple viewpoints, e.g. using a plurality of cameras
    • 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
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44213Monitoring of end-user related data
    • H04N21/44222Analytics of user selections, e.g. selection of programs or purchase activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Social Psychology (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a front-end camera real-time video on demand method, a device and electronic equipment, based on the method, a data server firstly receives an http on demand request sent by a traffic police terminal on a on demand selection page based on selection operation, converts the http on demand request into an sip on demand request which can be identified by a front-end camera, synchronously processes an http state identifier and an sip state identifier corresponding to the two types of on demand requests, sends the sip on demand request to a target camera, synchronously updates the identifier contents of the sip state identifier and the http state identifier according to the content of the sip on demand response returned by the front-end camera, generates a corresponding http on demand response to be returned to the traffic police terminal when the identifier contents are the on demand request, sends real-time video uploaded by the target camera to target playing equipment according to a playing address, and the whole on demand process can be finished by the traffic police terminal only on a web browser or a platform, thus ensuring safety.

Description

Front-end camera real-time video-on-demand method and device and electronic equipment
Technical Field
The application relates to the field of intelligent traffic, in particular to a front-end camera real-time video-on-demand method and device and electronic equipment.
Background
At present, when most security cameras in the market play real-time video on demand through a front-end camera, in order to simplify the play-on-demand process, a front-end camera real-time play-on-demand signaling is generally packaged into a signaling in an SDK (Software Development Kit) format, and then the traffic police system calls the SDK to play on demand, wherein the SDK is developed and manufactured by an external manufacturer, and a real-time video shot by the front-end camera can be acquired by personnel in a non-traffic police system, namely, some potential safety hazards exist in the real-time video on demand mode.
Therefore, the existing front-end camera real-time video-on-demand method has the technical problem of low safety, and needs to be improved.
Content of application
The embodiment of the application provides a real-time video-on-demand method for a front-end camera, which is used for improving the safety of the video-on-demand process of the front-end camera.
In order to solve the above technical problem, an embodiment of the present application provides the following technical solutions:
the application provides a real-time video on demand method of front end camera, is applicable to wisdom traffic system, wisdom traffic system includes front end camera, data server, playback devices and traffic police terminal, the front end camera is based on the sip agreement is connected data server, the traffic police terminal with playback devices inserts based on the http protocol data server, the real-time video on demand method of front end camera is applied to data server, the real-time video on demand method of front end camera includes:
receiving an http real-time video on demand request sent by the traffic police terminal based on an http protocol; the http real-time video-on-demand request comprises that after the traffic police terminal receives a trigger instruction of on-demand real-time video, an on-demand selection page comprising a playing equipment selection control and a front-end camera selection control is displayed, target playing equipment is determined according to selection operation aiming at the playing equipment selection control, a target camera is determined according to selection operation aiming at the front-end camera selection control, and the http real-time video-on-demand request conforming to an http protocol is generated according to a terminal identifier of the traffic police terminal, a playing address of the target playing equipment and a target camera identifier of the target camera;
generating an sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the target camera identification, generating an http state identification corresponding to the http real-time video-on-demand request, synchronizing the sip state identification corresponding to the sip real-time video-on-demand request and identification contents of the http state identification and the sip state identification in real time, wherein the identification contents comprise an on-demand request completion state;
sending the sip real-time video on demand request to a target camera corresponding to the target camera identification based on an sip protocol, receiving an sip real-time video on demand response returned by the target camera based on the sip protocol, and synchronously updating the identification contents of the sip state identification and the http state identification according to the content of the sip real-time video on demand response;
when the identification content of the http state identification is that the video-on-demand request is completed, generating an http real-time video-on-demand response corresponding to the http state identification, and returning the http real-time video-on-demand response to the traffic police terminal based on an http protocol according to the terminal identification;
and sending the real-time video uploaded by the target camera to the target playing equipment according to the playing address.
Simultaneously, this application embodiment still provides a real-time video on demand device of front end camera, is applicable to wisdom traffic system, wisdom traffic system includes front end camera, data server, broadcast equipment and traffic police terminal, the front end camera is connected based on the sip agreement data server, the traffic police terminal with broadcast equipment inserts based on the http protocol data server, the real-time video on demand device of front end camera sets up in the data server, the real-time video on demand device of front end camera includes:
the receiving module is used for receiving an http real-time video on demand request sent by the traffic police terminal based on an http protocol; the http real-time video-on-demand request comprises that after the traffic police terminal receives a trigger instruction of on-demand real-time video, an on-demand selection page comprising a playing equipment selection control and a front-end camera selection control is displayed, target playing equipment is determined according to selection operation aiming at the playing equipment selection control, a target camera is determined according to selection operation aiming at the front-end camera selection control, and the http real-time video-on-demand request conforming to an http protocol is generated according to a terminal identifier of the traffic police terminal, a playing address of the target playing equipment and a target camera identifier of the target camera;
the first synchronization module is used for generating an sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the target camera identification, generating an http state identification corresponding to the http real-time video-on-demand request, synchronizing the http state identification and the sip state identification in real time, and enabling the identification content to comprise an on-demand request completion state;
the second synchronization module is used for sending the sip real-time video-on-demand request to the target camera corresponding to the target camera identification based on an sip protocol, receiving an sip real-time video-on-demand response returned by the target camera based on the sip protocol, and synchronously updating the identification contents of the sip state identification and the http state identification according to the content of the sip real-time video-on-demand response;
a returning module, configured to generate an http real-time video on demand response corresponding to the http state identifier when the identifier content of the http state identifier is that an on demand request is completed, and return the http real-time video on demand response to the traffic police terminal based on an http protocol according to the terminal identifier;
and the sending module is used for sending the real-time video uploaded by the target camera to the target playing equipment according to the playing address.
The application also provides an electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory to perform any operation in the front-end camera real-time video-on-demand method.
Has the advantages that: the embodiment of the application provides a front-end camera real-time video on demand method, a device and electronic equipment, which are suitable for a smart traffic system, wherein the smart traffic system comprises front-end equipment, a data server, playing equipment and a traffic police terminal, the front-end equipment is connected with the data server based on a sip protocol, the traffic police terminal and the playing equipment are accessed into the data server based on an http protocol, and the real-time video on demand method is applied to the data server. The operation is simple, the whole on-demand process traffic police terminal can be completed only on a web browser or a platform, and special SDK software is not required to be called, so that the safety is ensured, and the convenience of video acquisition is improved. In the protocol conversion process, the identification contents of the sip state identification and the http state identification are synchronized, so that the generated sip real-time video on demand response can be converted into the http real-time video on demand response in time, and the response returning speed is improved.
Drawings
The technical solutions and other advantages of the present application will become apparent from the following detailed description of specific embodiments of the present application when taken in conjunction with the accompanying drawings.
Fig. 1 is a schematic view of a scene of a front-end camera real-time video-on-demand system according to an embodiment of the present disclosure.
Fig. 2 is a schematic flow chart of a front-end camera real-time video-on-demand method according to an embodiment of the present application.
Fig. 3 is a schematic view of a video-on-demand selection page of a traffic police terminal in the front-end camera real-time video-on-demand method provided in the embodiment of the present application.
Fig. 4 is a schematic diagram of a first model of a front-end camera real-time video-on-demand method according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a second model of a front-end camera real-time video-on-demand method according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a third model of a real-time video-on-demand method for a front-end camera according to an embodiment of the present application.
Fig. 7 is a schematic view of a video playing page of a target playing device in a front-end camera real-time video-on-demand method according to an embodiment of the present application.
Fig. 8 is a schematic structural diagram of a front-end camera real-time video-on-demand device according to an embodiment of the present application.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the embodiment of the present application, the intelligent traffic system is an integrated network system that is constructed by comprehensively applying technologies such as audio/video monitoring, communication, computer network, system integration, etc. and has functions of information acquisition, transmission, exchange, control, display, storage, processing, etc. and can realize interconnection, intercommunication, and mutual control between different devices and systems in the traffic field for the purpose of maintaining national security and social stability and preventing and fighting against illegal criminal activities. The intelligent traffic system comprises a front-end camera, a data server, playing equipment and a traffic police terminal, wherein the front-end camera is connected with the data server based on an sip protocol, and the traffic police terminal and the playing equipment are accessed into the data server based on an http protocol.
In the embodiment of the application, the front-end camera refers to a camera which is installed in a monitoring field in an intelligent traffic system and is used for information acquisition, coding, processing, storage, transmission and safety control.
In the embodiment of the present application, the traffic police terminal refers to a client device registered and authorized by the intelligent transportation system and having an operation requirement on data and devices in the system, and may specifically include a client for traffic police and a client for developers.
In this embodiment of the present application, the playback device refers to a device that can receive a video uploaded by a front-end camera and support playing of videos in multiple formats.
The embodiment of the application provides a method and a device for real-time video on demand of a front-end camera and electronic equipment. The front-end camera real-time video-on-demand device can be integrated in electronic equipment, and the electronic equipment can be a server or a terminal and the like.
Referring to fig. 1, fig. 1 is a scene schematic diagram of a front-end camera real-time video-on-demand system according to an embodiment of the present disclosure, where the system may include terminals and servers, and the terminals, the servers, and the terminals and the servers are connected and communicated through internet composed of various gateways, and the like, where the application scene includes a traffic police terminal 11, a data server 12, a front-end camera 13, and a playing device 14; wherein:
the traffic police terminal 11 and the playing device 14 include, but are not limited to, a tablet Computer, a notebook Computer, a Personal Computer (PC), a mini box, or other devices;
the data server 12 comprises a local server and/or a remote server and the like;
the front-end camera 13 includes video and image capture equipment disposed at the monitoring site.
The traffic police terminal 11, the data server 12, the front-end camera 13 and the playing device 14 are located in a wireless network or a wired network, the front-end camera 13 is connected with the data server 12 based on an sip protocol, the traffic police terminal 11 and the playing device 14 are accessed into the data server 12 based on an http protocol, so that data interaction between the four is realized, wherein:
the traffic police terminal 11 obtains a playing address from the playing device 14 based on the selection operation on the on-demand selection page, the data server 12 receives an http real-time video-on-demand request sent by the traffic police terminal 11 on the on-demand selection page based on an http protocol, then generates a corresponding sip real-time video-on-demand request, synchronizes the http status identifier and the identification content of the sip status identifier corresponding to the traffic police terminal 11 on the on-demand selection page in real time, selects a target camera from the front-end camera 13 based on the sip protocol and sends the sip real-time video-on-demand request to the target camera, receives a sip real-time video-on-demand response returned by the target camera based on the sip protocol, then synchronously updates the identification content of the sip status identifier and the http status identifier according to the content of the sip real-time video-on-demand response, generates an http real-time video-on-demand response corresponding to the http status identifier when the identification content of the http status identifier is that the on-demand request is completed, and finally, returning http real-time video on demand response to the traffic police terminal 11 based on the http protocol, and sending the real-time video uploaded by the target camera to the target playing device, thereby realizing the real-time video on demand of the front-end camera on the page.
It should be noted that the system scenario diagram shown in fig. 1 is only an example, and the server and the scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation on the technical solution provided in the embodiment of the present application, and as a person having ordinary skill in the art knows, with the evolution of the system and the occurrence 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 are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
Referring to fig. 2, fig. 2 is a schematic flowchart of a front-end camera real-time video-on-demand method according to an embodiment of the present application, where the method includes:
s201: receiving an http real-time video on demand request sent by the traffic police terminal based on an http protocol; the http real-time video-on-demand request comprises the steps that after the traffic police terminal receives a trigger instruction of on-demand real-time video, an on-demand selection page comprising a playing device selection control and a front-end camera selection control is displayed, a target playing device is determined according to the selection operation aiming at the playing device selection control, a target camera is determined according to the selection operation aiming at the front-end camera selection control, and the http real-time video-on-demand request conforming to an http protocol is generated according to a terminal identification of the traffic police terminal, a playing address of the target playing device and a target camera identification of the target camera.
The traffic police terminal sends an http real-time video on demand request to the data server based on an http protocol, when the request is sent, a sender can be an internal person of a public security system and used for obtaining real-time videos of a monitoring place to judge and process illegal behaviors, and can also be a video on demand developer with access authority and used for on demand of the real-time videos of the front-end camera and debugging on-demand parameters and on-demand related equipment according to on-demand responses. The http real-time video on demand request can be sent through a video monitoring platform which is developed independently, or can be directly sent through a web browser and received by a data server. The request under the http protocol is a one-way channel request from the traffic police terminal to the data server.
The http real-time video-on-demand request carries a terminal identifier, a playing address of the target playing device and a target camera identifier, wherein the terminal identifier comprises an IP address and a port of the traffic police terminal, and the target camera identifier comprises an ID of the target camera. In a general case, the target playback device and the traffic police terminal are the same device, that is, the traffic police terminal initiating the request also serves as the target playback device receiving the real-time video. The target playing device and the traffic police terminal can also be different devices, namely the traffic police terminal which initiates the request and the target playing device which receives the real-time video are different devices which are registered in the intelligent traffic system. In addition, there may be a plurality of target playback devices, and the plurality of target playback devices may include a traffic police terminal and other playback devices, or may all be other playback devices.
After receiving a trigger instruction for requesting the real-time video, the traffic police terminal displays an on-demand selection page comprising a playing device selection control and a front-end camera selection control, and then performs corresponding selection operation on the on-demand selection page to determine which camera in a monitoring place wants to watch the real-time video shot by the camera and which playing device plays the real-time video. When the playing device selection control is triggered, a list of all registered playing devices is generated, and then one or some playing devices can be selected as target playing devices, and the traffic police terminal initiating the request or the playing device selected by the last request can be set as the default target playing device in the playing device list. When the front-end camera selection control is triggered, directories of all registered front-end cameras are generated, one of the directories can be selected as a target camera, and the front-end camera selected by the previous request can be set as a default target camera in the front-end camera directory.
And after corresponding selection operation is carried out on the on-demand selection page, generating an http real-time video on demand request which accords with an http protocol according to the terminal identification of the traffic police terminal, the playing address of the target playing device and the target camera identification of the target camera.
S202: and generating an sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the target camera identification, generating an http state identification corresponding to the http real-time video-on-demand request, generating an sip state identification corresponding to the sip real-time video-on-demand request, and synchronizing the identification contents of the http state identification and the sip state identification in real time, wherein the identification contents comprise the on-demand request completion state.
After receiving the http real-time video on demand request, determining a target camera from front-end camera cluster information stored in a data server according to a target camera identification carried by the http real-time video on demand request, acquiring an access address of the target camera, and generating a request head in the sip real-time video on demand request according to the access address. And then, converting each on-demand command in the http real-time video on-demand request into an on-demand command under the sip protocol, generating the on-demand command into a message body in the sip real-time video on-demand request, and combining the request head and the message body to generate the corresponding sip real-time video on-demand request.
After the sip real-time video-on-demand request corresponding to the http real-time video-on-demand request is generated, corresponding http state identification and sip state identification are respectively generated for the http real-time video-on-demand request and the sip real-time video-on-demand request, and identification contents of the two state identifications both comprise the starting time of the on-demand request and the completion state of the on-demand request. And synchronizing the identification contents of the http state identification and the sip state identification, namely, when the identification content of one of the http state identification and the sip state identification changes at any moment, the identification content of the other one of the http state identification and the sip state identification changes in the same way. When the on-demand request is not processed, the on-demand request completion state in the identification content always shows that the on-demand request is not completed, and if an on-demand response is received, the on-demand request completion state in the identification content shows that the on-demand request is completed.
S203: and sending an sip real-time video on demand request to a target camera corresponding to the target camera identification based on the sip protocol, receiving an sip real-time video on demand response returned by the target camera based on the sip protocol, and synchronously updating the identification contents of the sip state identification and the http state identification according to the content of the sip real-time video on demand response.
After the sip real-time video-on-demand request is obtained, according to the identification of the target camera, a sip session is established between the data server and the target camera, the sip real-time video-on-demand request is sent to the corresponding target camera, and the target camera processes the request after receiving the sip real-time video-on-demand request.
After the target camera processes the sip real-time video request, sending a processing signaling to the data server through a sip session established between the target camera and the data server, generating a sip real-time video on demand response according to the processing signaling, and then synchronously updating the identification contents of the sip state identification and the http state identification according to the content of the sip real-time video on demand response. And when the content of the sip real-time video on demand response is that the on demand is finished, updating the identification content of the sip state identification and the http state identification to that the on demand request is finished.
S204: and when the identification content of the http state identification is that the video-on-demand request is completed, generating an http real-time video-on-demand response corresponding to the http state identification, and returning the http real-time video-on-demand response to the traffic police terminal based on an http protocol according to the terminal identification.
And after the identification contents of the sip state identification and the http state identification are updated to the order request, the data server generates a corresponding http real-time video order response, wherein the response content of the http real-time video order response is the same as the response content of the sip real-time video order response. And after generating the http real-time video on demand response, determining a traffic police terminal sending the http real-time video on demand request according to the terminal identifier, then establishing an http session between the data server and the traffic police terminal, and returning the http real-time video on demand response to the traffic police terminal.
S205: and sending the real-time video uploaded by the target camera to the target playing equipment according to the playing address.
After receiving the http real-time video on demand response, the traffic police terminal indicates that the request is successful, the target camera encapsulates the shot real-time video to form a data packet, the data packet is uploaded to the data server, the data server sends the data packet to the target playing device according to the playing address of the target playing device, and the target playing device analyzes the data packet and plays the real-time video.
It can be known from the above method that the front-end camera real-time video-on-demand method provided in this embodiment of the present application, first receives an http real-time video-on-demand request sent by a traffic police terminal on an on-demand selection page based on an http protocol, where the http real-time video-on-demand request includes displaying an on-demand selection page including a playing device selection control and a front-end camera selection control after the traffic police terminal receives a trigger instruction for on-demand real-time video, determines a target playing device according to a selection operation for the playing device selection control, determines a target camera according to the selection operation for the front-end camera selection control, generates an http real-time video-on-demand request conforming to the http protocol according to a terminal identifier of the traffic police terminal, a playing address of the target playing device, and a target camera identifier of the target camera, generates a sip real-time video-on-demand request corresponding to the http video-on-demand request according to the target camera identifier, and generates an http state identifier corresponding to the http real-time video-on-demand request and an sip state identifier corresponding to the sip real-time video-on-demand request, and synchronizing the identification content of the http state identification and the sip state identification in real time, wherein the identification content comprises the on-demand request completion state, then based on sip protocol, sending sip real-time video on demand request to the target camera corresponding to the target camera identification, receiving sip real-time video on demand response returned by the target camera based on sip protocol, synchronously updating the identification contents of the sip state identification and the http state identification according to the content of the sip real-time video on demand response, and finally, returning the http real-time video on demand response to the traffic police terminal based on the http protocol according to the terminal identifier, and sending the real-time video uploaded by the target camera to the target playing equipment according to the playing address. According to the method and the device, after the target playing equipment and the target camera are selected on the on-demand selection page, an http on-demand request is sent out based on an http protocol and converted into an sip on-demand request which can be identified by the front-end camera, then an sip on-demand response returned by the front-end camera is converted into an http on-demand response and returned to the traffic police terminal, finally a real-time video is sent to the target playing equipment based on the playing address, the corresponding target camera and the target playing equipment can be selected only according to selection operation when the request is initiated on the calling selection page, the operation is simple, the whole on-demand process traffic police terminal can be completed only on a web browser or a platform, special SDK software does not need to be called, safety is guaranteed, and convenience in video acquisition is improved. In the protocol conversion process, the identification contents of the sip state identification and the http state identification are synchronized, so that the generated sip real-time video on demand response can be converted into the http real-time video on demand response in time, and the response returning speed is improved.
As shown in fig. 3, an on-demand real-time video control 100 is arranged on a platform interface of the traffic police terminal, and when a real-time video shot at a certain intersection is desired to be viewed, the on-demand real-time video control 100 is clicked, the traffic police terminal receives a trigger instruction of the on-demand real-time video, and displays an on-demand selection page including a playing device selection control 200 and a front-end camera selection control 300. The on-demand real-time video control 100 and the other two controls can be arranged on different pages, that is, the on-demand selection page can be a page generated by clicking the on-demand real-time video control 100 on another page of the traffic police terminal; the on-demand real-time video control 100 and the other two controls can be arranged on the same page, when the on-demand real-time video control 100 is not clicked, the other two controls are not displayed, and after the on-demand real-time video control 100 is clicked, the page serves as an on-demand selection page to display the playing device selection control 200 and the front-end camera selection control 300. A video display area 500 is arranged in the click selection page, a play button 501 is arranged in the video display area 500, and in an initial state, a blank picture or a final display picture when a video is played last time is in the video display area 500.
After the on-demand selection page clicks the playing device selection control 200, the on-demand selection page generates a playing device directory 201 according to a trigger operation for the device selection control 200, all playing devices registered in the intelligent transportation system can be displayed in the playing device directory 201, and then a corresponding selection operation is performed in the playing device directory 201 to determine which playing device is used as a target playing device to play a real-time video. When the selection operation is performed, one or more playback devices may be selected from the playback device list 201 as target playback devices, where the traffic police terminal that initiated the request or the playback device that was last requested to be selected may be set as a default target playback device. When there are many playing devices in the playing device directory 201, a search or screening function may be set, and the search range is narrowed according to information such as keywords, so that a target playing device to be selected can be quickly found.
Similarly, after the on-demand selection page clicks the front-end camera selection control 300, the on-demand selection page generates a front-end camera directory 301 according to a trigger operation for the front-end camera selection control 300, all front-end cameras registered in the intelligent transportation system can be displayed in the front-end camera directory 301, and then a corresponding selection operation is performed on the front-end camera directory 301 to determine which camera in the monitoring site to view the real-time video. When performing a selection operation, one of the front-end cameras from the front-end camera directory 301 may be selected as a target camera, where the front-end camera that was last requested to be selected may be set as a default target camera. When there are many front-end cameras included in the front-end camera directory 301, a search or screening function may be set, and the search range is narrowed down according to information such as keywords, so that a target camera desired to be selected is quickly searched.
After the corresponding selection operations are executed on the device selection control 200 and the front-end camera selection control 300, and the determination control 400 is clicked, an http real-time video-on-demand request conforming to an http protocol is generated according to the terminal identifier of the traffic police terminal, the playing address of the target playing device, and the target camera identifier of the target camera.
As shown in fig. 4, the framework of the front-end camera real-time video-on-demand is divided into several modules, and the data server includes http side processing logic 22, message synchronizer 23 and sip side processing logic 24. The http real-time video on demand request 21 sent by the traffic police terminal based on the http protocol is firstly sent to the http side processing logic 22 for processing, and then sent to the message synchronizer 23 by the http side processing logic 22; the message synchronizer 23 converts the http real-time video-on-demand request into a sip real-time video-on-demand request, generates an http state identifier for the http real-time video-on-demand request, generates a sip state identifier for the sip real-time video-on-demand request, synchronizes the identifier contents of the http state identifier and the sip state identifier, and then sends the sip real-time video-on-demand request to the sip side processing logic 24 for processing; after the processing of the sip side processing logic 24 is completed, establishing an sip session with the target camera 25, sending an sip real-time video on demand request to the target camera 25, and receiving an sip real-time video on demand response returned to the sip side processing logic 24 by the target camera 25; the sip side processing logic 24 sends the sip real-time video on demand response to the message synchronizer 23, the message synchronizer 23 synchronously updates the identification contents of the http state identification and the sip state identification according to the content of the sip real-time video on demand response, and generates an http real-time video on demand response and sends the http real-time video on demand response to the http side processing logic 22 when the identification contents of the http state identification are that the on demand request is completed; the http side processing logic 22 returns an http real-time video on demand response 26 to the traffic police terminal, and the traffic police terminal determines the processing state of the on demand request according to the http real-time video on demand response 26.
As shown in fig. 5 and fig. 6, the http side processing logic 22 includes an http service module 221, a request parser 222, a validity judgment 223, an http message manager 224, and an http timer status notification queue 225, and the sip side processing logic 24 includes an sip on-demand management 241, an sip message manager 242, a user agent client 243, a user agent server 244, and a front-end camera sip agent 245, and the front-end camera real-time video on demand method of the present application is specifically described below with reference to fig. 4 to fig. 6.
The traffic police terminal sends an http real-time video on demand request 21 to the http side processing logic 22, and the http real-time video on demand request 21 carries a terminal identifier, a playing address of the target playing device and a target camera identifier. The terminal identification comprises an IP address and a port of a traffic police terminal, the data server determines which terminal the on-demand response is received and to which the on-demand response is sent specifically according to the terminal identification, the target camera identification comprises an ID of a target camera, the data server determines that the target camera is specifically positioned at a xx crossing of an xx road section in an xx area according to the target camera identification, so as to send http real-time video on demand request 21 to the target camera, the data server determines to which device the last real-time video stream of the target camera should be sent specifically according to the playing address of the target playing device, so as to obtain the real-time video shot by the target camera, and determining the traffic violation type, the traffic violation time, the information of the traffic violation vehicles or pedestrians and other data according to the traffic behaviors of the vehicles or pedestrians at the intersection in the real-time video, and subsequently processing according to the traffic violation data.
In the http side processing logic 22, the http real-time vod request 21 is received by the http service module 221, where the http service module 221 includes an http gateway, and then the http real-time vod request 21 is transferred to the request parser 222. The request parser 222 parses each command parameter in the http real-time vod request 21, and then puts the http real-time vod request 21 into the http message manager 224. The http message manager 224 continuously handles the internal message buffering while sending the newly entered http real-time vod request 21 to the message synchronizer 23.
In an embodiment, before the step of placing the http real-time vod request 21 into the http message manager 224, the validity judgment 223 is further performed on the parsed http real-time vod request 21, which specifically includes: based on the effective parameter set of the request for requesting, carrying out logic judgment on the http real-time video on demand request 21; if the http real-time video on demand request 21 is legal, the http real-time video on demand request 21 is cached to the http message manager 224, if the http real-time video on demand request 21 is illegal, a termination request result is directly returned to the traffic police terminal, and the termination request result is represented as an http real-time video on demand response 26 at the traffic police terminal. When the traffic police terminal sends out the http real-time video on demand request 21, the http real-time video on demand request 21 comprises parameters such as a terminal identifier, a playing address, a target camera identifier, an on demand command and the like, if the input of each identifier, address or on-demand command is wrong, the subsequent processing logic will be affected, so after parsing, based on the on-demand request valid parameter set, making a logical judgment on the http real-time video-on-demand request 21, wherein the effective parameter set of the on-demand request comprises the type of effective parameters, specific parameter values, the arrangement sequence of the parameters and the like, and if the effective parameter set is legal, the next step is entered to cache the http real-time vod request 21 into the http message manager 224, and if it is not legal, then the terminal returns the result of the termination request to the traffic police terminal, and can further display the specific error type, such as inputting invalid parameters or finding no corresponding target camera, so that the http real-time video on demand request 21 can be adjusted and input again by the traffic police terminal.
In one embodiment, after the step of caching the http real-time vod request 21 to the http message manager 224, the method further comprises: judging whether the http real-time video-on-demand request 21 has the same content as the http real-time video-on-demand request entering in the previous preset time period; if the content is the same, the http real-time vod request 21 is removed from the http message manager 224, and if the content is different, the http real-time vod request 21 is sent to the message synchronizer 23. After the traffic police terminal sends the http real-time video-on-demand request 21, if no on-demand response is received within an expected time, one or more refreshing operations are usually performed, each refreshing operation re-sends one real-time video-on-demand request 21, the content of each sent real-time video-on-demand request 21 is the same, if the data server processes each request, resource waste is caused, therefore, after the http real-time video-on-demand request 21 is cached to the http message manager 224, the http message manager 224 numbers the incoming requests in time sequence, such as No. 1, No. 2, No. 3, and the like, and every time a new http real-time video-on-demand request 21 is entered, the incoming requests are checked for duplication and judged.
Assuming that the number of the newly entered http real-time vod request 21 is n, the http message manager 224 first determines whether an n-1 th request enters within a preset time period from the time of the n-th request entering, where the preset time period may be set according to the sending behavior of the majority of request senders, for example, if the majority of request senders start to initiate requests again if no response is received within 2 seconds after sending the request, 2 seconds may be used as the preset time period. If it is detected that no nth-1 request is entered within the previous preset time period, the newly entered http real-time vod request may be directly sent to the message synchronizer 23. If the n-1 request enters the message synchronizer 23 in the preset time period, the content of the n-1 request and the n request is checked and judged, if the contents are the same, the n request is a repeated request, the newly entered http real-time video on demand request is removed from the http message manager 224, the n-1 request is processed continuously, if the contents are different, the n request is a new request, the newly entered http real-time video on demand request is sent to the message synchronizer 23, and after the n-1 request is processed, the n request is processed continuously.
After receiving the http real-time video-on-demand request 21, the message synchronizer 23 generates an sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the identification of the target camera. The data server stores cluster information of the front-end cameras, the front-end cameras registered in the data server are all located in the cluster information, each front-end camera has a unique identifier, a target camera is determined from the cluster information of the front-end cameras according to the identifier of the target camera, an access address of the target camera is obtained, and a request head in a sip real-time video on demand request can be generated according to the access address. Then, converting each request command in the http real-time video-on-demand request 21 into a request command under the sip protocol, generating the request command into a message body in the sip real-time video-on-demand request, and combining the request header and the message body to generate the corresponding sip real-time video-on-demand request.
The message synchronizer 23 generates an http status identifier for the http real-time video-on-demand request 21, generates an sip status identifier for the sip real-time video-on-demand request, and synchronizes the http status identifier and the identification content of the sip status identifier in real time, wherein the identification content includes an on-demand request completion status. In the message synchronizer 23, the identification contents of the http state identification and the sip state identification are the same at any moment, and the synchronization operation is realized by a corresponding synchronization program.
For the http real-time video-on-demand request 21 newly entering the message synchronizer 23, after the steps of format conversion and identification synchronization are completed, the sip real-time video-on-demand request is sent to the sip side processing logic 24, and then the sip side processing logic 24 sends the sip real-time video-on-demand request to the target camera corresponding to the target camera identification based on the sip protocol. After the transmission, the inside of the message synchronizer 23 can complete the detection of the on-demand request, if the sip side processing logic 24 has returned the sip real-time video on-demand response, the message synchronizer 23 can generate a corresponding http real-time video on-demand response and place the http real-time video on-demand response into the http timing state notification queue 225, the http timing state notification queue 225 notifies the http message manager 224 of the response according to the sequence of the response entering, the http message manager 224 returns the http real-time video on-demand response 26 to the traffic police terminal, and the traffic police terminal can obtain the processing result of the on-demand request.
In the sip-side processing logic 24, the specific steps of the processing include: caching the sip real-time video-on-demand request into the sip message manager 242, and establishing a session with the front-end camera sip agent 245 based on the sip protocol; determining a target camera 25 from the front-end camera sip agent 245 according to the target camera identifier; and sending the sip real-time video on demand request to the target camera 25 based on the sip protocol.
The sip real-time video-on-demand request is firstly sent to the sip on-demand management 241, and the sip on-demand management 241 generates a unique identifier for the sip real-time video-on-demand request and then caches the unique identifier into the sip message manager 242. Then, the user agent client 243 checks from the sip message manager 242 whether a new on-demand request arrives or an update of the on-demand request status is available, and sends a different request to the front-end camera sip agent 245 according to the check result. When a new sip real-time video-on-demand request arrives at the sip message manager 242, the user agent client 243 calls its own agent mode, establishes a session with the front-end camera sip agent 245 based on the sip protocol, and sends an Invite request, the front-end camera sip agent 245 determines the target camera 25 from the front-end camera sip agent 245 according to the target camera identification after receiving the Invite request, and then the front-end camera sip agent 245 sends the sip real-time video-on-demand request to the target camera 25. When it is checked that the state of the on-demand request is updated in the sip message manager 242, if the request is terminated, a corresponding processing request is sent to the front-end camera sip agent 245 according to the updated state.
Then, the sip side processing logic 24 receives the sip real-time video-on-demand response returned by the target camera 25 based on the sip protocol, and synchronously updates the identification contents of the sip state identification and the http state identification according to the content of the sip real-time video-on-demand response.
In one embodiment, the steps specifically include: receiving a processing signaling returned by the target camera 25 to the sip message manager 242 based on the sip protocol; updating the identification content of the sip state identification corresponding to the sip real-time video-on-demand request in the sip message manager 242 according to the processing signaling; when detecting that the identification content of the sip state identification is that the on-demand request is completed, returning a sip real-time video on-demand response to the message synchronizer 23; and according to the content of the sip real-time video on demand response, synchronously updating the identification content of the sip state identification and the http state identification in the message synchronizer 23.
The processing signaling returned by the target camera 25 after processing the sip real-time video-on-demand request is received by the user agent 244, and the user agent 244 updates the identification content of the sip status identification corresponding to the sip real-time video-on-demand request in the sip message manager 242 according to the processing signaling. Specifically, when the processing signaling is 200OK, indicating that the on-demand request is completed, the user agent 244 matches the sip real-time video-on-demand request in the sip message manager 242, and updates the identification content of the sip status identifier corresponding to the sip real-time video-on-demand request to that the on-demand request is completed.
When detecting that the identification content of the sip state identification is that the on-demand request is completed, generating and returning a sip real-time video-on-demand response to the message synchronizer 23, and then synchronously updating the identification content of the sip state identification and the identification content of the http state identification in the message synchronizer 23 according to the content of the sip real-time video-on-demand response, so that the identification content of the sip state identification and the identification content of the http state identification are both updated to be that the on-demand request is completed.
In one embodiment, the steps after returning the sip real-time video on demand response to the message synchronizer 23 include: the sip real-time video on demand request is removed from the sip message manager 242. At this point the on-demand request has been processed and a corresponding on-demand response is generated, and therefore removed from sip message manager 242, the cache space of sip message manager 242 may be freed up to facilitate sip message manager 242 to re-process other request messages. In addition, after the log is removed, the data server can store the log related to the sip real-time video-on-demand response, classify a plurality of on-demand responses in a certain period of time in the log, for example, classify according to the on-demand request completion time, analyze the condition with long processing time, find the reason, facilitate the developers to perform BUG positioning and program debugging, and subsequently maintain and upgrade the system.
And when the identification content of the http state identification is that the video-on-demand request is completed, the message synchronizer 23 generates an http real-time video-on-demand response corresponding to the http state identification, and returns an http real-time video-on-demand response 26 to the traffic police terminal based on the http protocol according to the terminal identification. The message synchronizer 23 determines which port of which client the on-demand response should be sent to according to the terminal identifier, and then returns the http real-time video-on-demand response 26, and the traffic police terminal determines the processing result of the on-demand request according to the content of the http real-time video-on-demand response 26.
In one embodiment, the steps after returning the http real-time vod response 26 to the traffic police terminal include: the http real-time video on demand request and the sip real-time video on demand request are removed from the message synchronizer 23. After removal, the internal space of the message synchronizer 23 is also released to facilitate the message synchronizer 23 to process other request messages.
After the traffic police terminal obtains the http real-time video on demand response 26, the target camera 25 packages the shot real-time video stream, determines a stream receiving address according to the playing address of the target playing device, and then sends the real-time video stream to the target playing device. In this embodiment, taking the target playing device and the traffic police terminal as the same device as an example, as shown in fig. 7, after the target playing device receives the real-time video stream, the target playing device clicks the playing button 501 in the video playing area 500, and then the real-time video can be played in the target playing device, so as to realize the identification and subsequent processing of the traffic violation data. When the real-time videos shot by other front-end cameras are desired to be watched after the watching is finished, the on-demand real-time video control 100 can be clicked again to generate a next on-demand request. When the target playing device and the traffic police terminal are different devices, the link address of video playing can be sent to the target playing device, and after the target playing device clicks the link address, the target playing device can enter a video playing page, so that the real-time video can be watched on other devices except the traffic police terminal.
According to the embodiment, after the target playing equipment and the target camera are selected on the on-demand selection page, an http on-demand request is sent based on an http protocol and converted into an sip on-demand request which can be identified by the front-end camera, then an sip on-demand response returned by the front-end camera is converted into an http on-demand response and returned to the traffic police terminal, finally, the real-time video is sent to the target playing equipment based on the playing address, and the corresponding target camera and the target playing equipment can be selected only according to selection operation when the request is initiated on the calling selection page. In the protocol conversion process, the identification contents of the sip state identification and the http state identification are synchronized, so that the generated sip real-time video on demand response can be converted into the http real-time video on demand response in time, and the response returning speed is improved.
On the basis of the method described in the foregoing embodiment, the present embodiment will be further described from the perspective of a real-time video-on-demand device, please refer to fig. 8, where fig. 8 specifically describes the real-time video-on-demand device provided in the embodiment of the present application, which may include:
the receiving module 110 is configured to receive an http real-time video-on-demand request sent by the traffic police terminal based on an http protocol; the http real-time video on demand request comprises the steps that after a traffic police terminal receives a trigger instruction of on-demand real-time video, an on-demand selection page comprising a playing equipment selection control and a front-end camera selection control is displayed, target playing equipment is determined according to selection operation aiming at the playing equipment selection control, a target camera is determined according to selection operation aiming at the front-end camera selection control, and an http real-time video on demand request conforming to an http protocol is generated according to a terminal identification of the traffic police terminal, a playing address of the target playing equipment and a target camera identification of the target camera;
the first synchronization module 120 is configured to generate an sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the target camera identifier, generate an http state identifier corresponding to the http real-time video-on-demand request, generate an sip state identifier corresponding to the sip real-time video-on-demand request, and identify content of the http state identifier and the sip state identifier in real time, where the identification content includes an on-demand request completion state;
the second synchronization module 130 is configured to send an sip real-time video-on-demand request to a target camera corresponding to the target camera identification based on the sip protocol, receive an sip real-time video-on-demand response returned by the target camera based on the sip protocol, and synchronously update the identification contents of the sip state identification and the http state identification according to the content of the sip real-time video-on-demand response;
the returning module 140 is configured to generate an http real-time video-on-demand response corresponding to the http state identifier when the identifier content of the http state identifier is that the on-demand request is completed, and return the http real-time video-on-demand response to the traffic police terminal based on the http protocol according to the terminal identifier;
and the sending module 150 is configured to send the real-time video uploaded by the target camera to the target playing device according to the playing address.
In an embodiment, the receiving module 110 is configured to generate a playing device directory according to a trigger operation for a playing device selection device, and determine a target playing device according to a selection operation for a playing device in the playing device directory; and generating a front-end camera directory according to the triggering operation aiming at the front-end camera selection control, and determining a target camera according to the selection operation aiming at the front-end camera in the front-end camera directory.
In an embodiment, the real-time video-on-demand device further includes a logic determination module, configured to perform logic determination on the http real-time video-on-demand request based on the on-demand request valid parameter set after the receiving module 110 receives the http real-time video-on-demand request; and if the http real-time video-on-demand request is legal, caching the http real-time video-on-demand request to an http message manager, and if the http real-time video-on-demand request is illegal, directly returning a termination request result to the traffic police terminal.
In one embodiment, the real-time video-on-demand device further comprises a duplication checking module, wherein after the http real-time video-on-demand request is cached to the http message manager, the duplication checking module is used for judging whether the content of the http real-time video-on-demand request is the same as the content of the http real-time video-on-demand request entering in the previous preset time period; and if the contents are the same, removing the http real-time video on demand request from the http message manager, and if the contents are different, sending the http real-time video on demand request to the message synchronizer.
In an embodiment, the second synchronization module 130 specifically includes:
the caching unit is used for caching the sip real-time video-on-demand request into the sip message manager and establishing a session with the front-end camera sip proxy based on the sip protocol;
the determining unit is used for determining a target camera from the front-end camera sip proxy according to the target camera identification;
and the sending unit is used for sending the sip real-time video on demand request to the target camera based on the sip protocol.
In an embodiment, the second synchronization module 130 further includes:
the receiving unit is used for receiving a processing signaling returned to the sip message manager by the target camera based on the sip protocol;
the first updating unit is used for updating the identification content of the sip state identification corresponding to the sip real-time video on demand request in the sip message manager according to the processing signaling;
the return unit is used for returning sip real-time video on demand response to the message synchronizer when the identification content of the sip state identification is detected to be that the on demand request is completed;
and the second updating unit is used for synchronously updating the identification contents of the sip state identification and the http state identification in the message synchronizer according to the content of the sip real-time video on demand response.
In an embodiment, the second updating unit is configured to update the identification content of the sip status identifier and the http status identifier synchronously to that the on-demand request is completed according to the content of the sip real-time video-on-demand response.
In an embodiment, the real-time vod device further includes a removing module, configured to remove the http real-time vod request and the sip real-time vod request from the message synchronizer after the returning module 140 returns the http real-time vod response to the traffic police terminal.
Different from the prior art, the real-time video on demand device provided by the application sends out an http on demand request based on an http protocol after selecting the target playing device and the target camera on the on demand selection page, converts the http on demand request into an sip on demand request which can be identified by the front-end camera, converts the sip on demand response returned by the front-end camera into an http on demand response and returns to the traffic police terminal, and finally sends the real-time video to the target playing device based on the playing address. In the protocol conversion process, the identification contents of the sip state identification and the http state identification are synchronized, so that the generated sip real-time video on demand response can be converted into the http real-time video on demand response in time, and the response returning speed is improved.
Accordingly, embodiments of the present application also provide an electronic device, as shown in fig. 9, which may include components such as a radio frequency circuit 901, a memory 902 including one or more computer-readable storage media, an input unit 903, a display unit 904, a sensor 905, an audio circuit 906, a WiFi module 907, a processor 908 including one or more processing cores, and a power supply 909. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 9 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the rf circuit 901 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink information of a base station and then delivering the received downlink information to the one or more processors 908; in addition, data relating to uplink is transmitted to the base station. The memory 902 may be used to store software programs and modules, and the processor 908 executes various functional applications and data processing by operating the software programs and modules stored in the memory 902. The input unit 903 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The display unit 904 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof.
The electronic device may also include at least one sensor 905, such as a light sensor, motion sensor, and other sensors. The audio circuitry 906 includes a speaker that can provide an audio interface between a user and the electronic device.
WiFi belongs to short-distance wireless transmission technology, and the electronic equipment can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 907, and provides wireless broadband internet access for the user. Although fig. 9 shows the WiFi module 907, it is understood that it does not belong to the essential constitution of the electronic device, and may be omitted entirely as needed within the scope not changing the essence of the application.
The processor 908 is a control center of the electronic device, connects various parts of the entire cellular phone using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 902 and calling data stored in the memory 902, thereby performing overall monitoring of the cellular phone.
The electronic device also includes a power supply 909 (e.g., a battery) that provides power to the various components, which may preferably be logically coupled to the processor 908 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
Although not shown, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 908 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 902 according to the following instructions, and the processor 908 executes the application program stored in the memory 902, thereby implementing the following functions:
receiving an http real-time video on demand request sent by a traffic police terminal based on an http protocol; the http real-time video on demand request comprises the steps that after a traffic police terminal receives a trigger instruction of on-demand real-time video, an on-demand selection page comprising a playing equipment selection control and a front-end camera selection control is displayed, target playing equipment is determined according to selection operation aiming at the playing equipment selection control, a target camera is determined according to selection operation aiming at the front-end camera selection control, and an http real-time video on demand request conforming to an http protocol is generated according to a terminal identification of the traffic police terminal, a playing address of the target playing equipment and a target camera identification of the target camera; generating an sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the target camera identification, generating an http state identification corresponding to the http real-time video-on-demand request, an sip state identification corresponding to the sip real-time video-on-demand request, and synchronizing the identification contents of the http state identification and the sip state identification in real time, wherein the identification contents comprise an on-demand request completion state; sending an sip real-time video on demand request to a target camera corresponding to the target camera identification based on an sip protocol, receiving an sip real-time video on demand response returned by the target camera based on the sip protocol, and synchronously updating identification contents of the sip state identification and the http state identification according to the content of the sip real-time video on demand response; when the identification content of the http state identification is that the video-on-demand request is completed, generating an http real-time video-on-demand response corresponding to the http state identification, and returning the http real-time video-on-demand response to the traffic police terminal based on an http protocol according to the terminal identification; and sending the real-time video uploaded by the target camera to the target playing equipment according to the playing address.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description, which is not repeated herein.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
The method, the device and the electronic equipment for real-time video-on-demand of the front-end camera provided by the embodiment of the application are introduced in detail, a specific example is applied to explain the principle and the implementation mode of the application, and the description of the embodiment is only used for helping to understand the technical scheme and the core idea of the application; those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications or substitutions do not depart from the spirit and scope of the present disclosure as defined by the appended claims.

Claims (10)

1. The real-time video-on-demand method of the front-end camera is characterized by being applicable to a smart traffic system, wherein the smart traffic system comprises the front-end camera, a data server, a playing device and a traffic police terminal, the front-end camera is connected with the data server based on an sip protocol, the traffic police terminal and the playing device are accessed into the data server based on an http protocol, the real-time video-on-demand method of the front-end camera is applied to the data server, and the real-time video-on-demand method of the front-end camera comprises the following steps:
receiving an http real-time video on demand request sent by the traffic police terminal based on an http protocol; the http real-time video-on-demand request comprises that after the traffic police terminal receives a trigger instruction of on-demand real-time video, an on-demand selection page comprising a playing equipment selection control and a front-end camera selection control is displayed, target playing equipment is determined according to selection operation aiming at the playing equipment selection control, a target camera is determined according to selection operation aiming at the front-end camera selection control, and the http real-time video-on-demand request conforming to an http protocol is generated according to a terminal identifier of the traffic police terminal, a playing address of the target playing equipment and a target camera identifier of the target camera;
generating an sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the target camera identification, generating an http state identification corresponding to the http real-time video-on-demand request, synchronizing the sip state identification corresponding to the sip real-time video-on-demand request and identification contents of the http state identification and the sip state identification in real time, wherein the identification contents comprise an on-demand request completion state;
sending the sip real-time video on demand request to a target camera corresponding to the target camera identification based on an sip protocol, receiving an sip real-time video on demand response returned by the target camera based on the sip protocol, and synchronously updating the identification contents of the sip state identification and the http state identification according to the content of the sip real-time video on demand response;
when the identification content of the http state identification is that the video-on-demand request is completed, generating an http real-time video-on-demand response corresponding to the http state identification, and returning the http real-time video-on-demand response to the traffic police terminal based on an http protocol according to the terminal identification;
and sending the real-time video uploaded by the target camera to the target playing equipment according to the playing address.
2. The method for real-time video-on-demand by the front-end camera according to claim 1, wherein the step of determining the target playing device according to the selection operation for the playing device selection control and determining the target camera according to the selection operation for the front-end camera selection control comprises:
generating a playing device directory according to the triggering operation aiming at the playing device selection device, and determining a target playing device according to the selection operation aiming at the playing device in the playing device directory;
and generating a front-end camera directory according to the trigger operation aiming at the front-end camera selection control, and determining a target camera according to the selection operation aiming at the front-end camera in the front-end camera directory.
3. The front-end camera real-time video-on-demand method according to claim 1, wherein before the step of generating the sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the target camera identification, the method further comprises:
based on the effective parameter set of the on-demand request, carrying out logic judgment on the http real-time video on-demand request;
and if the http real-time video-on-demand request is legal, caching the http real-time video-on-demand request to an http message manager, and if the http real-time video-on-demand request is illegal, directly returning a termination request result to the traffic police terminal.
4. The front-end camera real-time video-on-demand method according to claim 3, further comprising, after the step of caching the http real-time video-on-demand request to an http message manager:
judging whether the http real-time video-on-demand request has the same content as the http real-time video-on-demand request entering in the previous preset time period or not;
and if the contents are the same, removing the http real-time video on demand request from the http message manager, and if the contents are different, sending the http real-time video on demand request to a message synchronizer.
5. The front-end camera real-time video-on-demand method according to claim 1, wherein the step of sending the sip real-time video-on-demand request to the target camera identified by the target camera based on a sip protocol includes:
caching the sip real-time video-on-demand request into a sip message manager, and establishing a session with a front-end camera sip agent based on a sip protocol;
determining a target camera from the front-end camera sip agent according to the target camera identification;
and sending the sip real-time video on demand request to the target camera based on a sip protocol.
6. The front-end camera real-time video-on-demand method according to claim 1, wherein the step of receiving an sip real-time video-on-demand response returned by the target camera based on an sip protocol, and synchronously updating the identification contents of the sip state identifier and the http state identifier according to the content of the sip real-time video-on-demand response comprises the steps of:
receiving a processing signaling returned to the sip message manager by the target camera based on the sip protocol;
updating the identification content of the sip state identification corresponding to the sip real-time video on demand request in the sip message manager according to the processing signaling;
when detecting that the identification content of the sip state identification is that the on-demand request is completed, returning a sip real-time video on-demand response to the message synchronizer;
and synchronously updating the identification contents of the sip state identification and the http state identification in the message synchronizer according to the content of the sip real-time video on demand response.
7. The front-end camera real-time video-on-demand method according to claim 6, wherein the step of synchronously updating the identification contents of the sip state identifier and the http state identifier in the message synchronizer according to the content of the sip real-time video-on-demand response comprises:
and synchronously updating the identification contents of the sip state identification and the http state identification into the completion of the on-demand request according to the content of the sip real-time video on-demand response.
8. The front-end camera real-time video-on-demand method according to claim 7, wherein after the step of returning the http real-time video-on-demand response to the traffic police terminal based on an http protocol according to the terminal identifier, the method further comprises:
and removing the http real-time video-on-demand request and the sip real-time video-on-demand request from the message synchronizer.
9. The utility model provides a real-time video on demand device of front end camera, its characterized in that is applicable to wisdom traffic system, wisdom traffic system includes front end camera, data server, broadcast equipment and traffic police terminal, the front end camera is connected based on the sip agreement data server, the traffic police terminal with broadcast equipment inserts based on the http protocol data server, the real-time video on demand device of front end camera sets up in the data server, the real-time video on demand device of front end camera includes:
the receiving module is used for receiving an http real-time video on demand request sent by the traffic police terminal based on an http protocol; the http real-time video on demand request comprises that after the traffic police terminal receives a trigger instruction of on-demand real-time video, an on-demand selection page comprising a play equipment selection control and a front-end camera selection control is displayed, target play equipment is determined according to selection operation aiming at the play equipment selection control, a target camera is determined according to selection operation aiming at the front-end camera selection control, and an http real-time video on demand request conforming to an http protocol is generated according to a terminal identifier of the traffic police terminal, a play address of the target play equipment and a target camera identifier of the target camera;
the first synchronization module is used for generating an sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the target camera identification, generating an http state identification corresponding to the http real-time video-on-demand request, synchronizing the http state identification and the sip state identification in real time, and enabling the identification content to comprise an on-demand request completion state;
the second synchronization module is used for sending the sip real-time video-on-demand request to the target camera corresponding to the target camera identification based on an sip protocol, receiving an sip real-time video-on-demand response returned by the target camera based on the sip protocol, and synchronously updating the identification contents of the sip state identification and the http state identification according to the content of the sip real-time video-on-demand response;
the return module is used for generating an http real-time video on demand response corresponding to the http state identifier when the identifier content of the http state identifier is that the on demand request is completed, and returning the http real-time video on demand response to the traffic police terminal based on an http protocol according to the terminal identifier;
and the sending module is used for sending the real-time video uploaded by the target camera to the target playing equipment according to the playing address.
10. An electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory to perform the operations of the front-end camera real-time video-on-demand method according to any one of claims 1 to 8.
CN202011068974.5A 2020-09-30 2020-09-30 Front-end camera real-time video-on-demand method and device and electronic equipment Active CN112188245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011068974.5A CN112188245B (en) 2020-09-30 2020-09-30 Front-end camera real-time video-on-demand method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011068974.5A CN112188245B (en) 2020-09-30 2020-09-30 Front-end camera real-time video-on-demand method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112188245A CN112188245A (en) 2021-01-05
CN112188245B true CN112188245B (en) 2022-07-12

Family

ID=73948484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011068974.5A Active CN112188245B (en) 2020-09-30 2020-09-30 Front-end camera real-time video-on-demand method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112188245B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112866303B (en) * 2021-04-25 2021-07-20 武汉中科通达高新技术股份有限公司 Method and device for managing cascade media transmission link

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729880B (en) * 2009-12-14 2012-01-18 中国电信股份有限公司 Network video monitoring method and system based on SIP
CN103581712B (en) * 2013-11-04 2014-09-10 广州华工信元通信技术有限公司 Multi-protocol video playing method and system based on mobile terminal
CN104301140B (en) * 2014-10-08 2019-07-30 广州华多网络科技有限公司 Service request response method, device and system
CN107370806B (en) * 2017-07-12 2020-11-24 北京京东尚科信息技术有限公司 HTTP status code monitoring method, device, storage medium and electronic equipment
CN111050225A (en) * 2019-12-03 2020-04-21 安徽四创电子股份有限公司 Network architecture and method for playing real-time video in web browser

Also Published As

Publication number Publication date
CN112188245A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN111970215B (en) Data packet management method and device
CN112104893B (en) Video stream management method and device for realizing plug-in-free playing of webpage end
CN111798664B (en) Illegal data identification method and device and electronic equipment
EP4123472A1 (en) Information sharing method, apparatus, electronic device, and storage medium
EP4084482A1 (en) Stream pull method and device for live stream
CN111935177B (en) Service control method and device
CN111800521A (en) Front-end equipment control method and device
CN112188245B (en) Front-end camera real-time video-on-demand method and device and electronic equipment
CN111935316B (en) Method and device for acquiring front-end equipment catalog
CN112188244B (en) Front-end camera real-time video-on-demand method and device and electronic equipment
CN112188242B (en) Front-end camera real-time video-on-demand method and device and electronic equipment
CN112367296B (en) Service control method and device
CN112188243B (en) Front-end camera real-time video-on-demand method and device and electronic equipment
CN112367297B (en) Service control method and device
CN112291210B (en) Method and device for acquiring front-end equipment catalog
CN112291209B (en) Method and device for acquiring front-end equipment catalog
CN112291207B (en) Method and device for acquiring front-end equipment catalog
CN112187810A (en) Front-end equipment control method and device
CN112202786B (en) Illegal data identification method and device and electronic equipment
CN112163538B (en) Illegal data identification method and device and electronic equipment
CN111935313B (en) Connection pool management method and device
CN112367298B (en) Service control method and device
US12032528B2 (en) Information sharing method, apparatus, electronic device, and storage medium
CN111935309B (en) Method and device for managing circular tasks
CN111767131A (en) Streaming media task management method and device

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