CN117834374A - Distributed camera implementation method, device, equipment and storage medium - Google Patents

Distributed camera implementation method, device, equipment and storage medium Download PDF

Info

Publication number
CN117834374A
CN117834374A CN202211179834.4A CN202211179834A CN117834374A CN 117834374 A CN117834374 A CN 117834374A CN 202211179834 A CN202211179834 A CN 202211179834A CN 117834374 A CN117834374 A CN 117834374A
Authority
CN
China
Prior art keywords
target
server
client
video data
distributed
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.)
Pending
Application number
CN202211179834.4A
Other languages
Chinese (zh)
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.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202211179834.4A priority Critical patent/CN117834374A/en
Publication of CN117834374A publication Critical patent/CN117834374A/en
Pending legal-status Critical Current

Links

Abstract

The application provides a distributed camera implementation method, a distributed camera implementation device, a distributed camera implementation equipment and a storage medium. The method comprises the following steps: the client and at least one server access to the same local area network, cameras of the server are used as distributed cameras of the client, client applications are installed on the client, server applications are installed on the server and applied to the client, the client communicates with the at least one server based on an ONVIF protocol, and information related to the distributed cameras and the server sent by the at least one server is received; determining video data stream acquisition interfaces corresponding to the distributed cameras; receiving a target distributed camera starting request; calling a target video data stream acquisition interface, and establishing communication connection between a client and a target server based on an RTSP protocol; receiving a target video data stream sent by a target server; and displaying a view of the target distributed camera on the user interface according to the target video data stream. The application-level distributed camera can realize the pure application-level distributed camera of a non-specific operating system.

Description

