Video stream collision elimination method, device, equipment and storage medium

By identifying and adjusting the transmission time of the video stream, it solves the problem of data packet loss caused by collisions in video stream transmission, improves the accuracy of video stream transmission, is suitable for scenarios with limited bandwidth, and reduces the need to increase bandwidth.

CN115734009BActive Publication Date: 2024-10-29SHENZHEN AI LINK CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202211427717.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-15
Publication Date
2024-10-29
Estimated Expiration
2042-11-15

AI Technical Summary

Technical Problem

During the video stream transmission process, due to the limited transmission bandwidth, the problem of data packet loss caused by video stream collisions can be solved by increasing the bandwidth. However, the cost is high and not suitable for all scenarios, especially for monitoring centers that need to receive a large number of video streams. It is difficult to configure appropriate bandwidth.

Method used

By receiving multiple video streams, the optional video streams with collisions are determined, the target video stream is determined based on the collision information, and collision elimination processing is performed based on its key frame period, and the transmission time of the target video stream is adjusted to avoid collisions.

Benefits of technology

It effectively avoids data packet loss in video stream transmission, improves the accuracy of video stream transmission, is suitable for scenarios with limited bandwidth, and reduces the need to increase bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115734009B_ABST
    Figure CN115734009B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for eliminating collisions of video streams, and belongs to the field of data transmission technology. The method includes: receiving multiple video streams sent by different video stream sending sources, and determining an optional video stream with a video stream collision from the multiple video streams, the video stream including: multiple key frames arranged in time sequence; determining a target video stream from the optional video stream according to the collision information of the optional video stream, wherein the collision information includes: the number of collisions, the duration of the collision or the combination of video streams involved in the collision; performing collision elimination processing on the target video stream according to the key frame period of the target video stream. The present application can realize collision elimination of video stream collisions, avoid data packet loss during video stream transmission, and improve the accuracy of video stream transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a method, device, equipment and storage medium for eliminating collision of a video stream. Background Art

[0002] During the video stream transmission process, especially for processing devices that need to receive a large number of video streams, due to its limited transmission bandwidth, when receiving video streams, if the sum of all video streams exceeds the transmission bandwidth, data packet loss may occur due to video stream collision.

[0003] The solution adopted in the prior art is usually to widen the transmission bandwidth to meet the transmission of more video streams.

[0004] However, increasing bandwidth requires additional costs, and for special scenarios, such as monitoring centers, the number of video streams that need to be received is too large, and the required transmission bandwidth is usually difficult to configure in practice, which leads to data packet loss during video stream transmission. Summary of the invention

[0005] The purpose of the present application is to provide a method, device, equipment and storage medium for eliminating collisions of video streams, which can achieve collision elimination of video stream collisions, avoid data packet loss during video stream transmission, and improve the accuracy of video stream transmission.

[0006] The embodiment of the present application is implemented as follows:

[0007] In one aspect of an embodiment of the present application, a method for eliminating collision of a video stream is provided, comprising:

[0008] Receiving multiple video streams sent by different video stream sending sources, and determining a selectable video stream with a video stream collision from the multiple video streams, the video stream comprising: multiple key frames arranged in time sequence;

[0009] Determine a target video stream from the optional video streams according to collision information of the optional video streams, wherein the collision information includes: the number of collisions, the collision duration, or a combination of video streams involved in the collision;

[0010] According to the key frame period of the target video stream, collision elimination processing is performed on the target video stream.

[0011] Optionally, determining a target video stream from the optional video streams according to the collision information of the optional video streams includes:

[0012] Determine the number of collisions that occur for each selectable video stream;

[0013] The video stream with the largest number of collisions among the optional video streams is used as the target video stream.

[0014] Optionally, determining a target video stream from the optional video streams according to the collision information of the optional video streams includes:

[0015] Determine the cumulative duration of collision of each optional video stream;

[0016] The video stream with the longest cumulative collision duration among the optional video streams is used as the target video stream.

[0017] Optionally, determining a target video stream from the optional video streams according to the collision information of the optional video streams includes:

[0018] Determine the combination of video streams involved in the collision each time a collision occurs;

[0019] Determine the number of optional video streams included in each video stream combination;

[0020] The selectable video stream in the video stream combination containing the largest number of selectable video streams is used as the target video stream.

[0021] Optionally, according to the key frame period of the target video stream, collision elimination processing is performed on the target video stream, including:

[0022] According to the key frame period of the target video stream, the restart time of the target video stream is determined, and at the restart time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source.

