Video data processing method and device, equipment, storage medium and program product
By dynamically allocating bandwidth resources through video processing equipment, the problem of resource waste and low utilization caused by fixed bandwidth reservation in NVRs is solved, achieving more efficient video processing and stable output.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TP-LINK INT CHENGDU CO LTD
- Filing Date
- 2025-12-03
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, network video recorders (NVRs) reserve fixed bandwidth resources for each IPC, resulting in wasted bandwidth resources and low utilization, making them unable to adapt to the changing needs of the usage environment.
By determining the viewing function of the video acquisition device, the video processing equipment dynamically allocates matching bandwidth resources, realizing on-demand allocation of bandwidth resources and avoiding the waste of fixed bandwidth reservations.
It improves the utilization rate of bandwidth resources, ensures the stability of video processing equipment and the quality of output video, avoids stuttering and packet loss caused by insufficient bandwidth, and enhances the user experience.
Smart Images

Figure CN121907977A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video processing technology, and in particular to a method for processing video data, a device for processing video data, a video processing equipment, a computer-readable storage medium, and a computer program product. Background Technology
[0002] In related technologies, NVRs (Network Video Recorders) typically reserve a certain amount of bandwidth for each connected IPC (Internet Protocol Camera) to ensure robust processing of video captured by the IPCs. However, in actual use, the bandwidth reserved for the IPCs may exceed the bandwidth required for processing the video captured by the IPCs, resulting in a waste of bandwidth resources. Summary of the Invention
[0003] This application provides a method for processing video data, a device for processing video data, a video processing equipment, a computer-readable storage medium, and a computer program product.
[0004] This application provides a method for processing video data, applied to a video processing device, the method comprising: When connected to a first video capture device, determine the first video viewing function enabled for the video captured by the first video capture device. Based on the first video viewing function, determine the first target bandwidth resource amount allocated to the first video acquisition device; Based on the first target bandwidth resource amount, the video data sent by the first video acquisition device is processed to output a video that matches the first video viewing function.
[0005] Thus, in this embodiment of the application, the video processing device, when connected to the first video acquisition device, can determine the first video viewing function enabled for the video captured by the first video acquisition device, determine the first target bandwidth resource allocated to the first video acquisition device based on the first video viewing function, and process the video data sent by the first video acquisition device based on the first target bandwidth resource to output a video that matches the first video viewing function. This achieves on-demand allocation of bandwidth resources. Compared with the traditional solution of directly reserving a fixed amount of bandwidth resources for the first video acquisition device, it can ensure that the first target bandwidth resource allocated to the first video acquisition device matches the first video viewing function corresponding to the first video acquisition device, thereby avoiding the waste of bandwidth resources.
[0006] In some embodiments of this application, determining the first target bandwidth resource amount allocated to the first video acquisition device based on the first video viewing function includes: Based on the first video viewing function and the pre-determined function-bandwidth resource mapping data, determine the first target bandwidth resource corresponding to the first video viewing function.
[0007] Thus, in this embodiment of the application, the first target bandwidth resource quantity corresponding to the video viewing setting function can be determined based on the first video viewing function and the pre-determined function-bandwidth resource quantity mapping data. This allows the video processing device to quickly determine the first target bandwidth resource quantity allocated to the first video acquisition device through the function-bandwidth resource quantity mapping data, thereby eliminating the need to calculate the first target bandwidth resource quantity corresponding to the first video viewing function in real time. This reduces the difficulty in determining the first target bandwidth resource quantity and can improve the data processing efficiency of the video processing device to a certain extent.
[0008] In some embodiments of this application, the first video viewing function includes a first sub-function and a second sub-function. The first sub-function is used to determine the resolution of the video captured by the first video acquisition device, and the second sub-function is used to determine the type of artificial intelligence processing performed on the video captured by the first video acquisition device. The step of determining a first target bandwidth resource corresponding to the first video viewing function based on the first video viewing function and pre-determined function-bandwidth resource mapping data includes: Based on the first sub-function, the second sub-function, and the function-bandwidth resource mapping data, determine the first bandwidth resource corresponding to the first sub-function, the second bandwidth resource corresponding to the second sub-function, and the bandwidth resource consumed jointly corresponding to the first sub-function and the second sub-function. The sum of the first bandwidth resource quantity, the second bandwidth resource quantity, and the consumed bandwidth resource quantity is determined as the first target bandwidth resource quantity.
[0009] Thus, in this embodiment of the application, the first bandwidth resource corresponding to the first sub-function, the second bandwidth resource corresponding to the second sub-function, and the bandwidth resource consumption corresponding to both the first and second sub-functions can be determined based on the first sub-function, the second sub-function, and the function-bandwidth resource mapping data. The sum of the first bandwidth resource, the second bandwidth resource, and the bandwidth resource consumption is then determined as the first target bandwidth resource, thereby achieving precise allocation of bandwidth resources.
[0010] In some embodiments of this application, the video processing device can be connected to multiple second video acquisition devices, and determining the sum of the first bandwidth resource amount, the second bandwidth resource amount, and the consumed bandwidth resource amount as the first target bandwidth resource amount includes: If the total amount of the second bandwidth resources is less than a preset threshold, the sum of the resource amounts is determined as the first target bandwidth resource amount, wherein the total amount of the second bandwidth resources is the sum of the second bandwidth resource amount corresponding to the first video acquisition device and the resource amount of the second bandwidth resource amount corresponding to each of the second video acquisition devices.
[0011] Thus, in this embodiment of the application, when the total amount of the second bandwidth resources is less than a preset threshold, the resource amount and value can be determined as the first target bandwidth resource amount. This can effectively prevent the second sub-function of each video acquisition device from occupying too much bandwidth of the video processing device when multiple video acquisition devices simultaneously enable the second sub-function, thereby affecting the basic functions of the video processing device such as video decoding. This ensures the basic decoding performance of the video processing device and avoids problems such as screen stuttering and packet loss.
[0012] In some embodiments of this application, the method further includes: If the total amount of second bandwidth resources is greater than or equal to the preset threshold, the sum of the first bandwidth resources and the consumed bandwidth resources is determined as the second target bandwidth resources. Based on the second target bandwidth resource amount, the video data sent by the first video acquisition device is processed to output a video that satisfies the first sub-function.
[0013] Thus, in this embodiment of the application, when the total amount of the second bandwidth resources is greater than or equal to a preset threshold, the sum of the first bandwidth resources and the amount of bandwidth resources consumed can be determined as the second target bandwidth resources. Based on the second target bandwidth resources, the video data sent by the first video acquisition device can be processed to output a video that satisfies the first sub-function. This ensures that the video that satisfies the first sub-function can be output even when the total amount of the second bandwidth resources exceeds the preset threshold, thereby ensuring the effectiveness and usability of the output video.
[0014] In some embodiments of this application, the method further includes: If the total amount of the second bandwidth resources is greater than or equal to the preset threshold, a message indicating insufficient bandwidth resources will be provided.
[0015] Thus, in this embodiment of the application, when the total amount of the second bandwidth resources is greater than or equal to a preset threshold, a bandwidth resource shortage prompt is fed back. This allows the user to know that the bandwidth resources of the video processing device are insufficient through the bandwidth resource shortage prompt, thereby improving the user's experience with the video acquisition device and the video processing device to a certain extent.
[0016] In some embodiments of this application, the method further includes: When connected to a third video acquisition device, and without enabling the second video viewing function for the video captured by the third video acquisition device, obtain the first current bandwidth resource amount of the video processing device; When the second video viewing function is enabled for the video captured by the third video acquisition device, the video data sent by the third video acquisition device is processed to output a video that matches the second video viewing function. When processing the video data sent by the third video acquisition device to output a video that matches the second video viewing function, the second current bandwidth resource amount of the video processing device is obtained; Based on the second video viewing function and the bandwidth resource difference between the first current bandwidth resource and the second current bandwidth resource, the mapping data between the function and the bandwidth resource is determined.
[0017] Thus, in this embodiment, when connected to a third video acquisition device and without enabling the second video viewing function for the video captured by the third video acquisition device, the first current bandwidth resource of the video processing device is obtained. When the second video viewing function is enabled for the video captured by the third video acquisition device, the video data sent by the third video acquisition device is processed to output a video matching the second video viewing function. When the video data sent by the third video acquisition device is processed to output a video matching the second video viewing function, the second current bandwidth resource of the video processing device is obtained. Based on the second video viewing function and the bandwidth resource difference between the first and second current bandwidth resources, function-bandwidth resource mapping data is determined, thereby realizing the acquisition of function-bandwidth resource mapping data.
[0018] This application provides a video data processing apparatus, applied to a video processing device, the apparatus comprising: The function determination module is used to determine the first video viewing function enabled for the video captured by the first video capture device when connected to the first video capture device. The bandwidth determination module is used to determine the first target bandwidth resource amount allocated to the first video acquisition device based on the first video viewing function. The processing module is used to process the video data sent by the first video acquisition device based on the first target bandwidth resource amount, so as to output a video that satisfies the first video viewing function.
[0019] This application provides a video processing device, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the video data processing method described above.
[0020] This application provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the video data processing method described above.
[0021] This application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the video data processing method described above.
[0022] The video data processing apparatus, video processing device, computer-readable storage medium, and computer program product provided in this application embodiment, in which the video processing device, when connected to a first video acquisition device, determines the first video viewing function enabled for the video captured by the first video acquisition device, determines the first target bandwidth resource allocated to the first video acquisition device based on the first video viewing function, and processes the video data sent by the first video acquisition device based on the first target bandwidth resource to output a video matching the first video viewing function, thereby realizing on-demand allocation of bandwidth resources. Compared with the traditional solution of directly reserving a fixed amount of bandwidth resources for the first video acquisition device, this can ensure the matching of the first target bandwidth resource allocated to the first video acquisition device with the first video viewing function corresponding to the first video acquisition device, thereby avoiding the waste of bandwidth resources.
[0023] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description
[0024] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein: Figure 1 A schematic diagram of the bandwidth allocation mechanism for a network video recorder. Figure 2This is a flowchart illustrating a video data processing method in certain embodiments of this application; Figure 3 This is a flowchart illustrating a video data processing method in certain embodiments of this application; Figure 4 This is a flowchart illustrating a video data processing method in certain embodiments of this application; Figure 5 This is a schematic diagram illustrating application scenarios in some embodiments of this application; Figure 6 This is a flowchart illustrating a video data processing method in certain embodiments of this application; Figure 7 This is a schematic diagram illustrating application scenarios in some embodiments of this application. Detailed Implementation
[0025] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting the embodiments of this application.
[0026] In a network video surveillance system, the NVR (Network Video Recorder) is the core component responsible for receiving, storing, and managing video data. The access bandwidth of an NVR is affected by various performance factors, including CPU (Central Processing Unit) processing power, memory bandwidth, AI (Artificial Intelligence) workload, and network bandwidth conditions.
[0027] In the current technological landscape, NVRs generally employ a fixed bandwidth allocation mechanism. Specifically, during the equipment manufacturing phase, manufacturers pre-deduct bandwidth resources based on the AI functions that IPC devices might use, and calculate the number of IPC devices the NVR can support. For a clearer explanation, please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is a schematic diagram of the bandwidth allocation mechanism of a network video recorder, as shown below. Figure 1 As shown, after the NVR leaves the factory, it can connect to a total of n IPCs (Internet Protocol Cameras). The total bandwidth resources (i.e., decoding performance) used by the NVR for decoding are equal to the decoding bandwidth of these n IPCs (i.e., Figure 1The total decoding bandwidth of the NVR is the sum of the decoding bandwidth of each IPC (i.e., network camera 1, network camera 2, ..., network camera n). Figure 1 The sum of network cameras 1, 2, ..., n in the NVR, and the total bandwidth (i.e., artificial intelligence performance) used for AI functions in the NVR is a fixed quantity. Figure 1 The "reserved bandwidth for artificial intelligence functions" in the text. Therefore, such as... Figure 1 As shown, the access bandwidth available to the IPC device is fixed. If the total bandwidth of the connected IPC devices exceeds the preset limit, the NVR can prompt the user that the bandwidth is insufficient and that no new devices can be added.
[0028] However, in real-world applications, many IPC devices may not be running AI-related functions, such as human detection, facial recognition, or vehicle detection. In these cases, the bandwidth reserved for AI remains idle and cannot be reallocated for other tasks. This static bandwidth management approach fails to achieve dynamic adjustment of SoC (System on Chip) performance, resulting in low resource utilization. Especially in variable usage environments, fixed limitations may not adapt to actual needs, thus restricting the overall performance of the NVR.
[0029] Based on the issues mentioned above, please refer to Figure 2 This application provides a method for processing video data, applied to a video processing device, the method comprising: 01: When connected to the first video capture device, determine the first video viewing function enabled for the video captured by the first video capture device; 02: Based on the first video viewing function, determine the first target bandwidth resource amount allocated to the first video acquisition device; 03: Based on the first target bandwidth resource amount, process the video data sent by the first video acquisition device to output a video that matches the first video viewing function.
[0030] This application provides a video data processing apparatus. The video data processing method of this application can be implemented by the video data processing apparatus of this application. Specifically, the processing apparatus includes a function determination module, a bandwidth determination module, and a processing module. The function determination module, when connected to a first video acquisition device, determines a first video viewing function enabled for video captured by the first video acquisition device. The bandwidth determination module determines a first target bandwidth resource allocated to the first video acquisition device based on the first video viewing function. The processing module processes the video data sent by the first video acquisition device based on the first target bandwidth resource to output a video matching the first video viewing function.
[0031] This application also provides a video processing apparatus, which includes a memory and a processor. The video data processing method of this application can be implemented by the video processing apparatus of this application. Specifically, the memory stores a computer program, and the processor, when connected to a first video acquisition device, determines a first video viewing function enabled for video captured by the first video acquisition device, determines a first target bandwidth resource allocated to the first video acquisition device based on the first video viewing function, and processes the video data sent by the first video acquisition device based on the first target bandwidth resource to output a video matching the first video viewing function.
[0032] Specifically, to avoid wasting bandwidth resources, in the embodiments provided in this application, after establishing a connection with the first video acquisition device, the video processing device can dynamically allocate a matching first target bandwidth resource based on the first video viewing function that the user needs to enable to view the video captured by the first video acquisition device, and then perform targeted processing on the video data transmitted by the IPC based on the bandwidth resource, and finally output a video that matches the user's functional requirements, thereby realizing the on-demand allocation of bandwidth resources.
[0033] In some implementations, a video processing device can be understood as a core device with functions such as video data reception, bandwidth resource allocation, video decoding, and AI (Artificial Intelligence) processing, responsible for managing the video data transmitted by the video acquisition device and completing the corresponding processing.
[0034] In some implementations, the video processing device may be an NVR (Network Video Recorder).
[0035] In some implementations, the first video acquisition device can be understood as a terminal device used to capture surveillance video, collect raw video data, and transmit the data to the video processing device.
[0036] In some implementations, the first video capture device may be a network camera (Internet Protocol Camera).
[0037] In some implementations, the first video acquisition device and the video processing device are connected via a wired network, such as via an Ethernet cable (e.g., CAT5e or CAT6 cable).
[0038] In some implementations, the first video acquisition device is connected to a network switch via an Ethernet cable, and the switch is connected to the video processing device via an Ethernet cable.
[0039] In some implementations, the first video acquisition device is connected to the video processing device via a wireless network connection, such as via Wi-Fi.
[0040] In some implementations, the first video viewing function can be understood as a function actively activated by the user for videos captured by the first video acquisition device.
[0041] In some implementations, the first video viewing function may include a video resolution requirement for setting the video resolution, such as setting the video resolution to any one of the specifications such as 480p, 720p, or 1080p.
[0042] In some implementations, the first video viewing function may include AI processing requirements, such as video analysis functions based on artificial intelligence technologies, like selecting pedestrians, detecting specific targets, intelligent drawing frames, and intelligent search.
[0043] In some implementations, the first target bandwidth resource amount can be understood as the total amount of bandwidth resources required to ensure the robust operation of the first video viewing function.
[0044] In one example, the video processing device can estimate the bandwidth resources required for the video processing device to robustly run the first video viewing function based on a pre-trained network model or a pre-built mathematical model, combined with the video processing device's attribute parameters (such as current CPU load and current operating temperature) as input, and use the estimation result as the first target bandwidth resource amount.
[0045] In one example, if the user's first video viewing function includes "720p resolution, selecting pedestrians in the video", then the video processing device can decode the video data after receiving the video data collected by the first video acquisition device to obtain a 720p resolution video. It can also detect the position of pedestrians in the video using a pre-trained image processing model, and finally output a 720p resolution video with the pedestrians selected, which is the video that matches the first video viewing function.
[0046] To more clearly illustrate the embodiments of this application, please refer to the following exemplary description: First, the video processing equipment establishes a connection with the first video acquisition equipment.
[0047] Next, the video processing device determines the video viewing function (first video viewing function) enabled by the user to view the video captured by the first video capture device, such as setting the resolution of the video captured by the first video capture device, and whether to select a specific target in the video captured by the first video capture device.
[0048] Then, based on the determined first video viewing function, the video processing device calculates and allocates a first target bandwidth resource amount. For example, if the user sets the resolution of the video captured by the first video capture device to 480p and does not select pedestrian targets in the video captured by the first video capture device, a bandwidth resource amount of size X1 is allocated to the first video capture device. However, if the user sets the resolution of the video captured by the first video capture device to 720p and selects pedestrian targets in the video captured by the first video capture device, a bandwidth resource amount of size X2 is allocated to the first video capture device, where X2 is greater than X1.
[0049] Finally, based on the allocated first target bandwidth resource, the video processing device performs processing on the video data transmitted by the first video acquisition device, such as decoding and AI analysis (e.g., selecting pedestrians, detecting specific targets), and ultimately outputs a video that matches the user-set resolution and AI effects. For example, if the user sets the resolution of the video captured by the first video acquisition device to 480p and does not select pedestrian targets in the video, the output is "a video with a resolution of 480p without selecting pedestrian targets in the video" based on a bandwidth resource of size X1. Similarly, if the user sets the resolution of the video captured by the first video acquisition device to 720p and selects pedestrian targets in the video, the output is "a video with a resolution of 720p and selecting pedestrian targets in the video" based on a bandwidth resource of size X2.
[0050] Thus, in this embodiment of the application, the video processing device, when connected to the first video acquisition device, can determine the first video viewing function enabled for the video captured by the first video acquisition device, determine the first target bandwidth resource allocated to the first video acquisition device based on the first video viewing function, and process the video data sent by the first video acquisition device based on the first target bandwidth resource to output a video that matches the first video viewing function. This achieves on-demand allocation of bandwidth resources. Compared with the traditional solution of directly reserving a fixed amount of bandwidth resources for the first video acquisition device, it can ensure that the first target bandwidth resource allocated to the first video acquisition device matches the first video viewing function corresponding to the first video acquisition device, thereby avoiding the waste of bandwidth resources.
[0051] Furthermore, by avoiding wasted bandwidth resources, the SoC processing performance of the video processing equipment is fully utilized, enabling the connection of more primary video acquisition devices or the decoding of more channels of high-definition surveillance video, thus improving equipment utilization and system scalability. Additionally, the matching of bandwidth resources with user-enabled functions ensures the stability of the video processing process and the quality of the output video, effectively avoiding problems such as video stuttering, packet loss, or untimely AI processing caused by insufficient bandwidth, providing users with a more reliable monitoring experience. Moreover, this solution requires no hardware modifications; it can be implemented solely through software-level logic optimization, possessing excellent practicality and compatibility, and is suitable for various monitoring system scenarios based on video processing and primary video acquisition devices.
[0052] Please see Figure 3 In some embodiments provided in this application, step 02 includes: 020: Based on the first video viewing function and the pre-determined function-bandwidth resource mapping data, determine the first target bandwidth resource corresponding to the first video viewing function.
[0053] The bandwidth determination module in this application embodiment is further configured to determine the first target bandwidth resource corresponding to the video viewing setting function based on the first video viewing function and the pre-determined function-bandwidth resource mapping data.
[0054] The processor in this application embodiment is further configured to determine a first target bandwidth resource corresponding to the video viewing setting function based on the first video viewing function and predetermined function-bandwidth resource mapping data.
[0055] Specifically, in order to accurately determine the first target bandwidth resource amount allocated to the first video acquisition device, in some embodiments provided in this application, the "predetermined function-bandwidth resource mapping data" can be used as a unified basis for bandwidth allocation. By querying the bandwidth corresponding to the "video viewing setting function" (i.e. the first video viewing function) in the mapping data, the first target bandwidth resource amount can be accurately determined.
[0056] In some implementations, the pre-determined function and bandwidth resource mapping data can be understood as a set of data pre-stored in the device before the video processing device leaves the factory or is used. It can characterize the association between various video viewing functions (including single functions such as 480p resolution, pedestrian selection AI function, and combined functions such as 1080p resolution + specific target detection AI function) and "the minimum bandwidth resource that can stably support the operation of the function". For example, "480p resolution" corresponds to "2Mbps", "pedestrian selection AI function" corresponds to "3Mbps", and "1080p resolution + pedestrian selection AI function" corresponds to "8Mbps".
[0057] It is understandable that when the video processing device determines the first video viewing function to be enabled for the video captured by the first video acquisition device, it can directly query the bandwidth resource quantity that has a mapping relationship with the first video viewing function based on the pre-determined function and bandwidth resource quantity mapping data, and use the bandwidth resource quantity as the first target bandwidth resource quantity, thereby achieving efficient determination of the first target bandwidth resource quantity without having to calculate the first target bandwidth resource quantity through complex calculation methods.
[0058] For example, to more clearly illustrate the process of determining the first target bandwidth resource amount in the embodiments of this application, please refer to the following exemplary description: First, the video processing device checks whether a valid connection has been established with the first video acquisition device, such as a wired or wireless network connection.
[0059] After successfully establishing a connection with the first video acquisition device, the system determines the "video viewing settings" actually enabled by the user for the first IPC by reading user operation instructions (such as the resolution and AI function selected by the user in the monitoring interface) or reading its own configuration file. This is the first video viewing function, such as "720p resolution + box selection of passing vehicles".
[0060] Then, the video processing device calls the "function and bandwidth resource mapping data" pre-stored locally or in the cloud, and retrieves the entry that matches the first video viewing function from this data set. For example, if the bandwidth record corresponding to "720p resolution + selected vehicles" is found to be "6Mbps" in the mapping table, then the 6Mbps bandwidth is determined as the "first target bandwidth resource allocated to the first IPC".
[0061] Finally, based on the determined first target bandwidth resource amount (6Mbps), the video processing device allocates the corresponding bandwidth resources to the original video data transmitted by the first IPC, and then processes the original video data, such as decoding the original video data to obtain a 720p resolution video, running AI algorithms to detect vehicles in the video data and selecting them, and finally outputting a video that meets the requirements of "720p resolution + selected vehicles", for users to view or store in real time.
[0062] Thus, in this embodiment of the application, the first target bandwidth resource quantity corresponding to the video viewing setting function can be determined based on the first video viewing function and the pre-determined function-bandwidth resource quantity mapping data. This allows the video processing device to quickly determine the first target bandwidth resource quantity allocated to the first video acquisition device through the function-bandwidth resource quantity mapping data, thereby eliminating the need to calculate the first target bandwidth resource quantity corresponding to the first video viewing function in real time. This reduces the difficulty in determining the first target bandwidth resource quantity and can improve the data processing efficiency of the video processing device to a certain extent.
[0063] Please see Figure 4 In some embodiments provided in this application, the first video viewing function includes a first sub-function and a second sub-function. The first sub-function is used to determine the resolution of the video captured by the first video acquisition device, and the second sub-function is used to determine the artificial intelligence processing performed on the video captured by the first video acquisition device. Therefore, step 020 includes: 0200: Based on the first sub-function, the second sub-function, and the function-bandwidth resource mapping data, determine the first bandwidth resource corresponding to the first sub-function, the second bandwidth resource corresponding to the second sub-function, and the bandwidth resource consumed jointly corresponding to the first and second sub-functions. 0201: The sum of the first bandwidth resource quantity, the second bandwidth resource quantity, and the consumed bandwidth resource quantity is determined as the first target bandwidth resource quantity.
[0064] The bandwidth determination module in this application embodiment is further configured to determine, based on the first sub-function, the second sub-function, and the function-bandwidth resource mapping data, the first bandwidth resource corresponding to the first sub-function, the second bandwidth resource corresponding to the second sub-function, and the bandwidth resource consumption corresponding to both the first and second sub-functions, and to determine the sum of the first bandwidth resource, the second bandwidth resource, and the bandwidth resource consumption as the first target bandwidth resource.
[0065] The processor in this embodiment is further configured to determine, based on the first sub-function, the second sub-function, and the function-bandwidth resource mapping data, a first bandwidth resource corresponding to the first sub-function, a second bandwidth resource corresponding to the second sub-function, and a bandwidth resource consumption corresponding to both the first and second sub-functions, and to determine the sum of the first bandwidth resource, the second bandwidth resource, and the bandwidth resource consumption as a first target bandwidth resource.
[0066] Specifically, in order to reliably process the video data sent by the first video acquisition device, in some embodiments provided in this application, the first video viewing function enabled by the user can be divided into a first sub-function related to resolution and a second sub-function related to AI processing. Then, by combining the preset function-bandwidth mapping data, the bandwidth required by each of the two sub-functions can be calculated separately, and the bandwidth consumed by the two working together can be added together. Finally, the sum of the three is used as the target bandwidth resource amount corresponding to the first video acquisition device, thereby achieving fine-grained allocation of bandwidth.
[0067] In some implementations, the first sub-function can be understood as a component of the first video viewing function, which can determine the resolution of the video when the user views the video captured by the first video acquisition device (such as IPC). The user can select the desired video clarity through this function, such as setting it to different resolution levels such as 480p (standard definition), 720p (high definition), 1080p (full high definition).
[0068] In some implementations, the second sub-function can also be understood as a component of the first video viewing function, used to determine what type of artificial intelligence processing to be performed on the video captured by the first video acquisition device, that is, to clarify the AI-related functional requirements of the user, such as super-resolution processing, intelligent frame, intelligent search, human detection, face recognition, vehicle detection, etc. These functions will additionally occupy the performance and bandwidth resources of the video processing device.
[0069] In some implementations, the type of artificial intelligence processing set by the second sub-function can be understood as a type of processing operation on video data to achieve specific effects by using a preset algorithm model and computational logic, such as extracting key information from the video (such as the location and category of the target object) and performing specific feedback (such as box selection annotation and abnormal alarm).
[0070] In some implementations, the first bandwidth resource amount can be understood as the bandwidth resource amount required to satisfy only the first sub-function (i.e., video decoding at a specific resolution).
[0071] In some implementations, the size of the first bandwidth resource is positively correlated with the video resolution.
[0072] In some implementations, the second bandwidth resource amount can be understood as the bandwidth resource amount required only to satisfy the second sub-function (i.e., the artificial intelligence processing type).
[0073] In some implementations, the complexity of different types of artificial intelligence processing varies, so the amount of second bandwidth resources corresponding to different types of artificial intelligence processing also varies. For example, the bandwidth resources for face recognition are usually higher than those for smart frames.
[0074] In some implementations, the amount of bandwidth resources consumed can be understood as the amount of memory bandwidth resources consumed due to data interaction, cache usage, etc., when the first sub-function and the second sub-function are enabled at the same time.
[0075] In some implementations, the first target bandwidth resource amount can be understood as the total bandwidth resource amount that can satisfy the bandwidth required for the operation of the first sub-function (i.e., the first bandwidth resource amount), the bandwidth required for the operation of the second sub-function (i.e., the second bandwidth resource amount), and the memory consumption bandwidth required for the coordinated operation of the two (i.e., the consumed bandwidth resource amount).
[0076] To more clearly illustrate the implementation methods provided in this application, please refer to the following exemplary description: First, after the video processing device establishes a connection with the first video acquisition device, it identifies the first sub-function (such as 1080P resolution) and the second sub-function (such as intelligent search) enabled by the user for the IPC.
[0077] Secondly, it calls upon pre-stored function and bandwidth resource mapping data in the local machine or cloud. Understandably, this mapping data stores the first bandwidth resource corresponding to different resolutions (720P, 960P, 1080P, etc.), the second bandwidth resource corresponding to different AI processing types (super-resolution, intelligent frame, intelligent search, etc.), and the bandwidth resource consumption corresponding to each combination of resolution and AI processing type (e.g., the memory bandwidth consumption corresponding to the combination of 1080P resolution and intelligent search).
[0078] Then, based on the identified first and second sub-functions, the first bandwidth resource corresponding to the first sub-function, the second bandwidth resource corresponding to the second sub-function, and the bandwidth resource consumed by both the first and second sub-functions are matched from the function-bandwidth resource mapping data.
[0079] Finally, the first target bandwidth resource amount (i.e., first target bandwidth resource amount = first bandwidth resource amount + second bandwidth resource amount + consumed bandwidth resource amount) is obtained by summation, so that the video processing device allocates bandwidth resources to the first video acquisition device according to the first target bandwidth resource amount.
[0080] Thus, in this embodiment of the application, the first bandwidth resource quantity corresponding to the first sub-function, the second bandwidth resource quantity corresponding to the second sub-function, and the bandwidth resource quantity consumed corresponding to both the first and second sub-functions can be determined based on the first sub-function, the second sub-function, and the function-bandwidth resource quantity mapping data. The sum of the first bandwidth resource quantity, the second bandwidth resource quantity, and the bandwidth resource quantity consumed is then determined as the first target bandwidth resource quantity, thereby achieving precise allocation of bandwidth resources.
[0081] Furthermore, considering practical applications, users may only need to set the video resolution and / or use specific AI functions. Therefore, if the allocated bandwidth resources are sufficient to meet both the AI function and the video resolution when a user only sets the video resolution but doesn't use the specific AI function, bandwidth resources will be wasted. Similarly, if the allocated bandwidth resources are only sufficient to meet either the AI function or the video resolution when a user sets the video resolution and uses the specific AI function, bandwidth resources will be insufficient.
[0082] Based on this, in the embodiments provided in this application, the video processing device can cover three combined scenarios (only the first sub-function is enabled, only the second sub-function is enabled, and both are enabled) based on the enabling status of the first sub-function (resolution) and the second sub-function (AI processing). It can determine the corresponding first target bandwidth resource based on the function and bandwidth resource mapping data, realize bandwidth allocation under different functional requirements, and avoid the problems of bandwidth resource waste or insufficient bandwidth resources.
[0083] To more clearly illustrate the implementation methods provided in this application, please refer to the following three exemplary scenarios: Scenario 1 (First sub-function enabled, second sub-function disabled): When a user only needs video at a specific resolution (e.g., only viewing 1080p HD video, no AI detection required), the video processing device first calls the function-bandwidth resource mapping data to query the bandwidth resource quantity directly corresponding to the currently enabled first sub-function (e.g., 1080p resolution), thus obtaining the first bandwidth resource quantity (i.e., only bandwidth supporting this resolution is allocated, without additional bandwidth related to AI); at the same time, it queries the bandwidth resource quantity consumed corresponding to this first sub-function from the function-bandwidth resource mapping data, thus obtaining the first consumed bandwidth resource quantity (only memory bandwidth supporting video processing at this resolution is allocated); finally, the first bandwidth resource quantity and the first consumed bandwidth resource quantity are added together to obtain the corresponding first target bandwidth resource quantity.
[0084] Scenario 2 (First sub-function not enabled, second sub-function enabled): When the user does not need specific resolution settings (e.g., using the default 480p base resolution) and only needs AI processing functions (e.g., only needing to select pedestrians), based on the currently enabled second sub-function (e.g., pedestrian selection), the function-bandwidth resource mapping data is queried to extract the bandwidth resource corresponding to the second sub-function, thus obtaining the second bandwidth resource (i.e., only bandwidth supporting AI processing is allocated); simultaneously, the bandwidth resource consumption corresponding to the second sub-function is queried from the function-bandwidth resource mapping data to obtain the second bandwidth resource consumption (i.e., only memory bandwidth supporting AI processing is allocated); finally, the second bandwidth resource and the second bandwidth resource consumption are added together to obtain the corresponding first target bandwidth resource.
[0085] Scenario 3 (both sub-functions are enabled): When a user needs both high-resolution video (e.g., 1080p) and AI processing (e.g., simultaneous pedestrian selection and vehicle detection), the system first queries the first bandwidth resource corresponding to the first sub-function (e.g., 1080p resolution) and the second bandwidth resource corresponding to the second sub-function (e.g., pedestrian selection + vehicle detection) using the function-bandwidth resource mapping data. Then, it queries the bandwidth resource consumption corresponding to the combination of "first sub-function + second sub-function" from the mapping data to obtain the third bandwidth resource consumption. Finally, the first bandwidth resource, the second bandwidth resource, and the third bandwidth resource consumption are added together to obtain the corresponding first target bandwidth resource.
[0086] It is understood that, as shown in the three scenarios above, the video processing device in this application embodiment can dynamically allocate corresponding bandwidth to each first video acquisition device according to the AI functions enabled by the user for shooting videos on different first video acquisition devices. Therefore, the performance allocation logic of the video processing device in this application embodiment can refer to... Figure 5 , Figure 5 This is a schematic diagram illustrating application scenarios in some embodiments of this application, such as... Figure 5 As shown, in some embodiments where the first video acquisition device is a network camera and the video processing device is a network video recorder, when the user enables AI function 1 for video recording from network camera 1, enables AI function 2 for video recording from network camera 2, does not enable AI function for video recording from network camera 3, ..., enables AI function n for video recording from network camera n, the network video recorder can dynamically allocate corresponding bandwidth (including memory consumption bandwidth) to each first network camera according to the AI function enabled by the user for video recording from different network cameras. Figure 5 The term "network camera 1 + AI function 1 + memory 1", "network camera 2 + AI function 2 + memory 2", "network camera 3 + memory 3", ..., "network camera n + AI function n + memory n" is used.
[0087] It is also understandable that, Figure 1 In the scenario shown, because a fixed amount of bandwidth is reserved in advance for artificial intelligence functions, the network video recorder can only decode a fixed number of network cameras at 1080p. However, in situations like... Figure 5 In the scenario shown, because the network video recorder can dynamically allocate the corresponding bandwidth to each network camera based on the AI function enabled by the user for the video captured by different network cameras, the bandwidth performance of the network video recorder can be flexibly allocated. Therefore, the network video recorder can decode multiple network cameras in 1080p according to the actual situation.
[0088] Please see Figure 6 In some embodiments provided in this application, the video processing device can be connected to multiple second video acquisition devices, and therefore step 0201 includes: 02010: If the total amount of the second bandwidth resources is less than a preset threshold, the sum of the resources is determined as the first target bandwidth resource amount, wherein the total amount of the second bandwidth resources is the sum of the second bandwidth resources corresponding to the first video acquisition device and the resource amount of the second bandwidth resources corresponding to each second video acquisition device.
[0089] The bandwidth determination module in this application embodiment is further configured to determine the sum of the second bandwidth resources as the first target bandwidth resource when the total second bandwidth resource is less than a preset threshold, wherein the total second bandwidth resource is the sum of the second bandwidth resource corresponding to the first video acquisition device and the resource of the second bandwidth resource corresponding to each second video acquisition device.
[0090] The processor in this application embodiment is further configured to determine the sum of the second bandwidth resources as a first target bandwidth resource when the total second bandwidth resource amount is less than a preset threshold, wherein the total second bandwidth resource amount is the sum of the second bandwidth resource amount corresponding to the first video acquisition device and the resource amount of the second bandwidth resource amount corresponding to each second video acquisition device.
[0091] Specifically, in scenarios where multiple video capture devices are simultaneously connected to a video processing device, if too many devices enable AI functions at the same time, it will lead to excessive AI bandwidth usage, squeezing the resources required for basic decoding (resolution), resulting in the video processing device only being able to connect to a small number of video capture devices to decode a smaller number of high-definition images.
[0092] Based on this, in some embodiments provided in this application, when multiple second video acquisition devices have been connected, the video processing device first calculates the total amount of second bandwidth resources corresponding to the AI function of all connected devices (i.e., the currently connected video acquisition device and all previously connected second video acquisition devices). When the total does not exceed a preset threshold, the first target bandwidth is allocated to the first video acquisition device based on the bandwidth corresponding to the first sub-function (resolution), the second sub-function (AI), and the sum of the memory consumption bandwidth generated by both, so as to ensure that the video decoding and AI functions of the first video acquisition device operate normally at the same time.
[0093] In some implementations, the preset threshold can be understood as the upper limit of the total bandwidth usage of the AI function (i.e. the second sub-function) preset by the video processing device. The preset threshold can be determined by a combination of factors such as the chip processing performance, memory bandwidth, and basic decoding requirements of the device.
[0094] Additionally, it is understandable that if the second sub-function (i.e., AI function) is not enabled when shooting videos with the second video capture device, or if a user shoots videos with a certain second video capture device but does not enable the AI function of the second video capture device, then the second bandwidth resource corresponding to the second video capture device is 0.
[0095] For a clearer illustration of the implementation methods of this application, please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram illustrating an application scenario in some embodiments of this application, namely in Figure 7 Based on the following exemplary description, that is: When the first video viewing function of the first video acquisition device includes the first sub-function (determining video resolution) and the second sub-function (determining AI processing requirements), the video processing device can calculate three types of bandwidth resources through pre-set function and bandwidth resource mapping data: first, the first bandwidth resource quantity matching the resolution requirements (corresponding to the first sub-function); second, the second bandwidth resource quantity supporting the artificial intelligence processing type (corresponding to the second sub-function); and third, the bandwidth resource quantity consumed when the resolution requirements and the artificial intelligence processing type are running simultaneously.
[0096] Next, the video processing device determines the second bandwidth resource amount corresponding to each second video acquisition device based on the bandwidth resource amount already allocated to each second video acquisition device.
[0097] Next, based on the second bandwidth resource amount of the second sub-function to be allocated to the first video acquisition device, and the second bandwidth resource amount corresponding to each second video acquisition device, the sum of the second bandwidth resource amount corresponding to the first video acquisition device and the second bandwidth resource amount corresponding to each second video acquisition device is calculated, thereby obtaining the total second bandwidth resource amount.
[0098] Subsequently, the sum of the second bandwidth resources is compared with a preset threshold (corresponding to...). Figure 7 The first target bandwidth resource is compared with the "preset threshold" in the data acquisition process. When the total second bandwidth resource is less than the preset threshold, it can be considered that the total bandwidth required for the AI processing type of all current video acquisition devices is within a reasonable range and will not affect the basic video decoding function. At this time, the device adds the first bandwidth resource, the second bandwidth resource, and the consumed bandwidth resource to obtain the first target bandwidth resource. It is understandable that the first target bandwidth satisfies the resolution requirements of the first video acquisition device, supports the bandwidth requirements of its AI processing type, and also takes into account the resource consumption caused by memory consumption.
[0099] Finally, based on the first target bandwidth resource, the video processing device processes the raw video data transmitted by the first video acquisition device and ultimately outputs a video that meets the requirements of the first video viewing function.
[0100] Thus, in this embodiment of the application, when the total amount of the second bandwidth resources is less than a preset threshold, the resource amount and value can be determined as the first target bandwidth resource amount. This can effectively prevent the second sub-function of each video acquisition device from occupying too much bandwidth of the video processing device when multiple video acquisition devices simultaneously enable the second sub-function, thereby affecting the basic functions of the video processing device such as video decoding. This ensures the basic decoding performance of the video processing device and avoids problems such as screen stuttering and packet loss.
[0101] In some embodiments provided in this application, the video data processing method further includes: If the total amount of the second bandwidth resources is greater than or equal to a preset threshold, the sum of the first bandwidth resources and the consumed bandwidth resources is determined as the second target bandwidth resources. Based on the second target bandwidth resource amount, the video data sent by the first video acquisition device is processed to output video that satisfies the first sub-function.
[0102] The processing apparatus of this application embodiment further includes a second target bandwidth resource determination module and a video data processing module. The second target bandwidth resource determination module is used to determine the sum of the first bandwidth resource and the consumed bandwidth resource as the second target bandwidth resource when the total second bandwidth resource is greater than or equal to a preset threshold. The video data processing module is used to process the video data sent by the first video acquisition device based on the second target bandwidth resource to output video that satisfies the first sub-function.
[0103] The processor in this embodiment is further configured to, when the total amount of the second bandwidth resources is greater than or equal to a preset threshold, determine the sum of the first bandwidth resources and the amount of bandwidth resources consumed as the second target bandwidth resources, and process the video data sent by the first video acquisition device based on the second target bandwidth resources to output a video that satisfies the first sub-function.
[0104] Specifically, considering that when the artificial intelligence processing function (second sub-function) of all devices is enabled at the same time, the total amount of second bandwidth resources may exceed the hardware carrying capacity of the video processing device (i.e., greater than or equal to the preset threshold). In this case, the CPU, memory and other hardware of the video processing device may be overloaded, which may lead to video processing stuttering, packet loss, or even the inability to properly implement the basic video resolution function (first sub-function).
[0105] Based on this, in some embodiments provided in this application, when the total amount of the second bandwidth resources is greater than or equal to a preset threshold, the video processing device adjusts the bandwidth allocation strategy, that is, it no longer includes the second bandwidth resources corresponding to the artificial intelligence processing type in the target bandwidth, but only uses the sum of the first bandwidth resources (video resolution-related bandwidth) and the consumed bandwidth resources as the second target bandwidth resources; based on the second target bandwidth resources, the video data of the first video acquisition device is processed, prioritizing the resolution requirements of the video (first sub-function), and the artificial intelligence processing function is temporarily stopped or not enabled (second sub-function).
[0106] As an example, to more clearly illustrate the video processing process provided in the embodiments of this application, in some embodiments provided in this application, after the video processing device establishes a connection with the first video acquisition device and a plurality of second video acquisition devices, it first determines the first video viewing function of the first video acquisition device, and calculates the first bandwidth resource amount, the second bandwidth resource amount and the consumed bandwidth resource amount through preset function and bandwidth resource amount mapping data.
[0107] Subsequently, the video processing device calculates the total second bandwidth resource (i.e., the sum of the second bandwidth resources of the first video acquisition device and the second bandwidth resources of all second video acquisition devices) and compares this sum with a preset threshold. When the judgment result is "the total second bandwidth resource is greater than or equal to the preset threshold", it can be considered that the current AI processing bandwidth consumption of all devices has exceeded the device hardware carrying capacity. At this time, the first bandwidth resource is added to the consumed bandwidth resource to obtain the second target bandwidth resource that is only used to ensure the video resolution function.
[0108] Finally, the video processing device processes the raw video data transmitted by the first video acquisition device based on the second target bandwidth resource amount. That is, during the data processing, it ensures that the resolution of the decoded video matches the first sub-function (such as 480p, 720p or 1080p), and temporarily does not execute the second sub-function (such as selecting pedestrians or detecting specific targets). The final output is a normal video that only meets the video resolution requirements, ensuring that users can clearly view the video.
[0109] Thus, in this embodiment of the application, when the total amount of the second bandwidth resources is greater than or equal to a preset threshold, the sum of the first bandwidth resources and the amount of bandwidth resources consumed can be determined as the second target bandwidth resources. Based on the second target bandwidth resources, the video data sent by the first video acquisition device can be processed to output a video that satisfies the first sub-function. This ensures that the video that satisfies the first sub-function can be output even when the total amount of the second bandwidth resources exceeds the preset threshold, thereby ensuring the effectiveness and usability of the output video.
[0110] In some embodiments provided in this application, the method further includes: If the total amount of the second bandwidth resources is greater than or equal to a preset threshold, a message indicating insufficient bandwidth resources will be sent.
[0111] The processing apparatus of this application embodiment further includes a prompting module. The prompting module is used to provide a bandwidth resource shortage prompt when the total amount of the second bandwidth resources is greater than or equal to a preset threshold.
[0112] The processor in this embodiment is also used to provide a bandwidth resource shortage warning when the total amount of the second bandwidth resources is greater than or equal to a preset threshold.
[0113] Specifically, when the total amount of second bandwidth resources is greater than or equal to a preset threshold, the second sub-function will be suspended (or unusable), and only the video that satisfies the first sub-function may be output. Understandably, if the user lacks clear feedback at this time—that is, they do not know the reason for the suspension of the second sub-function, nor are they aware that it is due to insufficient bandwidth resources—the user may misjudge it as a device malfunction (such as damage to the second sub-function) or operational error, thus affecting the user experience of the video acquisition and processing equipment.
[0114] Based on this, in some embodiments provided in this application, when the total amount of the second bandwidth resources is greater than or equal to a preset threshold, the video processing device can automatically generate a prompt message to indicate "insufficient bandwidth resources" and provide feedback to the user.
[0115] In some implementations, the insufficient bandwidth resource prompt can be understood as feedback information generated by the video processing device in a specific scenario, used to inform the user that the current bandwidth resources cannot meet the needs of all AI functions.
[0116] In some implementations, the insufficient bandwidth message may include "Reasons for insufficient bandwidth (e.g., too many video capture devices simultaneously enabling the second sub-function)", "Functional adjustment of the current video capture device (e.g., disabling the second sub-function)", "Optimization suggestions (e.g., disabling the second sub-function of some devices)", etc., and can be set according to the actual situation.
[0117] In some implementations, insufficient bandwidth information can be displayed through the device's local interface (such as a display screen), a remote management platform (such as computer / mobile phone management software), or sound prompts, depending on the specific circumstances.
[0118] As an example, to more clearly illustrate the embodiments of this application, please refer to the following exemplary description, namely: The video processing equipment collects the second bandwidth resource amount of the first video acquisition device in real time (e.g., the second sub-function of the device requires 10Mbps of bandwidth) and the second bandwidth resource amount of all the second video acquisition devices (e.g., the second sub-function of each of the three second acquisition devices requires 15Mbps of bandwidth), and calculates the "total second bandwidth resource amount" (i.e., 10 + 15 × 3 = 55Mbps). Then, the total amount of the second bandwidth resources (55Mbps) is compared with the "preset threshold (50Mbps)".
[0119] Finally, because the total second bandwidth resource (55Mbps) exceeds the preset threshold (50Mbps), the video processing device can generate a prompt message, such as "The total bandwidth requirement of the AI function of all devices is currently 55Mbps, which exceeds the device's carrying capacity threshold of 50Mbps. The AI function has been temporarily turned off to ensure 1080P video output. It is recommended to turn off the AI function of 1-2 devices and try again," and then feed the information back to the user.
[0120] Thus, in this embodiment of the application, when the total amount of the second bandwidth resources is greater than or equal to a preset threshold, a bandwidth resource shortage prompt is fed back. This allows the user to know that the bandwidth resources of the video processing device are insufficient through the bandwidth resource shortage prompt, thereby improving the user's experience with the video acquisition device and the video processing device to a certain extent.
[0121] In some embodiments provided in this application, the video data processing method further includes: When connected to a third video capture device and without enabling the second video viewing function for the video captured by the third video capture device, obtain the first current bandwidth resource amount of the video processing device; When the second video viewing function is enabled for the video captured by the third video acquisition device, the video data sent by the third video acquisition device is processed to output a video that matches the second video viewing function. In the case of processing the video data sent by the third video acquisition device to output a video that matches the second video viewing function, the second current bandwidth resource of the video processing device is obtained; Based on the second video viewing function and the bandwidth resource difference between the first and second current bandwidth resource quantities, determine the mapping data between the function and the bandwidth resource quantity.
[0122] The processing apparatus of this application embodiment further includes a first resource quantity acquisition module, a video output module, a second resource quantity acquisition module, and a mapping data determination module. The first resource quantity acquisition module is used to acquire the first current bandwidth resource quantity of the video processing device when connected to a third video acquisition device and without enabling the second video viewing function for the video captured by the third video acquisition device. The video output module is used to process the video data sent by the third video acquisition device to output a video matching the second video viewing function when the second video viewing function is enabled. The second resource quantity acquisition module is used to acquire the second current bandwidth resource quantity of the video processing device when processing the video data sent by the third video acquisition device to output a video matching the second video viewing function. The mapping data determination module is used to determine the function-bandwidth resource quantity mapping data based on the second video viewing function and the bandwidth resource quantity difference between the first and second current bandwidth resource quantities.
[0123] The processor in this embodiment is further configured to: when connected to a third video acquisition device and without enabling the second video viewing function for the video captured by the third video acquisition device; to: process the video data sent by the third video acquisition device to output a video matching the second video viewing function when the second video viewing function is enabled for the video captured by the third video acquisition device; to: process the video data sent by the third video acquisition device to output a video matching the second video viewing function when the second video viewing function is enabled; and to: obtain the second current bandwidth resource of the video processing device when processing the video data sent by the third video acquisition device to output a video matching the second video viewing function; and to determine function-bandwidth resource mapping data based on the second video viewing function and the bandwidth resource difference between the first and second current bandwidth resources.
[0124] Specifically, in the embodiments provided in this application, when the second video viewing function of the third video acquisition device is not enabled, the basic bandwidth (first current bandwidth resource) of the video processing device can be obtained. Then, when the second video viewing function of the third video acquisition device is enabled and the video is processed normally, the actual bandwidth (second current bandwidth resource) can be obtained. The bandwidth difference between the two (i.e., the additional bandwidth consumption of the second function) is calculated. Finally, the "second video viewing function" is mapped to the "bandwidth difference" to form or improve the "function and bandwidth resource mapping data", thereby providing an accurate basis for subsequent bandwidth allocation.
[0125] In some implementations, the third video capture device can be understood as a device that establishes a connection with the video processing device for capturing video, such as an IPC.
[0126] In some implementations, the second video viewing function can be understood as a function that a user may enable when shooting videos with a third video capture device.
[0127] In some implementations, the first current bandwidth resource amount can be understood as the total amount of bandwidth resources actually consumed by the video processing device when it is connected to the third video acquisition device and the second video viewing function is not enabled.
[0128] In some implementations, the second current bandwidth resource amount can be understood as the total amount of bandwidth resources actually consumed by the video processing device when it enables the second video viewing function for the third video acquisition device and normally outputs a video that matches the function.
[0129] To more clearly illustrate the process of determining the mapping data between function and bandwidth resources in the embodiments of this application, please refer to the following exemplary description: First, a stable connection is established between the video processing device and the third video acquisition device. At this time, no second video viewing function is enabled on the video captured by the third video acquisition device (i.e., the third device only performs basic video transmission and does not perform resolution adjustment, artificial intelligence processing, etc.). In this state, the bandwidth resource status of the video processing device is detected to obtain the total amount of bandwidth resources actually consumed by the device, which is recorded as "first current bandwidth resource amount".
[0130] Next, while maintaining a stable connection between the third video acquisition device and the video processing device, the preset second video review function (such as enabling 1080p resolution output, selecting pedestrian targets, etc.) is activated for the video captured by the third device. Simultaneously, the video processing device processes the raw video data sent by the third device according to the requirements of the second video review function (such as decoding, artificial intelligence processing, etc.) to ensure that the output video matches the second video review function in terms of image quality and functional effects, such as a 1080p video resolution and the selection of pedestrian targets in the video.
[0131] Then, when the video processing device outputs a video that matches the second video viewing function, the total amount of bandwidth resources actually consumed by the video processing device is recorded as the "second current bandwidth resource amount".
[0132] Next, the difference between the "first current bandwidth resource amount" and the "second current bandwidth resource amount" is calculated. This difference is the "additional bandwidth resource amount consumed after enabling the second video viewing function".
[0133] Subsequently, the "second video viewing function" (such as one or both of "1080p resolution" and "selecting pedestrian targets") is associated with the recorded "bandwidth difference". For example, the bandwidth difference A associated with "1080p resolution", the bandwidth difference B associated with "selecting pedestrian targets", and the bandwidth difference C associated with "1080p resolution + selecting pedestrian targets" are recorded.
[0134] Finally, by repeatedly testing different second video viewing functions (such as changing the resolution and changing the type of artificial intelligence processing), the above-mentioned "function and bandwidth resource mapping data" was gradually obtained.
[0135] Thus, in this embodiment, when connected to a third video acquisition device and without enabling the second video viewing function for the video captured by the third video acquisition device, the first current bandwidth resource of the video processing device is obtained. When the second video viewing function is enabled for the video captured by the third video acquisition device, the video data sent by the third video acquisition device is processed to output a video matching the second video viewing function. When the video data sent by the third video acquisition device is processed to output a video matching the second video viewing function, the second current bandwidth resource of the video processing device is obtained. Based on the second video viewing function and the bandwidth resource difference between the first and second current bandwidth resources, function-bandwidth resource mapping data is determined, thereby realizing the acquisition of function-bandwidth resource mapping data.
[0136] This application also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the above-described video data processing method.
[0137] This application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-described video data processing method.
[0138] In this specification, the terms "specifically," "furthermore," "particularly," "understandably," etc., refer to specific features, structures, materials, or characteristics described in connection with embodiments or examples that are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0139] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.
[0140] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for processing video data, characterized in that, Applied to a video processing device, the method includes: When connected to a first video capture device, determine the first video viewing function enabled for the video captured by the first video capture device. Based on the first video viewing function, determine the first target bandwidth resource amount allocated to the first video acquisition device; Based on the first target bandwidth resource amount, the video data sent by the first video acquisition device is processed to output a video that matches the first video viewing function.
2. The method according to claim 1, characterized in that, The step of determining the first target bandwidth resource amount allocated to the first video acquisition device based on the first video viewing function includes: Based on the first video viewing function and the pre-determined function-bandwidth resource mapping data, determine the first target bandwidth resource corresponding to the first video viewing function.
3. The method according to claim 2, characterized in that, The first video viewing function includes a first sub-function and a second sub-function. The first sub-function is used to determine the resolution of the video captured by the first video acquisition device, and the second sub-function is used to determine the type of artificial intelligence processing performed on the video captured by the first video acquisition device. The step of determining the first target bandwidth resource corresponding to the first video viewing function based on the first video viewing function and pre-determined function-bandwidth resource mapping data includes: Based on the first sub-function, the second sub-function, and the function-bandwidth resource mapping data, determine the first bandwidth resource corresponding to the first sub-function, the second bandwidth resource corresponding to the second sub-function, and the bandwidth resource consumed jointly corresponding to the first sub-function and the second sub-function. The sum of the first bandwidth resource quantity, the second bandwidth resource quantity, and the consumed bandwidth resource quantity is determined as the first target bandwidth resource quantity.
4. The method according to claim 3, characterized in that, The video processing device can be connected to multiple second video acquisition devices. Determining the sum of the first bandwidth resource amount, the second bandwidth resource amount, and the consumed bandwidth resource amount as the first target bandwidth resource amount includes: If the total amount of the second bandwidth resources is less than a preset threshold, the sum of the resource amounts is determined as the first target bandwidth resource amount, wherein the total amount of the second bandwidth resources is the sum of the second bandwidth resource amount corresponding to the first video acquisition device and the resource amount of the second bandwidth resource amount corresponding to each of the second video acquisition devices.
5. The method according to claim 4, characterized in that, The method further includes: If the total amount of second bandwidth resources is greater than or equal to the preset threshold, the sum of the first bandwidth resources and the consumed bandwidth resources is determined as the second target bandwidth resources. Based on the second target bandwidth resource amount, the video data sent by the first video acquisition device is processed to output a video that satisfies the first sub-function.
6. The method according to claim 4 or 5, characterized in that, The method further includes: If the total amount of the second bandwidth resources is greater than or equal to the preset threshold, a message indicating insufficient bandwidth resources will be provided.
7. The method according to claim 2, characterized in that, The method further includes: When connected to a third video acquisition device, and without enabling the second video viewing function for the video captured by the third video acquisition device, obtain the first current bandwidth resource amount of the video processing device; When the second video viewing function is enabled for the video captured by the third video acquisition device, the video data sent by the third video acquisition device is processed to output a video that matches the second video viewing function. When processing the video data sent by the third video acquisition device to output a video that matches the second video viewing function, the second current bandwidth resource amount of the video processing device is obtained; Based on the second video viewing function and the bandwidth resource difference between the first current bandwidth resource and the second current bandwidth resource, the mapping data between the function and the bandwidth resource is determined.
8. A video data processing apparatus, characterized in that, Applied to video processing equipment, the apparatus includes: The function determination module is used to determine the first video viewing function enabled for the video captured by the first video capture device when connected to the first video capture device. The bandwidth determination module is used to determine the first target bandwidth resource amount allocated to the first video acquisition device based on the first video viewing function. The processing module is used to process the video data sent by the first video acquisition device based on the first target bandwidth resource amount, so as to output a video that matches the first video viewing function.
9. A video processing device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by one or more processors, implements the method of any one of claims 1-7.
11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1-7.