CN111787292A - Data transmission method based on multiple network cameras and related device - Google Patents

Data transmission method based on multiple network cameras and related device Download PDF

Info

Publication number
CN111787292A
CN111787292A CN202010920854.7A CN202010920854A CN111787292A CN 111787292 A CN111787292 A CN 111787292A CN 202010920854 A CN202010920854 A CN 202010920854A CN 111787292 A CN111787292 A CN 111787292A
Authority
CN
China
Prior art keywords
time slot
hash
key frame
network
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010920854.7A
Other languages
Chinese (zh)
Other versions
CN111787292B (en
Inventor
张金玉
王飞
李翔
邓志吉
刘明
叶奇
方勇军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202010920854.7A priority Critical patent/CN111787292B/en
Publication of CN111787292A publication Critical patent/CN111787292A/en
Application granted granted Critical
Publication of CN111787292B publication Critical patent/CN111787292B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a data transmission method and a related device based on a plurality of network cameras, wherein the data transmission method comprises the following steps: the network platform judges whether a plurality of key frames are received in a preset time range; if so, adjusting the key frame generation time of at least part of the plurality of key frames which collide with the network camera so that the network platform can uniformly receive the key frames within a preset time range; and sending the adjusted key frame generation time to the corresponding collision network camera. Through the mode, the network platform can uniformly receive the I frame within the preset time range, so that the probability of I frame collision is reduced.

Description

Data transmission method based on multiple network cameras and related device
Technical Field
The application belongs to the technical field of data transmission, and particularly relates to a data transmission method based on a plurality of network cameras and a related device.
Background
Under the 5G/4G/wireless environment, the network platform can simultaneously pull the video stream to a plurality of network cameras (namely IPCs). The larger the number of IPCs, the higher the probability that multiple key frames (i.e., I-frames) arrive at the network platform via the network at the same time, thereby causing I-frame collisions. The I-frame collision appears as a transient network burst on the network, and specifically, as shown in fig. 1, fig. 1 is a schematic diagram illustrating the effect of an embodiment of the transient network burst caused by the I-frame collision. Because the air interface resource of the wireless uplink is limited, the larger the collision probability of the I frame is, the larger the probability of congestion, packet loss and RTT increase of the wireless uplink is, and even the video is blocked.
Disclosure of Invention
The application provides a data transmission method and a related device based on a plurality of network cameras, which can enable a network platform to uniformly receive I frames within a preset time range so as to reduce the probability of I frame collision.
In order to solve the technical problem, the application adopts a technical scheme that: a data transmission method based on a plurality of network cameras is provided, which comprises the following steps: the network platform judges whether a plurality of key frames are received in a preset time range; if so, adjusting the key frame generation time of at least part of the plurality of key frames which collide with the network camera so that the network platform can uniformly receive the key frames within a preset time range; and sending the adjusted key frame generation time to the corresponding collision network camera.
Wherein the step of adjusting the key frame generation time of the at least part of the plurality of key frames corresponding to the network camera comprises: obtaining snapshots of key frame hash time slots of all network cameras connected to the network platform from a cache area, wherein the key frame arrival of all the network cameras on the network platform has corresponding timestamps, and all the timestamps are hashed in a plurality of time slots in the same hash period to form the key frame hash time slots; adjusting and obtaining target time slots of at least part of key frames of the collision network camera so as to enable the number of the key frames existing in the same time slot to be less than or equal to a threshold value; and determining the key frame generation time of the collision network camera by using the target time slot.
Wherein, the step of adjusting and obtaining at least part of target time slots of the key frames of the collision network camera, so that the number of the key frames existing in the same time slot is less than or equal to a threshold value, comprises: keeping the time slot of the key frame of one of the collision network cameras unchanged, and adjusting the time slots of the key frames of the rest collision network cameras to the idle time slot of the key frame hash time slot to obtain the target time slot.
Wherein the step of adjusting the time slots of the key frames of the rest of the colliding web cameras to the idle time slots of the key frame hash time slots comprises: obtaining an idle weight value of each time slot in the snapshot of the key frame hash time slot, wherein the idle weight value of the current time slot is related to the state of the current time slot and the states of the surrounding time slots; and adjusting the time slots of the rest key frames of the collision network camera to the time slots with higher idle weight values.
Wherein, the time slots in the snapshot of the key frame hash time slots are regarded as adjacent rings, and the step of obtaining the idle weight value of each time slot in the snapshot of the key frame hash time slots comprises: judging whether a key frame exists in the current time slot or not; if yes, setting the idle weight value of the current time slot to be 0; otherwise, obtaining a first accumulated number of the time slots of the continuous non-key frames on the left side of the current time slot and obtaining a second accumulated number of the time slots of the continuous non-key frames on the right side of the current time slot; adding one to the smaller value of the first accumulated number and the second accumulated number to serve as an idle weight value of the current time slot; judging whether the current time slot is the last one in the snapshots of the key frame hash time slot; if not, taking the next time slot in the current time slot as the current time slot, and returning to the step of judging whether the current time slot has the key frame.
Wherein the step of adjusting the time slots of the key frames of the rest of the collision network cameras to the time slots with higher idle weight values includes: adjusting the time slot of the key frame of one of the collision network cameras to the time slot with the highest idle weight value; judging whether the adjustment of the collision network camera is finished or not; if not, obtaining the idle weight value of each time slot in the adjusted snapshot of the key frame hash time slot; and adjusting the time slot of the key frame of one of the rest collision network cameras to the time slot with the highest idle weight value, and returning to the step of judging whether the collision network camera is adjusted completely.
Before the step of obtaining the snapshots of the key frame hash time slots of all the network cameras connected to the network platform from the buffer area, the method further includes: acquiring key frame information of a network camera newly accessed to the network platform, wherein the key frame information comprises a key frame period, a frame rate, a channel number and an equipment ID; acquiring a time stamp of a key frame of the network camera reaching a network platform by using the key frame information; the timestamp is used to obtain the particular slot it is in the hash cycle.
The key frame hash time slot comprises a hash period, a hash interval and a hash number, wherein a first integer value obtained by dividing the hash period by the hash interval is the hash number; the step of obtaining the specific time slot in the hash cycle by using the timestamp comprises the following steps: obtaining a first remainder value obtained by dividing the timestamp by the hash period; obtaining a second integer value obtained by dividing the first remainder value by the hash interval; obtaining a second remainder value obtained by dividing the second integer value by the number of hashes; and taking the time slot at the second remainder value as the specific time slot of the time stamp in the hash period.
In order to solve the above technical problem, another technical solution adopted by the present application is: a data transmission method based on a plurality of network cameras is provided, which comprises the following steps: the network camera judges whether a key frame generation time adjustment instruction from a network platform is received or not; if so, adjusting the key frame generation time sequence according to the adjusting instruction; otherwise, the key frame is sent to the network platform according to the original key frame generating time sequence.
In order to solve the above technical problem, the present application adopts another technical solution: providing a network platform comprising a memory and a processor coupled to each other; the processor is used for executing the program instructions stored in the memory to realize the data transmission method based on the multiple network cameras in any one of the above embodiments.
In order to solve the above technical problem, the present application adopts another technical solution: providing a network camera, comprising a memory and a processor which are coupled with each other; the processor is used for executing the program instructions stored in the memory to realize the data transmission method based on the multiple network cameras in any one of the above embodiments.
In order to solve the above technical problem, the present application adopts another technical solution: there is provided a storage device storing program instructions executable by a processor to implement the multiple-network-camera-based data transmission method described in any one of the above embodiments, or to implement the multiple-network-camera-based data transmission method described in any one of the above embodiments.
Being different from the prior art situation, the beneficial effect of this application is: when the network platform receives a plurality of I frames within the preset time range, the I frame time sequence arrangement function is triggered, namely the I frame generation time of a plurality of collision IPCs (inter-phase communication) with I frame collision is adjusted, so that the network platform only receives one I frame within the preset time range. The method is suitable for 5G/4G/wireless access scenes, and can reduce the probability of I frame collision of multiple IPCs, so that the network data of video resources are smoothed, and the phenomena of video frame loss, video blocking and the like are reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without inventive efforts, wherein:
FIG. 1 is a diagram illustrating an effect of an embodiment of a transient network burst caused by an I-frame collision;
FIG. 2 is a schematic flow chart diagram illustrating an embodiment of a data transmission method based on multiple IPCs according to the present application;
FIG. 3 is a flowchart illustrating an embodiment corresponding to step S102 in FIG. 2;
FIG. 4 is a flowchart illustrating an embodiment of the method before step S201 in FIG. 3;
FIG. 5 is a flowchart illustrating an embodiment corresponding to step S202 in FIG. 3;
FIG. 6 is a flowchart illustrating an embodiment corresponding to step S401 in FIG. 5;
FIG. 7 is a flowchart illustrating an embodiment corresponding to step S402 in FIG. 5;
FIG. 8 is a schematic flow chart diagram illustrating an embodiment of a data transmission method based on multiple IPCs according to the present application;
FIG. 9 is a schematic structural diagram of an embodiment of a data transmission system based on multiple video devices according to the present application;
FIG. 10 is a schematic structural diagram of an embodiment of a network platform or IPC of the present application;
FIG. 11 is a block diagram of an embodiment of a network platform of the present application;
FIG. 12 is a block diagram of an embodiment of a storage device according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 2, fig. 2 is a schematic flow chart of an embodiment of a data transmission method based on multiple IPCs according to the present application, where the data transmission method includes:
s101: the network platform judges whether a plurality of I frames are received in a preset time range.
Specifically, the network platform may be NVR (i.e., a store-and-forward portion of a network video surveillance system) or the like. The purpose of step S101 is to determine whether an I-frame collision occurs within a preset time range, which may be the whole or a part of the time period of transmitting the video stream. Generally, a video frame includes an I frame, a P frame, and the like, the difference between the I frame and the P frame is large, and the data amount ratio of the I frame and the P frame can reach more than 10 times, as shown in fig. 1, when there is an I frame collision within a preset time range, it appears as a large data amount burst in a short time in the network.
S102: if so, adjusting the I frame generation time of at least part of the collision IPC in the I frames so that the network platform can uniformly receive the I frames in a preset time range.
Specifically, the implementation process of the step S102 will be described in detail later. Corresponding to the above step S102, that is, if no, the I-frame scheduling function is not triggered, and the process returns to step S101.
S103: and sending the adjusted I frame generation time to the corresponding collision IPC.
By the mode, the probability of I frame collision of multiple IPCs can be reduced in a 5G/4G/wireless access scene, so that video resource network data are smoothed, and the phenomena of video frame loss, video blocking and the like are reduced.
In one embodiment, please refer to fig. 3, wherein fig. 3 is a flowchart illustrating an embodiment corresponding to step S102 in fig. 2. The step S102 specifically includes:
s201: a snapshot of I-frame hash slots of all IPCs connected to the network platform is obtained from a cache, wherein I-frames of all IPCs arriving at the network platform have corresponding timestamps, and all timestamps hash over multiple slots in the same hash period to form I-frame hash slots.
In an application scenario, before the step S201, the data processing method provided by the present application further includes: please refer to fig. 4 for a specific process of forming all I-frame hash slots of IPCs in the buffer, and fig. 4 is a flowchart illustrating an embodiment of step S201 in fig. 3. The specific process of forming all IPC I frame hash slots in the buffer includes:
s301: and obtaining I frame information of the IPC of the new access network platform, wherein the I frame information comprises an I frame period, a frame rate, a channel number and a device ID.
Specifically, each time an IPC is newly accessed, the process from step S301 to step S303 is triggered, and the I-frame information may be cached in the cache area of the network platform after being obtained. I frame period, GOP, which represents the time interval in which the network platform receives I frames from the same IPC; frame rate, FPS, represents the number of frames IPC transmits per second; the channel number can be called as a channel for IPC data transmission; and an IPC has a unique device ID. Of course, in other embodiments, the I frame information may further include a code stream type, a code rate, and the like.
S302: and obtaining the time stamp of the arrival of the I frame of the IPC at the network platform by using the I frame information.
Specifically, the time of the current access and the I-frame period of the IPC may be used to obtain the corresponding timestamp.
S303: the timestamp is used to obtain the particular slot it is in the hash cycle.
Specifically, the I frame hash slots of all IPCs currently connected to the network platform can be obtained through the step S303, and the I frame hash slots can be stored in the buffer area; further, after receiving the I-frame collision trigger instruction, a snapshot of the I-frame hash slot may be directly obtained from the buffer, where the snapshot is an instant copy. The I frame hash time slot comprises a hash period HashTimeGop, a hash interval HashTimeInterval and a hash number HashArrayCnt, wherein a first integer value obtained by dividing the hash interval by the hash period is the hash number;
i.e., HashArrayCnt = [ HashTimeGop/HashTimeInterval ].
For example, taking frame rate FPS =25 and GOP =2s as an example, IPC generates one video frame every 40ms, and may use 120ms (40 ms × 3) as a hash interval, where the hash number is 2s/120ms, that is, the hash number is 16. In the present embodiment, the hash interval is related to the first interval of IPC generated video frames, and N times the first interval may be set as the hash interval, where N is an integer greater than or equal to 2. The hash interval is set in such a way that the collision peaks of the I frames are staggered in normal traffic.
Further, the implementation process of step S303 specifically includes: obtaining a first remainder value obtained by dividing the timestamp by the hash period; obtaining a second integer value obtained by dividing the first remainder value by the hash interval; obtaining a second remainder value obtained by dividing the second integer value by the number of columns; the time slot at the second remainder value is taken as the specific time slot in the hash period for which the timestamp is located. The timestamp can be easily hashed into the hash period through the above-mentioned process. The above process is embodied as follows using the formula:
slots = [ (time% HashTimeGop)/HashTimeInterval ]% HashArrayCnt; wherein, time represents a timestamp, and slots represents a specific time slot corresponding to the timestamp.
For example, assume that the timestamp is 5s, the hash period is 2s, the hash interval is 120ms, and the number of hashes is 16; first obtaining a first remainder value of [5s%2s ], i.e. 1 s; then obtaining a second integer value of [1s/120ms ], namely 8; finally, a second remainder value of 8%16, namely 8, is obtained; the final current timestamp is in slot 8 in the hash cycle.
S202: and adjusting and obtaining target time slots of the I frames at least partially colliding with the IPC, so that the number of the I frames in the same time slot is less than or equal to a threshold value.
Specifically, the threshold may be a positive integer such as 1. In an application scenario, the step S202 specifically includes: keeping the time slot of the I frame of one of the collision IPCs unchanged, and adjusting the time slots of the I frames of the rest collision IPCs to the idle time slot in the snapshot of the hash time slot of the I frame to obtain the target time slot. The idle timeslot refers to that there is no I frame in the timeslot. The method for adjusting the target time slot of the I frame of the collision IPC is simple and has low calculation amount. Of course, in other application scenarios, the target slots of the I frames of all IPCs may also be adjusted, which is not limited in this application.
Further, referring to fig. 5, fig. 5 is a flowchart illustrating an embodiment corresponding to step S202 in fig. 3, where the step S202 adjusts the slots of the I frames of the remaining colliding IPCs to the free slots in the snapshot of the hash slots of the I frames specifically includes:
s401: and obtaining an idle weight value of each time slot in the snapshot of the I-frame hash time slot, wherein the idle weight value of the current time slot is related to the state of the current time slot and the states of the surrounding time slots.
Specifically, in the present embodiment, the time slots in the I-frame hash time slots are regarded as adjacent rings, please refer to fig. 6, fig. 6 is a flowchart illustrating an embodiment corresponding to step S401 in fig. 5, where step S401 specifically includes:
s501: and judging whether the current time slot has an I frame.
Specifically, in one example, as shown in table 1 below, table 1 is a hash slot table corresponding to the I-frame timestamps of three IPC devices.
Table 1: hash slot table corresponding to I frame time stamps of three IPC devices
Network camera I-frame time stamping Time slot
IPC-1 X 1
IPC-2 X+80ms 1
IPC-3 X+500ms 5
As can be seen from Table 1, there are three IPC devices currently connected to the same network platform, which are IPC-1, IPC-2 and IPC-3; after the I-frame timestamps of the three IPC devices in Table 1 are hashed according to the following hash parameters (the hash period is 2s, the hash interval is 120ms, and the hash number is 16), the time slots corresponding to the I-frame timestamps of IPC-1 and IPC-2 are 1, and the time slots corresponding to the I-frame timestamp of IPC-3 are 5. Based on this, a snapshot of the I-frame slot hash formed by the three IPC devices described above is shown in Table 2 below, with slot 0 and slot 15 in Table 2 being circular neighbors.
Table 2: snapshot of I-frame slot hashes formed by three IPC devices
Time slot 0 Time slot 1 Time slot 2 Time slot3 Time slot 4 Time slot 5 Time slot 6 Time slot 7 Time slot 8 Time slot 9 Time slot 10 Time slot 11 Time slot 12 Time slot 13 Time slot 14 Time slot 15
Number of I frames 0 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0
S502: if yes, the idle weight value of the current time slot is set to 0, and the process proceeds to step S504.
Specifically, please refer to table 2 above, assuming that the current timeslot is timeslot 1, and since timeslot 1 includes an I frame, the idle weight value corresponding to timeslot 1 is 0. Assume that the current timeslot is timeslot 5, and since timeslot 5 includes an I frame, the idle weight value corresponding to timeslot 5 is 0.
S503: otherwise, obtaining a first accumulated number of the time slots without the I frames continuously on the left side of the current time slot and obtaining a second accumulated number of the time slots without the I frames continuously on the right side of the current time slot; and adding one to the smaller value of the first accumulated number and the second accumulated number to serve as the idle weight value of the current time slot.
Specifically, referring to table 2, assuming that the current timeslot is timeslot 0 and there is no I frame at timeslot 0, the number of consecutive no I frames at the left side of timeslot 0 is 10 (i.e., timeslot 15 to timeslot 6), and the number of consecutive no I frames at the right side of timeslot 0 is 0, and the corresponding idle weight value is min (10,0) +1, i.e., 1; where 1 in "+ 1" mentioned above represents the slot 0 itself.
S504: and judging whether the current time slot is the last time slot in the I-frame hash time slot snapshot or not.
S505: if not, taking the next time slot in the current time slot as the current time slot, and returning to the step of judging whether the current time slot has the I frame.
Specifically, in this embodiment, each time slot may be sequentially determined in a left-to-right or right-to-left manner, so as to obtain the corresponding idle weight value. As shown in Table 3 below, Table 3 is a table of I-frame slot hash snapshots and corresponding idle weight values formed by three IPC devices.
Table 3: i-frame time slot hash snapshot formed by three IPC devices and corresponding idle weight value table
Time slot 0 Time slot 1 Time slot 2 Time slot 3 Time slot 4 Time slot 5 Time slot 6 Time slot 7 Time slot 8 Time slot 9 Time slot 10 Time slot 11 Time slot 12 Time slot 13 Time slot 14 Time slot 15
Number of I frames 0 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0
Idle weight value 1 0 1 2 1 0 1 2 3 4 5 6 5 4 3 2
S402: and adjusting the time slots of the I frames of the rest collision IPCs to the time slots with higher idle weight values.
Specifically, in an embodiment, as shown in table 3 above, IPC-1 or IPC-2 may be adjusted to a time slot with an idle weight value greater than a threshold, where the threshold may be 3, 4, 5, and the like, and may be specifically set according to an actual situation.
In another embodiment, when the number of the remaining collisions IPC is multiple, the remaining collisions IPC may be respectively adjusted to have a value in the time slot with a higher idle weight value.
Alternatively, the method shown in fig. 7 may be adopted, and fig. 7 is a schematic flow chart of an embodiment corresponding to step S402 in fig. 5. The process of adjusting the time slot of the I frames of the remaining collided IPCs in the step S402 includes:
s601: and adjusting the time slot of one I frame of the collision IPC to the time slot with the highest idle weight value.
Specifically, as shown in Table 3 above, the slot of the I-frame of IPC-1 or IPC-2 may be adjusted into slot 11.
S602: and judging whether the collision IPC is adjusted.
Specifically, the implementation process of step S602 may be: and acquiring snapshots of the adjusted I-frame hash time slots, and judging whether the snapshots of the adjusted I-frame hash time slots have the condition that a plurality of I frames exist in the same time slot.
In one embodiment, for the case in table 3 above, a snapshot of its adjusted I-frame hash slots may be as shown in table 4 below. As can be seen from table 4, in the snapshot of the hash time slot of the adjusted I frame, there is no case where there are multiple I frames in the same time slot, which indicates that the collision IPC has been adjusted, and the subsequent step S203 may be performed. Of course, in other embodiments, there may be a case that multiple I frames exist in the same time slot in the snapshot of the adjusted I frame hash time slot, and then the step S603 needs to be performed.
Table 4: table 3 three IPC device adjusted I-frame time slot hash snapshots
Time slot 0 Time slot 1 Time slot 2 Time slot 3 Time slot 4 Time slot 5 Time slot 6 Time slot 7 Time slot 8 Time slot 9 Time slot 10 Time slot 11 Time slot 12 Time slot 13 Time slot 14 Time slot 15
Number of I frames 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0
S603: and if not, obtaining the idle weight value of each time slot in the snapshot of the hash time slot of the adjusted I frame.
Specifically, the specific implementation process of step S603 may refer to step S401, which is not described herein again.
S604: and adjusting the time slot of the I frame in one of the rest of the collision IPCs to the time slot with the highest idle weight value, and returning to the step of judging whether the collision IPCs are adjusted.
By the mode, the I frame time stamps of the IPC devices can be distributed as uniformly as possible, so that the purpose that all IPCs stagger the collision peak of the I frame in time is achieved.
S203: the target slot is used to determine the generation time of the I frame colliding with the IPC.
Specifically, as shown in table 4 above, assuming that the initial slot of IPC-3 is slot 1, the adjusted target slot is slot 11, and the slot interval is 120ms, the I-frame generation time of IPC-3 needs to be delayed by (11-1) × 120ms =1200 ms.
In an application scenario, taking FPS as 25 and GOP as 2 seconds as an example, the I frame generation timing of IPC collision is adjusted in the above manner, so that the I frame traffic peak can be staggered. As shown in tables 5 and 6 below, tables 5 and 6 are an I-frame collision schematic table and an I-frame collision post-adjustment schematic table, respectively.
Table 5: i frame collision schematic table when multiple IPC devices send video frames
1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 25
IPC- 1 I P P P P P P P P P P P P P P P P P P P P P P P P
IPC- 2 P P P P I P P P P P P P P P P P P P P P P P P P P
IPC- N I P P P P P P P P P P P P P P P P P P P P P P P P
Table 6: schematic table after I frame collision adjustment when multiple IPC devices send video frames
1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 25
IPC- 1 I P P P P P P P P P P P P P P P P P P P P P P P P
IPC- 2 P P P P I P P P P P P P P P P P P P P P P P P P P
IPC- N P P P P P P P P I P P P P P P P P P P P P P P P P
The above embodiments are all descriptions of data transmission methods from the perspective of network devices, and the data transmission methods are further described below from the perspective of IPC. Referring to fig. 8, fig. 8 is a schematic flowchart illustrating an embodiment of a data transmission method based on multiple IPCs according to the present application, where the data transmission method specifically includes:
s701: the IPC determines whether an I-frame generation time adjustment instruction is received from the network platform.
S702: if so, adjusting the I frame generation time sequence according to the adjusting instruction.
Specifically, the time of I-frame generation may be delayed according to the adjustment instruction, but no adjustment is made for the GOP.
S703: otherwise, the I frame is sent to the network platform according to the original I frame generation time sequence.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of a data transmission system based on multiple video devices according to the present application. The data transmission system includes: multiple IPCs 10, network platform 12, and monitor screen 14.
Specifically, multiple IPCs 10 are coupled to the network platform 12 via a 4G/5G/wireless network, and the network platform 12 and the monitor 14 are connected via a wireless or wired network. IPC10 accesses network platform 12 by means of active registration, and network platform 12 initiates real-time pull-streaming service to multiple IPCs 10 and provides preview of implementation of front-end IPC10 for monitor screen 14.
In one embodiment, as shown in fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a network platform or IPC according to the present application. Network platform 12 or IPC10 includes memory 20 and processor 22 coupled to each other; the processor 22 is used to execute the program instructions stored in the memory to implement the data transmission method based on multiple IPCs in any of the above embodiments.
Specifically, the processor 22 may also be referred to as a CPU (Central Processing Unit). The processor 22 may be an integrated circuit chip having signal processing capabilities. The Processor 102 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, processor 22 may be commonly implemented by a plurality of integrated circuit chips.
In yet another embodiment, the network platform 12 is further described above from the perspective of a virtual module. Referring to fig. 11, fig. 11 is a schematic diagram of a framework according to an embodiment of a network platform of the present application. The network platform 12 includes a collision detection module 30, an I-frame timing adjustment module 32, and an IPC management module 34 coupled to each other. The collision detection module 30 is configured to determine whether a plurality of key frames are received within a preset time range; if so, the collision detection module 30 notifies the I-frame timing adjustment module 32. After receiving the notification, the I-frame timing adjustment module 32 adjusts the I-frame generation time of the collision IPC corresponding to at least part of the plurality of I frames, so that the network platform receives only one I frame in the preset time range. The I-frame timing adjustment module 32 issues the adjusted I-frame generation time to the IPC management module 34, and the IPC management module 34 issues the adjustment command to the corresponding collision IPC.
In addition, the IPC management module 34 is also responsible for providing parameter information of IPC, such as parameters of IPC device ID, channel number, code stream type, code rate, frame rate, GOP size, and the like.
Referring to fig. 12, fig. 12 is a block diagram of an embodiment of the storage device 40 of the present application, in which program instructions 400 for implementing all the methods described above are stored. The program instructions 400 may be stored in the storage device in the form of a software product, and include several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. The aforementioned storage device includes: various media capable of storing program codes, such as a usb disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or terminal devices, such as a computer, a server, a mobile phone, and a tablet.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.

Claims (12)

1. A data transmission method based on a plurality of network cameras is characterized by comprising the following steps:
the network platform judges whether a plurality of key frames are received in a preset time range;
if so, adjusting the key frame generation time of at least part of the plurality of key frames which collide with the network camera so that the network platform can uniformly receive the key frames within a preset time range;
and sending the adjusted key frame generation time to the corresponding collision network camera.
2. The data transmission method according to claim 1, wherein the step of adjusting the key frame generation time of at least some of the plurality of key frames corresponding to the network camera comprises:
obtaining snapshots of key frame hash time slots of all network cameras connected to the network platform from a cache area, wherein the key frame arrival of all the network cameras on the network platform has corresponding timestamps, and all the timestamps are hashed in a plurality of time slots in the same hash period to form the key frame hash time slots;
adjusting and obtaining target time slots of at least part of key frames of the collision network camera so as to enable the number of the key frames existing in the same time slot to be less than or equal to a threshold value;
and determining the key frame generation time of the collision network camera by using the target time slot.
3. The data transmission method according to claim 2, wherein the step of adjusting and obtaining the target time slots of at least some of the key frames of the colliding web cameras so that the number of key frames existing in the same time slot is less than or equal to a threshold value comprises:
keeping the time slot of the key frame of one of the collision network cameras unchanged, and adjusting the time slots of the key frames of the rest collision network cameras to the idle time slot of the key frame hash time slot to obtain the target time slot.
4. The data transmission method according to claim 3, wherein the step of adjusting the time slots of the key frames of the rest of the colliding web cameras to be in the idle time slot of the key frame hash time slot comprises:
obtaining an idle weight value of each time slot in the snapshot of the key frame hash time slot, wherein the idle weight value of the current time slot is related to the state of the current time slot and the states of the surrounding time slots;
and adjusting the time slots of the rest key frames of the collision network camera to the time slots with higher idle weight values.
5. The data transmission method according to claim 4, wherein the time slots in the snapshot of key frame hash time slots are considered to be adjacent in a ring, and the step of obtaining the idle weight value of each time slot in the snapshot of key frame hash time slots comprises:
judging whether a key frame exists in the current time slot or not;
if yes, setting the idle weight value of the current time slot to be 0; otherwise, obtaining a first accumulated number of the time slots of the continuous non-key frames on the left side of the current time slot and obtaining a second accumulated number of the time slots of the continuous non-key frames on the right side of the current time slot; adding one to the smaller value of the first accumulated number and the second accumulated number to serve as an idle weight value of the current time slot;
judging whether the current time slot is the last one in the snapshots of the key frame hash time slot;
if not, taking the next time slot in the current time slot as the current time slot, and returning to the step of judging whether the current time slot has the key frame.
6. The data transmission method according to claim 4, wherein the step of adjusting the time slots of the key frames of the rest of the colliding web cameras to the time slot with the higher idle weight value comprises:
adjusting the time slot of the key frame of one of the collision network cameras to the time slot with the highest idle weight value;
judging whether the adjustment of the collision network camera is finished or not;
if not, obtaining the idle weight value of each time slot in the adjusted snapshot of the key frame hash time slot;
and adjusting the time slot of the key frame of one of the rest collision network cameras to the time slot with the highest idle weight value, and returning to the step of judging whether the collision network camera is adjusted completely.
7. The data transmission method according to claim 2, wherein the step of obtaining the snapshot of the key frame hash slots of all the network cameras connected to the network platform from the buffer further comprises:
acquiring key frame information of a network camera newly accessed to the network platform, wherein the key frame information comprises a key frame period, a frame rate, a channel number and an equipment ID;
acquiring a time stamp of a key frame of the network camera reaching a network platform by using the key frame information;
the timestamp is used to obtain the particular slot it is in the hash cycle.
8. The data transmission method according to claim 7,
the key frame hash time slot comprises a hash period, a hash interval and a hash number, wherein a first integer value obtained by dividing the hash period by the hash interval is the hash number;
the step of obtaining the specific time slot in the hash cycle by using the timestamp comprises the following steps:
obtaining a first remainder value obtained by dividing the timestamp by the hash period;
obtaining a second integer value obtained by dividing the first remainder value by the hash interval;
obtaining a second remainder value obtained by dividing the second integer value by the number of hashes;
and taking the time slot at the second remainder value as the specific time slot of the time stamp in the hash period.
9. A data transmission method based on a plurality of network cameras is characterized by comprising the following steps:
the network camera judges whether a key frame generation time adjustment instruction from a network platform is received or not;
if so, adjusting the key frame generation time sequence according to the adjusting instruction;
otherwise, the key frame is sent to the network platform according to the original key frame generating time sequence.
10. A network platform comprising a memory and a processor coupled to each other;
the processor is used for executing the program instructions stored in the memory to realize the data transmission method based on the plurality of network cameras in any one of claims 1 to 8.
11. A network camera comprising a memory and a processor coupled to each other;
the processor is configured to execute the program instructions stored in the memory to implement the multiple webcam-based data transmission method of claim 9.
12. A storage device, characterized by storing program instructions executable by a processor for implementing the multiple network camera-based data transmission method according to any one of claims 1 to 8, or implementing the multiple network camera-based data transmission method according to claim 9.
CN202010920854.7A 2020-09-04 2020-09-04 Data transmission method based on multiple network cameras and related device Active CN111787292B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010920854.7A CN111787292B (en) 2020-09-04 2020-09-04 Data transmission method based on multiple network cameras and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010920854.7A CN111787292B (en) 2020-09-04 2020-09-04 Data transmission method based on multiple network cameras and related device

Publications (2)

Publication Number Publication Date
CN111787292A true CN111787292A (en) 2020-10-16
CN111787292B CN111787292B (en) 2020-12-04

Family

ID=72763020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010920854.7A Active CN111787292B (en) 2020-09-04 2020-09-04 Data transmission method based on multiple network cameras and related device

Country Status (1)

Country Link
CN (1) CN111787292B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112399141A (en) * 2020-10-16 2021-02-23 浙江大华技术股份有限公司 Data transmission method based on multiple front-end video devices and related device
CN113114978A (en) * 2021-02-22 2021-07-13 浙江大华技术股份有限公司 Multi-device video negotiation transmission method, system and related device
CN113259717A (en) * 2021-07-15 2021-08-13 腾讯科技(深圳)有限公司 Video stream processing method, device, equipment and computer readable storage medium
WO2022078266A1 (en) * 2020-10-16 2022-04-21 Zhejiang Dahua Technology Co., Ltd. Systems and methods for data transmission
CN114501066A (en) * 2021-12-30 2022-05-13 浙江大华技术股份有限公司 Video stream processing method, system, computer device and storage medium
CN114520891A (en) * 2020-11-20 2022-05-20 浙江大华技术股份有限公司 Data transmission method based on multiple front-end video devices and related device
CN114567808A (en) * 2022-01-25 2022-05-31 浙江大华技术股份有限公司 Video I frame transmission control method, device and equipment based on link equipment
WO2022156202A1 (en) * 2021-01-22 2022-07-28 华为技术有限公司 Video transmission test method, apparatus and system, and terminal
CN114980337A (en) * 2022-05-23 2022-08-30 中国电信股份有限公司 Network peak value control method and device, computer storage medium and electronic equipment
WO2022198464A1 (en) * 2021-03-23 2022-09-29 华为技术有限公司 Data transmission method, related device, and communication system
CN115334307A (en) * 2022-10-11 2022-11-11 浙江大华技术股份有限公司 Data transmission method, front-end equipment, video acquisition system and medium
WO2023151349A1 (en) * 2022-02-10 2023-08-17 华为技术有限公司 Video transmission method and apparatus
WO2023185292A1 (en) * 2022-03-31 2023-10-05 中兴通讯股份有限公司 Video data processing method and apparatus, and edge computing gateway and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383959A (en) * 2008-10-23 2009-03-11 中兴通讯股份有限公司 Method, system and customer equipment obtaining key frame in stream media service
CN102209237A (en) * 2011-05-26 2011-10-05 杭州华三通信技术有限公司 Method for reducing overlapping of frame I in on demand of live media stream and video management server
US20150209673A1 (en) * 2012-07-30 2015-07-30 Sony Computer Entertainment Europe Limited Localisation and mapping
CN105049783A (en) * 2014-04-28 2015-11-11 霍尼韦尔国际公司 System and method of optimized network traffic in video surveillance system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101383959A (en) * 2008-10-23 2009-03-11 中兴通讯股份有限公司 Method, system and customer equipment obtaining key frame in stream media service
CN102209237A (en) * 2011-05-26 2011-10-05 杭州华三通信技术有限公司 Method for reducing overlapping of frame I in on demand of live media stream and video management server
US20150209673A1 (en) * 2012-07-30 2015-07-30 Sony Computer Entertainment Europe Limited Localisation and mapping
CN105049783A (en) * 2014-04-28 2015-11-11 霍尼韦尔国际公司 System and method of optimized network traffic in video surveillance system

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112399141A (en) * 2020-10-16 2021-02-23 浙江大华技术股份有限公司 Data transmission method based on multiple front-end video devices and related device
CN112399141B (en) * 2020-10-16 2022-03-25 浙江大华技术股份有限公司 Data transmission method based on multiple front-end video devices and related device
WO2022078266A1 (en) * 2020-10-16 2022-04-21 Zhejiang Dahua Technology Co., Ltd. Systems and methods for data transmission
CN114520891A (en) * 2020-11-20 2022-05-20 浙江大华技术股份有限公司 Data transmission method based on multiple front-end video devices and related device
WO2022156202A1 (en) * 2021-01-22 2022-07-28 华为技术有限公司 Video transmission test method, apparatus and system, and terminal
CN113114978A (en) * 2021-02-22 2021-07-13 浙江大华技术股份有限公司 Multi-device video negotiation transmission method, system and related device
WO2022198464A1 (en) * 2021-03-23 2022-09-29 华为技术有限公司 Data transmission method, related device, and communication system
CN113259717B (en) * 2021-07-15 2021-09-14 腾讯科技(深圳)有限公司 Video stream processing method, device, equipment and computer readable storage medium
CN113259717A (en) * 2021-07-15 2021-08-13 腾讯科技(深圳)有限公司 Video stream processing method, device, equipment and computer readable storage medium
CN114501066A (en) * 2021-12-30 2022-05-13 浙江大华技术股份有限公司 Video stream processing method, system, computer device and storage medium
CN114567808A (en) * 2022-01-25 2022-05-31 浙江大华技术股份有限公司 Video I frame transmission control method, device and equipment based on link equipment
WO2023151349A1 (en) * 2022-02-10 2023-08-17 华为技术有限公司 Video transmission method and apparatus
WO2023185292A1 (en) * 2022-03-31 2023-10-05 中兴通讯股份有限公司 Video data processing method and apparatus, and edge computing gateway and storage medium
CN114980337A (en) * 2022-05-23 2022-08-30 中国电信股份有限公司 Network peak value control method and device, computer storage medium and electronic equipment
CN115334307A (en) * 2022-10-11 2022-11-11 浙江大华技术股份有限公司 Data transmission method, front-end equipment, video acquisition system and medium

Also Published As

Publication number Publication date
CN111787292B (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN111787292B (en) Data transmission method based on multiple network cameras and related device
CN112399141B (en) Data transmission method based on multiple front-end video devices and related device
EP3214839B1 (en) Method and device for transmitting multiple video streams
CN110381316B (en) Video transmission control method, device, equipment and storage medium
US9635583B2 (en) Method, apparatus and network system for controlling network congestion
US10117106B2 (en) Backoff mechanism techniques for spatial reuse
US20120275305A1 (en) Prioritized random access method, resource allocation method and collision resolution method
CN114520891B (en) Data transmission method and related device based on multiple front-end video devices
EP3863355A1 (en) Data transmission method, apparatus and device in a wifi network
Bui et al. Design and performance analysis of a novel distributed queue access protocol for cellular-based massive M2M communications
JP2006279381A (en) Radio lan system, communication device, and communication control method
CN112105086A (en) Unmanned aerial vehicle ad hoc network channel access control method based on flow prediction
US20230262266A1 (en) Systems and methods for data transmission
US20230231787A1 (en) Communication method and an apparatus
US20130148501A1 (en) Constant window back-off method for multiple access in wireless local area networks
CN114501066A (en) Video stream processing method, system, computer device and storage medium
CN108605114B (en) Control method, control device and network controller
JP2007235533A (en) Interference amount estimating device, method, wireless communication system, and its control method
KR101707163B1 (en) Method and apparatus for dynamic random access control and resource allocation in wireless communication system
JP2015192195A (en) Radio communication device, cw maximum value acquisition device, cw maximum value acquisition method, and program
CN114679570A (en) Video transmission method and device, storage medium and electronic device
US9917752B1 (en) Optimization of contention paramaters for quality of service of VOIP (voice over internet protocol) calls in a wireless communication network
WO2016062055A1 (en) Uplink supplementary carrier state control method and device, and base station
US9906650B2 (en) Voice adaptation for wireless communication
CN113055928B (en) Channel management method, data communication method, device and readable storage medium

Legal Events

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