CN112188242A - 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 PDFInfo
- Publication number
- CN112188242A CN112188242A CN202011058297.9A CN202011058297A CN112188242A CN 112188242 A CN112188242 A CN 112188242A CN 202011058297 A CN202011058297 A CN 202011058297A CN 112188242 A CN112188242 A CN 112188242A
- Authority
- CN
- China
- Prior art keywords
- real
- http
- time video
- demand
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/239—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
- H04N21/2393—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/21805—Source of audio or video content, e.g. local disk arrays enabling multiple viewpoints, e.g. using a plurality of cameras
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-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/47202—End-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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4782—Web browsing, e.g. WebTV
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network 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/63—Control 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/643—Communication protocols
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (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 and device, electronic equipment, based on the method, a data server receives an http on demand request sent by a traffic police terminal, 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 corresponding to the http on demand request and an sip state identifier corresponding to the sip on demand request, 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 meet preset conditions, the traffic police terminal can complete the whole on demand process only on a web browser or a platform without calling special SDK software, thereby ensuring the safety, and the http protocol is a general protocol, the convenience of video acquisition is improved.
Description
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 on the market carry out real-time video on demand of a front-end camera, in order to simplify the on demand process, a front-end camera real-time on demand signaling is generally packaged into a signaling in an SDK (Software Development Kit) format, then a traffic police system calls the SDK to carry out on demand, the SDK is developed and manufactured by an external manufacturer, a real-time video shot by the front-end camera can be acquired by personnel in a non-traffic police system, and the real-time video on demand mode has some potential safety hazards.
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, the real-time video-on-demand method of front-end camera is used for wisdom traffic system based on the http protocol, wisdom traffic system includes front-end camera, data server and traffic police terminal, the front-end camera is connected based on the sip protocol data server, the traffic police terminal 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, wherein the http real-time video on demand request carries a terminal identifier and a target camera identifier;
generating a 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 identifier corresponding to the http real-time video-on-demand request, an sip state identifier corresponding to the sip real-time video-on-demand request, and synchronizing the http state identifier and the identification content of the sip state identifier in real time, wherein the identification content comprises an on-demand request overtime state and 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 a sip protocol;
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 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 meets a preset condition, 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.
Simultaneously, this application embodiment still provides a real-time video on demand device of front end camera, the real-time video on demand device of front end camera is used for wisdom traffic system based on the http protocol, wisdom traffic system includes front end camera, data server and traffic police terminal, the front end camera is connected based on the sip protocol data server, the traffic police terminal 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, wherein the http real-time video-on-demand request carries a terminal identifier and a target camera identifier;
the first generation module is used for generating a 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 first synchronization module is used for generating an http state identifier corresponding to the http real-time video-on-demand request, an sip state identifier corresponding to the sip real-time video-on-demand request, and synchronizing the http state identifier and the identification content of the sip state identifier in real time, wherein the identification content comprises an on-demand request overtime state and an on-demand request completion state;
the sending module is used for sending the sip real-time video on demand request to the target camera head corresponding to the target camera head identification based on an sip protocol;
the second synchronization module is used for 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 identification and the http state identification according to the content of the sip real-time video-on-demand response;
the second generation 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 meets a preset condition;
and the return module is used for 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 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 and device for a smart traffic system based on an http protocol, and an electronic device, wherein the smart traffic system comprises a front-end device, a data server and a traffic police terminal, the front-end device is connected with the data server based on an sip protocol, the traffic police terminal is accessed into the data server based on the http protocol, the front-end camera real-time video on demand method is applied to the data server, and based on the method, firstly, a http real-time video on demand request sent by the traffic police terminal based on the http protocol is received, the http real-time video on demand request carries a terminal identifier and a target camera identifier, a sip real-time video on demand request corresponding to the http real-time video on demand request is generated according to the target camera identifier, a http state identifier corresponding to the http real-time video on demand request is generated, a sip state identifier corresponding to the sip real-time video on demand request is generated, and the identifier contents of the http state identifier and, the identification content comprises an on-demand request overtime state and an on-demand request completion state, then an sip real-time video on-demand request is sent to a target camera corresponding to the target camera identification based on an sip protocol, an sip real-time video on-demand response returned by the target camera based on the sip protocol is received, the identification content of the sip state identification and the identification content of the http state identification are synchronously updated according to the content of the sip real-time video on-demand response, when the identification content of the http state identification meets a preset condition, an http real-time video on-demand response corresponding to the http state identification is generated, and finally, the http real-time video on-demand response is returned to the traffic police terminal based on the http protocol according to the terminal identification. The method and the device send out the http on-demand request based on the http protocol, convert the http on-demand request into the sip on-demand request which can be identified by the front-end camera, convert the sip on-demand response returned by the front-end camera into the http on-demand response and return the http on-demand response to the traffic police terminal, the traffic police terminal can finish the whole on-demand process only on a web browser or a platform, special SDK software does not need to be called, safety is guaranteed, the http protocol is a general protocol, 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.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
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 application.
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 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. 4 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. 5 is a schematic diagram of a third 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 view of a first page of a traffic police terminal in the front-end camera real-time video-on-demand method according to the embodiment of the present application.
Fig. 7 is a schematic view of a second page of the traffic police terminal in the front-end camera real-time video-on-demand method according to the 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 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 is 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 site in an intelligent traffic system and is used for information acquisition, encoding, 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.
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 application scene includes a traffic police terminal 11, a data server 12, and a front-end camera 13; wherein:
the traffic police terminal 11 includes, but is not limited to, a tablet Computer, a notebook Computer, a Personal Computer (PC), a micro processing 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 and the front-end camera 13 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 is accessed into the data server 12 based on an http protocol so as to realize data interaction among the three, wherein:
the data server 12 first receives the http real-time video on demand request sent by the traffic police terminal 11 based on the http protocol, then generating a corresponding sip real-time video on demand request, synchronizing the identification contents of the http state identification and the sip state identification corresponding to the sip real-time video on demand request in real time, selecting a target camera from the front-end camera 13 based on the sip protocol and sending the sip real-time video on demand request to the target camera, and receives the sip real-time video-on-demand response returned by the target camera based on the sip protocol, then synchronously updating the identification content 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 identification content of the http state identification meets the preset condition, generating an http real-time video on demand response corresponding to the http state identification, and finally returning the http real-time video on demand response to the traffic police terminal 11 based on an http protocol to realize the real-time video on demand of the front-end camera.
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: and receiving an http real-time video on demand request sent by the traffic police terminal based on an http protocol, wherein the http real-time video on demand request carries a terminal identifier and a target camera identifier.
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 monitored place and judging and processing 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 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 a 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.
After receiving the http real-time video on demand request, determining a target camera from the front-end camera cluster information stored in the 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.
S203: and generating 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 contents of the http state identifier and the sip state identifier in real time, wherein the identification contents comprise an on-demand request overtime state and an on-demand request completion state.
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, wherein the identification contents of the two state identifications respectively comprise the starting time of the on-demand request, the expiration time of the on-demand request, the on-demand request overtime state and the broadcast request completion state. 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.
After the on-demand request is sent out, an on-demand response is usually returned within a short time, if the on-demand request is not processed for some reason, the on-demand response not only occupies the memory of the data server and causes resource waste, but also the request sender cannot respond late and causes poor user experience. Therefore, the identification content of the http state identification and the sip state identification comprises the start time and the expiration time of the on-demand request, the start time is used for marking the sending sequence of the on-demand request, the data server sequentially processes the on-demand requests according to the start time sequence of the on-demand requests, the expiration time can be the time obtained by adding a preset time value to the start time, when the on-demand request does not reach the expiration time, if an on-demand response is received, the on-demand request completion state in the identification content can show that the on-demand request is completed, and if the on-demand request does not reach the expiration time and no on-demand response is sent, the on-demand request timeout state in the identification content can show that the on-demand request is overtime. By setting an expiration detection mechanism in the data server, the request sender can be informed of the overtime state and the completion state of the on-demand request as soon as possible, so that the waste of processing resources can be avoided, and the user experience is improved.
S204: and sending an sip real-time video on demand request to the target camera corresponding to the target camera identification based on the sip protocol.
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.
S205: and 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.
And 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. When the content of the sip real-time video on demand response is that the on demand is finished, the identification contents of the sip state identification and the http state identification are updated to be that the on demand request is finished, and when the content of the sip real-time video on demand response is that the on demand is overtime, the identification contents of the sip state identification and the http state identification are updated to be that the on demand request is overtime.
S206: and when the identification content of the http state identification meets the preset condition, generating an http real-time video on demand response corresponding to the http state identification.
After the identification content of the sip state identification and the http state identification is updated, if the identification content of the http state identification meets a preset condition, the data server generates a corresponding http real-time video on demand response, wherein the response content of the http real-time video on demand response is the same as the response content of the sip real-time video on demand response. And when the identification content of the http state identification is one of the completion of the on-demand request and the overtime of the on-demand request, generating an http real-time video on-demand response corresponding to the http state identification.
S207: and returning an http real-time video on demand response to the traffic police terminal based on the http protocol according to the terminal identification.
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, returning the http real-time video on demand response to the traffic police terminal, and determining whether the real-time video can be watched by the traffic police terminal based on the condition that the on demand in the received on demand response is finished or the on demand is overtime. When the on-demand is finished, the traffic police terminal can acquire the real-time video from the target camera, and when the on-demand is over time, the traffic police terminal can send the on-demand request again or analyze the reason of the over time, find out the reason of the over time and send the on-demand request again after the reason is solved.
It can be known from the above method that the front-end camera real-time video-on-demand method provided in the embodiment of the present application, first receives an http real-time video-on-demand request sent by a traffic police terminal based on an http protocol, where the http real-time video-on-demand request carries a terminal identifier and a target camera identifier, generates a sip real-time video-on-demand request corresponding to the http real-time video-on-demand request according to the target camera identifier, generates an http state identifier corresponding to the http real-time video-on-demand request, generates a sip state identifier corresponding to the sip real-time video-on-demand request, synchronizes identifier contents of the http state identifier and the sip state identifier in real time, where the identifier contents include an on-demand request timeout state and an on-demand request completion state, then sends a sip real-time video-on-demand request to the target camera corresponding to the target camera identifier based on the sip protocol, receives a sip real-time, 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, generating an http real-time video on demand response corresponding to the http state identification when the identification contents of the http state identification meet preset conditions, and finally returning the http real-time video on demand response to the traffic police terminal based on an http protocol according to the terminal identification. The method and the device send out the http on-demand request based on the http protocol, convert the http on-demand request into the sip on-demand request which can be identified by the front-end camera, convert the sip on-demand response returned by the front-end camera into the http on-demand response and then return the traffic police terminal, the traffic police terminal can finish the whole on-demand process only on a web browser or a platform, special SDK software is not required to be called, safety is guaranteed, the http is a general protocol, operation is simple, understanding is convenient, 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, 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 content 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 the 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 content of the http state identification meets the preset condition; 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. 4 and fig. 5, 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 and fig. 5.
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 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 target camera is specifically to send to after receiving the on-demand response and the real-time video stream according to the terminal identification, the target camera identification comprises an ID of the target camera, the data server determines that the target camera is specifically positioned at the xx road section xx intersection in the xx region according to the target camera identification so as to send the http real-time video on-demand request 21 to the target camera, and therefore the traffic police terminal can obtain the real-time video shot by the target camera, determine the traffic violation type, the traffic violation time, the information of traffic violation vehicles or pedestrians and other data according to the traffic violation data in the real-time video, and can process the data subsequently.
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; and if the http real-time video-on-demand request 21 is legal, caching the http real-time video-on-demand request 21 into the http message manager 224, and if the http real-time video-on-demand request 21 is illegal, directly returning a termination request result to the traffic police terminal, wherein 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 is sent out in a form of inputting a website on a web browser or a platform, the http real-time video-on-demand request 21 comprises parameters such as a terminal identifier, a target camera identifier and an on-demand command, if the input of each identifier or on-demand command is wrong, subsequent processing logic is affected, therefore, after analysis, logic judgment is carried out on the http real-time video-on-demand request 21 based on an on-demand request effective parameter set, the on-demand request effective parameter set comprises types of effective parameters, specific parameter values, an arrangement sequence of each on-demand parameter and the like, if the on-demand request effective parameter set is legal, the next step is entered, the http real-time video-demand request 21 is cached in the http message manager 224, if the on-demand request is illegal, a termination request result is returned to the traffic police terminal, specific error, 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 an n-1 request is detected to enter in the previous preset time period, content duplication judgment is carried out on the n-1 request and the n request, when 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 continuously processed, when 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, subsequent processing is continuously carried out on the n request.
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 state identifier for the http real-time video-on-demand request 21, generates an sip state identifier for the sip real-time video-on-demand request, and synchronizes the http state identifier and the identification content of the sip state identifier in real time, wherein the identification content includes an on-demand request timeout state and an on-demand request completion state. 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 request is sent, the inside of the message synchronizer 23 detects the time-out and completion of the request, if the sip side processing logic 24 returns the sip real-time video on demand response, or if the sip real-time video on demand response does not return after exceeding the maximum value of the response time, the message synchronizer 23 generates a corresponding http real-time video on demand response and puts the http real-time video on demand response into the http timer state notification queue 225, the http timer state notification queue 225 notifies the http message manager 224 according to the sequence of 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 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 identification; 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 proxy mode, establishes a session with the front-end camera sip proxy 245 based on the sip protocol, and sends an Invite request, the front-end camera sip proxy 245 determines the target camera 25 from the front-end camera sip proxy 245 according to the target camera identification after receiving the Invite request, and then the front-end camera sip proxy 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 overtime or the on-demand request is finished, 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 server 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 the on-demand request completed. If the processing signaling is 408, which indicates that the on-demand request has timed out, the user agent 244 will also match the sip real-time video-on-demand request in the sip message manager 242, and update the identification content of the sip status identifier corresponding to the sip real-time video-on-demand request to be timed out. In addition, the processing signaling return may also have other types, for example, 404 indicates that the user does not exist, 403 indicates prohibition, and the like, and the identification content of the corresponding sip state identifier is different after being updated according to the difference of the processing signaling.
When detecting that the identification content of the sip state identification is that the on-demand request is overtime or the on-demand request is finished, 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 updated to be that the on-demand request is finished or the on-demand request is overtime.
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 removal, the data server can store a log related to sip real-time video on demand responses, classify a plurality of on demand responses within a certain period of time in the log, for example, classify according to overtime and completed conditions of on demand requests, analyze overtime conditions, find reasons, facilitate developers to perform BUG positioning and program debugging, and subsequently maintain and upgrade the system.
And the message synchronizer 23 generates an http real-time video-on-demand response corresponding to the http state identifier when the identifier content of the http state identifier meets a preset condition, where the preset condition is that the on-demand request is completed or the on-demand request is overtime. Specifically, when the identification content of the http state identification is that the on-demand request is overtime, generating an http real-time video-on-demand response that the real-time video-on-demand is overtime; 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 that the real-time video-on-demand is completed.
And after generating the http real-time video on demand response, returning the 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 traffic police terminal IP address and the port information in the terminal identification, and then sends the real-time video stream to the traffic police terminal, and the traffic police terminal realizes the identification and subsequent processing of traffic violation data by watching the real-time video.
According to the embodiment, the front-end camera real-time video on demand method sends out the http on demand request based on the http protocol, converts the http on demand request into the 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 the http on demand response, and returns the http on demand response to the traffic police terminal. 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. 6 and 7, in actual operation, the traffic police terminal performs real-time video on demand of the front-end camera on the platform, the platform is provided with a play video control 100 and a stop play control 200, wherein the play video control 100 corresponds to the on-demand interface, the stop play control 200 corresponds to the stop on-demand interface, when on-demand is required, the play video control 100 is clicked, then an http real-time video on demand request is input in an input frame 400 of a popped up webpage and transmitted, and after receiving an http real-time video on demand response, a corresponding real-time video picture can be displayed in a video area 300 of the webpage in fig. 6. In order to make the on-demand service more applicable, when an http real-time video on-demand request is input, the terminal identifier carried by the request may include an IP address and a port of any desired machine, so that the real-time video can be viewed on any desired machine. When the on-demand playing is required to be terminated, the playing termination control 200 is clicked, the on-demand request is input in the input box 400 of the popped-up webpage, and the playing of the real-time video can be terminated only by inputting the playing termination identifier in the on-demand request. The on-demand and the termination on-demand are both based on http protocol to send out corresponding requests, the operation is simple, and the safety is high.
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, where the http real-time video-on-demand request carries a terminal identifier and a target camera identifier;
the first generation 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 identification;
the first synchronization module 130 is configured to generate an http status identifier corresponding to the http real-time video-on-demand request and an sip status identifier corresponding to the sip real-time video-on-demand request, and synchronize identification contents of the http status identifier and the sip status identifier in real time, where the identification contents include an on-demand request timeout status and an on-demand request completion status;
a sending module 140, configured to send an sip real-time video-on-demand request to a target camera corresponding to the target camera identifier based on an sip protocol;
the second synchronization module 150 is configured to receive an sip real-time video-on-demand response returned by the target camera based on the sip protocol, and update the identification contents of the sip state identifier and the http state identifier synchronously according to the content of the sip real-time video-on-demand response;
the second generating module 160 is configured to generate an http real-time video-on-demand response corresponding to the http status identifier when the identifier content of the http status identifier meets a preset condition;
and the returning module 170 is configured to return an http real-time video on demand response to the traffic police terminal based on the http protocol according to the terminal identifier.
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 sending module 140 specifically includes:
the caching submodule is used for caching the sip real-time video-on-demand request into the sip message manager and establishing a session with a front-end camera sip agent based on an sip protocol;
the determining submodule is used for determining a target camera from the front-end camera sip agent according to the target camera identification;
and the sending submodule 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 150 specifically includes:
the receiving submodule 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 submodule 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 submodule is used for returning the 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 overtime or the on demand request is finished;
and the second updating submodule 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 sub-module is configured to, according to the content of the sip real-time video-on-demand response, synchronously update the identification content of the sip status identifier and the http status identifier to that the on-demand request has timed out or the on-demand request has completed.
In one embodiment, the second generating module 160 specifically includes one of the following sub-modules:
the timeout generating submodule is used for generating an http real-time video on demand response that the real-time video on demand is overtime when the identification content of the http state identification is that the on demand request is overtime;
and the completion generation submodule is used for generating an http real-time video-on-demand response that the real-time video-on-demand is completed when the identification content of the http state identification is that the on-demand request is completed.
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 170 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, converts the http on demand request into an sip on demand request which can be identified by a front-end camera, converts the sip on demand response returned by the front-end camera into an http on demand response and returns to a traffic police terminal, the traffic police terminal can complete the whole on demand process only on a web browser or a platform, and special SDK software is not required to be called, so that the safety is ensured, the http protocol is a general protocol, 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.
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 information transmission and reception or during a call, and in particular, receives downlink information of a base station and then sends the received downlink information to the one or more processors 908 for processing; 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 light sensors, motion sensors, 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 functions of managing charging, discharging, and power consumption are performed via the power management system.
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 an executable file corresponding to a process of one or more application programs into the memory 902 according to the following instructions, and the processor 908 executes the application programs stored in the memory 902, so as to implement the following functions:
receiving an http real-time video on demand request sent by a traffic police terminal based on an http protocol, wherein the http real-time video on demand request carries a terminal identifier and a target camera identifier; 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 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 contents of the http state identifier and the sip state identifier in real time, wherein the identification contents comprise an on-demand request overtime state and 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 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 meets a preset condition, generating an http real-time video on demand response corresponding to the http state identification; and returning an http real-time video on demand response to the traffic police terminal based on the http protocol according to the terminal identification.
In the above 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, and are not described herein again.
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 associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to implement the following functions:
receiving an http real-time video on demand request sent by a traffic police terminal based on an http protocol, wherein the http real-time video on demand request carries a terminal identifier and a target camera identifier; 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 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 contents of the http state identifier and the sip state identifier in real time, wherein the identification contents comprise an on-demand request overtime state and 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 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 meets a preset condition, generating an http real-time video on demand response corresponding to the http state identification; and returning an http real-time video on demand response to the traffic police terminal based on the http protocol according to the terminal identification.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by any method provided in the embodiments of the present application can be achieved, for details, see the foregoing embodiments, and are not described herein again.
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 in the text 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. A real-time video on demand method of a front-end camera is characterized in that the real-time video on demand method of the front-end camera is used for a smart traffic system based on an http protocol, the smart traffic system comprises the front-end camera, a data server and a traffic police terminal, the front-end camera is connected with the data server based on an sip protocol, the traffic police terminal is accessed into the data server based on the 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, wherein the http real-time video on demand request carries a terminal identifier and a target camera identifier;
generating a 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 identifier corresponding to the http real-time video-on-demand request, an sip state identifier corresponding to the sip real-time video-on-demand request, and synchronizing the http state identifier and the identification content of the sip state identifier in real time, wherein the identification content comprises an on-demand request overtime state and 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 a sip protocol;
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 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 meets a preset condition, 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.
2. 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 request for on demand, 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.
3. The front-end camera real-time video-on-demand method according to claim 2, 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.
4. 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 an sip protocol comprises:
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.
5. 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 the identification content of the sip state identification is detected to be that the on-demand request is overtime or the on-demand request is finished, 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.
6. The front-end camera real-time video-on-demand method according to claim 5, 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 that the on-demand request is overtime or the on-demand request is finished 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 5, wherein the step of generating an http real-time video-on-demand response corresponding to the http state identifier when the identifier content of the http state identifier satisfies a preset condition includes one of the following modes:
when the identification content of the http state identification is that the video-on-demand request is overtime, generating an http real-time video-on-demand response that the real-time video-on-demand is overtime;
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 that the real-time video-on-demand is completed.
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, a serial communication port, real-time video on demand device of front end camera is used for wisdom traffic system based on the http protocol, wisdom traffic system includes front end camera, data server and traffic police terminal, the front end camera is connected based on the sip protocol data server, the traffic police terminal 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, wherein the http real-time video-on-demand request carries a terminal identifier and a target camera identifier;
the first generation module is used for generating a 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 first synchronization module is used for generating an http state identifier corresponding to the http real-time video-on-demand request, an sip state identifier corresponding to the sip real-time video-on-demand request, and synchronizing the http state identifier and the identification content of the sip state identifier in real time, wherein the identification content comprises an on-demand request overtime state and an on-demand request completion state;
the sending module is used for sending the sip real-time video on demand request to the target camera head corresponding to the target camera head identification based on an sip protocol;
the second synchronization module is used for 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 identification and the http state identification according to the content of the sip real-time video-on-demand response;
the second generation 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 meets a preset condition;
and the return module is used for returning the http real-time video on demand response to the traffic police terminal based on an http protocol according to the terminal identifier.
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.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011058297.9A CN112188242B (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 |
---|---|---|---|
CN202011058297.9A CN112188242B (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 |
---|---|
CN112188242A true CN112188242A (en) | 2021-01-05 |
CN112188242B CN112188242B (en) | 2022-07-12 |
Family
ID=73945522
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011058297.9A Active CN112188242B (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) | CN112188242B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101729880A (en) * | 2009-12-14 | 2010-06-09 | 中国电信股份有限公司 | Network video monitoring method and system based on SIP |
CN103581712A (en) * | 2013-11-04 | 2014-02-12 | 广州华工信元通信技术有限公司 | Multi-protocol video playing method and system based on mobile terminal |
CN104301140A (en) * | 2014-10-08 | 2015-01-21 | 广州华多网络科技有限公司 | Service request responding method, device and system |
CN107370806A (en) * | 2017-07-12 | 2017-11-21 | 北京京东尚科信息技术有限公司 | HTTP conditional codes 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 |
-
2020
- 2020-09-30 CN CN202011058297.9A patent/CN112188242B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101729880A (en) * | 2009-12-14 | 2010-06-09 | 中国电信股份有限公司 | Network video monitoring method and system based on SIP |
CN103581712A (en) * | 2013-11-04 | 2014-02-12 | 广州华工信元通信技术有限公司 | Multi-protocol video playing method and system based on mobile terminal |
CN104301140A (en) * | 2014-10-08 | 2015-01-21 | 广州华多网络科技有限公司 | Service request responding method, device and system |
CN107370806A (en) * | 2017-07-12 | 2017-11-21 | 北京京东尚科信息技术有限公司 | HTTP conditional codes 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 |
---|---|
CN112188242B (en) | 2022-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109152095B (en) | Wireless network connection method for terminal | |
EP4027664A1 (en) | Method and apparatus for providing network auxiliary information, electronic device, and computer-readable storage medium | |
CN104348811A (en) | Method and device for detecting attack of DDoS (distributed denial of service) | |
CN111935177B (en) | Service control method and device | |
CN111798664B (en) | Illegal data identification method and device and electronic equipment | |
US9801049B2 (en) | Method and system for continuously forwarding monitored information of machine-to-machine devices by a subscriber's registered terminals to a designated user terminal | |
CN111970215A (en) | Data packet management method and device | |
CN112188227A (en) | Streaming media data distribution method and device | |
CN112104893A (en) | Video stream management method and device for realizing plug-in-free playing of webpage end | |
CN113347158A (en) | Streaming media data receiving and transmitting method and device and electronic equipment | |
CN111800521A (en) | Front-end equipment control method and device | |
CN108924485A (en) | Client live video stream interruption processing method and system, monitoring system | |
CN112188245B (en) | Front-end camera real-time video-on-demand method and device and electronic equipment | |
WO2024027745A1 (en) | Network connection method, electronic device, readable storage medium, and chip | |
CN112188242B (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 | |
CN112188243B (en) | Front-end camera real-time video-on-demand method and device and electronic equipment | |
CN112367297B (en) | Service control method and device | |
CN112188244B (en) | Front-end camera real-time video-on-demand method and device and electronic equipment | |
CN112367296B (en) | Service control method and device | |
CN113038518B (en) | Network registration method and device and user equipment | |
CN112187810A (en) | Front-end equipment control method and device | |
CN112291207B (en) | Method and device for acquiring front-end equipment catalog | |
CN113766630A (en) | IMS network registration method, device and electronic equipment | |
CN112291210B (en) | Method and device for acquiring front-end equipment catalog |
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 |