Distributed camera implementation method, device, equipment and storage medium
Technical Field
The present disclosure relates to communication technologies, and in particular, to a method, an apparatus, a device, and a storage medium for implementing a distributed camera.
Background
When the local device can use the camera of the remote device to acquire the view of the camera of the remote device, the camera of the remote device can be used as a distributed camera of the local device. The local device can acquire the view angles and the framing pictures of a plurality of remote devices through the distributed camera. The user can obtain the framing pictures of different view angles and different scenes through the distributed cameras of the local equipment without switching the equipment or moving the position.
Currently, implementation of a distributed camera requires that the operating system between multiple devices be a specific operating system. For other devices that do not use a specific operating system, a distributed camera cannot be implemented.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for realizing a distributed camera, which are used for solving the problem that a non-specific operating system device in the prior art cannot realize the distributed camera.
According to a first aspect of the present application, there is provided a distributed camera implementation method, in which a client accesses the same local area network as at least one server, and a camera of each server is used as a distributed camera of the client, a client application is installed on the client, and a server application is installed on each server and applied to the client, including:
Based on ONVIF protocol, communicating with at least one server, receiving the associated information of the server and the distributed camera sent by the at least one server;
determining video data stream acquisition interfaces corresponding to the distributed cameras according to the associated information of the distributed cameras and the service terminals;
receiving a target distributed camera starting request triggered by a user; the target distributed camera starting request comprises a target distributed camera identifier;
calling a target video data stream acquisition interface corresponding to the target distributed camera identifier, and establishing communication connection between the client and the target server based on an RTSP; the target server is a server where the target distributed camera is located;
receiving a target video data stream of a target distributed camera sent by a target server based on communication connection between a client and the target server;
and displaying a view of the target distributed camera on the user interface according to the target video data stream.
According to a second aspect of the present application, there is provided a distributed camera implementation method, in which a client accesses the same local area network as at least one server, and a camera of each server is used as a distributed camera of the client, a client application is installed on the client, and a server application is installed on each server and applied to a target server, including:
Based on ONVIF protocol, communicating with the client, and sending the related information of the target server and the distributed camera to the client;
establishing communication connection between a target server and a client;
and starting the target distributed camera based on the communication connection between the target server and the client, acquiring a target video data stream of the target distributed camera, and sending the target video data stream to the client.
According to a third aspect of the present application, there is provided a distributed camera implementation apparatus, in which a client accesses the same local area network as at least one server, a camera of each server is used as a distributed camera of the client, a client application is installed on the client, a server application is installed on each server, and the distributed camera implementation apparatus is applied to the client, and includes:
the first receiving module is used for communicating with at least one server based on the ONVIF protocol and receiving the associated information of the server and the distributed cameras, which is sent by the at least one server;
the determining module is used for determining video data stream acquisition interfaces corresponding to the distributed cameras according to the associated information of the service terminals and the distributed cameras;
the second receiving module is used for receiving a target distributed camera starting request triggered by a user; the target distributed camera starting request comprises a target distributed camera identifier;
The first communication module is used for calling a target video data stream acquisition interface corresponding to the target distributed camera identifier and establishing communication connection between the client and the target server based on an RTSP (real time streaming protocol); the target server is a server where the target distributed camera is located;
the third receiving module is used for receiving a target video data stream of the target distributed camera sent by the target server based on the communication connection between the client and the target server;
and the display module is used for displaying the framing picture of the target distributed camera on the user interface according to the target video data stream.
According to a fourth aspect of the present application, there is provided a distributed camera implementation apparatus, in which a client accesses the same local area network as at least one server, and cameras of the respective servers are used as distributed cameras of the client, a client application is installed on the client, and a server application is installed on the respective servers and applied to a target server, including:
the first sending module is used for communicating with the client based on the ONVIF protocol and sending the related information of the target server and the distributed cameras to the client;
the second communication module is used for establishing communication connection between the target server and the client;
the second sending module is used for starting the target distributed camera based on the communication connection between the target server and the client, obtaining a target video data stream of the target distributed camera and sending the target video data stream to the client.
According to a fifth aspect of the present application, there is provided an electronic device comprising: a memory, a processor and a transceiver;
the memory, the processor and the transceiver circuitry being interconnected;
the memory stores computer-executable instructions;
the transceiver is used for receiving and transmitting data;
the processor executes computer-executable instructions stored in the memory to implement the method as described in the first aspect.
According to a sixth aspect of the present application, there is provided a computer readable storage medium having stored therein computer executable instructions for implementing the method according to the first aspect when executed by a processor.
The distributed camera implementation method, the device, the equipment and the storage medium are characterized in that a client and at least one server access to the same local area network, cameras of all the servers are used as distributed cameras of the client, client applications are installed on the client, server applications are installed on all the servers and applied to the client, the client communicates with at least one server based on an ONVIF protocol, and server and distributed camera association information sent by at least one server is received; determining video data stream acquisition interfaces corresponding to the distributed cameras according to the associated information of the distributed cameras and the service terminals; receiving a target distributed camera starting request triggered by a user; the target distributed camera starting request comprises a target distributed camera identifier; calling a target video data stream acquisition interface corresponding to the target distributed camera identifier, and establishing communication connection between the client and the target server based on an RTSP; the target server is a server where the target distributed camera is located; receiving a target video data stream of a target distributed camera sent by a target server based on communication connection between a client and the target server; and displaying a view of the target distributed camera on the user interface according to the target video data stream. The client acquires the relevant information of the server and the distributed cameras based on the ONVIF protocol, and determines video data stream acquisition interfaces corresponding to the distributed cameras according to the relevant relation of the server and the distributed cameras, and then when a user triggers a target distributed camera starting request, the client can directly call a target video data stream acquisition interface corresponding to the target distributed camera, establish communication connection with the target server, receive the target video data stream of the target distributed camera sent by the target server through the communication connection between the client and the target server, and then display a view finding picture of the target distributed camera on the user interface according to the target video data stream, thereby realizing the distributed camera of a pure application layer of a non-specific operating system.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a network architecture diagram corresponding to an application scenario of a distributed camera implementation method according to an embodiment of the present application;
FIG. 2 is a flow chart of a distributed camera implementation method according to an embodiment of the present application;
fig. 3 is a flow chart of a distributed camera implementation method according to a second embodiment of the present application;
fig. 4 is a flow chart of a distributed camera implementation method according to a third embodiment of the present application;
fig. 5 is a flow chart of a distributed camera implementation method according to a fourth embodiment of the present application;
fig. 6 is a flow chart of a distributed camera implementation method according to a fifth embodiment of the present application;
fig. 7 is a schematic structural diagram of a distributed camera implementation device according to a sixth embodiment of the present application;
fig. 8 is a schematic structural diagram of a distributed camera implementation apparatus according to a seventh embodiment of the present application;
fig. 9 is a block diagram of an electronic device provided according to an eighth embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
The terms referred to in this application are explained first.
ONVIF (Open Network Video Interface Forum) is a network video standard protocol for implementing information exchange between different network video devices.
RTSP (Real Time Streaming Protocol) is a multimedia data transfer protocol for controlling the transmission of real-time media stream data.
The prior art to which the present application relates is described in detail and analyzed below.
When the operating systems of the devices are all characteristic operating systems, such as a hong Monte-ging system, the devices can realize multi-device discovery through wireless local area network peer-to-peer connection (WLAN P2P) technology, and the remote device cameras are opened, closed and other operations through the distributed camera function of the operating system. However, the technology of implementing a distributed camera between specific operating systems is not disclosed at present, and only between devices using the specific operating systems, the distributed camera cannot be implemented by other non-specific operating systems.
In summary, in the prior art, a distributed camera cannot be implemented by a non-specific operating system device.
Therefore, in order to enable the non-specific operating system device to implement the distributed camera, the inventor has proposed the technical scheme of the present application, by creatively researching that clients and service terminals can be connected to the same lan, client applications are installed on the clients, service applications are installed on the service terminals, cameras of the respective service terminals are used as the distributed cameras of the clients, and the distributed cameras are implemented in the pure application layer, so that the non-specific operating system device can implement the distributed cameras, so that the inventor has provided the following technical scheme: the client and at least one server access to the same local area network, cameras of the server are used as distributed cameras of the client, client applications are installed on the client, server applications are installed on the server and applied to the client, the client communicates with the at least one server based on an ONVIF protocol, and information related to the distributed cameras and the server sent by the at least one server is received; determining video data stream acquisition interfaces corresponding to the distributed cameras according to the associated information of the distributed cameras and the service terminals; receiving a target distributed camera starting request triggered by a user; the target distributed camera starting request comprises a target distributed camera identifier; calling a target video data stream acquisition interface corresponding to the target distributed camera identifier, and establishing communication connection between the client and the target server based on an RTSP; the target server is the server where the target distributed camera is located; receiving a target video data stream of a target distributed camera sent by a target server based on communication connection between a client and the target server; and displaying a view of the target distributed camera on the user interface according to the target video data stream. The client acquires the relevant information of the server and the distributed cameras based on the ONVIF protocol, and determines video data stream acquisition interfaces corresponding to the distributed cameras according to the relevant relation of the server and the distributed cameras, and then when a user triggers a target distributed camera starting request, the client can directly call a target video data stream acquisition interface corresponding to the target distributed camera, establish communication connection with the target server, receive the target video data stream of the target distributed camera sent by the target server through the communication connection between the client and the target server, and then display a view finding picture of the target distributed camera on the user interface according to the target video data stream, thereby realizing the distributed camera of a pure application layer of a non-specific operating system.
The method, the device, the equipment and the storage medium for realizing the distributed camera aim to solve the technical problems in the prior art. The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
The network architecture and application field Jing Jinhang of the distributed camera implementation method provided in the embodiments of the present application will be described below. When the following description refers to the accompanying drawings, the same data in different drawings represents the same or similar elements, unless otherwise indicated.
Fig. 1 is a network architecture diagram corresponding to an application scenario of a distributed camera implementation method according to an embodiment of the present application, and as shown in fig. 1, in a network architecture corresponding to an application scenario provided by an embodiment of the present application, the network architecture includes: a client 10, a first server 11, a second server 12 and a route switching device 13. The client has at least one camera and the first server 11 and the second server 12 have at least one camera.
The client 10, the first server 11 and the second server 12 access the route switching device 13 and access the same local area network. The client 10 has a client application installed thereon, and the first server and the second server 12 have a server application installed thereon.
After the user starts the client application on the client 10 and starts the server applications on the first application server 11 and the second application server 12. The client 10 may communicate with at least one of the first server 11 and the second server 12 in the local area network based on the ONVIF protocol, and receive server-side and distributed camera association information transmitted by at least one of the first server 11 and the second server 12.
After the client 10 receives the information related to each server and the distributed camera, a video data stream acquisition interface corresponding to each distributed camera may be determined according to the information related to each server and the distributed camera.
The user may trigger a target distributed camera activation request in an operation interface of the client application, where the target distributed camera activation request includes a target distributed camera identifier. The target distributed camera is a camera on the first server 11 or the second server 12.
After receiving a target distributed camera starting request triggered by a user, the client 10 invokes a target video data stream acquisition interface corresponding to the target distributed camera, and establishes communication connection between the client 10 and a target server, wherein the target server is the server where the target distributed camera is located. Illustratively, as shown in FIG. 1, the target server is the second server 12.
The client 10 receives a target video data stream of a target distributed camera sent by the target server based on communication connection with the target server, and can display a view finding picture of the target distributed camera on a user interface according to the target video data stream, so as to realize a distributed camera function.
The client may be a wireless terminal or a wired terminal, and the server may be a wireless terminal or a wired terminal. A wireless terminal may be a device that provides voice and/or other traffic data connectivity to a user, a handheld device with wireless connectivity, or other processing device connected to a wireless modem. A wireless terminal may communicate with one or more core network devices via a radio access network (Radio Access Network, RAN for short), which may be a mobile terminal, such as a mobile phone (or "cellular" phone), a computer with a mobile terminal, and a smart device, e.g., a portable, pocket, hand-held, computer-built-in, or vehicle-mounted mobile device. Alternatively, the wireless terminal may be a monitoring device such as a recorder, a control ball, etc., which is not limited herein. Optionally, the operating system of the terminal may be an android system.
Embodiments of the present application will be described below with reference to the accompanying drawings. The embodiments described in the examples below do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
Example 1
Fig. 2 is a flow chart of a distributed camera implementation method according to an embodiment of the present application, and as shown in fig. 2, an execution subject of the present application is a distributed camera implementation device, where the distributed camera implementation device is located in a client. In the distributed camera implementation method provided by the embodiment, the client and at least one server access to the same local area network, the camera of each server is used as the distributed camera of the client, the client is provided with a client application, and each server is provided with a server application applied to the client, and the method comprises the steps 201 to 206.
Step 201, based on the ONVIF protocol, communicating with at least one server, and receiving server and distributed camera association information sent by at least one server.
In this embodiment, the client has a client application installed thereon. The server is provided with a server application and at least one camera. Wherein a camera can be understood as a video camera. The client and the server both support the ONVIF protocol, and the client and at least one server access the same local area network. The routing switch of the local area network supports multicast message forwarding.
The client may periodically send a multicast message in the lan based on the ONVIF protocol, searching for a server in the lan. The server side responds to the multicast message sent by the client side to communicate with the client side based on the ONVIF protocol, and sends the association information of the server side and the distributed cameras to the client side. The server and distributed camera association information may include: the streaming address of the server and the distributed camera identifications on the server.
Optionally, the server side and the distributed camera associated information may further include server side and distributed camera capability information, where the server side and the distributed camera capability information refer to functions supported by the server side and the distributed camera, such as, for example, supported resolution, coding mode, transmission protocol, whether the distributed camera can turn, whether audio can be collected, and the like. In a subsequent step, the client may determine configuration parameters, such as resolution, of the target video data stream based on the server and the distributed camera capability information. And the client-side control distributed camera function can be realized through an RTSP protocol.
The client can determine each distributed camera of the client according to the information related to each service end and the distributed camera, display each distributed camera in an interface of the client application, inform a user that a view finding picture of each distributed camera view angle can be obtained, and further realize the function of the distributed camera.
The client may filter out duplicate distributed cameras, remove offline distributed cameras, and update each distributed camera in the interface of the client application in real time during the periodic search.
In this embodiment, when the client and the plurality of servers access the same lan, the client and the plurality of servers may be connected to the same routing switch device. When the client and a service access to the same local area network, the service can start the hot spot, the client accesses to the hot spot of the service, and the client also starts the hot spot, and the service accesses to the hot spot of the client. The manner in which the client and at least one server access the same lan is not limited in this embodiment.
Step 202, determining video data stream acquisition interfaces corresponding to the distributed cameras according to the associated information of the distributed cameras and the service terminals.
In this embodiment, after the client obtains the information related to the server and the distributed camera based on the ONVIF protocol, the communication between the client and the server is disconnected, and the entity of the distributed camera of the client is located on the server, so when the user starts the target distributed camera, the client needs to establish a communication connection with the target server in order to obtain the view of the target distributed camera.
Therefore, after the client side obtains the relevant information of each server side and the distributed cameras, the client side can determine the video data stream obtaining interface corresponding to each distributed camera according to the relevant information of each server side and the distributed cameras. And when the video data stream interface is called, returning to the streaming address corresponding to the target distributed camera. Wherein the pull address may be a media plane pull address URI. The pull stream address includes the IP address of the target server.
Alternatively, the client may update the information associated with the distributed cameras by each server in real time during the periodic search. Since the same server exits after first accessing the lan, the IP address at the second re-access may be different from the IP address at the first access. Therefore, the change of the server-side streaming address will cause the streaming address of the distributed camera to change. The client can update the video data stream acquisition interface corresponding to the distributed camera according to the latest acquired service end and the distributed camera association information, so that the video data stream acquisition interface can return an accurate stream pulling address.
Step 203, receiving a target distributed camera starting request triggered by a user; the target distributed camera activation request includes a target distributed camera identification.
In this embodiment, after the client displays each distributed camera in the interface of the client application, the user may trigger the target distributed camera start request in the interface of the client application. For example, the client forms each distributed camera into an icon or list, and the user selects a target distributed camera by selecting information in the icon or list, triggering a target distributed camera activation request. The user may obtain the viewing angles of multiple distributed cameras by activating different distributed cameras.
Step 204, calling a target video data stream acquisition interface corresponding to the target distributed camera identifier, and establishing communication connection between the client and the target server based on an RTSP protocol; the target server is the server where the target distributed camera is located.
In this embodiment, the client may obtain the pull stream address of the target distributed camera by calling the target video data stream interface corresponding to the target distributed camera, and access the target pull stream address to establish communication connection with the target server.
Step 205, receiving a target video data stream of a target distributed camera sent by a target server based on the communication connection between the client and the target server.
In this embodiment, after the communication connection between the client and the target server is established based on the RTSP protocol, the client and the target server may communicate. Thus, the client may send a video data stream acquisition request to the target server, where the video data stream acquisition request includes the target distributed camera identification. Because the target distributed camera is a camera on the target server, the target server can start the target distributed camera after receiving the video data stream acquisition request, acquire the target video data stream of the target distributed camera, and send the target video data stream to the client. The target server side starts a target distributed camera, acquires an original video image acquired by the target distributed camera, encodes the original video image to obtain a target video data stream, and sends the target video data stream to the client side. The coding mode may be sent to the target server by the client based on the communication connection between the client and the target server.
Step 206, displaying the view of the target distributed camera on the user interface according to the target video data stream.
In this embodiment, the client may create a surface object and a player, and may decode the target video data stream with the player after receiving the target video data stream, to obtain real-time video data of the target distributed camera. The decoding mode corresponds to the encoding mode, and the target video data stream can be restored to the original video image. And the client draws the original video image into the surface object, so that a target camera framing picture is displayed on a client user interface. The Surface object Surface is a handle of an image buffer zone of the android system, and serves as a medium for interaction between the player and the View object View, and the player can draw a decoded image of the player to the View object View through the Surface object Surface. The View object View is a user interface control of the android system and is used for displaying images, and the player can display the images by taking the View object as a carrier of the images.
According to the distributed camera implementation method provided by the embodiment, the client and at least one server access the same local area network, cameras of all the servers are used as distributed cameras of the client, client applications are installed on the client, server applications are installed on all the servers and applied to the client, the client communicates with at least one server based on an ONVIF protocol, and information related to the distributed cameras and the server sent by the at least one server is received; determining video data stream acquisition interfaces corresponding to the distributed cameras according to the associated information of the distributed cameras and the service terminals; receiving a target distributed camera starting request triggered by a user; the target distributed camera starting request comprises a target distributed camera identifier; calling a target video data stream acquisition interface corresponding to the target distributed camera identifier, and establishing communication connection between the client and the target server based on an RTSP; the target server is the server where the target distributed camera is located; receiving a target video data stream of a target distributed camera sent by a target server based on communication connection between a client and the target server; and displaying a view of the target distributed camera on the user interface according to the target video data stream. The client acquires the relevant information of the server and the distributed cameras based on the ONVIF protocol, and determines video data stream acquisition interfaces corresponding to the distributed cameras according to the relevant relation of the server and the distributed cameras, and then when a user triggers a target distributed camera starting request, the client can directly call a target video data stream acquisition interface corresponding to the target distributed camera, establish communication connection with the target server, receive the target video data stream of the target distributed camera sent by the target server through the communication connection between the client and the target server, and then display a view finding picture of the target distributed camera on the user interface according to the target video data stream, thereby realizing the distributed camera of a pure application layer of a non-specific operating system.
As an optional implementation manner, on the basis of the first embodiment, the server side and the distributed camera association information include a pull stream address of the server side and each distributed camera identifier on the server side, and refine the step 202, and then the step 202 refinement includes steps 2021 to 2023.
In step 2021, the streaming address of the server where each distributed camera is located is determined as the streaming address corresponding to each distributed camera.
Step 2022, determining the pull stream address corresponding to each distributed camera as the return information when the video data stream acquisition interface corresponding to each distributed camera is called.
In this embodiment, the entity of the distributed camera is located on the server, so that the client needs to communicate with the target server to obtain the target video data stream. And determining the pulling address of the server where each distributed camera is located as the pulling address corresponding to each distributed camera, determining the pulling address corresponding to the distributed camera as the return information when the video data stream acquisition interface corresponding to the distributed camera is called, so that the video data stream acquisition interface corresponding to the target distributed camera returns to the pulling address of the target server when the video data stream acquisition interface corresponding to the target distributed camera is called, and the client can establish communication connection with the target server according to the pulling address corresponding to the target distributed camera, thereby acquiring the target video data stream from the target server.
According to the distributed camera implementation method provided by the embodiment, the information related to the distributed camera through the server side comprises a streaming address of the server side and identifications of the distributed cameras on the server side; determining the streaming address of the server where each distributed camera is located as the streaming address corresponding to each distributed camera; and determining the streaming addresses corresponding to the distributed cameras as return information when the video data stream acquisition interfaces corresponding to the distributed cameras are called. Because the streaming address of the server where the distributed camera is located is determined to be the streaming address corresponding to the distributed camera, and the streaming address corresponding to the distributed camera is used as the return information when the video data stream acquisition interface is called, the client can directly acquire the streaming address corresponding to the target distributed camera by calling the video data stream acquisition interface corresponding to the target distributed camera, which server the target distributed camera belongs to is not required to be determined, and the time for acquiring the target video data stream is saved.
Example two
Fig. 3 is a flow chart of a distributed camera implementation method according to a second embodiment of the present application, as shown in fig. 3, in the distributed camera implementation method according to the first embodiment, on the basis of the first embodiment, a target video data stream acquisition interface corresponding to a target distributed camera is called in step 204, a communication connection between a client and a target server is established based on an RTSP protocol, and refinement is performed, and then step 204 refinement includes steps 301 to 303.
Step 301, a target video data stream obtaining interface is called to obtain a target pull stream address corresponding to a target distributed camera.
In this embodiment, the client invokes the target video data stream acquisition interface and acquires a target pull stream address corresponding to the target distributed camera returned by the target video data stream acquisition interface. The target pull stream address may be a storage location of the target video data stream on the server side.
Step 302, a session establishment request is sent to the target server through the target pull address, and a transmission protocol, a client port number and a target service port number for communication with the target server are determined according to the RTSP protocol and the session establishment request.
In this embodiment, the session establishment request includes a transport protocol and a client port number. After receiving the session establishment request, the target server determines a port number for communication with the client in response to the session establishment request, and sends the target server port number to the client. The session establishment request may be a SETUP message in the RTSP protocol, and the session establishment request may further include a configuration parameter of the target video data stream, so as to instruct the target server to configure the parameter of the target video data stream, where the parameter of the target video data stream may be resolution, whether audio is carried, and so on.
Step 303, a session with the target server is established according to the transmission protocol, the client port number and the target server port number, so as to establish a communication connection with the target server.
In this embodiment, after receiving the port number of the target server, the client establishes a session with the communication with the target server according to the RTSP protocol, the transmission protocol, the port number of the client, and the port number of the target server, and prepares for transmission.
According to the distributed camera implementation method provided by the embodiment, the target streaming address corresponding to the target distributed camera is obtained by calling the target video data stream obtaining interface; transmitting a session establishment request to a target service end through a target streaming address, and determining a transmission protocol, a client port number and a target service port number communicated with the target service end according to an RTSP protocol and the session establishment request; establishing a session with a target server according to a transmission protocol, a client port number and a target server port number so as to establish communication connection with the target server; the RTSP is an application layer protocol and does not relate to an operating system, so that the function of the distributed camera can be realized on a non-hong operating system.
As an optional implementation manner, based on the second embodiment, the step 205 is further refined, and then step 205, based on the communication connection between the client and the target server, receives the target video data stream of the target distributed camera sent by the target server, where the refinement includes steps 401 to 402.
Step 401, sending a video data stream acquisition request to a target server through a session; the video data stream acquisition request comprises a target distributed camera identifier, and the video data stream acquisition request is used for indicating the target server to start the target distributed camera and acquiring a target video data stream of the target distributed camera.
Step 402, receiving a target video data stream sent by a target server.
In this embodiment, the video data stream acquisition request may be a PLAY message in the RTSP protocol. After the communication connection between the client and the target server is established successfully, the video data stream acquisition request is used for indicating the target server to acquire the target video data stream and sending the target video data stream to the client.
According to the distributed camera implementation method provided by the embodiment, a video data stream acquisition request is sent to a target server according to a session; the video data stream acquisition request comprises a target distributed camera identifier, and the video data stream acquisition request is used for indicating a target server to start a target distributed camera and acquiring a target video data stream of the target distributed camera; receiving a target video data stream sent by a target server; because the target recognition data stream is received, the view finding picture of the target distributed camera can be displayed according to the video data stream, and the distributed camera function can be realized.
As an optional implementation manner, based on any one of the foregoing embodiments, step 206 displays a viewfinder of the target distributed camera on the user interface according to the target video data stream, and then further includes steps 501 to 502.
Step 501, receiving a target distributed camera closing request triggered by a user; the target distributed camera close request includes a target distributed camera identification.
In this embodiment, after displaying the view finding interface of the target distributed camera on the client application, the user client may close the view finding screen of the target distributed camera by interacting with the client, or trigger a start request of the distributed camera before removing the target distributed camera, where the user triggers a close request of the target distributed camera.
Step 502, sending a video data stream termination request to a target server according to a session; the video data stream termination request is used to instruct the target server to close the target distributed camera and stop sending the target video data stream to the client.
In this embodiment, the video data stream termination request may be a TEARDOWN message in the RTSP protocol, which is used to instruct the target server to close the target distributed camera and stop sending the target video data stream to the client, and simultaneously, may close the session with the target server and end the communication connection with the target server.
As an optional implementation manner, on the basis of any one of the foregoing embodiments, in step 201, communication is performed with at least one server based on the ONVIF protocol, and server and distributed camera association information sent by the at least one server is received, and refinement is performed, where step 201 refinement includes steps 601 to 603.
Step 601, a client application starting request triggered by a user is received.
In this embodiment, the client application is installed on the client, and the user may trigger the client application start request through interaction with the client.
Step 602, starting a client application, and periodically sending a detection message in a multicast mode based on the ONVIF protocol; the detection message is used for indicating the server to join the multicast group where the client is located, and sending the association information of the server and the distributed cameras to the client.
In this embodiment, the client starts a client application, and the client application controls the client to periodically send a probe message in a multicast form in the local area network based on the ONVIF protocol.
Step 603, receiving server-side and distributed camera association information sent by at least one server-side.
In this embodiment, if at least one server exists in the lan and the server starts the server application, the server may receive the probe message sent by the client through the lan, and send the distributed camera association information to the client in response to the probe message. The client receives the distributed camera association information sent by at least one server.
According to the distributed camera implementation method, a client application starting request triggered by a user is received; starting a client application, and periodically sending a detection message in a multicast mode based on an ONVIF protocol; the detection message is used for indicating the server to join the multicast group and sending the related information of the server and the distributed cameras to the client; receiving service end and distributed camera association information sent by at least one service end; because the client periodically transmits the probe message in a multicast mode based on the ONVIF protocol after the client is started, the client application can not be started when the user does not need the distributed camera function, and the resources of the client are saved.
As an alternative implementation manner, after receiving the target video stream sent by the target server, the client may further send the target video stream to a target server that is not in the local area network. After receiving the target video stream, the target server may send the target video stream to other clients not in the local area network, so as to display the viewfinder of the target distributed camera on the other clients not in the local area network.
As an optional implementation manner, when the server is a special camera device such as a control ball or a recorder, the server application always runs, and the native camera interface of the server is continuously occupied by the server application. When other applications except the server on the server call the native camera interface of the server, the server application sends the original video data of the native camera interface to the other applications except the server.
Example III
Fig. 4 is a flow chart of a distributed camera implementation method according to a third embodiment of the present application, and as shown in fig. 4, an execution subject of the present application is a distributed camera implementation device, where the distributed camera implementation device is located in a server. In the distributed camera implementation method provided by the embodiment, the client and at least one server access to the same local area network, the camera of each server is used as the distributed camera of the client, the client is provided with a client application, each server is provided with a server application, and the client application is applied to a target server, and the method comprises steps 701 to 703.
In step 701, the method communicates with a client based on the ONVIF protocol, and sends information related to the target server and the distributed camera to the client.
In this embodiment, the target server supports the ONVIF protocol, and the target server supports the same local area network as the client, so when the client sends the probe message in a multicast manner, the target server may receive the probe message, may respond to the probe message, join the multicast group, and send the association information of the target server and the distributed camera to the client.
Step 702, establishing a communication connection between the target server and the client.
In this embodiment, the multicast message sent by the target server to the client may include a pull address of the target server, where the pull address of the target server includes an IP address of the target server. The target server and the client access the same local area network, so that the client can access the target server according to the IP address of the target server and send the IP address of the client to the target server, and the target server can obtain the IP address of the client after being accessed and establish communication connection with the client.
Step 703, starting the target distributed camera based on the communication connection between the target server and the client, obtaining the target video data stream of the target distributed camera, and sending the target video data stream to the client.
In this embodiment, after the communication connection of the target server and the client is established, the client and the target server may communicate. After the user triggers the target camera start request on the client, the client may send a video data stream acquisition request to the target server, where the video data stream acquisition request includes the target distributed camera identifier. After receiving the video data stream obtaining request, the target server can start the target distributed camera according to the target distributed camera identifier in the video data stream obtaining request, obtain the target video data stream of the target distributed camera, and send the target video data stream to the client, so as to realize the function of the distributed camera.
According to the distributed camera implementation method provided by the embodiment, the target server side and the distributed camera association information are sent to the client side through communication with the client side based on the ONVIF protocol; establishing communication connection between a target server and a client; starting a target distributed camera based on communication connection between a target server and a client, acquiring a target video data stream of the target distributed camera, and sending the target video data stream to the client; the target server sends the relevant information of the target server and the distributed camera to the client based on the ONVIF protocol, so that the client can find the distributed camera on the target server.
Example IV
Fig. 5 is a flow chart of a distributed camera implementation method according to a fourth embodiment of the present application, as shown in fig. 5, in the distributed camera implementation method according to the fourth embodiment, on the basis of the fourth embodiment, step 702 is performed to establish a communication connection between a target server and a client, and step 702 is performed to refine the communication connection, and then step 702 includes steps 801 to 802.
Step 801, a session establishment request sent by a client is received, and a transmission protocol, a client port number, and a target service port number for communication with the client are determined according to the RTSP protocol and the session establishment request.
In this embodiment, the session establishment request includes a transmission protocol and a client port number, and after receiving the session establishment request, the target server determines a target service port number that communicates with the client, and sends the target service port number to the client.
Step 802, a session with the client is established according to the transmission protocol, the client port number and the target server port number to establish a communication connection with the target server.
In this embodiment, after sending the target server port number to the client, the target server establishes a session with the client according to the RTSP protocol, the transport protocol, the port number of the client, and the target server port number, and prepares for transmission.
According to the distributed camera implementation method provided by the embodiment, a session establishment request sent by a client is received, and a transmission protocol, a client port number and a target service port number for communication with the client are determined according to an RTSP and the session establishment request; establishing a session with the client according to the transmission protocol, the client port number and the target server port number so as to establish communication connection with the target server; because the transmission protocol, the client port number and the target service end of the client and the target service end are determined according to the RTSP protocol and the session establishment request, the client can control the target data stream, and the function of controlling the distributed camera on the client by the user is further realized.
As an optional implementation manner, on the basis of the fourth embodiment, for step 703, based on the communication connection between the target server and the client, the target distributed camera is started, the target video data stream of the target distributed camera is obtained, and the target video data stream is sent to the client for refinement, where step 703 refinement includes steps 901 to 904.
Step 901, receiving a video data stream acquisition request sent by a client according to a session; the video data stream acquisition request includes a target distributed camera identification.
In step 902, in response to a video data stream acquisition request, a target distributed camera is started and original video data of the target distributed camera is acquired.
In this embodiment, the original video data of the target distributed camera refers to data directly collected from the camera, and the data format of the original video data is generally RGB or YUV420, which is not generally directly used for transmission due to the large data volume.
Step 903, the original video data is encoded according to the RTSP protocol, so as to obtain a target video data stream.
In this embodiment, the target server and the client may communicate the codec formats supported by both parties through the RTSP protocol, and determine the codec format of the target video data stream, for example, H264, MPEG coding format, and the like. The target server side encodes the original video data by adopting the encoding and decoding format determined by the RTSP protocol and the client side, and a target video data stream is obtained.
Step 904, the target video stream is sent to the client.
In this embodiment, the target video stream may be sent to the client port of the client through the target server port.
According to the distributed camera implementation method, a video data stream acquisition request sent by a client is received according to a session; the video data stream acquisition request includes a target distributed camera identification; responding to a video data stream acquisition request, starting a target distributed camera, and acquiring original video data of the target distributed camera; encoding the original video data according to the session establishment request to obtain a target video data stream; transmitting the target video stream to a client; because the target data stream is sent to the client, even if the entity of the target distributed camera is not on the client, the client can display the view finding picture of the target distributed camera according to the target video data stream, thereby realizing the function of the distributed camera.
As an optional implementation manner, based on the fourth embodiment, step 703 starts the target distributed camera based on the communication connection between the target server and the client, acquires the target video data stream of the target distributed camera, and sends the target video data stream to the client, and then further includes steps 1001 to 1002.
Step 1001, receiving a video data stream termination request sent by a client according to a session.
In step 1002, responsive to a video data stream termination request, the target distributed camera is turned off and the sending of the target video data stream to the client is stopped.
In this embodiment, the video data stream termination request may be a TEARDOWN message in the RTSP protocol. After receiving the video data stream termination request, the target server may close the target distributed camera, stop sending the target video data stream to the client, close the session with the client, and disconnect the communication connection with the client.
As an optional implementation manner, on the basis of any one of the above embodiments, in step 701, based on communication between the ONVIF protocol and the client, information related to the target server and the distributed camera is sent to the client, and refinement is performed, and then step 701 refinement includes steps 1101 to 1103.
Step 1101, receiving a server application start request triggered by a user.
In this embodiment, the server application is installed on the target server, and the user may trigger the target server to start the request through interaction with the target server.
In step 1102, a server application is started, and a probe message sent by a client in a multicast mode is received based on the ONVIF protocol.
In this embodiment, after the target server starts the server application, the server may receive the multicast message in the lan. If the client exists in the local area network, the target server can receive the detection message sent by the client in a multicast mode.
In step 1103, in response to the probe message, joining the multicast group and sending the target server and the distributed camera association information to the client.
In this embodiment, the target server may respond to the probe message, join the multicast group where the client is located, and send the association information of the target server and the distributed camera to the client. It will be appreciated that the target server responds to the probe message after the server application is started.
According to the distributed camera implementation method, a server application starting request triggered by a user is received; starting a server application, and receiving a detection message sent by a client in a multicast mode based on an ONVIF protocol; responding to the detection message, joining a multicast group and sending the related information of the target server and the distributed cameras to the client; after the server is started, the client can take the camera of the server as a distributed camera to realize the function of the distributed camera, so that when the user does not need the function of the distributed camera, the application of the server can not be started, and the resources of the server are saved.
Example five
Fig. 6 is a flow chart of a distributed camera implementation method provided according to a fifth embodiment of the present application, as shown in fig. 6, where an execution body provided in this embodiment is a distributed camera implementation system, and the distributed camera implementation system includes a client and at least one server, where the client and the at least one server access the same local area network, cameras of the respective servers are used as distributed cameras of the client, a client application is installed on the client, and a server application is installed on each server, where the distributed camera implementation method provided in this embodiment includes the following steps.
In step 1201, the client launches the client application.
In step 1202, each server starts a server application.
In step 1203, the client periodically sends probe messages in multicast form based on the ONVIF protocol.
In step 1204, each server joins the multicast group and sends the target server and the distributed camera association information to the client in response to the probe message.
In step 1205, the client determines a video data stream acquisition interface corresponding to each distributed camera identifier according to the association information of each server and the distributed camera.
In step 1206, the client receives a user-triggered target distributed camera activation request.
Step 1207, call the target video data stream acquisition interface corresponding to the target distributed camera, and acquire the target pull stream address returned by the target distributed camera interface.
In step 1208, the client sends a session establishment request to the target server through the target pull address, and determines a transport protocol, a client port number, and a target service port number for communicating with the target server according to the RTSP protocol and the session establishment request.
In step 1209, the client establishes a session with the target server according to the transmission protocol, the client port number and the target server port number, so as to establish a communication connection with the target server.
In step 1210, the client sends a video data stream acquisition request to the target server according to the session.
In step 1211, the target server starts the target distributed camera in response to the video data stream acquisition request, and acquires the original video data of the target distributed camera.
In step 1212, the target server encodes the original video data according to the RTSP protocol to obtain a target video data stream.
In step 1213, the target server sends the target video stream to the client.
In step 1214, the client displays a view of the target distributed camera on the user interface according to the target video data stream.
In step 1215, the client receives a user-triggered target distributed camera shutdown request.
In step 1216, the client sends a video data stream termination request to the target server according to the session.
In step 1217, the target server turns off the target distributed camera and stops sending the target video data stream to the client in response to the video data stream termination request.
The implementation manner of each step of the implementation method of the distributed camera provided in this embodiment is similar to that of the corresponding step in the foregoing embodiment, and will not be described in detail herein.
The implementation method of the distributed camera provided by the embodiment is implemented by
Example six
Fig. 7 is a schematic structural diagram of a distributed camera implementation device according to a sixth embodiment of the present application, and as shown in fig. 7, the distributed camera implementation device 70 provided in this embodiment includes a first receiving module 71, a determining module, a second receiving module, a first communication module, a third receiving module, and a display module.
The first receiving module 71 is configured to communicate with at least one server based on the ONVIF protocol, and receive server and distributed camera association information sent by the at least one server.
The determining module 72 is configured to determine a video data stream acquisition interface corresponding to each distributed camera according to the association information of each server and the distributed camera.
A second receiving module 73, configured to receive a target distributed camera start request triggered by a user; the target distributed camera activation request includes a target distributed camera identification.
A first communication module 74, configured to invoke a target video data stream acquisition interface corresponding to the target distributed camera identifier, and establish a communication connection between the client and the target server based on an RTSP protocol; the target server is the server where the target distributed camera is located.
And a third receiving module 75, configured to receive, based on the communication connection between the client and the target server, the target video data stream of the target distributed camera sent by the target server.
A display module 77 for displaying the viewfinder of the target distributed camera on the user interface according to the target video data stream.
As an optional implementation manner, the information related to the server and the distributed cameras comprises a pull stream address of the server and identifications of the distributed cameras on the server; the determining module 72 is specifically further configured to determine a pull-stream address of a server where each distributed camera is located as a pull-stream address corresponding to each distributed camera identifier; and determining the streaming addresses corresponding to the distributed camera identifications as return information when the video data stream acquisition interfaces corresponding to the distributed cameras are called.
As an optional implementation manner, the first communication module 74 is specifically further configured to invoke a target video data stream obtaining interface to obtain a target pull stream address corresponding to the target distributed camera; transmitting a session establishment request to a target service end through a target streaming address, and determining a transmission protocol, a client port number and a target service port number communicated with the target service end according to an RTSP protocol and the session establishment request; and establishing a session with the target server according to the transmission protocol, the client port number and the target server port number so as to establish a communication connection with the target server.
As an alternative embodiment, the first communication module 74 is specifically further configured to send a video data stream acquisition request to the target server according to the session; the video data stream acquisition request comprises a target distributed camera identifier, and the video data stream acquisition request is used for indicating a target server to start a target distributed camera and acquiring a target video data stream of the target distributed camera; and receiving the target video data stream sent by the target server.
As an alternative embodiment, the first communication module 74 is specifically further configured to receive a target distributed camera shutdown request triggered by a user; the target distributed camera closing request comprises a target distributed camera identifier; sending a video data stream termination request to a target server according to the session; the video data stream termination request is used to instruct the target server to close the target distributed camera and stop sending the target video data stream to the client.
As an optional implementation manner, the first receiving module 71 is specifically further configured to receive a client application start request triggered by a user; starting a client application, and periodically sending a detection message in a multicast mode based on an ONVIF protocol; the detection message is used for indicating the server to join the multicast group and sending the related information of the server and the distributed cameras to the client; and receiving the associated information of the server and the distributed cameras, which is sent by at least one server.
The distributed camera implementation device provided in this embodiment may execute the distributed camera implementation method provided in any one of the first to second embodiments, and the specific implementation manner is similar to the principle, and will not be described herein again.
Example seven
Fig. 8 is a schematic structural diagram of a distributed camera implementation device according to a seventh embodiment of the present application, and as shown in fig. 8, the distributed camera implementation device 80 provided in the present embodiment includes a first sending module 81, a second communication module 82, and a second sending module 83.
The first sending module 81 is configured to communicate with the client based on the ONVIF protocol, and send the target server and the distributed camera association information to the client.
And the second communication module 82 is used for establishing communication connection between the target server and the client.
The second sending module 83 is configured to start the target distributed camera based on the communication connection between the target server and the client, obtain a target video data stream of the target distributed camera, and send the target video data stream to the client.
As an optional implementation manner, the second communication module 82 is specifically configured to receive a session establishment request sent by the client, and determine a transmission protocol, a client port number, and a target service port number for communication with the client according to the RTSP protocol and the session establishment request; and establishing a session with the client according to the transmission protocol, the client port number and the target server port number so as to establish a communication connection with the target server.
As an optional implementation manner, the second sending module 83 is specifically configured to receive, according to a session, a video data stream acquisition request sent by a client; the video data stream acquisition request includes a target distributed camera identification; responding to a video data stream acquisition request, starting a target distributed camera, and acquiring original video data of the target distributed camera; encoding the original video data according to an RTSP protocol to obtain a target video data stream; and sending the target video stream to the client.
As an optional implementation manner, the second sending module 83 is specifically configured to receive, according to the session, a video data stream termination request sent by the client; in response to the video data stream termination request, the target distributed camera is turned off and the sending of the target video data stream to the client is stopped.
As an optional implementation manner, the first sending module 81 is specifically configured to receive a server application start request triggered by a user; starting a server application, and receiving a detection message sent by a client in a multicast mode based on an ONVIF protocol; and in response to the detection message, joining the multicast group and sending the target server and the distributed camera association information to the client.
The distributed camera implementation device provided in this embodiment may execute the distributed camera implementation method provided in any one of the third to fourth embodiments, and the specific implementation manner is similar to the principle, and will not be described herein again.
Example eight
Fig. 9 is a block diagram of an electronic device provided according to an eighth embodiment of the present application, and as shown in fig. 9, an electronic device 90 provided in the present embodiment includes a memory 91, a processor 92, and a transceiver 93.
The memory 91, processor 92 and transceiver 93 are electrically interconnected.
The memory 91 stores computer-executable instructions.
The transceiver 93 is used to transmit and receive data.
The processor 92 executes computer-executable instructions stored in the memory 91 to implement the distributed camera implementation method provided in any of the above embodiments.
Wherein the circuitry between the memory 91, the processor 92 and the transceiver 93 is connected by a bus.
The embodiment of the invention also provides a computer readable storage medium, in which computer executable instructions are stored, the computer executable instructions being used for implementing the distributed camera implementation method provided in any one of the embodiments above when being executed by a processor. By way of example, the computer-readable storage medium may be read-only memory (ROM), random-access memory (RAM), magnetic tape, floppy disk, optical data storage device, etc.
Embodiments of the present invention also provide a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements a distributed camera implementation method as provided in any one of the embodiments described above.
In an exemplary embodiment, the electronic device 90 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for performing the above-described distributed camera implementation method.
It should be understood that the above-described device embodiments are merely illustrative and that the device of the present application may be implemented in other ways. For example, the division of the modules in the above embodiment is merely a logic function division, and there may be another division manner when actually implemented. For example, multiple modules or components may be combined, or may be integrated into another system, or some features may be omitted or not performed. In addition, each functional module in each embodiment of the present application may be integrated into one module, or each module may exist alone physically, or two or more modules may be integrated together, unless otherwise specified. The integrated modules may be implemented in hardware or in software program modules.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required in the present application.
It should be further noted that, although the steps in the flowchart are sequentially shown as indicated by arrows, the steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in the flowcharts may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order in which the sub-steps or stages are performed is not necessarily sequential, and may be performed in turn or alternately with at least a portion of the sub-steps or stages of other steps or steps.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. The method for realizing the distributed camera is characterized in that a client and at least one server access to the same local area network, cameras of all the servers are used as the distributed cameras of the client, client applications are installed on the client, and server applications are installed on all the servers and applied to the client, and the method comprises the following steps:
based on ONVIF protocol, communicating with at least one server, receiving the associated information of the server and the distributed camera sent by the at least one server;
determining video data stream acquisition interfaces corresponding to the distributed cameras according to the associated information of the distributed cameras and the service terminals;
receiving a target distributed camera starting request triggered by a user; the target distributed camera starting request comprises a target distributed camera identifier;
calling a target video data stream acquisition interface corresponding to a target distributed camera, and establishing communication connection between a client and a target server based on an RTSP (real time streaming protocol); the target server is a server where the target distributed camera is located;
Receiving a target video data stream of a target distributed camera sent by a target server based on communication connection between a client and the target server;
and displaying a view of the target distributed camera on the user interface according to the target video data stream.
2. The method of claim 1, wherein the server-side and distributed camera association information includes a pull address of the server-side and each distributed camera identifier on the server-side;
the determining the video data stream acquisition interface corresponding to each distributed camera identifier according to the associated information of each server and the distributed camera comprises the following steps:
determining the streaming address of the server where each distributed camera is located as the streaming address corresponding to each distributed camera identifier;
and determining the streaming addresses corresponding to the distributed camera identifications as return information when the video data stream acquisition interfaces corresponding to the distributed cameras are called.
3. The method of claim 1, wherein the calling the target video data stream obtaining interface corresponding to the target distributed camera establishes a communication connection between the client and the target server based on the RTSP protocol, and includes:
calling the target video data stream acquisition interface to acquire a target streaming address corresponding to the target distributed camera;
Transmitting a session establishment request to a target server through the target streaming address, and determining a transmission protocol, a client port number and a target service port number communicated with the target server according to an RTSP protocol and the session establishment request;
and establishing a session with the target server according to the transmission protocol, the client port number and the target server port number so as to establish communication connection with the target server.
4. The method of claim 3, wherein receiving the target video data stream of the target distributed camera sent by the target server based on the communication connection between the client and the target server comprises:
sending a video data stream acquisition request to a target server according to the session; the video data stream acquisition request comprises a target distributed camera identifier, and the video data stream acquisition request is used for indicating a target server to start a target distributed camera and acquiring a target video data stream of the target distributed camera;
and receiving the target video data stream sent by the target server.
5. The method of claim 3, wherein after displaying the view of the target distributed camera on the user interface based on the target video data stream, further comprising:
Receiving a target distributed camera closing request triggered by a user; the target distributed camera closing request comprises a target distributed camera identifier;
sending a video data stream termination request to a target server according to the session; the video data stream termination request is used for indicating the target server to close the target distributed camera and stopping sending the target video data stream to the client.
6. The method of claim 1, wherein the communicating with the at least one server based on the ONVIF protocol and receiving server and distributed camera association information sent by the at least one server comprises:
receiving a client application starting request triggered by a user;
starting a client application, and periodically sending a detection message in a multicast mode based on an ONVIF protocol; the detection message is used for indicating the server to join the multicast group and sending the related information of the server and the distributed cameras to the client;
and receiving the associated information of the server and the distributed cameras, which is sent by at least one server.
7. The distributed camera implementation method is characterized in that a client and at least one server access to the same local area network, cameras of all the servers are used as distributed cameras of the client, client applications are installed on the client, server applications are installed on all the servers and applied to target servers, and the method comprises the following steps:
Based on ONVIF protocol, communicating with the client, and sending the related information of the target server and the distributed camera to the client;
establishing communication connection between a target server and a client;
and starting the target distributed camera based on the communication connection between the target server and the client, acquiring a target video data stream of the target distributed camera, and sending the target video data stream to the client.
8. The method of claim 7, wherein the establishing the communication connection between the target server and the client comprises:
receiving a session establishment request sent by a client, and determining a transmission protocol, a client port number and a target service port number communicated with the client according to an RTSP protocol and the session establishment request;
and establishing a session with the client according to the transmission protocol, the client port number and the target server port number so as to establish communication connection with the target server.
9. The method of claim 8, wherein the enabling the target distributed camera based on the communication connection of the target server and the client, obtaining a target video data stream of the target distributed camera, and sending the target video data stream to the client comprises:
Receiving a video data stream acquisition request sent by a client according to the session; the video data stream acquisition request includes a target distributed camera identification;
responding to the video data stream acquisition request, starting a target distributed camera, and acquiring original video data of the target distributed camera;
encoding the original video data according to the RTSP protocol to obtain the target video data stream;
and sending the target video stream to a client.
10. The method of claim 8, wherein after sending the target video data stream of the target distributed camera to the client based on the communication connection between the target server and the client, further comprising:
receiving a video data stream termination request sent by a client according to the session;
and responding to the video data stream termination request, closing the target distributed camera, and stopping sending the target video data stream to the client.
11. The method of claim 7, wherein the sending the target server and distributed camera association information to the client based on the ONVIF protocol in communication with the client comprises:
receiving a server application starting request triggered by a user;
Starting a server application, and receiving a detection message sent by a client in a multicast mode based on an ONVIF protocol;
and responding to the detection message, joining a multicast group and sending the target server and the distributed camera association information to the client.
12. The utility model provides a distributed camera realization device which characterized in that, the customer end inserts same LAN with at least one service terminal, and the camera of each service terminal is as the distributed camera of customer end, installs the customer end application on the customer end, installs the service end application on each service terminal, is applied to the customer end, includes:
the first receiving module is used for communicating with at least one server based on the ONVIF protocol and receiving the associated information of the server and the distributed cameras, which is sent by the at least one server;
the determining module is used for determining video data stream acquisition interfaces corresponding to the distributed cameras according to the associated information of the service terminals and the distributed cameras;
the second receiving module is used for receiving a target distributed camera starting request triggered by a user; the target distributed camera starting request comprises a target distributed camera identifier;
the first communication module is used for calling a target video data stream acquisition interface corresponding to the target distributed camera identifier and establishing communication connection between the client and the target server based on an RTSP (real time streaming protocol); the target server is a server where the target distributed camera is located;
The third receiving module is used for receiving a target video data stream of the target distributed camera sent by the target server based on the communication connection between the client and the target server;
and the display module is used for displaying the framing picture of the target distributed camera on the user interface according to the target video data stream.
13. The utility model provides a distributed camera realization device which characterized in that, the customer end inserts same LAN with at least one service terminal, and the camera of each service terminal is as the distributed camera of customer end, installs the customer end application on the customer end, installs the service terminal application on each service terminal, is applied to the target service terminal, includes:
the first sending module is used for communicating with the client based on the ONVIF protocol and sending the related information of the target server and the distributed cameras to the client;
the second communication module is used for establishing communication connection between the target server and the client;
the second sending module is used for starting the target distributed camera based on the communication connection between the target server and the client, obtaining a target video data stream of the target distributed camera and sending the target video data stream to the client.
14. An electronic device, comprising: memory, processor, and transceiver;
The memory, the processor, and the transceiver circuitry are interconnected;
the memory stores computer-executable instructions;
the transceiver is used for receiving and transmitting data;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1-11.
15. A computer readable storage medium comprising a computer program which, when executed by a processor, implements the method of any of claims 1-11.
CN202211179834.4A 2022-09-27 2022-09-27 Distributed camera implementation method, device, equipment and storage medium Pending CN117834374A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211179834.4A CN117834374A (en) 2022-09-27 2022-09-27 Distributed camera implementation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211179834.4A CN117834374A (en) 2022-09-27 2022-09-27 Distributed camera implementation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117834374A true CN117834374A (en) 2024-04-05