[0023] Optionally, determining a restart time of the target video stream according to a key frame period of the target video stream, and sending a control signal to a video stream sending source corresponding to the target video stream at the restart time to restart the video stream sending source, including:

[0024] Perform transmission timing on the target video stream;

[0025] When the timing time reaches the first restart time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source, wherein the first restart time is a time predetermined according to the key frame period of the target video stream.

[0026] Optionally, determining a restart time of the target video stream according to a key frame period of the target video stream, and sending a control signal to a video stream sending source corresponding to the target video stream at the restart time to restart the video stream sending source, including:

[0027] Determine a first frame period value and a second frame period value respectively, the first frame period value is an average value of key frame periods of all optional video streams, and the second frame period value is a key frame period value of the target video stream;

[0028] Determine a time difference between the first frame period value and the second frame period value, and use the time difference as a second restart time;

[0029] The target video stream is timed for transmission, and after the timed time reaches a second restart time, a control signal is sent to a video stream sending source corresponding to the target video stream to restart the video stream sending source.

[0030] Another aspect of an embodiment of the present application provides a video stream collision elimination device, including: a receiving module, a determining module, and an eliminating module;

[0031] A receiving module is used to receive multiple video streams sent by different video stream sending sources, and determine an optional video stream with a video stream collision from the multiple video streams, the video stream comprising: multiple key frames arranged in time sequence;

[0032] A determination module, used to determine a target video stream from the optional video streams according to the collision information of the optional video streams, wherein the collision information includes: the number of collisions, the collision duration, or the combination of video streams involved in the collision;

[0033] The elimination module is used to perform collision elimination processing on the target video stream according to the key frame period of the target video stream.

[0034] Optionally, the determination module is specifically used to determine the number of collisions of each optional video stream; and to use the video stream with the largest number of collisions among the optional video streams as the target video stream.

[0035] Optionally, the determination module is specifically used to determine the cumulative duration of collision of each optional video stream; and to use the video stream with the longest cumulative duration of collision among the optional video streams as the target video stream.

[0036] Optionally, the determination module is specifically used to determine the video stream combination involved in the collision each time a collision occurs; determine the number of optional video streams contained in each video stream combination; and use the optional video stream in the video stream combination containing the largest number of optional video streams as the target video stream.

[0037] Optionally, the elimination module is specifically used to determine the restart time of the target video stream according to the key frame period of the target video stream, and send a control signal to the video stream sending source corresponding to the target video stream at the restart time to restart the video stream sending source.

[0038] Optionally, the elimination module is specifically used to time the transmission of the target video stream; when the timing time reaches the first restart time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source, wherein the first restart time is a time predetermined according to the key frame period of the target video stream.

[0039] Optionally, the elimination module is specifically used to determine a first frame cycle value and a second frame cycle value respectively, the first frame cycle value being the average value of the key frame cycles of all optional video streams, and the second frame cycle value being the key frame cycle value of the target video stream; determining the time difference between the first frame cycle value and the second frame cycle value, and using the time difference as the second restart time; timing the transmission of the target video stream, and after the timing time reaches the second restart time, sending a control signal to the video stream sending source corresponding to the target video stream to restart the video stream sending source.

[0040] Another aspect of an embodiment of the present application provides a computer device, including: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the video stream collision elimination method are implemented.

[0041] In another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for eliminating collisions in a video stream are implemented.

[0042] The beneficial effects of the embodiments of the present application include:

[0043] The embodiment of the present application provides a method, device, equipment and storage medium for eliminating collisions of video streams, which can receive multiple video streams sent by different video stream sending sources, and determine the optional video streams with video stream collisions from the multiple video streams; determine the target video stream from the optional video streams according to the collision information of the optional video streams, and the collision information includes: the number of collisions, the collision duration or the combination of video streams involved in the collision; and perform collision elimination processing on the target video stream according to the key frame period of the target video stream. Among them, the transmission time of the target video stream can be adjusted through the key frame period of the target video stream, so that collision elimination of the target video stream can be achieved, thereby avoiding collisions between the target video stream and other video streams during the transmission process, avoiding data packet loss caused by collisions, and improving the accuracy of video stream transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A schematic diagram of an application scenario of video stream collision elimination provided in an embodiment of the present application;

[0046] Figure 2A schematic diagram of a flow chart of a method for eliminating collisions in a video stream provided in an embodiment of the present application;

[0047] Figure 3 Another schematic diagram of a process flow of a method for eliminating collisions in a video stream provided in an embodiment of the present application;

