Multi-camera video data transmission method, apparatus, device, and storage medium
By controlling multiple cameras to simultaneously expose and transmit video data in a gigabit network with delayed packetization, the problems of high network setup costs and bandwidth waste in video transmission from multiple industrial cameras are solved, achieving synchronous transmission of video data and improved stability.
Patent Information
- Application Number
- CN202311767588.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-12-20
AI Technical Summary
In applications where people, roads, and the cloud collaborate, existing technologies require a 10 Gigabit Ethernet transmission environment when multiple industrial cameras transmit video data simultaneously. This results in high network setup costs and wasted bandwidth. Furthermore, using gigabit networks can easily lead to packet loss, making it impossible to send and receive video data completely.
By controlling multiple cameras to expose simultaneously to generate target video, and sending target data packets in a gigabit network with time delays, the data transmission of each camera is controlled by a preset time interval and the difference between adjacent time points, achieving almost synchronous video data transmission.
In gigabit networks, near-synchronous transmission of video data from multiple cameras is achieved, reducing data loss rate, minimizing bandwidth waste and network setup costs, and improving data transmission efficiency and stability.
Smart Images

Figure CN117729295B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and specifically relates to a method, apparatus, device and storage medium for multi-camera video data transmission. Background Technology
[0002] In existing technologies, transmitting video data from multiple cameras requires a large bandwidth, especially in applications that integrate people, roads, and the cloud. When multiple industrial cameras transmit video data simultaneously, a 10 Gigabit Ethernet transmission environment is often required, which means high network setup costs and significant bandwidth waste. While using a gigabit network can reduce costs, transmitting video data from multiple industrial cameras via a gigabit network can easily result in packet loss, leading to incomplete transmission and reception of video data. Summary of the Invention
[0003] To address the aforementioned technical issues, this application proposes a multi-camera video data transmission method, apparatus, device, and storage medium, enabling near-synchronous transmission of video data from multiple cameras in a gigabit network. This reduces reliance on ultra-high-speed networks, improves data transmission efficiency and stability, lowers data loss rates, reduces network setup costs, and minimizes bandwidth waste.
[0004] On one hand, this application proposes a multi-camera video data transmission method, the method comprising: controlling a preset number of cameras to simultaneously expose, so that each camera generates a corresponding target video; controlling each camera to process its corresponding target video to obtain a target data packet corresponding to each camera, the target data packet corresponding to each camera including multiple message data; controlling each camera to transmit the message data in the target data packet corresponding to each camera to a receiving end sequentially from a corresponding preset time, according to a preset time interval, until all the multiple message data included by each camera have been transmitted, the preset time interval being determined according to a preset number of cameras, and the difference between two adjacent preset times being the transmission time of one message data.
[0005] In one embodiment of the present invention, controlling each camera to process its corresponding target video to obtain a target data packet for each camera includes: controlling a preset number of cameras to acquire image data of the corresponding target video; controlling each camera to encapsulate the image data of the target video corresponding to each camera based on a preset protocol to obtain a target data packet for each camera; wherein, the preset protocol is the communication protocol on which the cameras perform data transmission.
[0006] In one embodiment of the present invention, controlling each camera to sequentially transmit the message data in the target data packet corresponding to each camera to the receiving end at a preset time and according to a preset time interval, until all the multiple message data included in each camera are transmitted, includes: controlling each camera to transmit any one message data in its corresponding target data packet to the receiving end starting from the corresponding preset time; after the preset time interval, controlling each camera to take any one of the untransmitted message data in its corresponding target data packet as the current message data, and controlling each camera to transmit the corresponding current message data to the receiving end; repeating the preset time interval, controlling each camera to take any one of the untransmitted message data in its corresponding target data packet as the current message data, and controlling each camera to transmit the corresponding current message data to the receiving end, until all message data in the target data packet corresponding to each camera is transmitted.
[0007] In one embodiment of the present invention, controlling a preset number of cameras to expose simultaneously so that each camera generates a corresponding target video includes: controlling a signal source to simultaneously send a pulse signal to each camera through an external line, so that each camera simultaneously responds to the pulse signal to expose and simultaneously generates a target video corresponding to each camera.
[0008] In one embodiment of the present invention, controlling a preset number of cameras to expose simultaneously so that each camera generates a corresponding target video includes: controlling a signal source to simultaneously send a camera trigger command to each camera through a network switching device, so that each camera responds to the camera trigger command to expose simultaneously and simultaneously generate a target video corresponding to each camera.
[0009] In one embodiment of the present invention, controlling each camera to sequentially transmit the message data in the target data packet corresponding to each camera to the receiving end at a preset time and according to a preset time interval, until all multiple message data included by each camera have been transmitted, includes:
[0010] In Gigabit Ethernet, each camera is controlled to transmit the message data in the target data packet corresponding to each camera to the receiving end sequentially through Gigabit Ethernet at a preset time and according to a preset time interval, until all the multiple message data included by each camera have been transmitted.
[0011] On the other hand, embodiments of this application provide a multi-camera video data transmission device, the device comprising:
[0012] A target video generation module is used to control a preset number of cameras to expose simultaneously, so that each camera generates a corresponding target video.
[0013] The target data packet generation module is used to control each camera to process its corresponding target video to obtain a target data packet for each camera. The target data packet for each camera includes multiple message data.
[0014] The target data packet transmission module is used to control each camera to transmit the message data in the target data packet corresponding to each camera to the receiving end sequentially from the corresponding preset time and according to the preset time interval, until all the multiple message data included by each camera has been transmitted. The preset time interval is determined according to the preset number of cameras, and the difference between two adjacent preset times is the transmission time of one message data.
[0015] In one embodiment of the present invention, the target data packet generation module includes: an image data acquisition module; used to control a preset number of cameras to acquire image data of corresponding target videos respectively; and an image data encapsulation module; used to control each camera to encapsulate the image data of the target video corresponding to each camera according to a preset protocol to obtain a target data packet corresponding to each camera, wherein the preset protocol is a communication protocol on which the cameras perform data transmission.
[0016] On the other hand, this application proposes an electronic device for multi-camera video data transmission, the electronic device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by the processor to implement the method described above.
[0017] On the other hand, this application proposes a computer-readable storage medium storing at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the method described above.
[0018] The multi-camera video data transmission method proposed in this application utilizes a packet-based delayed transmission method, which enables the near-synchronous transmission of video data from multiple cameras, reduces data loss rate, reduces bandwidth waste, lowers network setup costs, and thus improves data transmission efficiency. Attached Figure Description
[0019] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 1 .
[0021] Figure 2 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 2 .
[0022] Figure 3 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 3 .
[0023] Figure 4 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 4 .
[0024] Figure 5 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 5 .
[0025] Figure 6 This is a block diagram of a multi-camera video data transmission device provided in an embodiment of the present invention.
[0026] Figure 7 This is a hardware structure block diagram of a server provided in an embodiment of the present invention.
[0027] Figure 8 This is a schematic diagram of a single-pole network camera deployment in a roadside application scenario provided by an embodiment of the present invention.
[0028] Figure 9 This is a network communication diagram of a single-pole network camera in a roadside application scenario provided by an embodiment of the present invention.
[0029] Figure 10 This is a schematic diagram of two cameras transmitting video data in parallel, provided by an embodiment of the present invention.
[0030] Figure 11 This is a schematic diagram of a delayed transmission of video data between two cameras provided in an embodiment of the present invention.
[0031] Figure 12This is a schematic diagram illustrating a method for synchronously triggering camera exposure and transmitting data, as provided in an embodiment of the present invention. Detailed Implementation
[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the present application described herein can be implemented in orders other than those illustrated or described herein. Thus, features defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments, unless otherwise stated, "a plurality of" means two or more. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0034] To make the objectives, technical solutions, and advantages disclosed in the embodiments of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples, particularly taking the transmission of video data from multiple GigE cameras in Gigabit Ethernet as an example. It should be noted that the application in Gigabit Ethernet is only an example, and the embodiments provided by this invention can also be applied in other scenarios. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of this application and are not intended to limit the embodiments of this application.
[0035] Figure 1 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 1 , Figure 2 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 2 , Figure 3 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 3 , Figure 4 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 4 , Figure 5 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 5 , Figure 6 This is a device block diagram of a multi-camera video data transmission apparatus provided in an embodiment of the present invention. Figure 7 This is a hardware structure block diagram of a server provided in an embodiment of the present invention. Figure 8 This is a schematic diagram of a single-pole network camera deployment in a roadside application scenario provided by an embodiment of the present invention. Figure 9 This is a network communication diagram of a single-pole network camera in a roadside application scenario provided by an embodiment of the present invention. Figure 10 This is a schematic diagram illustrating the parallel transmission of video data between two cameras, provided in an embodiment of the present invention. Figure 11 This is a schematic diagram illustrating a delayed transmission of video data between two cameras according to an embodiment of the present invention. Figure 12 This is a schematic diagram illustrating a method for synchronously triggering camera exposure and transmitting data, as provided in an embodiment of the present invention.
[0036] To facilitate understanding of the technical solutions described above and their resulting technical effects in the embodiments of this application, the embodiments of this application will first explain the relevant technical terms:
[0037] GigE Camera: An industrial camera that uses the GigE (Gigabit Ethernet) universal data interface. GigE Vision is an interface standard developed based on the Gigabit Ethernet communication protocol, which is based on the UDP protocol.
[0038] Bayer RGB: A primitive image format invented by scientist Bryce Bayer.
[0039] This specification provides the method operation steps as described in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many steps and does not represent the only execution order. In actual system or server products, the methods shown in the embodiments or drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment).
[0040] Please see Figure 1 , Figure 1 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 1 ,like Figure 1 As shown, the present invention provides a multi-camera video data transmission method, comprising the following steps:
[0041] S102: Control a preset number of cameras to expose simultaneously, so that each camera generates a corresponding target video;
[0042] This application does not impose a specific limit on the number of cameras. For industrial cameras, due to the large data length and bandwidth required, the number of cameras should be controlled within 4 without changing the camera data transmission frequency. Therefore, the preset number of cameras can optionally be 2 or 3.
[0043] After the preset number of cameras expose simultaneously, each camera generates a target video corresponding to its own camera. In other words, during each exposure, all cameras expose simultaneously, and each camera generates its own target video.
[0044] S104: Control each camera to process its corresponding target video to obtain a target data packet for each camera. The target data packet for each camera includes multiple message data.
[0045] Each camera processes its own generated target video. Optionally, the processing methods include image processing and encapsulation processing. This application does not limit the specific steps of the image processing of the camera. For example, it may include smoothing, noise reduction, brightness adjustment, contrast adjustment, and encapsulation processing of the video data that has been processed to provide a better visual experience for the human eye.
[0046] For example, for a GigE camera, the data transmission protocol is UDP. After encapsulating the video data using UDP, multiple data packets are generated. Taking one frame of image data as an example, the data format of a GigE camera is Bayer RGB. The total length of one frame of image data (1920×1200) is: length = width × height × (Bytes / pixel) = 1920 × 1200 × 1 = 2304000 Bytes. One UDP packet contains 1464 Bytes of image data. The number of packets that can accommodate a total length of 2304000 Bytes is 2304000 ÷ 1464 = 1573.77. That is, one frame of image data requires approximately 1574 UDP packets to be transmitted continuously, thus generating 1574 UDP data packets.
[0047] S106: Control each camera to transmit the message data in the target data packet corresponding to each camera to the receiving end sequentially from the corresponding preset time and according to the preset time interval, until all the multiple message data included by each camera are transmitted. The preset time interval is determined according to the preset number of cameras, and the difference between two adjacent preset times is the transmission time of one message data.
[0048] This application does not impose specific restrictions on the preset time, but the difference between two adjacent preset times is the transmission time of one message data. For example, taking two cameras, the first camera starts sending the message data in the corresponding target data packet at time t1, and the second camera starts sending the message data in the corresponding target data packet at time t2. The transmission time of one message data is t, and t = t2 - t1. That is to say, when the first camera finishes sending the first message data, the second camera starts sending the message data in the corresponding target data packet.
[0049] This application does not impose specific restrictions on the preset time interval of the cameras. For example, when the preset number of cameras in a gigabit network is 2, the preset time interval is 2t; when the preset number of cameras is 2, the preset time interval is 3t; and when the preset number of cameras is 4, the preset time interval is 4t.
[0050] The multi-camera video data transmission method proposed in this invention controls each camera to send the message data in its corresponding data packet at different preset times. Starting from the preset time, the next message data is sent after a preset time interval. By using the aforementioned packet delay transmission method, multiple cameras can send their respective video target data packets almost synchronously, which improves bandwidth utilization, reduces data loss rate, reduces network setup costs, and improves the stability of camera data transmission in a human-path cloud environment.
[0051] Please see Figure 2 , Figure 2 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 2 ,like Figure 2 As shown, step S104 above includes:
[0052] S1041: Control a preset number of cameras to acquire image data of the corresponding target video;
[0053] S1043: Control each camera to encapsulate the image data of the target video corresponding to each camera based on a preset protocol, so as to obtain the target data packet corresponding to each camera.
[0054] The preset protocol is the communication protocol upon which the camera transmits data.
[0055] Optionally, after a preset number of cameras generate target videos, the image data of the target videos are processed. The processing includes image processing and encapsulation processing for data transmission. For GigE cameras, data transmission is based on the UDP protocol. Therefore, each camera is controlled to encapsulate its own image data using the UDP protocol to form an encapsulated target data packet.
[0056] The embodiments provided by this invention control each camera to encapsulate and process its corresponding video data to obtain its corresponding target data packet, thereby improving the efficiency and controllability of camera video data transmission.
[0057] Please see Figure 3 , Figure 3 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 3 ,like Figure 3 As shown, step S106 above includes:
[0058] S1061: Control each camera to transmit any one of the message data in its corresponding target data packet to the receiving end from the corresponding preset time.
[0059] This application does not impose specific restrictions on the message data used as the current message data. The message data selected as the current message data can be any message data in the target data packet corresponding to each camera.
[0060] S1063: After a preset time interval, control each camera to take any one of the untransmitted message data in its corresponding target data packet as the current message data, and control each camera to transmit the corresponding current message data to the receiving end.
[0061] This application does not impose specific restrictions on the preset time when the camera starts sending message data. The difference between two adjacent preset times is the transmission time t of a message data. For example, when the preset number of cameras is 3, the first camera, the second camera, and the third camera are controlled to send the current message data in their respective target data packets from times t1, t2, and t3, respectively. Here, t1, t2, and t3 are three preset times arranged in chronological order, and the difference between two adjacent preset times is the transmission time t of a message data, that is, t2-t1=t3-t2=t.
[0062] S1605: After repeating the preset time interval, control each camera to take any one of the untransmitted message data from its corresponding target data packet as the current message data, and control each camera to transmit the corresponding current message data to the receiving end, until all message data in the target data packet corresponding to each camera has been transmitted.
[0063] Optionally, after the current message data transmission is completed, each camera can use other message data as the current message data and send each message data in the corresponding target data packet to the receiving end at a preset time interval until all message data in the target data packet corresponding to each camera has been transmitted.
[0064] This application does not impose specific restrictions on the preset time interval. The transmission time of a message data is t. The preset time interval is determined by the number of cameras. The preset time interval is the number of cameras times t. When there are 2 cameras, the preset time interval is 2t. When there are 3 cameras, the preset time interval is 3t.
[0065] For example, when there are 3 cameras, after the first camera sends the current message data at t1, the second camera sends the current message data at t2 (t2 = t1 + t), and the third camera sends the current message data at t3 (t3 = t1 + 2t). The first camera will take any other message data in the target data packet corresponding to the first camera as the current message data and send the current message data at t3 + t. The time difference between the first camera sending the current message data for the first time and the second time is (t3 + t) - t1 = (t1 + 2t + t) - t1 = 3t.
[0066] Similarly, the second camera will also retransmit any other message data in the target data packet corresponding to the second camera as the current message data, starting from time t3+2t. The time difference between the first and second times the second camera sends the current message data is (t3+2t)-t2=(t3+2t)-(t1+t)=(t1+2t+2t)-t 1- t = 3t.
[0067] Similarly, the third camera will also retransmit any other message data in the target data packet corresponding to the third camera as the current message data, starting from time t3+3t. The time difference between the first and second times the third camera sends the current message data is (t3+3t)-t3=(t3+3t)-(t1+2t)=(t1+2t+3t)-t 1- 2t = 3t.
[0068] It can be seen that when there are 3 cameras, the preset time interval between two adjacent current message data in the corresponding target data packet sent by each camera is the number of cameras t.
[0069] This application does not impose specific restrictions on the camera's hardware infrastructure. However, since the message data in the target data packet is sent in strips with a delay, when sending the current message data, other message data needs to be stored in sufficient space. Therefore, the camera to which this application's method applies should have a sufficiently large amount of RAM to buffer the target data packet.
[0070] The embodiments provided by this invention control multiple cameras to send the message data in the corresponding target data packets with delays, so that the image data generated by multiple cameras at the same time can arrive at the receiving end almost simultaneously. The receiving end can also process the image data sent by multiple cameras almost simultaneously, which can improve data transmission efficiency and processing speed, reduce the bandwidth pressure of multiple cameras transmitting video data at the same time, reduce the data loss rate caused by insufficient bandwidth, and improve the smoothness of data transmission.
[0071] Please see Figure 4 , Figure 4 This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 4 ,like Figure 4 As shown, step S102 above includes:
[0072] S1021: The control signal source simultaneously sends a pulse signal to each of the cameras via an external line, so that each of the cameras simultaneously responds to the pulse signal and performs an exposure;
[0073] This application does not limit the method of controlling a preset number of cameras to expose simultaneously. Optionally, a hard synchronization triggering method can be selected, that is, the camera and the network switch are connected by an external line, and a pulse signal is sent to the camera through the external line, so that each camera will expose simultaneously after receiving the pulse signal.
[0074] S1023: Control each of the cameras to simultaneously generate a target video corresponding to each of the cameras.
[0075] The embodiments provided by this invention employ a hard synchronization triggering method. By connecting an external cable to each camera, the control signal source simultaneously sends pulse signals to each camera through the external line, enabling each camera to expose simultaneously and generate its corresponding target video. This facilitates the fusion processing of image data at the receiving end and improves the accuracy of camera exposure control and the stability of data generation.
[0076] Please see Figure 5 , Figure 5This is a flowchart illustrating a multi-camera video data transmission method provided in an embodiment of the present invention. Figure 5 ,like Figure 5 As shown, step S102 above may further include:
[0077] S1025: The control signal source simultaneously sends a camera trigger command to each of the cameras through the network switching device, so that each of the cameras simultaneously performs exposure in response to the camera trigger command;
[0078] Optionally, a soft synchronization triggering method can be selected, which performs synchronous exposure control by sending a camera trigger command. For example, the camera trigger command is a message containing a command to trigger the camera to perform exposure.
[0079] S1027: Control each of the cameras to simultaneously generate a target video corresponding to each of the cameras.
[0080] The embodiments provided by this invention employ a soft synchronization triggering method to send messages to each camera, enabling each camera to expose simultaneously and generate its own corresponding target video, thereby improving the accuracy of camera exposure control and the stability of data generation.
[0081] For information on camera synchronization triggering methods, please refer to [link / reference]. Figure 12 , Figure 12 This is a schematic diagram illustrating a synchronous triggering of camera exposure and data transmission according to an embodiment of the present invention. This application does not impose specific limitations on the method of triggering the camera, as described above... Figure 4 , Figure 5 For example, the camera can be triggered using either hard synchronization or soft synchronization. Figure 12 As shown, after the signal source sends a signal to trigger the camera to synchronously expose, the signal can be a pulse signal or a camera trigger command. The camera responds to the trigger signal and synchronously exposes, generating a target video corresponding to the camera. After performing camera image processing (ISP) on the target video, the processed target video data is encapsulated using an encapsulation protocol to form a target data packet to be transmitted. The target data packet contains multiple encapsulated message data. For GigE cameras, the target data packet contains message data encapsulated using the UDP protocol. The number of message data depends on the size of the video data. This application does not specifically limit the means of target video processing. For example, camera image processing includes noise reduction, smoothing, brightness adjustment, etc., but since the relevant content of camera image processing is prior art, it will not be described in detail here.
[0082] Optionally, the multi-camera video data transmission method provided by this invention can be applied to various network environments. The gigabit Ethernet mentioned in the specification is only one of these network environments. More specifically, taking industrial cameras at intersections as an example, in the context of human-road-cloud collaboration, there is a need to monitor road conditions in real time, which creates a demand to transmit road condition information to the cloud for processing in an instant. In the deployment of equipment on road sections, the deployment of cameras and network switching equipment has a significant impact on the timeliness of data transmission.
[0083] Please see Figure 8 , Figure 8 This is a schematic diagram of a single-pole network camera deployment in a roadside application scenario provided by an embodiment of the present invention, as shown below. Figure 8 As shown, the equipment deployment along the road is based on poles, with two network cameras typically mounted on a single pole. These network cameras can be understood as GigE cameras. Please refer to [link / reference]. Figure 9 , Figure 9 This is a network communication diagram of a single-pole network camera in a roadside application scenario provided by an embodiment of the present invention. Camera A and camera B are connected through a network switching device to form a local area network (LAN), and data is transmitted via the LAN to a receiving end such as a computer. The receiving end unpacks, reads, and processes the received data. In a 10 Gigabit network, due to the large bandwidth, parallel transmission of camera data from the two network cameras can be achieved. Please refer to [link to relevant documentation]. Figure 10 , Figure 10 This is a schematic diagram illustrating the parallel transmission of video data between two cameras according to an embodiment of the present invention, as shown below. Figure 10As shown, each of the two cameras synchronously transmits 1574 messages from its corresponding data packet without setting a preset time interval. For example, taking a 2-megapixel GigE camera that continuously outputs at 30fps, the video data bandwidth of a single camera is approximately 69MB / s, or 552Mbps. If two GigE cameras transmit simultaneously, the peak bandwidth is approximately 138MB / s, or 1104Mbps. If 10 Gigabit Ethernet (10000Mbps bandwidth) is used, the bandwidth of 10 Gigabit Ethernet is much greater than the peak bandwidth data when two GigE cameras transmit in parallel, but this will result in bandwidth waste, and the setup cost of a 10 Gigabit network is much higher than that of a gigabit network. If video data from two GigE cameras are transmitted in parallel in a gigabit network, the peak bandwidth of the transmitted data will be no less than 552 × 2 = 1104Mbps > 1000Mbps. It can be seen that transmitting data from two cameras in parallel in a gigabit network will cause the peak bandwidth to exceed the bandwidth, resulting in packet data loss. In order to ensure that packet data is not lost, the data transmission frequency can be reduced, but reducing the data transmission frequency will cause the transmission speed to not keep up with the real-time requirements of road condition monitoring. It can be seen that reducing the data transmission frequency cannot substantially solve the problem of improving the integrity and stability of data transmission. In view of this situation, the multi-camera video data transmission method provided by this invention is applied to a gigabit network, which can basically achieve synchronous transmission of video data without exceeding the maximum bandwidth, and can improve the integrity and stability of data transmission. The following is a detailed description of the application of the multi-camera video data method provided by this invention in gigabit Ethernet.
[0084] In one embodiment of the present invention, controlling each camera to sequentially transmit the message data in the target data packet corresponding to each camera to the receiving end at a preset time and according to a preset time interval, until all multiple message data included by each camera have been transmitted, includes:
[0085] In Gigabit Ethernet, each camera is controlled to transmit the message data in the target data packet corresponding to each camera to the receiving end sequentially through Gigabit Ethernet at a preset time and according to a preset time interval, until all the multiple message data included by each camera have been transmitted.
[0086] To better understand the application of the multi-camera video data transmission method shown in this embodiment in Gigabit Ethernet, please refer to [link to relevant documentation]. Figure 11 , Figure 11 This is a schematic diagram of a delayed transmission of video data between two cameras provided in an embodiment of the present invention, as shown below. Figure 11 As shown, cameras A and B transmit their respective target data packets with a delay. Camera A transmits the packet data in the target data packet at a preset time T. AThe system begins sending messages from camera A at a predetermined time T, and camera B sends messages from camera B at a predetermined time T. B The message from camera B is sent starting at time T. B -T A = t_p, which is the time interval (t_p) between the preset times when camera A and camera B start sending messages, which is the time interval of one message transmission.
[0087] Camera A: Sends the first UDP packet Packet_A-1. After the first UDP packet is transmitted, after a delay of one packet transmission time interval (t_p), it sends the second UDP packet Packet_A-2, and so on, until all packets in the target data packet of Camera A are transmitted.
[0088] Camera B: After Camera A finishes sending its first UDP packet Packet_A-1, it sends its first UDP packet Packet_B-1; after a delay of one packet transmission time interval (t_p), it sends its second UDP packet Packet_B-2, and so on, until all packets in Camera B's target data packet have been transmitted.
[0089] The embodiments provided by this invention achieve synchronous transmission of video data from multiple GigE cameras by using a delayed message data transmission method in GigE Ethernet. This ensures the transmission delay and video frame rate for normal operation of GigE cameras, improves the integrity and stability of data transmission, greatly reduces reliance on ultra-high-speed 10 Gigabit Ethernet, reduces network hardware costs, reduces bandwidth waste, and improves bandwidth utilization.
[0090] Please see Figure 6 , Figure 6 This is a device block diagram of a multi-camera video data transmission apparatus provided in an embodiment of the present invention. Figure 6 As shown, the device may include at least:
[0091] 602: Target video generation module; used to control a preset number of cameras to expose simultaneously, so that each camera generates a corresponding target video;
[0092] 604: Target data packet generation module; used to control each camera to process its corresponding target video to obtain a target data packet for each camera, wherein the target data packet for each camera includes multiple message data;
[0093] 606: Target data packet transmission module; used to control each camera to transmit the message data in the target data packet corresponding to each camera to the receiving end sequentially from the corresponding preset time and according to the preset time interval, until all the multiple message data included by each camera have been transmitted. The preset time interval is determined according to the preset number of cameras, and the difference between two adjacent preset times is the transmission time of one message data.
[0094] In an optional embodiment, the target data packet generation module includes:
[0095] Image data acquisition module; used to control a preset number of cameras to acquire image data of the corresponding target video respectively;
[0096] An image data encapsulation module is used to control each camera to encapsulate the image data of the target video corresponding to each camera based on a preset protocol, so as to obtain the target data packet corresponding to each camera, wherein the preset protocol is the communication protocol on which the camera performs data transmission.
[0097] In one optional embodiment, the target data packet transmission module includes:
[0098] A preset time message data transmission module is used to control each camera to transmit any one of the message data from its corresponding target data packet to the receiving end starting from the corresponding preset time.
[0099] A preset time message data transmission module is used to control each camera to take any one of the untransmitted message data in its corresponding target data packet as the current message data after a preset time interval, and control each camera to transmit the corresponding current message data to the receiving end.
[0100] A repeat message data transmission module is used to control each camera to send any one of the untransmitted message data from its corresponding target data packet as the current message data after repeating a preset time interval, and to control each camera to transmit the corresponding current message data to the receiving end, until all message data in the target data packet corresponding to each camera has been transmitted.
[0101] In one optional embodiment, the target video generation module includes:
[0102] A pulse signal trigger control module is used to control a signal source to simultaneously send pulse signals to each of the cameras via an external line, so that each of the cameras simultaneously responds to the pulse signal to perform exposure and simultaneously generates a target video corresponding to each of the cameras.
[0103] In one optional embodiment, the target video generation module includes:
[0104] The message trigger control module is used to control the signal source to simultaneously send camera trigger commands to each of the cameras through the network switching device, so that each of the cameras responds to the camera trigger commands to simultaneously expose and simultaneously generate target videos corresponding to each of the cameras.
[0105] It should be noted that the device embodiments provided in this application are based on the same inventive concept as the method embodiments described above.
[0106] This application also provides an electronic device for multi-camera video transmission, which includes a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the method provided in any of the above embodiments.
[0107] Embodiments of this application also provide a computer-readable storage medium that can be disposed in a terminal to store at least one instruction or at least one program for implementing a method in the method embodiments, wherein the at least one instruction or at least one program is loaded and executed by a processor to implement the method provided in the above method embodiments.
[0108] Optionally, in the embodiments of this specification, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0109] The memory described in this specification can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for functions, etc.; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.
[0110] The methods and embodiments provided in this application can be executed on a terminal, computer terminal, server, or similar computing device. Taking running on a server as an example, Figure 7 This is a hardware structure block diagram of a server according to an embodiment of the present invention. Figure 7 As shown, the server 700 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 710 (CPUs 710 may include, but are not limited to, microprocessors (MCUs) or programmable logic devices (FPGAs), a memory 730 for storing data, and one or more storage media 720 (e.g., one or more mass storage devices) for storing application programs 723 or data 722. The memory 730 and storage media 720 may be temporary or persistent storage. The program stored in the storage media 720 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 710 may be configured to communicate with the storage media 720 and execute the series of instruction operations stored in the storage media 720 on the server 700. Server 700 may also include one or more power supplies 760, one or more wired or wireless network interfaces 750, one or more input / output interfaces 740, and / or one or more operating systems 721, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0111] The input / output interface 740 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 700. In one example, the input / output interface 740 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 740 may be a radio frequency (RF) module for wireless communication with the Internet.
[0112] Those skilled in the art will understand that Figure 7 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 700 may also include... Figure 7 The more or fewer components shown, or having the same Figure 7 The different configurations shown.
[0113] The multi-camera data transmission method and apparatus provided in this invention have the following technical effects:
[0114] 1. The multi-camera video data transmission method proposed in this invention controls each camera to send the message data in its corresponding data packet at different preset times, and sends the next message data after a preset time interval, starting from the preset time. By using the aforementioned packet-delayed transmission method, multiple cameras can send their respective video target data packets almost synchronously, which improves bandwidth utilization, reduces data loss rate, reduces network setup costs, and improves the stability of camera data transmission in a human-path-cloud environment.
[0115] 2. The embodiments provided by the present invention control each camera to encapsulate and process its own corresponding video data to obtain its own corresponding target data packet, thereby improving the efficiency and controllability of camera video data transmission.
[0116] 3. The embodiments provided by the present invention control multiple cameras to send the message data in the corresponding target data packets with delays, so that the image data generated by multiple cameras at the same time can arrive at the receiving end almost simultaneously. The receiving end can also process the image data sent by multiple cameras almost simultaneously, which can improve data transmission efficiency and processing speed, reduce the bandwidth pressure of multiple cameras transmitting video data at the same time, reduce the data loss rate caused by insufficient bandwidth, and improve the smoothness of data transmission.
[0117] 4. The embodiments provided by the present invention adopt a hard synchronization triggering method. By means of an external connection connected to each camera, the control signal source sends pulse signals to each camera simultaneously through the external line, so that each camera is exposed at the same time and generates its own corresponding target video. This is beneficial for the receiving end to fuse and process the image data, and improves the accuracy of camera exposure control and the stability of data generation.
[0118] 5. The embodiments provided by the present invention adopt a soft synchronization triggering method to send messages to each camera, so that each camera exposes simultaneously and generates its own corresponding target video, thereby improving the accuracy of camera exposure control and the stability of data generation.
[0119] 6. The embodiments provided by the present invention achieve synchronous transmission of video data from multiple GigE cameras by using a delayed message data transmission method in GigE Ethernet, ensuring the transmission delay and video frame rate for normal operation of GigE cameras, improving the integrity and stability of data transmission, greatly reducing dependence on ultra-high-speed 10 Gigabit Ethernet, reducing network hardware costs, reducing bandwidth waste, and improving bandwidth utilization.
[0120] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0121] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and server embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0122] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0123] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for transmitting multi-camera video data, characterized in that, The method includes: A preset number of cameras are controlled to expose simultaneously, so that each camera generates a corresponding target video. Each camera is controlled to process its corresponding target video to obtain a target data packet for each camera. The target data packet for each camera includes multiple message data. Each camera is controlled to transmit the message data in the target data packet corresponding to each camera to the receiving end sequentially from its corresponding preset time and according to a preset time interval, until all the multiple message data included by each camera has been transmitted. The preset time interval is determined according to the preset number of cameras, and the difference between two adjacent preset times is the transmission time of one message data.
2. The method according to claim 1, characterized in that, The process of controlling each camera to process its corresponding target video to obtain a target data packet for each camera includes: The preset number of cameras are controlled to acquire image data of the corresponding target video. Each camera is controlled to encapsulate the image data of the target video corresponding to each camera based on a preset protocol, thereby obtaining the target data packet corresponding to each camera; The preset protocol is the communication protocol upon which the camera transmits data.
3. The method according to claim 2, characterized in that, The control of each camera to sequentially transmit the message data in the target data packet corresponding to each camera to the receiving end at a preset time and according to a preset time interval, until all multiple message data included by each camera have been transmitted, includes: Each camera is controlled to transmit any one of the message data from its corresponding target data packet to the receiving end starting from the corresponding preset time. After a preset time interval, each camera is controlled to take any one of the untransmitted message data in its corresponding target data packet as the current message data, and each camera is controlled to transmit the corresponding current message data to the receiving end. After repeating the preset time interval, each camera is controlled to take any one of the untransmitted message data from its corresponding target data packet as the current message data, and each camera is controlled to transmit the corresponding current message data to the receiving end, until all message data in the target data packet corresponding to each camera has been transmitted.
4. The method according to claim 1, characterized in that, The control of a preset number of cameras to simultaneously expose, so that each camera generates a corresponding target video, includes: The control signal source simultaneously sends pulse signals to each of the cameras via an external line, so that each camera simultaneously responds to the pulse signal to perform exposure and simultaneously generates a target video corresponding to each camera.
5. The method according to claim 1, characterized in that, The control of a preset number of cameras to simultaneously expose, so that each camera generates a corresponding target video, includes: The control signal source simultaneously sends camera trigger commands to each of the cameras via a network switching device, so that each of the cameras responds to the camera trigger commands and simultaneously exposes itself, and simultaneously generates a target video corresponding to each of the cameras.
6. The method according to any one of claims 1-5, characterized in that, The control of each camera to sequentially transmit the message data in the target data packet corresponding to each camera to the receiving end at a preset time and according to a preset time interval, until all multiple message data included by each camera have been transmitted, includes: In Gigabit Ethernet, each camera is controlled to transmit the message data in the target data packet corresponding to each camera to the receiving end sequentially through Gigabit Ethernet at a preset time and according to a preset time interval, until all the multiple message data included by each camera have been transmitted.
7. A multi-camera video data transmission device, characterized in that, The device includes: A target video generation module is used to control a preset number of cameras to expose simultaneously, so that each camera generates a corresponding target video. The target data packet generation module is used to control each camera to process its corresponding target video to obtain a target data packet for each camera. The target data packet for each camera includes multiple message data. The target data packet transmission module is used to control each camera to transmit the message data in the target data packet corresponding to each camera to the receiving end sequentially from the corresponding preset time and according to the preset time interval, until all the multiple message data included by each camera has been transmitted. The preset time interval is determined according to the preset number of cameras, and the difference between two adjacent preset times is the transmission time of one message data.
8. The apparatus according to claim 7, characterized in that, The target data packet generation module includes: an image data acquisition module for controlling a preset number of cameras to acquire image data of the corresponding target video; and an image data encapsulation module for controlling each camera to encapsulate the image data of the target video corresponding to each camera based on a preset protocol to obtain a target data packet corresponding to each camera, wherein the preset protocol is the communication protocol on which the cameras perform data transmission.
9. An electronic device for multi-camera video data transmission, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded by the processor and executed as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Network camera instrument and camera video distribution method
JP2004147262A
Apparatus with animation data reproduction function and animation data reproducing method
JP2006325086A
