Video polling display method and device and storage medium
By caching and adjusting the playback time, the black screen and information omission caused by network instability in multi-camera wheel patrol display are solved, and timely display of important information and efficient display of video data are achieved.
Patent Information
- Application Number
- CN202510503138.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, when the multi-camera wheel patrol display is patrolled, the screen is black due to unstable network interaction, and important information cannot be paid attention to in time, the screen information is not displayed comprehensively, and information omissions are found.
The video data after the round patrol display is cached as the round patrol interval video, and the round patrol interval video is first displayed in the next round patrol display cycle, and then the real-time video is displayed. The playback time is adjusted in combination with event detection to ensure the display of important information.
It avoids black screen during video source switching, ensures timely display of important information, and improves the display efficiency of video data.
Smart Images

Figure CN120378684A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of video processing, and in particular, to a video round-robin display method, device, and storage medium. Background Art
[0002] Due to the explosive growth in the number of cameras, people often cannot keep real-time attention on the live feeds of all cameras, and only view them in a round-robin manner. Most of the video round-robin display solutions in the related art require the video display client to send requests to the cameras or the video servers connected to the cameras in real time according to the round-robin camera order, so as to send the video stream to the display client for display in real time.
[0003] However, due to the possible instability of network interaction, black screens are likely to occur during the round-robin display of multiple cameras. In addition, there are problems such as incomplete display of picture information and failure to pay timely attention to important information in the round-robin display. Summary of the Invention
[0004] In order to solve the above technical problems, this application provides at least one video round-robin display method, device, and storage medium.
[0005] In the first aspect of this application, a video round-robin display method is provided. The method includes: obtaining the display order of multiple video sources, and round-robin displaying the real-time videos respectively corresponding to the multiple video sources based on the display order, where the real-time video is obtained by the video source performing real-time video data acquisition on a preset scene; taking any one of the multiple video sources as the target video source, and in response to the target video source finishing round-robin display, caching the video data collected by the target video source after finishing round-robin display to obtain the round-robin interval video corresponding to the target video source; in response to reaching the display order of the target video source again, during the round-robin display of the target video source, first display the round-robin interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source.
[0006] In an embodiment, during the round-robin display of the target video source, first displaying the round-robin interval video corresponding to the target video source and then displaying the real-time video corresponding to the target video source includes: performing event detection on the round-robin interval video and / or the real-time video to obtain an event detection result; based on the event detection result, adjusting the playing duration of the round-robin interval video and / or the playing duration of the real-time video; based on the adjusted playing duration of the round-robin interval video and / or the playing duration of the real-time video, first display the round-robin interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source.
[0007] In one embodiment, the event detection result is used to characterize whether a preset event exists; based on the event detection result, the playing duration of the periodic video and / or the playing duration of the live video are adjusted, including: if the event detection result indicates that a preset event exists in the periodic video, setting the playing duration of the periodic video to a first duration; if the event detection result indicates that no preset event exists in the periodic video, setting the playing duration of the periodic video to a second duration; wherein, the second duration is less than the first duration; if the event detection result indicates that a preset event exists in the live video, setting the playing duration of the periodic video to a third duration; if the event detection result indicates that no preset event exists in the live video, setting the playing duration of the periodic video to a fourth duration; wherein, the fourth duration is less than the third duration.
[0008] In one embodiment, the event detection result includes the event attribute information corresponding to the preset events included in the periodic video and the live video; based on the event detection result, the playing duration of the periodic video and / or the playing duration of the live video are adjusted, including: based on the event detection result, determining the event attribute information corresponding to the preset events included in the periodic video, and / or determining the event attribute information corresponding to the preset events included in the live video; based on the event attribute information corresponding to the preset events included in the periodic video and / or the event attribute information corresponding to the preset events included in the live video, adjusting the playing duration of the periodic video and / or the playing duration of the live video.
[0009] In one embodiment, during the periodic display of the target video source, the periodic video corresponding to the target video source is displayed first, and then the live video corresponding to the target video source is displayed, including: determining the video sources that have been periodically displayed within the current periodic display cycle to obtain the displayed video sources; summing the actual playing durations of each displayed video source to obtain the total playing duration corresponding to each displayed video source; based on the total playing duration corresponding to each displayed video source, adjusting the playing duration of the periodic video and / or the playing duration of the live video; based on the adjusted playing duration of the periodic video and / or the playing duration of the live video, displaying the periodic video corresponding to the target video source first, and then displaying the live video corresponding to the target video source.
[0010] In one embodiment, based on the total playback duration corresponding to each displayed video source, adjusting the playback duration of the periodic video and / or the real-time video includes: performing event detection on the periodic video and the real-time video to obtain an event detection result; if the total playback duration is less than a preset playback duration threshold and the event detection result indicates that there is a preset event in the periodic video and / or the real-time video, increasing the playback duration of the periodic video and / or the real-time video; if the total playback duration is greater than the preset playback duration threshold and the event detection result indicates that there is no preset event in the periodic video and the real-time video, decreasing the playback duration of the periodic video and / or the real-time video.
[0011] In one embodiment, the method further includes: if it is detected that there is a preset event in the video data collected by a video source during the non-periodic display period, using the video source as a priority display video source; advancing the display order of the priority display video source.
[0012] In one embodiment, advancing the display order of the priority display video source includes: detecting whether there is a preset event in the periodic video and / or the real-time video currently being periodically displayed; if there is no preset event in the periodic video and / or the real-time video currently being periodically displayed, directly switching to display the periodic video and / or the real-time video of the priority display video source; if there is a preset event in the periodic video and / or the real-time video currently being periodically displayed, switching to display the periodic video and / or the real-time video of the priority display video source after detecting that the periodic video and / or the real-time video currently being periodically displayed has finished playing.
[0013] A second aspect of the present application provides a video periodic display device, the device includes: a periodic module, configured to obtain the display order of multiple video sources, and periodically display the real-time videos respectively corresponding to the multiple video sources based on the display order, where the real-time video is obtained by a video source performing real-time video data collection on a preset scene; an interval caching module, configured to use any one of the multiple video sources as a target video source, and in response to the target video source finishing periodic display, cache the video data collected by the target video source after finishing periodic display to obtain the periodic video corresponding to the target video source; a video combined display module, configured to in response to reaching the display order of the target video source again, during the periodic display of the target video source, first display the periodic video corresponding to the target video source, and then display the real-time video corresponding to the target video source.
[0014] A third aspect of the present application provides an electronic device, including a memory and a processor, where the processor is configured to execute program instructions stored in the memory to implement the above video periodic display method.
[0015] A fourth aspect of the present application provides a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a processor, the above video round-robin display method is implemented.
[0016] In the above solution, by obtaining the display order of multiple video sources, the real-time videos corresponding to the multiple video sources are round-robin displayed based on the display order; any one of the multiple video sources is used as the target video source, and in response to the completion of the round-robin display of the target video source, the video data collected after the completion of the round-robin display of the target video source is cached to obtain the round-robin interval video corresponding to the target video source; in response to reaching the display order of the target video source again, during the round-robin display of the target video source, the round-robin interval video corresponding to the target video source is first displayed, and then the real-time video corresponding to the target video source is displayed. Because the round-robin interval video is cached, when it is the turn of the target video source to be displayed in the next round-robin display cycle, the round-robin interval video is first displayed, and at the same time, the traceability of historical video data and the zero-latency connection of real-time video are realized. This can not only avoid the black screen caused by unstable network during the video source switching process, but also avoid information omission and improve the display efficiency of video data.
[0017] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification. These drawings show embodiments consistent with the present application and are used together with the specification to illustrate the technical solutions of the present application.
[0019] Figure 1 It is a schematic diagram of the implementation environment of the solution shown in an exemplary embodiment of the present application;
[0020] Figure 2 It is a flowchart of the video round-robin display method shown in an exemplary embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of round-robin display of multiple display windows respectively shown in an exemplary embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of video round-robin display shown in an exemplary embodiment of the present application;
[0023] Figure 5 It is a schematic diagram of differential display of round-robin interval video and real-time video shown in an exemplary embodiment of the present application;
[0024] Figure 6 It is a schematic diagram of the advance of the display order of the priority display video source shown in an exemplary embodiment of the present application;
[0025] Figure 7 It is a block diagram of a video round-robin display device shown in an exemplary embodiment of the present application;
[0026] Figure 8 It is a schematic structural diagram of an electronic device shown in an exemplary embodiment of the present application;
[0027] Figure 9 It is a schematic structural diagram of a computer-readable storage medium shown in an exemplary embodiment of the present application. Detailed implementation manners
[0028] The solutions of the embodiments of the present application will be described in detail below with reference to the accompanying drawings of the specification.
[0029] In the following description, specific details such as specific system architectures, interfaces, and technologies are presented for the purpose of illustration rather than limitation, in order to thoroughly understand the present application.
[0030] The term "and / or" in this article is merely an associated information describing associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after. In addition, "multiple" in this article means two or more than two. In addition, the term "at least one" in this article represents any one of multiple types or any combination of at least two of multiple types. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set composed of A, B, and C.
[0031] The applicant has found that in the related art, when performing multi-video round-robin, the following problems exist: First, due to unstable network interaction, it is impossible to obtain the video stream data of the next switch in time, resulting in easy black screens during video stream switching; Second, the order and duration of multi-video stream round-robin are unreasonable, resulting in important picture information not being able to be paid attention to in time; Third, during the round-robin process, the picture information of some video streams cannot be displayed, which may lead to the omission of important information.
[0032] In order to solve the above technical problems, the present application provides at least one video round-robin display method, device, and storage medium.
[0033] The video round-robin display method provided by the embodiments of the present application will be described below.
[0034] Please refer to Figure 1 , Figure 1It is a schematic diagram of the solution implementation environment shown in an exemplary embodiment of the present application. The solution implementation environment may include a video display terminal 110 and a video source 120, and the video display terminal 110 and the video source 120 are communicatively connected to each other.
[0035] The video display terminal 110 is used to play video data. The video display terminal 110 may be a network video recorder (NVR) connected to a display, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, etc. installed with a video management system (VMS), but is not limited thereto.
[0036] The number of video sources 120 is multiple. The video sources 120 may be Internet Protocol Cameras (IPCs), video servers communicatively connected to the IPCs, etc., and are used to send video data to the video display terminal 110.
[0037] For the video round-robin display method provided by the embodiments of the present application, the execution entity of each step may be the video display terminal 110, or may be executed by the interaction and cooperation of the video display terminal 110 and the video source 120, that is, a part of the steps of the method are executed by the video display terminal 110 and another part of the steps are executed by the video source 120.
[0038] Please refer to Figure 2 , Figure 2 It is a flowchart of the video round-robin display method shown in an exemplary embodiment of the present application. The video round-robin display method may be applied to the Figure 1 shown implementation environment and is specifically executed by the video display terminal 110 in this implementation environment. It should be understood that this method may also be applicable to other exemplary implementation environments and be specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment applicable to this method.
[0039] As Figure 2 shown, the video round-robin display method at least includes step S210 to step S230, which are introduced in detail as follows:
[0040] Step S210: Obtain the display order of multiple video sources, and round-robin display the real-time videos respectively corresponding to the multiple video sources based on the display order. The real-time video is obtained by the video source collecting video data in real time for a preset scene.
[0041] The video source collects video data for a preset scenario to obtain real-time video. Among them, the preset scenarios corresponding to different video sources can be different, or the same. For example, different video sources collect video data for the same preset scenario from different angles. This application does not limit this.
[0042] Determine the video sources that need to be displayed in a loop and determine the display order of each video source.
[0043] Taking the IPC as the video source as an example, the IP cameras that need to be displayed in a loop include A1, A2, A3, and A4. The video display terminal establishes communication connections with A1, A2, A3, and A4 respectively for subsequent video data transmission. Then, a display window is constructed, and A1, A2, A3, and A4 are associated with the display window, and the video data corresponding to A1, A2, A3, and A4 is displayed in a loop in the display window.
[0044] Among them, the display order can be preset by the user according to experience, or can be flexibly set according to the actual situation.
[0045] For example, according to the number of preset events detected by each video source within a historical time period (such as in a traffic scenario, the preset events include but are not limited to running a red light, driving over the line, speeding, etc.), and / or the quality of the video data corresponding to each video source (such as determining the quality of the video data according to image clarity, occlusion degree, acquisition angle, etc.), and / or the importance degree of the deployment location corresponding to each video source (such as the importance degree of the building entrance is greater than that of the corridor inside the building), etc., determine the display order corresponding to each video source. Specifically, the more the number of preset events detected, and / or the higher the quality of the video data, and / or the higher the importance degree of the deployment location, the more forward the display order. Conversely, the fewer the number of preset events detected, and / or the lower the quality of the video data, and / or the lower the importance degree of the deployment location, the more backward the display order.
[0046] Of course, it is also possible to randomly sort each video source to obtain the display order.
[0047] It should be noted that when there are many video sources, multiple display windows can be created in one display interface. Each display window is respectively assigned a preset number of video sources, and each display window respectively displays the preset number of video sources assigned to it in a loop.
[0048] Among them, the specific number of display windows created can be preset by the user according to experience, or can be flexibly set according to the actual situation. For example, determine the number of display windows according to the total number of video sources. The total number of video sources is positively correlated with the number of display windows.
[0049] Optionally, the attention score of each display window can also be calculated based on the window size and window position of the display window. For example, the larger the window and the closer the window position is to the center point or the upper left point of the display interface, the higher the attention of the display window. In addition, the attention score of the video source is calculated based on the number of preset events detected corresponding to the video source, and / or the quality of the video data, and / or the importance level of the deployment location. The more preset events detected corresponding to the video source, and / or the higher the quality of the video data, and / or the higher the importance level of the deployment location, the higher the attention of the video source. Based on the attention of each display window and the attention of each video source, a matching video source is allocated to each display window. The display window with higher attention and the video source with higher attention are matched with each other. On the contrary, the display window with lower attention and the video source with lower attention are matched with each other.
[0050] In addition, since the larger the number of video sources matched by a single display window, the longer the total duration required for a single round-robin display cycle, or the shorter the display duration that a single video source can be allocated in a single round-robin display cycle, therefore, the number of video sources that can be allocated to the display window can be set according to the attention of the display window. For example, the higher the attention of the display window, the fewer the number of video sources, and the lower the attention of the display window, the more the number of video sources. Of course, the attention of the display window and the number of allocable video sources may not be linearly related. For example, the attention of the display window and the number of allocable video sources may also follow a normal distribution, that is, the number of allocable video sources corresponding to the display window with high attention and the display window with low attention is small, while the number of allocable video sources corresponding to the display window with medium attention is large. The present application does not limit this.
[0051] Of course, the user can also preset the video sources matched by each display window according to experience.
[0052] For example, please refer to Figure 3 , Figure 3 which is a schematic diagram showing the round-robin display of multiple display windows shown in an exemplary embodiment of the present application. As Figure 3 shown, the display windows include Window 1, Window 2, Window 3, and Window 4. The video sources matched by Window 1 include A1, A2, A3, and A4. The video sources matched by Window 2 include B1, B2, B3, and B4. The video sources matched by Window 3 include C1, C2, C3, and C4. The video sources matched by Window 4 include D1, D2, D3, and D4.
[0053] In the related art, generally, each video source plays for N seconds by default. For example, if the default playing time is 10 seconds, then in each display window, A1, B1, C1, and D1 play for 10 seconds first, then the whole switches to A2, B2, C2, and D2 to play for 10 seconds, then switches to A3, B3, C3, and D3 to play for 10 seconds, and finally switches to A4, B4, C4, and D4 to play for 10 seconds, completing a cycle of cyclic display. Then, the next cycle of cyclic display starts, and the above steps are repeated. Therefore, when switching away from A1 and then cycling back to A1 again, there is an interval of 30 seconds. Similarly, when cycling back to B1, C1, and D1 again, there is also an interval of 30 seconds, that is, the real-time monitoring images of any video source during the cyclic interval will be lost, there are omissions in the image information during the video display process, and during the switching process, if there is network lag, it will cause a black screen.
[0054] Step S220: Use any one of the multiple video sources as the target video source. In response to the completion of the cyclic display of the target video source, cache the video data collected after the completion of the cyclic display of the target video source to obtain the cyclic interval video corresponding to the target video source.
[0055] It should be noted that the target video source in this application is just any video source randomly selected for the purpose of facilitating the illustration of the solution of this application, that is, each video source can be used as the target video source.
[0056] After the cyclic display of the target video source is completed, it will switch to other video sources for video data display. At this time, continue to receive the video data collected after the completion of the cyclic display of the target video source and cache it to obtain the cyclic interval video of the target video source during the period when it is not cyclically displayed.
[0057] For example, it can be to cache all the video data collected after the completion of the cyclic display of the target video source; it can also be to detect whether there is a preset event in all the collected video data and only cache the video data with the preset event; it can also be to cache the key video frames without the preset event and all the video frames with the preset event. This application does not limit this.
[0058] Step S230: In response to reaching the display order of the target video source again, during the cyclic display of the target video source, first display the cyclic interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source.
[0059] When reaching the display order of the target video source again, during the cyclic display of the target video source, first display the cyclic interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source.
[0060] In some embodiments, a total play duration can be assigned to the target video source, and then the total play duration is divided into a video display time period for round-robin intervals and a real-time video display time period to display the round-robin interval video and the real-time video respectively. For example, the total play duration is 10 seconds, the video display time period for round-robin intervals is from the 0th to the 3rd second, and the real-time video display time period is from the 3rd to the 10th second.
[0061] It should be noted that the above total play duration, the video display time period for round-robin intervals, and the real-time video display time period can be values preset according to experience, or can be values flexibly calculated according to the actual situation (see the subsequent embodiment examples for details), and the present application does not limit this.
[0062] Among them, if the duration corresponding to the video display time period for round-robin intervals is less than the duration of the round-robin interval video, it is necessary to perform frame extraction display on the round-robin interval video.
[0063] Taking the video source including A1, B1, C1, D1 as an example, please refer to Figure 4 , Figure 4 is a schematic diagram of video round-robin display shown in an exemplary embodiment of the present application. As Figure 4 shown, the video data is played in sequence according to the display order of A1, A2, A3, A4. A1l, A2l, A3l, A4l respectively correspond to the real-time videos of A1, A2, A3, A4. If the target video source is A1, after the round-robin display of A1 is completed, record the moment A1e when the video starts to be stored at this time, cache the video data subsequently collected by A1, and switch to A2 for video playback. Similarly, when A2 finishes playing, record the end moment A2e at this time, cache the video data subsequently collected by A2, and switch to A3 for video playback, and so on. When it is the turn of A1's display order in the next round-robin display cycle, record the moment A1b. Obtain the round-robin interval video A1r corresponding to A1 cached during the interval from A1b to A1e, and first display the round-robin interval video A1r within the round-robin display time period A1l corresponding to A1, and then display the real-time video A1l corresponding to A1. The same applies to the other video sources.
[0064] Among them, the round-robin interval video can be subjected to frame extraction processing and then displayed to shorten the display duration. For example, after frame extraction processing on the round-robin interval videos A1r, A2r, A3r, A4r corresponding to A1, A2, A3, A4 respectively, the finally displayed videos A1tlp, A2tlp, A3tlp, A4tlp are obtained.
[0065] It should be noted that the above recording of the start time of the round-robin interval video is only for illustrative purposes, and other start times can also be selected for caching and recording of video data to obtain the round-robin interval video, and the present application does not limit this.
[0066] After the target video source is cyclically displayed, instead of directly stopping receiving the video data of the target video source, the video data during the non-cyclical display period of the target video source is cached to obtain the cyclical interval video. When it is the turn of the target video source to be displayed in the next cyclical display period, the cyclical interval video is first displayed, which can not only avoid the black screen caused by unstable network during the video source switching process, but also avoid information omission and improve the display efficiency of video data.
[0067] Next, the embodiments of the present application will be described in detail.
[0068] In some embodiments, during the cyclical display of the target video source in step S230, first displaying the cyclical interval video corresponding to the target video source and then displaying the real-time video corresponding to the target video source includes:
[0069] Step S2311: Performing event detection on the cyclical interval video and / or the real-time video to obtain an event detection result.
[0070] By performing event detection on the cyclical interval video and / or the real-time video, it is possible to determine whether a preset event exists in the cyclical interval video and / or the real-time video, or to determine the type of the preset event existing in the cyclical interval video and / or the real-time video, so as to obtain an event detection result.
[0071] For example, inputting the cyclical interval video and / or the real-time video into a pre-trained event detection neural network model, and the event detection neural network model can perform event detection on the input video data to obtain an event detection result output by the event detection neural network model.
[0072] Step S2312: Adjusting the playing duration of the cyclical interval video and / or the playing duration of the real-time video based on the event detection result.
[0073] According to the event detection result, the playing duration of the cyclical interval video and / or the playing duration of the real-time video is adjusted, and the adjustment methods include reducing, increasing or remaining unchanged the playing duration.
[0074] Embodiment 1: The event detection result is used to indicate whether a preset event exists; based on the event detection result, the playing duration of the looped video and / or the playing duration of the live video are adjusted, including: if the event detection result indicates that a preset event exists in the looped video, setting the playing duration of the looped video to a first duration; if the event detection result indicates that no preset event exists in the looped video, setting the playing duration of the looped video to a second duration; where the second duration is less than the first duration; if the event detection result indicates that a preset event exists in the live video, setting the playing duration of the looped video to a third duration; if the event detection result indicates that no preset event exists in the live video, setting the playing duration of the looped video to a fourth duration; where the fourth duration is less than the third duration.
[0075] That is, the playing duration of the looped video with a preset event is greater than the playing duration of the looped video without a preset event; the playing duration of the live video with a preset event is greater than the playing duration of the live video without a preset event.
[0076] Among them, the values of the first duration, the second duration, the third duration, and the fourth duration can be preset according to experience or can be flexibly set according to the actual situation.
[0077] Embodiment 2: The event detection result includes the event attribute information corresponding to the preset events contained in the looped video and the live video; based on the event detection result, the playing duration of the looped video and / or the playing duration of the live video are adjusted, including: based on the event detection result, determining the event attribute information corresponding to the preset events contained in the looped video, and determining the event attribute information corresponding to the preset events contained in the live video; based on the event attribute information corresponding to the preset events contained in the looped video and the event attribute information corresponding to the preset events contained in the live video, adjusting the playing duration of the looped video and / or the playing duration of the live video.
[0078] Among them, the event attribute information includes but is not limited to the priority corresponding to the preset event (different preset events are set with different priorities), and / or the duration corresponding to the preset event, etc.
[0079] Specifically, the higher the priority corresponding to the preset event, the more important the preset event is indicated, and the longer the playing duration of the looped video or the live video; conversely, the lower the priority corresponding to the preset event, the shorter the playing duration of the looped video or the live video; the longer the duration corresponding to the preset event, the more information is indicated to be contained in the corresponding looped video or live video, and the longer the playing duration of the looped video or the live video; conversely, the shorter the duration corresponding to the preset event, the shorter the playing duration of the looped video or the live video.
[0080] Of course, the playback duration can also be set by combining the above-mentioned First Embodiment and Second Embodiment.
[0081] Examples of flexibly setting the first duration according to the actual situation: For example, for the target video source, the first duration is determined according to the duration of the preset event in the video during the polling interval; and / or different preset events are set with different priorities, and the first duration is determined according to the priority of the preset event in the video during the polling interval; and / or the first duration is determined according to whether there is a preset event in the real-time video during the playback of the polling interval video; and / or the first duration is determined according to the priority of the preset event in the real-time video during the playback of the polling interval video. For example, if the duration of the preset event in the polling interval video is longer, and / or the priority of the preset event in the polling interval video is higher, and / or there is no preset event in the real-time video, and / or the priority of the preset event in the real-time video is lower, then the first duration is longer; conversely, if the duration of the preset event in the polling interval video is shorter, and / or the priority of the preset event in the polling interval video is lower, and / or there is a preset event in the real-time video, and / or the priority of the preset event in the real-time video is higher, then the first duration is shorter.
[0082] Examples of flexibly setting the second duration according to the actual situation: For example, for the target video source, the second duration is determined according to whether there is a preset event in the real-time video during the playback of the polling interval video. For example, if it is detected that there is no preset event in the real-time video during the playback of the polling interval video, then the second duration is longer; conversely, if it is detected that there is a preset event in the real-time video during the playback of the polling interval video, then the second duration is shorter.
[0083] Examples of flexibly setting the third duration according to the actual situation: For example, for the target video source, the third duration is determined according to whether there is a preset event in the polling interval video; and / or the third duration is determined according to the duration of the preset event in the polling interval video; and / or the third duration is determined according to the priority of the preset event in the polling interval video; and / or the third duration is determined according to the duration of the preset event in the real-time video; and / or the third duration is determined according to the priority of the preset event in the real-time video. For example, if there is a preset event in the polling interval video, and / or the duration of the preset event in the polling interval video is longer, and / or the priority of the preset event in the polling interval video is higher, and / or the duration of the preset event in the real-time video is longer, and / or the priority of the preset event in the real-time video is higher, then the third duration is longer; conversely, if there is no preset event in the polling interval video, and / or the duration of the preset event in the polling interval video is shorter, and / or the priority of the preset event in the polling interval video is lower, and / or the duration of the preset event in the real-time video is shorter, and / or the priority of the preset event in the real-time video is lower, then the third duration is shorter.
[0084] Exemplarily, it may be that after detecting that the real-time video has been converted from a state with a preset event to a state without a preset event, and no preset event has been detected in the real-time video for M consecutive seconds, it is determined that the preset event in the real-time video ends. At this time, the playback of the real-time video of the target video source is ended, and the next video source is switched to. Wherein, the value of M can be preset according to experience, or can be flexibly determined according to the priority of the preset event in the real-time video. The higher the priority of the preset event in the real-time video, the larger the value of M; conversely, the lower the priority of the preset event in the real-time video, the smaller the value of M.
[0085] For another example, a default playback duration is set for the target video source. After the playback of the polling interval video is completed and the actual playback duration of the polling interval video has been determined, the default playback duration is subtracted from the actual playback duration of the polling interval video to obtain a third duration.
[0086] Among them, the default playback duration can be preset according to experience, or can be flexibly set according to the actual situation. For example, according to the importance degree of the deployment location of the target video source, and / or the number of preset events detected by the target video source within a historical time period, and / or the number of video sources allocated to the display window, etc., to determine the default playback duration. If the importance degree of the deployment location is higher, and / or the number of detected preset events is more, and / or the number of video sources allocated to the display window is less, the default playback duration is longer; conversely, if the importance degree of the deployment location is lower, and / or the number of detected preset events is less, and / or the number of video sources allocated to the display window is more, the default playback duration is shorter.
[0087] An example of flexibly setting the fourth duration according to the actual situation: For example, determining the fourth duration according to whether there is a preset event in the polling interval video; and / or determining the fourth duration according to the duration of the preset event in the polling interval video; and / or determining the fourth duration according to the priority of the preset event in the polling interval video. For example, if there is a preset event in the polling interval video, and / or the duration of the preset event in the polling interval video is longer, and / or the priority of the preset event in the polling interval video is higher, the fourth duration is longer; conversely, if there is no preset event in the polling interval video, and / or the duration of the preset event in the polling interval video is shorter, and / or the priority of the preset event in the polling interval video is lower, the fourth duration is shorter.
[0088] For another example, the default playback duration is subtracted from the actual playback duration of the polling interval video to obtain a fourth duration.
[0089] Taking the target video source A1 as an example, after A1 has been loop-displayed in the previous loop display cycle, the loop interval video cached is denoted as A1r, and the real-time video captured by A1 in the current loop display cycle is denoted as A1l.
[0090] Case 1: No preset event occurs in A1l and no preset event occurs in A1r. Set the playback duration corresponding to A1r to 1 second. After A1r finishes playing, play the real-time video A1l of A1. If no preset event occurs in A1l when switching to the real-time video A1l, set the playback duration of A1l to 3 seconds. If no preset event is detected during the playback of A1l, switch to the next video source after 3 seconds.
[0091] Case 2: No preset event occurs in A1l and a preset event occurs in A1r. Set the playback duration corresponding to A1r to 4 seconds. After A1r finishes playing, play the real-time video A1l of A1. If no preset event occurs in A1l when switching to the real-time video A1l, set the playback duration of A1l to 3 seconds. If no preset event is detected during the playback of A1l, switch to the next video source after 3 seconds. Of course, since a preset event occurs in A1r, it is determined that the possibility of a preset event occurring again in A1l is high at this time, and a longer playback duration for A1l can also be set, such as extending the playback duration of A1l to 5 seconds.
[0092] Case 3: A preset event occurs in A1l (if a preset event occurs in A1l when switching to the real-time video A1l, or a preset event is detected during the playback of A1l, it is determined that a preset event occurs in A1l), and there is no event recording in A1r. Set the playback duration corresponding to A1r to 1 second. After A1r finishes playing, play the real-time video A1l of A1, and set the playback duration of A1l to 8 seconds.
[0093] Case 4: A preset event occurs in A1l and a preset event occurs in A1r. Set the playback duration corresponding to A1r to 4 seconds. After A1r finishes playing, play the real-time video A1l of A1, and set the playback duration of A1l to 8 seconds. Or, considering that a preset event also occurs in A1r and it is determined that the information content of the current A1l is high, a longer playback duration for A1l can also be set, such as extending the playback duration of A1l to 15 seconds.
[0094] It should be noted that generally, the duration of the loop interval video is longer than its corresponding playback duration, and frame extraction playback needs to be performed on the loop interval video. For example, perform time-lapse photography on the loop interval video A1r to obtain the final video data A1tlp for playback. In addition, only the video segments with preset events in the loop interval video can be saved, and the video segments without preset events can be deleted or frame extraction processing can be performed on the video segments without preset events using a higher compression ratio.
[0095] Step S2313: Based on the playing duration of the loop interval video and / or the playing duration of the live video after adjustment, first display the loop interval video corresponding to the target video source, and then display the live video corresponding to the target video source.
[0096] In addition to determining the playing duration of the loop interval video and the playing duration of the live video according to the specific situations of the loop interval video and the live video of the target video source in the above embodiments, the playing duration of the loop interval video and the playing duration of the live video can also be determined according to the specific situations of the videos of other video sources.
[0097] In some embodiments, during the loop display of the target video source in step S230, first displaying the loop interval video corresponding to the target video source and then displaying the live video corresponding to the target video source includes:
[0098] Step S2321: Determine the video sources that have been loop-displayed within the current loop display period to obtain the displayed video sources.
[0099] A loop display period refers to the time period required for displaying each video source once.
[0100] Step S2322: Sum up the actual playing durations of each displayed video source to obtain the total playing duration corresponding to each displayed video source.
[0101] For example, if the displayed video sources include A1 and A2, the actual playing duration of A1 is 5 seconds, and the actual playing duration of A2 is 8 seconds, then the total playing duration corresponding to each displayed video source is 13 seconds.
[0102] Step S2323: Based on the total playing duration corresponding to each displayed video source, adjust the playing duration of the loop interval video and / or the playing duration of the live video.
[0103] For example, the longer the total playing duration corresponding to each displayed video source, the shorter the playing duration of the loop interval video and / or the playing duration of the live video; the shorter the total playing duration corresponding to each displayed video source, the longer the playing duration of the loop interval video and / or the playing duration of the live video.
[0104] For another example, event detection is performed on the periodic video and the live video to obtain event detection results. If the total playback duration is less than a preset playback duration threshold and the event detection results indicate that a preset event exists in the periodic video and / or the live video, the playback duration of the periodic video and / or the live video is increased. If the total playback duration is greater than the preset playback duration threshold and the event detection results indicate that no preset event exists in the periodic video and the live video, the playback duration of the periodic video and / or the live video is decreased.
[0105] Step S2324: Based on the adjusted playback duration of the periodic video and / or the live video, first display the periodic video corresponding to the target video source, and then display the live video corresponding to the target video source.
[0106] Of course, the playback duration of the periodic video and the live video can also be determined by combining the above embodiments, that is, considering the specific situations of the periodic video and the live video of the target video source and the specific situations of the videos of other video sources to determine the playback duration of the periodic video and the live video. The present application does not limit this.
[0107] Through the above embodiments, by dynamically adjusting the playback duration of the periodic video and the live video, worthless video frames can be quickly reported, the display of important video frames can be ensured, and the video display efficiency can be improved.
[0108] In some embodiments, when playing a video, the periodic video and the live video are displayed differently.
[0109] For example, please refer to Figure 5 , Figure 5 which is a schematic diagram showing different displays of the periodic video and the live video shown in an exemplary embodiment of the present application. As shown in Figure 5 , in the display interface, each display window corresponds to a video progress bar. The video progress bar is used to identify different video data in the time dimension and distinguish between the periodic video and the live video. For example, the video data belonging to the periodic video is identified in orange, and the video data belonging to the live video is identified in blue. In addition, since the display priority of the live video is generally higher than that of the periodic video, during the playback of the periodic video, a live video jump button can be displayed, such as the button in the upper right corner of the display window in Figure 5 . If it is detected that the live video jump button is triggered, switch to the live video corresponding to the video source in the current display order for display.
[0110] Through the above embodiments, it is convenient to view different video contents and improve the user experience.
[0111] In some embodiments, the method further includes: if it is detected that there is a preset event in the video data collected by a video source during non-round-robin display, then using the video source as a priority display video source; advancing the display order of the priority display video source.
[0112] For example, it may be to perform event detection on video sources that have not been displayed for the first time during the current round-robin display cycle. If there is a preset event in the video data collected by a video source that has not been round-robin displayed, using the video source as a priority display video source and advancing the display order of the priority display video source during the current round-robin display cycle.
[0113] For another example, it may also be to perform event detection on all video sources that have not been round-robin displayed at the current moment during the current round-robin display cycle. If there is a preset event in the video data collected by a video source that has not been round-robin displayed, using the video source as a priority display video source. If the priority display video source has not been displayed for the first time during the current round-robin display cycle and the next video source to be round-robin displayed is not the priority display video source, then advancing the display order of the priority display video source during the current round-robin display cycle; if the priority display video source has been displayed for the first time during the current round-robin display cycle and the display order of the priority display video source in the next round-robin display cycle is not the first order, then advancing the display order of the priority display video source in the next round-robin display cycle, or displaying the priority display video source again during the current round-robin display cycle.
[0114] Of course, if it is detected that there are multiple video sources with preset events in the video data collected during non-round-robin display, then there are multiple priority display video sources. The priorities corresponding to the preset events of each priority display video source can be compared, and according to the high and low priorities corresponding to the preset events, the new display order of these priority display video sources is determined. Specifically, the higher the priority corresponding to the preset event, the more forward the new display order of the priority display video source; the lower the priority corresponding to the preset event, the more backward the new display order of the priority display video source.
[0115] Exemplarily, advancing the display order of the priority display video source includes: detecting whether there is a preset event in the round-robin interval video and / or real-time video of the current round-robin display; if there is no preset event in the round-robin interval video and / or real-time video of the current round-robin display, then directly switching to display the round-robin interval video and / or real-time video of the priority display video source; if there is a preset event in the round-robin interval video and / or real-time video of the current round-robin display, then after detecting that the round-robin interval video and / or real-time video of the current round-robin display is finished, switching to display the round-robin interval video and / or real-time video of the priority display video source.
[0116] Exemplarily, if there is a preset event in the periodic interval video and / or the real-time video displayed in the current round-robin display, the priorities corresponding to the preset events in the periodic interval video and / or the real-time video displayed in the current round-robin display can also be compared with the priorities corresponding to the preset events of the preferred display video source. If the priority corresponding to the video displayed in the current round-robin display is higher than the priority corresponding to the preset event of the preferred display video source, then after detecting that the periodic interval video and / or the real-time video displayed in the current round-robin display is finished, switch to display the periodic interval video and / or the real-time video of the preferred display video source; otherwise, directly switch to display the periodic interval video and / or the real-time video of the preferred display video source.
[0117] For example, please refer to Figure 6 , Figure 6 is a schematic diagram showing the advance of the display order of the preferred display video source shown in an exemplary embodiment of the present application. As Figure 6 shown, during the playback of the real-time video A4l corresponding to A4, the next round-robin video source was originally A1. However, because an important high-priority preset event occurred in A2 at this time, after the round-robin display of A4 is finished, it can be switched to A2 for round-robin display (specifically refer to the specific method of single video source for round-robin display during the round-robin display in the above various embodiments); of course, if there is no preset event in the periodic interval video and / or the real-time video of A4, or the priority of the preset event that exists is lower than the priority corresponding to the preset event of the preferred display video source, then it is not necessary to wait for the round-robin display of A4 to end, and it can be directly switched to A2 for round-robin display.
[0118] Through the above adjustment method of the display order, the most concerned video data can be preferentially played, which is convenient for video observation.
[0119] The video round-robin display method provided by the present application obtains the display order of multiple video sources, and round-robin displays the real-time videos corresponding to the multiple video sources based on the display order; any one of the multiple video sources is used as the target video source, and in response to the completion of the round-robin display of the target video source, the video data collected after the completion of the round-robin display of the target video source is cached to obtain the periodic interval video corresponding to the target video source; in response to reaching the display order of the target video source again, during the round-robin display of the target video source, first display the periodic interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source. Because the periodic interval video is cached, when it is the turn of the target video source to be displayed in the next round-robin display cycle, the periodic interval video is first displayed, and at the same time, the traceability of historical video data and the zero-delay connection of real-time video are realized. It can not only avoid the black screen caused by network instability during the video source switching process, but also avoid information omission and improve the display efficiency of video data.
[0120] Figure 7It is a block diagram of a video round-robin display device shown in an exemplary embodiment of the present application. As Figure 7 shown, the exemplary video round-robin display device 700 includes:
[0121] A round-robin module 710, configured to obtain the display order of multiple video sources, and round-robin and display the real-time videos respectively corresponding to the multiple video sources based on the display order. The real-time video is obtained by a video source performing real-time video data acquisition on a preset scene;
[0122] An interval cache module 720, configured to use any one of the multiple video sources as a target video source, and in response to the target video source finishing round-robin display, cache the video data acquired after the target video source finishes round-robin display to obtain the round-robin interval video corresponding to the target video source;
[0123] A video combined display module 730, configured to, in response to reaching the display order of the target video source again, during the round-robin display of the target video source, first display the round-robin interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source.
[0124] It should be noted that the video round-robin display device provided in the above embodiment and the video round-robin display method provided in the above embodiment belong to the same concept. The specific manners in which each module and unit perform operations have been described in detail in the method embodiment, and will not be elaborated here. In actual application, the video round-robin display device provided in the above embodiment can, according to needs, allocate the above functions to different functional modules, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above. This is not limited here.
[0125] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of an embodiment of an electronic device of the present application. The electronic device 800 includes a memory 801 and a processor 802. The processor 802 is configured to execute program instructions stored in the memory 801 to implement the steps in any of the above video round-robin display method embodiments. In a specific implementation scenario, the electronic device 800 may include, but is not limited to: a microcomputer, a server. In addition, the electronic device 800 may also include mobile devices such as a laptop computer, a tablet computer, etc., which are not limited here.
[0126] Specifically, the processor 802 is used to control itself and the memory 801 to implement the steps in any of the above video patrol display method embodiments. The processor 802 may also be referred to as a Central Processing Unit (CPU). The processor 802 may be an integrated circuit chip with signal processing capabilities. The processor 802 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 devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Additionally, the processor 802 may be implemented jointly by integrated circuit chips.
[0127] Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application. The computer-readable storage medium 900 stores program instructions 910 that can be run by a processor, and the program instructions 910 are used to implement the steps in any of the above video patrol display method embodiments.
[0128] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0129] The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments. Their similarities or similarities can be referred to each other. For the sake of brevity, they will not be repeated in this article.
[0130] In several embodiments provided by the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, 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 displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.
[0131] In addition, each functional unit in the various embodiments of the present application may be integrated into one processing unit, may exist physically alone for each unit, 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 a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
Claims
1. A video round-robin display method, characterized in that, The method includes: Obtaining the display order of multiple video sources, and cyclically displaying the real-time videos corresponding to the multiple video sources respectively based on the display order, where the real-time videos are obtained by the video sources collecting video data of a preset scene in real time; Taking any one of the multiple video sources as a target video source, and caching the video data collected by the target video source after the cyclic display is completed in response to the completion of the cyclic display of the target video source, to obtain the cyclic interval video corresponding to the target video source; In response to reaching the display order of the target video source again, during the cyclic display of the target video source, first display the cyclic interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source.
2. The method according to claim 1, wherein, The step of, during the cyclic display of the target video source, first displaying the cyclic interval video corresponding to the target video source and then displaying the real-time video corresponding to the target video source includes: Performing event detection on the cyclic interval video and / or the real-time video to obtain an event detection result; Adjusting the playing duration of the cyclic interval video and / or the playing duration of the real-time video based on the event detection result; Based on the adjusted playing duration of the cyclic interval video and / or the playing duration of the real-time video, first display the cyclic interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source.
3. The method according to claim 2, wherein The event detection result is used to indicate whether a preset event exists; The step of, based on the event detection result, adjusting the playing duration of the cyclic interval video and / or the playing duration of the real-time video includes: If the event detection result indicates that a preset event exists in the cyclic interval video, setting the playing duration of the cyclic interval video to a first duration; If the event detection result indicates that no preset event exists in the cyclic interval video, setting the playing duration of the cyclic interval video to a second duration; where the second duration is less than the first duration; If the event detection result indicates that a preset event exists in the real-time video, setting the playing duration of the cyclic interval video to a third duration; If the event detection result indicates that no preset event exists in the real-time video, setting the playing duration of the cyclic interval video to a fourth duration; where the fourth duration is less than the third duration.
4. The method according to claim 2, wherein The event detection result includes the event attribute information corresponding to the preset events included in the cyclic interval video and the real-time video; The step of, based on the event detection result, adjusting the playing duration of the cyclic interval video and / or the playing duration of the real-time video includes: Based on the event detection result, determining the event attribute information corresponding to the preset events included in the cyclic interval video, and / or determining the event attribute information corresponding to the preset events included in the real-time video; Adjusting the playing duration of the cyclic interval video and / or the playing duration of the real-time video based on the event attribute information corresponding to the preset events included in the cyclic interval video and / or the event attribute information corresponding to the preset events included in the real-time video.
5. The method according to claim 1, wherein During the cyclic display of the target video source, first display the cyclic interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source, including: Determine the video sources that have been cyclically displayed within the current cyclic display period to obtain the displayed video sources; Sum up the actual playback durations of each displayed video source to obtain the total playback duration corresponding to each displayed video source; Based on the total playback duration corresponding to each displayed video source, adjust the playback duration of the cyclic interval video and / or the playback duration of the real-time video; Based on the adjusted playback duration of the cyclic interval video and / or the playback duration of the real-time video, first display the cyclic interval video corresponding to the target video source, and then display the real-time video corresponding to the target video source.
6. The method according to claim 5, wherein The adjusting the playback duration of the cyclic interval video and / or the playback duration of the real-time video based on the total playback duration corresponding to each displayed video source includes: Perform event detection on the cyclic interval video and the real-time video to obtain an event detection result; If the total playback duration is less than a preset playback duration threshold, and the event detection result indicates that there is a preset event in the cyclic interval video and / or the real-time video, increase the playback duration of the cyclic interval video and / or the playback duration of the real-time video; If the total playback duration is greater than the preset playback duration threshold, and the event detection result indicates that there is no preset event in the cyclic interval video and the real-time video, decrease the playback duration of the cyclic interval video and / or the playback duration of the real-time video.
7. The method according to claim 1, characterized in that, The method further includes: If it is detected that there is a preset event in the video data collected by a video source during the non-cyclic display period, use the video source as a priority display video source; Advance the display order of the priority display video source.
8. The method according to claim 7, wherein The advancing the display order of the priority display video source includes: Detect whether there is a preset event in the cyclic interval video and / or the real-time video currently being cyclically displayed; If there is no preset event in the cyclic interval video and / or the real-time video currently being cyclically displayed, directly switch to display the cyclic interval video and / or the real-time video of the priority display video source; If there is a preset event in the cyclic interval video and / or the real-time video currently being cyclically displayed, switch to display the cyclic interval video and / or the real-time video of the priority display video source after detecting that the cyclic interval video and / or the real-time video currently being cyclically displayed is finished.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, and the processor is configured to execute program instructions stored in the memory to implement the steps in the method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, and the program instructions can be executed by a processor to implement the steps in the method according to any one of claims 1-8.
Citation Information
Cited By
Video playing control method, electronic equipment and storage medium
CN121193875A