[0048] Figure 4 Another schematic diagram of a process flow of a method for eliminating collisions in a video stream provided in an embodiment of the present application;

[0049] Figure 5 Another schematic diagram of a process flow of a method for eliminating collisions in a video stream provided in an embodiment of the present application;

[0050] Figure 6 Another schematic diagram of a process flow of a method for eliminating collisions in a video stream provided in an embodiment of the present application;

[0051] Figure 7 Another schematic diagram of a process flow of a method for eliminating collisions in a video stream provided in an embodiment of the present application;

[0052] Figure 8 A schematic diagram of the structure of a video stream collision elimination device provided in an embodiment of the present application;

[0053] Fig. 9 A flowchart of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0055] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0056] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0057] In the description of the present application, it should be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0058] The specific application scenarios of the video stream collision elimination method provided in the embodiments of the present application are explained in detail below.

[0059] Figure 1 For a schematic diagram of an application scenario of video stream collision elimination provided in an embodiment of the present application, please refer to Figure 1 The scenario may include: a video stream processing device 110 and multiple video stream sending sources 120 , and the video stream processing device 110 may be communicatively connected with the multiple video stream sending sources 120 .

[0060] Optionally, the video stream processing device 110 may be any type of computer device, through which video streams sent by multiple video stream sending sources can be received, such as computers, servers, mobile phones, edge computing nodes, 5G base stations and other related computer devices.

[0061] The video stream sending source 120 may be any type of video stream acquisition device or video stream storage device, for example, a camera or any electronic device storing a video stream, and no specific limitation is made herein.

[0062] In this scenario, multiple video stream sending sources 120 can send video streams to the video stream processing device 110. During the video stream transmission process, if there are multiple video stream sending sources 120 transmitting video streams to the video stream processing device 110 at the same time, and the total transmission width exceeds the bandwidth of the video stream processing device 110, a collision between the video streams will occur, which will cause data packet loss in the transmission process of some video streams.

[0063] In order to avoid the above-mentioned phenomenon of data packet loss, a method for eliminating collision of a video stream is provided in an embodiment of the present application, and the specific implementation process of the method is explained in detail below.

[0064] Figure 2 For a flow chart of a method for eliminating collisions in a video stream provided in an embodiment of the present application, please refer to Figure 2 , a video stream collision elimination method, comprising:

[0065] S210: receiving a plurality of video streams sent by different video stream sending sources, and determining, from the plurality of video streams, an optional video stream where a video stream collision occurs.

[0066] The video stream includes: a plurality of key frames arranged in time sequence.

[0067] Optionally, the execution subject of the method may be the above-mentioned video stream processing device, and the video stream processing device may receive multiple video streams sent by different video stream sending sources.

[0068] For multiple video streams, since their transmission time is not fixed, there can be multiple video streams transmitted at the same time. If the total width of the transmitted video streams does not exceed the bandwidth of the video stream processing device at this time, it can be considered that these video streams can be transmitted normally, that is, no collision will occur.

[0069] In contrast, if it is determined that the total width of the transmitted video streams exceeds the bandwidth of the video stream processing device, it can be considered that these video streams have collided, and the video streams involved in the collision can be used as optional video streams.

[0070] For example, the bandwidth of the video stream processing device allows at most two video streams to be transmitted at the same time. If three video streams are transmitted at the same time, a video stream collision will occur among the three video streams, that is, all the three video streams can be used as optional video streams.

[0071] It should be noted that these video streams can all be video streams composed of multiple key frames arranged in time sequence, that is, there are multiple key frames in the video stream, and the key frames can be composed of multiple data packets. When the video streams are transmitted at the same time, the total size of the data packets in each video stream exceeds the bandwidth of the video stream processing device, then some data packets may not be transmitted normally, which will cause these data packets to be lost, that is, the data packet loss phenomenon that occurs when the video stream collision occurs.

[0072] S220: Determine a target video stream from the optional video streams according to the collision information of the optional video streams.

[0073] The collision information includes: the number of collisions, the duration of the collision, or the combination of video streams involved in the collision.

[0074] Optionally, the collision information may include multiple types, among which the number of collisions refers to the number of times a certain optional video stream has collided; the collision duration refers to the duration of a collision of a certain optional video stream or the total duration of a collision of a certain optional video stream, which is not limited here and can be selected according to actual needs; the combination of video streams participating in the collision refers to the combination of multiple optional video streams participating in the collision when a collision occurs.

