CN112188243B - 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
CN112188243B
CN112188243B CN202011059162.4A CN202011059162A CN112188243B CN 112188243 B CN112188243 B CN 112188243B CN 202011059162 A CN202011059162 A CN 202011059162A CN 112188243 B CN112188243 B CN 112188243B
Authority
CN
China
Prior art keywords
sip
real
time video
http
demand
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
CN202011059162.4A
Other languages
Chinese (zh)
Other versions
CN112188243A (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 CN202011059162.4A priority Critical patent/CN112188243B/en
Publication of CN112188243A publication Critical patent/CN112188243A/en
Application granted granted Critical
Publication of CN112188243B publication Critical patent/CN112188243B/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/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/61Network physical structure; Signal processing
    • H04N21/6106Network physical structure; Signal processing specially adapted to the downstream path of the transmission network
    • H04N21/6131Network physical structure; Signal processing specially adapted to the downstream path of the transmission network involving transmission via a mobile phone network
    • 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/61Network physical structure; Signal processing
    • H04N21/6156Network physical structure; Signal processing specially adapted to the upstream path of the transmission network
    • H04N21/6181Network physical structure; Signal processing specially adapted to the upstream path of the transmission network involving transmission via a mobile phone network
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application provides a real-time video on demand method and a device thereof for a front-end camera and electronic equipment, based on the method, a data server firstly receives an http on demand request sent by a traffic police terminal based on an http protocol, and converted into sip request which can be identified by the front-end camera, and synchronously generate state identification for the two, then sending the sip on demand request to the 5G base station through long connection with the 5G base station, controlling the 5G base station to send the sip on demand request to the target camera and receiving the sip on demand response returned by the target camera, then, based on the long connection, the sip request response is returned, the identification content of the sip state identification and the http state identification is synchronously updated according to the content of the sip real-time video request response, when the identification content meets the preset condition, an http on-demand response is generated and returned to the traffic police terminal, and the whole on-demand process does not need to call special SDK software, so that the safety is ensured.

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 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 method and a device for video-on-demand of a front-end camera in real time and electronic equipment, which are 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, 5G basic station and traffic police terminal, the front end camera is connected based on the sip agreement 5G basic station, 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 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, wherein the identification content comprises an on-demand request overtime state and an on-demand request completion state;
according to the target camera identification, a target camera and a target 5G base station corresponding to the target camera are determined, long connection between the target camera and the target 5G base station is determined, the sip real-time video on demand request is sent to the target 5G base station through the long connection, so that the target 5G base station is controlled to send the sip real-time video on demand request to the target camera through a sip special line based on a sip protocol, and a sip processing signaling returned by the target camera through the sip special line based on the sip protocol is received;
receiving the sip processing signaling returned by the target 5G base station through the long connection, generating an sip real-time video on demand response according to the sip processing signaling, 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, is applicable to wisdom traffic system, wisdom traffic system includes front end camera, data server, 5G basic station and traffic police terminal, the front end camera is connected based on the sip agreement 5G basic station, 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 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 overtime state and an on-demand request completion state;
the sending module is used for determining a target camera and a target 5G base station corresponding to the target camera according to the target camera identification, determining long connection between the target camera and the target 5G base station, sending the sip real-time video on demand request to the target 5G base station through the long connection, controlling the target 5G base station to send the sip real-time video on demand request to the target camera through a sip special line based on a sip protocol, and receiving a sip processing signaling returned by the target camera through the sip special line based on the sip protocol;
a second synchronization module, configured to receive the sip processing signaling returned by the target 5G base station through the long connection, generate an sip real-time video-on-demand response according to the sip processing signaling, and synchronously update the identifier contents of the sip state identifier and the http state identifier according to the content of the sip real-time video-on-demand response;
the generating 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, a device and electronic equipment, a smart traffic system comprises front-end equipment, a data server, a 5G base station and a traffic police terminal, the front-end equipment is connected with the 5G base station based on a sip protocol, the traffic police terminal is accessed into the data server based on the http protocol, the real-time video on demand method is applied to the data server, based on the method, the application firstly receives an http on demand request sent by the traffic police terminal based on the http protocol, converts the http on demand request into a sip on demand request which can be identified by a front-end camera, synchronously generates a state identifier for the http on demand request and the sip on demand request, then sends the sip on demand request to a target 5G base station through a long connection with the target 5G base station, controls the target 5G base station to send the sip on demand request to the target camera, receives a sip processing signaling returned by the target camera, and then returns the sip processing signaling based on the long connection, the method comprises the steps of generating an sip real-time video on demand response, synchronously updating identification contents of an sip state identification and an http state identification according to the content of the sip real-time video on demand response, generating the http on demand response and returning the http on demand response to a traffic police terminal when the identification contents meet preset conditions, wherein the traffic police terminal can finish the whole on demand process only on a web browser or a platform without calling special SDK software, so that the safety is ensured. 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 real-time video-on-demand method for a front-end camera 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, a 5G base station and a traffic police terminal, wherein the front-end camera is connected with the 5G base station 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 front-end camera real-time video-on-demand method and device 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 formed by various gateways, and the application scene includes a traffic police terminal 11, a data server 12, a 5G base station 13, and a front-end camera 14; 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 5G base station 13 comprises a radio transceiver station which carries out information transmission with each terminal in a certain radio coverage area through a communication switching center;
the front-end camera 14 includes video and image capture devices located at the monitoring site.
The traffic police terminal 11, the data server 12, the 5G base station 13 and the front end camera 14 are located in a wireless network or a wired network, the front end camera 14 is connected with the 5G base station 13 based on an sip protocol, the traffic police terminal 11 is accessed into the data server 12 based on an http protocol, and the data server 12 is connected with the 5G base station 13 based on the 5G protocol, so as to realize data interaction between the four, wherein:
the data server 12 receives an http on demand request sent by the traffic police terminal 11 based on an http protocol, converts the http on demand request into an sip on demand request recognizable by the front-end camera 14, synchronously generates a state identifier for the http on demand request and the sip on demand request, sends the sip on demand request to the 5G base station 13 through long connection with the 5G base station 13, controls the 5G base station 13 to send the sip on demand request to the front-end camera 14, receives a sip processing signaling returned by the front-end camera 14, then returns the sip processing signaling based on the long connection, generates a sip real-time video on demand response, synchronously updates the identifier contents of the sip state identifier and the http state identifier according to the content of the sip real-time video on demand response, generates an http on demand response and returns the http on demand response to the traffic police terminal 11 when the identifier contents meet preset conditions, and realizes 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, 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 overtime state and an 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, 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.
S203: and determining a target camera and a target 5G base station corresponding to the target camera according to the target camera identification, determining long connection between the target camera and the target 5G base station, sending a sip real-time video on demand request to the target 5G base station through the long connection, so as to control the target 5G base station to send the sip real-time video on demand request to the target camera through a sip dedicated line based on a sip protocol, and receiving a sip processing signaling returned by the target camera through the sip dedicated line based on the sip protocol.
In a 5G scene, all front-end cameras in a certain area are correspondingly connected with a 5G base station, a one-to-many connection relation is formed between the 5G base station and the front-end cameras, and the connection relations are stored in a data server, so that a target camera corresponding to a target camera identifier can be determined according to the target camera identifier, and further the target camera can be determined to which 5G base station the target camera is connected, and the 5G base station is taken as the target 5G base station. And for all 5G base stations, long connection is established between the data server, after the target 5G base station is determined, the long connection between the data server and the target 5G base station can be found, and then the sip real-time video on demand request is sent to the target 5G base station through the long connection.
The long connection between the data server and the target 5G base station is transmitted based on a 5G protocol, and the sip real-time video-on-demand request is a request under the sip protocol, so that during transmission, the sip real-time video-on-demand request is firstly encapsulated into a first encapsulation packet and then is transmitted to the target 5G base station through the long connection, and the target 5G base station then unpacks the first encapsulation packet into the sip real-time video-on-demand request.
The target 5G base station is connected with the front-end cameras by a sip protocol, and each front-end camera is connected by a sip dedicated line to ensure the safety of data, so that after the target 5G base station receives a sip real-time video on demand request, the data server controls the target 5G base station to send the sip real-time video on demand request to the target cameras through the sip dedicated lines based on the sip protocol, and after the target cameras process the sip real-time video on demand request, the target cameras return a sip processing signaling through the sip dedicated lines.
S204: and receiving an sip processing signaling returned by the target 5G base station through the long connection, generating an sip real-time video on demand response according to the sip processing signaling, and 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 after receiving the sip processing signaling, the target 5G base station returns the sip processing signaling to the data server through the long connection, and when returning, the target 5G base station encapsulates the sip processing signaling into a second encapsulation packet supporting the 5G protocol, and then unpacks the second encapsulation packet after receiving the sip processing signaling, so as to obtain the sip processing signaling.
And the data server generates an sip real-time video-on-demand response according to the sip processing signaling, and then 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. 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.
S205: 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 identification content of the http state identification are 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, and 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.
S206: 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 on-demand request sent by a traffic police terminal based on an http protocol, converts the http on-demand request into an sip on-demand request recognizable by a front-end camera, and synchronously generates a state identifier for the http on-demand request and the sip on-demand request, then sends the sip on-demand request to a target 5G base station through a long connection with the target 5G base station, controls the target 5G base station to send the sip on-demand request to the target camera, receives a sip processing signaling returned by the target camera, then returns the sip processing signaling based on the long connection, generates a sip real-time video-on-demand response, and synchronously updates the identifier contents of the sip state identifier and the http state identifier according to the contents of the sip real-time video-on-demand response, generates an http on-demand response and returns the http response to the traffic police terminal when the identifier contents satisfy a preset condition, and the traffic police terminal only needs to complete the whole on a web browser or a platform, and special SDK software is not required to be called, so that the safety is ensured, in addition, the information transmission is carried out through the 5G base station, the speed is higher, and the convenience for acquiring the traffic data and the illegal data 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 by the sip side processing logic 24 is completed, the sip real-time video on demand request is sent to the target 5G base station 25 through the long connection between the target 5G base stations 25, the target 5G base station 25 sends the sip real-time video on demand request to the target camera 26, and receives the sip processing signaling returned from the target camera 26 to the target 5G base station 25, the target 5G base station 25 returns the sip processing signaling to the sip side processing logic 24 based on the long connection, the sip side processing logic 24 generates the sip real-time video on demand response according to the returned sip processing signaling and 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 status identification and the sip status identification according to the content of the sip real-time video on demand response, when the identification content of the http state identification meets the preset condition, generating an http real-time video on demand response and sending the http real-time video on demand response to the http side processing logic 22; the http side processing logic 22 returns an http real-time video on demand response 27 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 27.
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, and a user agent server 244, and the front-end camera real-time video on demand method according to the present application is specifically described below with reference to fig. 4 and fig. 5.
And the traffic police terminal sends an http real-time video on demand request 21 to the http side processing logic 22, wherein the http real-time video on demand request 21 carries the target camera identification. The data server determines that a target camera is specifically located at xx road junction of xx road section of xx area according to a target camera identification so as to send http real-time video on demand request 21 to the target camera, and then determines to which terminal the on demand response and the real-time video stream are specifically sent after receiving the on demand response and the real-time video stream according to a terminal identification, so that a traffic police terminal can obtain the real-time video shot by the target camera, determine data such as traffic violation type, traffic violation time, information of traffic violation vehicles or pedestrians and the like according to traffic behaviors of vehicles or pedestrians at the junction in the real-time video, and can process the data according to the traffic violation 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 video-on-demand request 21 into the http message manager 224, the validity judgment 223 is further performed on the parsed http real-time video-on-demand 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 27 at the traffic police terminal. When the traffic police terminal sends the http real-time video-on-demand request 21, the http real-time video-on-demand request 21 is sent 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 target camera identification and an on-demand command, if the input of each identification or the on-demand command is wrong, subsequent processing logic is affected, therefore, after analysis, logic judgment is made 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, arrangement sequence of each parameter and the like, if the type is legal, the next step is entered, the http real-time video-on-demand request 21 is cached in the http message manager 224, if the type is illegal, a termination request result is returned to the traffic police terminal, and a specific error type can be further displayed, if the input is an invalid parameter or a corresponding target camera cannot be found, and the like, 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 through the target 5G base station 25 based on the long connection with the target 5G base station 25. 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 27 to the traffic police terminal, and the traffic police terminal can obtain the processing result of the request.
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 target 5G base station 25 according to the check result. When a new sip real-time video-on-demand request arrives at the sip message manager 242, according to the target camera identification carried in the sip real-time video-on-demand request, the target camera corresponding to the identification is determined, and then the 5G base station to which the target camera is connected is determined, and the 5G base station is used as the target 5G base station 25. For all 5G base stations, long connection is established between the base stations and the data server, after the target 5G base station 25 is determined, the long connection between the data server and the target 5G base station 25 can be found, and then the sip real-time video-on-demand request is sent to the target 5G base station 25 through the long connection.
In one embodiment, the specific step of sending the sip real-time video on demand request to the target 5G base station 25 includes: caching the sip real-time video-on-demand request into the sip message manager 242; encapsulating the sip real-time video-on-demand request into a first encapsulation packet; the first encapsulated packet is sent over the long connection to the target 5G base station 25. Because the long connection between the data server and the target 5G base station 25 is based on the 5G protocol transmission, and the sip real-time video-on-demand request is a request under the sip protocol, the sip real-time video-on-demand request is firstly encapsulated into a first encapsulation packet, then the first encapsulation packet is sent to the target 5G base station 25 through the long connection, and then the target 5G base station 25 unpacks the first encapsulation packet into the sip real-time video-on-demand request.
In one embodiment, the specific step of sending the sip real-time video on demand request to the target 5G base station 25 further includes: acquiring a connection period of a target 5G base station 25 and a target camera 26; and in the connection period, sending a sip real-time video on demand request to the target 5G base station 25 through the long connection so as to control the target 5G base station 25 to send the sip real-time video on demand request to the target camera 26 through a sip special line based on a sip protocol. The target 5G base station 25 and all front-end cameras in the connection range thereof form a one-to-many relationship, for each front-end camera, the target 5G base station 25 has a connection channel corresponding to the front-end camera, but the connection channels between the target 5G base station 25 and the front-end cameras are not communicated at all times, but are sequentially opened and closed according to a certain sequence, so that for each front-end camera, there is a corresponding connection period, and only in the connection period, the front-end camera and the target 5G base station 25 can realize communication, so that it is necessary to first obtain the connection period between the target 5G base station 25 and the target camera 26, and then in the connection period, control the target 5G base station 25 to send a sip real-time video-on-demand request to the target camera 26.
The target 5G base station 25 is connected with the front-end cameras by a sip protocol, and each front-end camera is connected by a sip dedicated line to ensure the safety of data, so that after the target 5G base station 25 receives a sip real-time video-on-demand request, the data server controls the target 5G base station 25 to send the sip real-time video-on-demand request to the target camera 26 through the sip dedicated line based on the sip protocol, and after the target camera 26 processes the sip real-time video-on-demand request, the sip processing signaling is returned to the target 5G base station 25 through the sip dedicated line.
And after receiving the sip processing signaling, the target 5G base station returns the sip processing signaling to the sip side processing logic 24 of the data server through the long connection, and the sip side processing logic 24 generates a sip real-time video on demand response according to the sip processing signaling 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 second encapsulation packet returned by the target 5G base station 25 to the sip message manager 242 through the long connection, and unpacking the second encapsulation packet to obtain an sip processing signaling of the target camera 26; 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 sip 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 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 26 after processing the sip real-time video on demand request is sent to the sip side processing logic 24, and then 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. 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.
The message synchronizer 23 generates an http real-time video on demand response 27 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 27 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 27 that the real-time video-on-demand is completed.
And after generating the http real-time video on demand response 27, returning the http real-time video on demand response 27 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 27, 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 27.
In one embodiment, the steps after returning the http real-time video on demand response 27 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 27, 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.
It can be known from the above embodiments that the front-end camera real-time video-on-demand method of the present application, first receives an http on-demand request sent by a traffic police terminal based on an http protocol, converts the http on-demand request into an sip on-demand request recognizable by a front-end camera, and synchronously generates a state identifier for the http on-demand request and the sip on-demand request, then sends the sip on-demand request to a target 5G base station through a long connection with the target 5G base station, controls the target 5G base station to send the sip on-demand request to the target camera, receives a sip processing signaling returned by the target camera, then returns the sip processing signaling based on the long connection, generates a sip real-time video-on-demand response, and synchronously updates the identifier contents of the sip state identifier and the http state identifier according to the content of the sip real-time video-on-demand response, generates an http response and returns the http response to the traffic police terminal when the identifier contents satisfy a preset condition, the whole on-demand process traffic police terminal can complete on a web browser or a platform, and in addition, the information transmission is carried out through the 5G base station, the speed is high, and the convenience for acquiring traffic data and illegal data 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. 6 and 7, in actual operation, the traffic police terminal performs real-time video on demand by using a front-end camera on a 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 an on-demand interface, the stop play control 200 corresponds to a 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 box 400 of a webpage popped up in fig. 7 and sent, and after an http real-time video on-demand response is received, a corresponding real-time video picture can be displayed in a video area 300 of the webpage in fig. 6. 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 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 synchronize 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;
the sending module 130 is configured to determine, according to the target camera identifier, a target 5G base station corresponding to the target camera and a long connection with the target 5G base station, send a sip real-time video-on-demand request to the target 5G base station through the long connection, so as to control the target 5G base station to send the sip real-time video-on-demand request to the target camera through a sip dedicated line based on a sip protocol, and receive a sip processing signaling returned by the target camera through the sip dedicated line based on the sip protocol;
the second synchronization module 140 is configured to receive an sip processing signaling returned by the target 5G base station through the long connection, generate an sip real-time video-on-demand response according to the sip processing signaling, and synchronously update the identification content of the sip state identifier and the identification content of the http state identifier according to the content of the sip real-time video-on-demand response;
the generating module 150 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 meets a preset condition;
and the returning module 160 is used for returning 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 130 specifically includes:
the caching unit is used for caching the sip real-time video-on-demand request into the sip message manager;
the first packaging unit is used for packaging the sip real-time video-on-demand request into a first packaging packet;
and the first sending unit is used for sending the first encapsulating packet to the target 5G base station through the long connection.
In an embodiment, the second synchronization module 140 specifically includes:
the unpacking unit is used for receiving a second encapsulation packet returned to the sip message manager by the target 5G base station through long connection, and unpacking the second encapsulation packet to obtain an sip processing signaling of the target camera;
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 sip processing signaling;
the response generating unit is used for generating and returning a sip real-time video on demand response to the message synchronizer when detecting that the identification content of the sip state identification is overtime or the on demand request is finished;
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 overtime or the on-demand request is completed according to the content of the sip real-time video on-demand response.
In one embodiment, the generating module 150 specifically includes one of the following units:
the overtime generation unit 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 generating unit 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 sending module 130 further includes:
the period acquisition unit is used for acquiring the connection period of the target 5G base station and the target camera;
and the second sending unit is used for sending the sip real-time video on demand request to the target 5G base station through long connection in the connection period so as to control the target 5G base station to send the sip real-time video on demand request to the target camera through a sip private line based on a sip protocol.
Different from the prior art, the real-time video on demand device provided by the application firstly receives an http on demand request sent by a traffic police terminal 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, synchronously generates a state identifier for the http on demand request and the sip on demand request, then sends the sip on demand request to a target 5G base station through long connection with the target 5G base station, controls the target 5G base station to send the sip on demand request to the target camera, receives a sip processing signaling returned by the target camera, then returns the sip processing signaling based on the long connection, generates a sip real-time video on demand response, synchronously updates the identifier contents of the sip state identifier and the http state identifier according to the content of the sip real-time video on demand response, generates an http on demand response and returns the http on demand response to the traffic police terminal when the identifier contents meet preset conditions, and can be finished by the traffic police terminal only on a web browser or a platform in the whole on demand process, and in addition, the information transmission is carried out through the 5G base station, the speed is high, and the convenience for acquiring traffic data and illegal data 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 architecture shown in fig. 9 does not constitute a limitation of a server and may include more or fewer components than 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 the user and various graphical user interfaces of the server, 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 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 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 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 overtime state and an on-demand request completion state; according to the identification of the target camera, determining the target camera and a target 5G base station corresponding to the target camera, determining long connection with the target 5G base station, sending a sip real-time video on demand request to the target 5G base station through the long connection, so as to control the target 5G base station to send the sip real-time video on demand request to the target camera through a sip dedicated line based on a sip protocol, and receiving a sip processing signaling returned by the target camera through the sip dedicated line based on the sip protocol; receiving an sip processing signaling returned by the target 5G base station through long connection, generating an sip real-time video on demand response according to the sip processing signaling, 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 identifier.
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 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 overtime state and an on-demand request completion state; according to the identification of the target camera, determining the target camera and a target 5G base station corresponding to the target camera, determining long connection with the target 5G base station, sending a sip real-time video on demand request to the target 5G base station through the long connection, so as to control the target 5G base station to send the sip real-time video on demand request to the target camera through a sip dedicated line based on a sip protocol, and receiving a sip processing signaling returned by the target camera through the sip dedicated line based on the sip protocol; receiving an sip processing signaling returned by the target 5G base station through long connection, generating an sip real-time video on demand response according to the sip processing signaling, 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. The real-time video on demand method of the front-end camera is characterized by being suitable for a smart traffic system, the smart traffic system comprises the front-end camera, a data server, a 5G base station and a traffic police terminal, the front-end camera is connected with the 5G base station based on an sip protocol, the traffic police terminal is 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, 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 identifier, generating an http state identifier corresponding to the http real-time video-on-demand request, 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;
according to the target camera identification, a target camera and a target 5G base station corresponding to the target camera are determined, long connection between the target camera and the target 5G base station is determined, the sip real-time video on demand request is sent to the target 5G base station through the long connection, so that the target 5G base station is controlled to send the sip real-time video on demand request to the target camera through a sip special line based on a sip protocol, and a sip processing signaling returned by the target camera through the sip special line based on the sip protocol is received;
receiving the sip processing signaling returned by the target 5G base station through the long connection, generating an sip real-time video on demand response according to the sip processing signaling, 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 5G base station through the long connection comprises:
caching the sip real-time video on demand request into a sip message manager;
encapsulating the sip real-time video-on-demand request into a first encapsulation packet;
and sending the first encapsulating packet to the target 5G base station through the long connection.
5. The front-end camera real-time video-on-demand method according to claim 1, wherein the step of receiving the sip processing signaling returned by the target 5G base station through the long connection, generating a sip real-time video-on-demand response according to the sip processing signaling, and synchronously updating the identification contents of the sip state identifier and the http state identifier according to the contents of the sip real-time video-on-demand response comprises:
receiving a second encapsulation packet returned to the sip message manager by the target 5G base station through the long connection, and unpacking the second encapsulation packet to obtain a sip processing signaling of the target camera;
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 sip 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, generating and 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 1, wherein the step of sending the sip real-time video-on-demand request to the target 5G base station through the long connection to control the target 5G base station to send the sip real-time video-on-demand request to the target camera through a sip dedicated line based on a sip protocol comprises:
acquiring a connection period between the target 5G base station and the target camera;
and in the connection period, sending the sip real-time video on demand request to the target 5G base station through the long connection so as to control the target 5G base station to send the sip real-time video on demand request to the target camera head through a sip private line based on a sip protocol.
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, 5G basic station and traffic police's terminal, the front end camera is connected based on the sip agreement the 5G basic station, the traffic police's 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 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 overtime state and an on-demand request completion state;
the sending module is used for determining a target camera and a target 5G base station corresponding to the target camera according to the target camera identification, determining long connection between the target camera and the target 5G base station, sending the sip real-time video on demand request to the target 5G base station through the long connection, controlling the target 5G base station to send the sip real-time video on demand request to the target camera through a sip special line based on a sip protocol, and receiving a sip processing signaling returned by the target camera through the sip special line based on the sip protocol;
a second synchronization module, configured to receive the sip processing signaling returned by the target 5G base station through the long connection, generate an sip real-time video-on-demand response according to the sip processing signaling, and synchronously update the identifier contents of the sip state identifier and the http state identifier according to the content of the sip real-time video-on-demand response;
the generating 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.
CN202011059162.4A 2020-09-30 2020-09-30 Front-end camera real-time video-on-demand method and device and electronic equipment Active CN112188243B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011059162.4A CN112188243B (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
CN202011059162.4A CN112188243B (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
CN112188243A CN112188243A (en) 2021-01-05
CN112188243B true CN112188243B (en) 2022-07-12

Family

ID=73945584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011059162.4A Active CN112188243B (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) CN112188243B (en)

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
CN112188243A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN102761864B (en) Data transmission method, system and device
CN111798664B (en) Illegal data identification method and device and electronic equipment
CN104348811A (en) Method and device for detecting attack of DDoS (distributed denial of service)
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
CN111970215B (en) Data packet management method and device
CN111935177B (en) Service control method and device
CN112188227A (en) Streaming media data distribution method and device
CN110399578A (en) Page access method and device
CN111800521A (en) Front-end equipment control method and device
CN112104893A (en) Video stream management method and device for realizing plug-in-free playing of webpage end
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
CN112188243B (en) Front-end camera real-time video-on-demand method and device and electronic equipment
CN112217813A (en) Front-end equipment control method and device
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
CN112188244B (en) Front-end camera real-time video-on-demand method and device and electronic equipment
CN112367297B (en) Service control method and device
CN112367296B (en) Service control method and device
CN112187810A (en) Front-end equipment control method and device
CN112291207B (en) Method and device for acquiring front-end equipment catalog
CN112291210B (en) Method and device for acquiring front-end equipment catalog
CN112201046B (en) Illegal data identification method and device and electronic equipment
CN114125502B (en) Video stream 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