Family

ID=90515872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211179834.4A Pending CN117834374A (en) 2022-09-27 2022-09-27 Distributed camera implementation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117834374A (en)

Similar Documents

Publication Publication Date Title
AU2019240571B2 (en) Reduced latency server-mediated audio-video communication
CN103139529B (en) Video call switching method between sip server, video call device
CN111479121A (en) Live broadcasting method and system based on streaming media server
CN111427527A (en) Screen projection method, device, equipment and computer readable storage medium
CN112637546B (en) Video conference system, gateway and conference control method for docking video monitoring platform
CN105306693A (en) Information interaction method and system for mobile terminal and driving video recording equipment
WO2021155702A1 (en) Communication processing method and device, terminal, server, and storage medium
WO2017219852A1 (en) Data information sharing method and apparatus, and terminal
US20220286731A1 (en) Multimedia apparatus and cast method
CN108574689B (en) Method and device for video call
EP2461580A1 (en) Monitoring message transmission method and system
WO2010000121A1 (en) A method, a system and a system server for realizing monitor
JP2009225221A (en) System for interlocking door intercom apparatus and ip type cellular phone
WO2019129125A1 (en) Method and system for interaction between smart glasses and smart device, and storage medium
CN103581607A (en) Method for transmitting video stream to local endpoint host using remote camera device
JP5243336B2 (en) Communication system, communication terminal, communication method, and communication program
CN117834374A (en) Distributed camera implementation method, device, equipment and storage medium
CN116962615A (en) Communication method, device, terminal, intelligent desk lamp, server and storage medium
CN112565654A (en) Data processing method and device
CN115514882A (en) Distributed shooting method, electronic device and medium
CN112866729A (en) Method for reducing live network broadcast time delay and live network broadcast system
WO2023011476A1 (en) Communication method, data channel establishment method, device, and storage medium
CN110856020A (en) Method and system for controlling terminal equipment to be accessed into camera device to push flow
CN115297356B (en) Equipment interaction method, system and device
KR20160116493A (en) Multi-Access CCTV System Based on WebRTC

Legal Events

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