[0075] Optionally, any of the above-mentioned collision information may be used to determine a target video stream from the optional video streams.

[0076] The target video stream may be one video stream or multiple video streams. After the target video stream is determined, the collision of the video streams can be eliminated.

[0077] It should be noted that the transmission of video streams is periodic, and the transmission method is the same in each cycle. For example, in the first cycle, the first video stream is transmitted first, and then the second video stream is transmitted. Later, the third video stream, the fourth video stream, and the fifth video stream are transmitted together and a video stream collision occurs. In the second cycle, the same transmission method will be executed, which means that a corresponding video stream collision will also occur.

[0078] The target video stream can be determined from the optional video streams through the transmission situation in the first cycle, and the video stream collision can be eliminated, so that the corresponding video stream collision will not occur in the subsequent transmission cycles.

[0079] S230: performing collision elimination processing on the target video stream according to the key frame period of the target video stream.

[0080] Optionally, after the target video stream is determined in the above manner, the key frame period of the target video stream may be determined.

[0081] Among them, the target video stream includes multiple key frames, each key frame is composed of multiple data packets. If the phase jitter of adjacent key frames in the target video stream is lower than the preset jitter threshold, the average value of the difference in arrival time of the first data packet of adjacent key frames is the key frame period.

[0082] After determining the key frame period of the target video stream, the video stream sending source corresponding to the target video stream can be restarted based on the value of the key frame period, thereby changing the transmission time of the target video stream, that is, changing the transmission time of the target video stream in the same period, so that the target video stream avoids collision and achieves the effect of collision elimination.

[0083] The embodiment of the present application provides a method, device, equipment and storage medium for eliminating collisions of video streams, which can receive multiple video streams sent by different video stream sending sources, and determine the optional video streams with video stream collisions from the multiple video streams; determine the target video stream from the optional video streams according to the collision information of the optional video streams, and the collision information includes: the number of collisions, the collision duration or the combination of video streams involved in the collision; and perform collision elimination processing on the target video stream according to the key frame period of the target video stream. Among them, the transmission time of the target video stream can be adjusted through the key frame period of the target video stream, so that collision elimination of the target video stream can be achieved, thereby avoiding collisions between the target video stream and other video streams during the transmission process, avoiding data packet loss caused by collisions, and improving the accuracy of video stream transmission.

[0084] The following is a detailed explanation of one implementation process of determining a target video stream in the method for eliminating collisions of video streams provided in an embodiment of the present application.

[0085] Figure 3 For another flow chart of the method for eliminating collision of video streams provided in the embodiment of the present application, please refer to Figure 3 , determining a target video stream from the optional video streams according to the collision information of the optional video streams, including:

[0086] S310: Determine the number of collisions that occur for each optional video stream.

[0087] Optionally, when a video stream collision occurs, the ID (Identity Document) of each video stream involved in the collision may be recorded, different optional video streams may be provided with different IDs, and the number of collisions of each optional video stream may be determined based on the number of times the ID appears.

[0088] S320: The video stream with the most collisions among the optional video streams is selected as the target video stream.

[0089] Optionally, after determining the number of collisions among the optional video streams, the video stream with the largest number of collisions may be used as the target video stream.

[0090] Among them, if there are multiple video streams with the largest number of times, one of them can be selected, or all of them can be used as target video streams. There is no limitation here, and a corresponding number of video streams can be selected as target video streams according to actual needs.

[0091] For example: there are eight collisions in total, one of which is a five-frame collision, and the video stream IDs involved are [2,4,5,6,8]; three of which are three-frame collisions, and the video stream IDs involved are [2,5,6], [5,8,9], [2,5,6]; four of which are two-frame collisions, and the video stream IDs involved are [1,2], [4,7], [8,9], [1,2]. It can be found that the video stream with ID 2 appeared 5 times, the most times, so the optional video stream with ID 2 can be used as the target video stream.

[0092] Another implementation process of determining the target video stream in the method for eliminating collisions of video streams provided in an embodiment of the present application is explained in detail below.

[0093] Figure 4 For another flow chart of the method for eliminating collision of video streams provided in the embodiment of the present application, please refer to Figure 4 , determining a target video stream from the optional video streams according to the collision information of the optional video streams, including:

[0094] S410: Determine the cumulative duration of collision of each optional video stream.

[0095] Optionally, when a video stream collides, each duration may be recorded. For each optional video stream, the duration of each collision may be determined, and the cumulative duration of the collision of the optional video stream may be calculated. The cumulative duration may be the total duration of the cumulative collisions.

[0096] For example, a selectable video stream has two collisions, the first collision lasts for T1, and the second collision lasts for T2, then the cumulative collision duration is T1+T2.

[0097] S420: The video stream with the longest cumulative collision duration among the optional video streams is selected as the target video stream.

[0098] Optionally, the accumulated duration of the collision of each optional video stream may be compared, and the video stream with the longest accumulated duration may be used as the target video stream.

[0099] Specifically, a timer may be set to time the time when each video stream collides, thereby obtaining the target video stream.

[0100] Another implementation process of determining the target video stream in the method for eliminating collisions of video streams provided in an embodiment of the present application is explained in detail below.

[0101] Figure 5 For another flow chart of the method for eliminating collision of video streams provided in the embodiment of the present application, please refer to Figure 5 , determining a target video stream from the optional video streams according to the collision information of the optional video streams, including:

[0102] S510: Determine a combination of video streams involved in a collision each time a collision occurs.

[0103] Optionally, each time a video stream collision occurs, the ID where the collision occurred can be recorded in the form of a video stream combination. For example, if three video streams with IDs 1, 2, and 3 collide at a certain time, the video stream combination can be recorded as [1, 2, 3].

[0104] S520: Determine the number of optional video streams included in each video stream combination.

[0105] Optionally, the number of optional video streams included in each video stream combination may be determined. For example, the number of video streams included in the video stream combination [1, 2, 3] is three.

[0106] S530: Use the optional video stream in the video stream combination containing the largest number of optional video streams as the target video stream.

[0107] Optionally, after determining the number of selectable video streams included in each video stream combination, the selectable video stream in the video stream combination including the largest number of selectable video streams may be used as the target video stream.

[0108] For example: if there is only one combination with the largest number of streams in the video stream combination, the optional video stream in this combination can be used as the target video stream. If there are multiple combinations with the largest number of optional video streams in the collision combination, the number of occurrences of each combination can be detected, and the video stream in the combination with the largest number of occurrences is determined as the target video stream. If there is no completely identical combination, the optional video stream in the video stream combination that appears for the first time is defaulted as the target video stream or the optional video stream in one of the video stream combinations is randomly selected as the target video stream, and specific restrictions are made here.

[0109] In a method for eliminating collisions of video streams provided in an embodiment of the present application, the number of times collisions occur among the optional video streams can be determined, and the video stream with the most collisions among the optional video streams can be used as the target video; or, the cumulative duration of collisions among the optional video streams can be determined, and the video stream with the longest cumulative duration of collisions among the optional video streams can be used as the target video stream; or, the video stream combination that participates in the collision each time a collision occurs can be determined; the number of optional video streams included in each video stream combination can be determined; and the optional video stream in the video stream combination with the largest number of optional video streams can be used as the target video stream. Among them, the target video stream can be determined by all of the above-mentioned methods, thereby increasing the diversity of determining the target video stream, and more comprehensively determining the video streams that need to be subjected to collision elimination.

[0110] Optionally, collision elimination processing is performed on the target video stream according to the key frame period of the target video stream, including: determining the restart time of the target video stream according to the key frame period of the target video stream, and sending a control signal to the video stream sending source corresponding to the target video stream at the restart time to restart the video stream sending source.

[0111] It should be noted that in the process of eliminating collisions of the target video stream, the restart time of the target video stream can be calculated and determined through the key frame period of the target video stream, and then the video stream processing device can send relevant control signals to the video stream sending source corresponding to the target video stream at the corresponding restart time, so that the video stream sending source is restarted to resend the target video stream.

[0112] A timer or other time calculation device may be used to determine whether the restart time has arrived, and the control signal may be transmitted after the restart time has arrived.

[0113] Optionally, the restart time may be pre-set, or it may be considered that the restart time has been reached directly after a collision is determined, thereby sending a control signal.

[0114] The specific implementation process of achieving collision elimination in the video stream collision elimination method provided in the embodiment of the present application is explained in detail below.

[0115] Figure 6 For another flow chart of the method for eliminating collision of video streams provided in the embodiment of the present application, please refer to Figure 6 , according to the key frame period of the target video stream, determining the restart time of the target video stream, and sending a control signal to the video stream sending source corresponding to the target video stream at the restart time to restart the video stream sending source, including:

[0116] S610: Perform transmission timing for the target video stream.

[0117] Optionally, a timer may be used to start timing when the first data packet in the first key frame in the target video stream is received.

[0118] It should be noted that the above-mentioned start time is only an example. In the actual implementation process, any time point can be selected to start the timing according to actual needs, and there is no limitation here.

[0119] S620: When the timing time reaches the first restart time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source.

[0120] The first restart time is a time predetermined according to a key frame period of the target video stream.

[0121] Optionally, the first restart time can be a time predetermined according to the key frame period of the target video stream. For example, a random number can be randomly selected between [0, the key frame period value of the target video stream]. When the timer reaches this time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source.

[0122] Alternatively, a duration equal to N×the key frame period value of the target video stream (N is a random positive integer) can be used as the first restart time. When the timer reaches this time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source.

[0123] Another specific implementation process of achieving collision elimination in the video stream collision elimination method provided in the embodiment of the present application is explained in detail below.

[0124] Figure 7 For another flow chart of the method for eliminating collision of video streams provided in the embodiment of the present application, please refer to Figure 7, according to the key frame period of the target video stream, determining the restart time of the target video stream, and sending a control signal to the video stream sending source corresponding to the target video stream at the restart time to restart the video stream sending source, including:

[0125] S710: Determine a first frame period value and a second frame period value respectively.

[0126] The first frame period value is an average value of the key frame periods of all optional video streams, and the second frame period value is a key frame period value of the target video stream.

[0127] Optionally, the key frame periods of all optional video streams may be calculated, and average calculation may be performed based on the calculated results to obtain an average value of the key frame periods of all optional video streams, and the average value may be used as the first frame period value.

[0128] The key frame period value of the target video stream may be used as the second frame period value.

[0129] It should be noted that the definition of the key frame period has been explained above, that is, the key frame period of the corresponding optional video stream can be obtained by calculating the average value of the arrival time difference of the first data packets in adjacent key frames in the optional video stream. This method can be used to calculate the key frame period of each optional video stream separately.

[0130] S720: Determine a time difference between the first frame period value and the second frame period value, and use the time difference as a second restart time.

[0131] Optionally, the calculation formula of the second restart time is as follows:

[0132] T0=|Ta-Tb|;

[0133] Wherein, T0 is the second restart time, Ta is the first frame period value, and Tb is the second frame period value.

[0134] S730: timing the transmission of the target video stream, and after the timing time reaches a second restart time, sending a control signal to a video stream sending source corresponding to the target video stream to restart the video stream sending source.

[0135] Optionally, after determining the second restart time based on the above method, the target video stream transmission timing can be performed, and after the timing time reaches the second restart time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source.

[0136] In the video stream collision method provided in the embodiment of the present application, the first frame period value and the second frame period value can be determined respectively, and then the time difference between the first frame period value and the second frame period value can be determined, and the time difference can be used as the second restart time, and the target video stream can be timed for transmission, and after the timing time reaches the second restart time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source. Among them, by determining the second restart time, the time to achieve collision elimination can be determined more accurately, and then the corresponding control signal can be sent to the video stream sending source at the corresponding time, so as to more accurately achieve the elimination of video stream collision and improve the accuracy and stability of video stream transmission.

[0137] It should be noted that the above steps may be performed multiple times to eliminate collisions of multiple target video streams, thereby improving the accuracy and stability of video stream transmission in the overall scene.

[0138] Optionally, based on the above explanation, the target video stream determination method may include multiple types, and the video stream collision elimination method may also include multiple types. In the actual implementation process, any one of them may be selected for execution, and the elimination effect may be calculated after the execution is completed.

[0139] For example, after the collision is eliminated, the collision severity score can be calculated. If the score is lower than the score before the collision elimination, it means that the collision elimination is effective, and the above steps can be repeated until the collision severity score remains unchanged or starts to increase, and then the collision elimination is stopped.

[0140] The collision severity score may be a value defined based on the collision information and used to characterize the severity of the collision. The specific calculation rules are as follows:

[0141] Record Score coll It is used to quantitatively evaluate the severity of key frame collisions, which is also the above-mentioned collision severity score. Assuming that at most M video streams collide in a certain time interval, set a cumulative timer for a total of M collision states [1,2,3,…,M], and assign corresponding M weight coefficients [1,2,3,…,M]. That is, the more video streams involved in the collision, the higher the weight coefficient, which means the overall collision is more severe. Conversely, the lower the number of collision frames, the lower the weight coefficient, which means the overall collision is milder. The collision severity score is:

[0142]

[0143] Among them, i means there are i collisions, Ti is the cumulative duration of each collision, and Score is coll Scores are assigned for the severity of the crash.

[0144] After each collision elimination, the collision severity score is calculated and normalized. The specific process is as follows:

[0145] After each collision elimination strategy is executed, a new collision severity score is calculated. The multiple collision severity scores obtained are normalized to limit the score range to [0,1].

[0146] If the normalized score approaches 0, it means the collision is relatively minor; if the normalized score approaches 1, it means the collision is relatively serious.

[0147] Assume that after executing N collision elimination strategies, the collision severity score reaches the minimum value, and the normalized collision severity score after n adjustments is recorded as The normalized collision severity score is calculated as follows:

[0148]

[0149] in, is the minimum value of all N collision severity scores, is the maximum value of all N collision severity scores.

[0150] The following describes the apparatus, device, storage medium, etc. corresponding to the video stream collision method provided by the present application. The specific implementation process and technical effects are as mentioned above and will not be described in detail below.

[0151] Figure 8 For a schematic diagram of the structure of the video stream collision elimination device provided in the embodiment of the present application, please refer to Figure 8 , a collision elimination device for a video stream, comprising: a receiving module 810, a determining module 820 and an eliminating module 830;

[0152] The receiving module 810 is used to receive multiple video streams sent by different video stream sending sources, and determine the optional video stream with video stream collision from the multiple video streams, the video stream comprising: multiple key frames arranged in time sequence;

[0153] A determination module 820, configured to determine a target video stream from the optional video streams according to collision information of the optional video streams, wherein the collision information includes: the number of collisions, the collision duration, or a combination of video streams involved in the collision;

[0154] The elimination module 830 is used to perform collision elimination processing on the target video stream according to the key frame period of the target video stream.

[0155] Optionally, the determination module 820 is specifically configured to determine the number of collisions of each optional video stream; and to use the video stream with the largest number of collisions among the optional video streams as the target video stream.

[0156] Optionally, the determination module 820 is specifically configured to determine the cumulative duration of collisions of the optional video streams; and to use the video stream with the longest cumulative duration of collisions among the optional video streams as the target video stream.

[0157] Optionally, the determination module 820 is specifically used to determine the video stream combination involved in the collision each time a collision occurs; determine the number of optional video streams contained in each video stream combination; and use the optional video stream in the video stream combination containing the largest number of optional video streams as the target video stream.

[0158] Optionally, the elimination module 830 is specifically configured to determine the restart time of the target video stream according to the key frame period of the target video stream, and send a control signal to the video stream sending source corresponding to the target video stream at the restart time to restart the video stream sending source.

[0159] Optionally, the elimination module 830 is specifically used to time the transmission of the target video stream; when the timing time reaches the first restart time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source, wherein the first restart time is a time predetermined according to the key frame period of the target video stream.

[0160] Optionally, the elimination module 830 is specifically used to respectively determine a first frame cycle value and a second frame cycle value, wherein the first frame cycle value is an average value of key frame cycles of all optional video streams, and the second frame cycle value is a key frame cycle value of a target video stream; determine a time difference between the first frame cycle value and the second frame cycle value, and use the time difference as a second restart time; perform transmission timing on the target video stream, and after the timing time reaches the second restart time, send a control signal to a video stream sending source corresponding to the target video stream to restart the video stream sending source.

[0161] In a video stream collision elimination device provided in an embodiment of the present application, multiple video streams sent by different video stream sending sources can be received, and an optional video stream with a video stream collision can be determined from the multiple video streams; a target video stream is determined from the optional video stream according to the collision information of the optional video stream, and the collision information includes: the number of collisions, the collision duration, or the combination of video streams involved in the collision; and a collision elimination process is performed on the target video stream according to the key frame period of the target video stream. Among them, the transmission time of the target video stream can be adjusted through the key frame period of the target video stream, so that the collision elimination of the target video stream can be achieved, thereby avoiding collisions between the target video stream and other video streams during the transmission process, avoiding data packet loss caused by collisions, and improving the accuracy of video stream transmission.

[0162] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0163] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0164] Fig. 9 For a flow chart of the computer device provided in the embodiment of the present application, please refer to Fig. 9 The computer device includes: a memory 910 and a processor 920. The memory 910 stores a computer program that can be run on the processor 920. When the processor 920 executes the computer program, the steps of the video stream collision elimination method are implemented.

[0165] The above-mentioned computer device may specifically be the above-mentioned video stream processing device.

[0166] In another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for eliminating collisions in a video stream are implemented.

[0167] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0168] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0169] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0170] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0171] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0172] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A video stream collision elimination method, It is characterized in that include: Receiving a plurality of video streams sent by different video stream sending sources, and determining a selectable video stream having a video stream collision from the plurality of video streams, wherein the video stream comprises: a plurality of key frames arranged in time sequence; Determine a target video stream from the optional video stream according to the collision information of the optional video stream, wherein the collision information includes: the number of collisions, the collision duration, or the combination of video streams involved in the collision; According to the key frame period of the target video stream, collision elimination processing is performed on the target video stream, and a collision severity score is calculated for the target video stream after collision elimination until the collision severity score remains unchanged or starts to increase, and then the step of performing the collision elimination processing is stopped, wherein the collision severity score is used to characterize the severity of the collision.

2. The method for eliminating collision of video streams as claimed in claim 1, It is characterized in that Determining the target video stream from the optional video stream according to the collision information of the optional video stream comprises: Determining the number of collisions between the selectable video streams; The video stream with the most collisions among the optional video streams is used as the target video stream.

3. The method for eliminating collision of video streams as claimed in claim 1, It is characterized in that Determining the target video stream from the optional video stream according to the collision information of the optional video stream comprises: Determine the cumulative duration of the collision of each of the optional video streams; The video stream in which the collision occurs for the longest cumulative duration among the optional video streams is used as the target video stream.

4. The method for eliminating collision of video streams as claimed in claim 1, It is characterized in that Determining the target video stream from the optional video stream according to the collision information of the optional video stream comprises: Determine the combination of video streams involved in the collision each time a collision occurs; Determine the number of optional video streams included in each of the video stream combinations; The selectable video stream in the video stream combination containing the largest number of selectable video streams is used as the target video stream.

5. The method for eliminating collision of a video stream according to any one of claims 1 to 4, It is characterized in that The performing collision elimination processing on the target video stream according to the key frame period of the target video stream comprises: According to the key frame period of the target video stream, the restart time of the target video stream is determined, and at the restart time, a control signal is sent to a video stream sending source corresponding to the target video stream to restart the video stream sending source.

6. The method for eliminating collision of video streams as claimed in claim 5, It is characterized in that The method of determining the restart time of the target video stream according to the key frame period of the target video stream, and sending a control signal to a video stream sending source corresponding to the target video stream at the restart time to restart the video stream sending source comprises: Performing transmission timing on the target video stream; When the timing time reaches the first restart time, a control signal is sent to the video stream sending source corresponding to the target video stream to restart the video stream sending source, wherein the first restart time is a time predetermined according to the key frame period of the target video stream.

7. The method for eliminating collision of video streams as claimed in claim 5, It is characterized in that The method of determining the restart time of the target video stream according to the key frame period of the target video stream, and sending a control signal to a video stream sending source corresponding to the target video stream at the restart time to restart the video stream sending source comprises: Determine a first frame period value and a second frame period value respectively, wherein the first frame period value is an average value of key frame periods of all optional video streams, and the second frame period value is a key frame period value of the target video stream; Determine a time difference between the first frame period value and the second frame period value, and use the time difference as a second restart time; The target video stream is timed for transmission, and after the time reaches the second restart time, a control signal is sent to a video stream sending source corresponding to the target video stream to restart the video stream sending source.

8. A video stream collision elimination device, It is characterized in that include: A receiving module, a determining module, and an eliminating module; The receiving module is used to receive multiple video streams sent by different video stream sending sources, and determine the optional video stream with video stream collision from the multiple video streams, wherein the video stream includes: multiple key frames arranged in time sequence; The determination module is used to determine the target video stream from the optional video stream according to the collision information of the optional video stream, wherein the collision information includes: the number of collisions, the collision duration or the combination of video streams involved in the collision; The elimination module is used to perform collision elimination processing on the target video stream according to the key frame period of the target video stream, and calculate the collision severity score of the target video stream after collision elimination until the collision severity score remains unchanged or starts to increase, and then stop executing the collision elimination processing step, wherein the collision severity score is used to characterize the severity of the collision.

9. A computer device, It is characterized in that include: A memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video stream sending method and device based on RTP protocol, equipment and medium

    CN111757151A

  • Data transmission method based on multiple pieces of front-end video equipment and related device

    CN112399141A

  • Data transmission method based on multiple front-end video devices and related device

    CN114520891A

  • Video transmission test method, device, system and terminal

    CN114827676A

  • Video transmission system

    CN115086779A