Image transmission strategy determination method and device, storage medium and electronic equipment
By dynamically adjusting the image transmission strategy of the substrate management controller, and filtering image frames based on the bandwidth usage of Ethernet, solving the problem of insufficient bandwidth when the server remotely displays high-definition images and improving the image display effect.
Patent Information
- Application Number
- CN202411295531.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, due to insufficient bandwidth when the server remotely displays high-definition images, screen tear and stuttering often occur in image transmission, and the fixed frame drop mode cannot effectively deal with bandwidth changes, resulting in poor image display effect.
By obtaining the current occupied bandwidth of Ethernet and the target occupied bandwidth required to transmit target image data within the preset time period, the image transmission strategy of the substrate management controller is determined, and full transmission, fixed frame drop, similar frame drop or combined Strategy: Flexible filtering of image frames that need to be transmitted, and dynamically adjusting the transmission strategy to adapt to bandwidth changes.
When bandwidth limitations are met, the image display quality can be maximized, the picture tear and lag can be reduced, and the user experience can be improved.
Smart Images

Figure CN119211438A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the server field, and in particular, to a method, device, storage medium and electronic device for determining an image transmission strategy. Background Art
[0002] As an important component of the server, BMC (Baseboard Management Controller) is not only used to monitor and manage the hardware on the server motherboard. At the same time, BMC is also integrated with image display ports such as VGA (VedioGraphics Array) and / or DP (Display Port) for local display and remote display. When realizing remote display, the image data is encoded by the compression module and transmitted to the remote display end via Ethernet, and then displayed on the remote display after decoding. With the popularization of high-definition images, the amount of data in each frame of the image is also increasing. The transmission of a large amount of data under the limited Ethernet bandwidth can easily cause tearing and freezing of the picture, which seriously affects the viewing experience.
[0003] In the prior art, in order to solve the problem of insufficient bandwidth, a fixed frame drop mode is usually adopted. For example, after continuously transmitting multiple frames of image data, the next frame of image data is discarded, or one frame of image data is discarded when the two frames of image data are highly similar. However, adopting a fixed frame drop mode to transmit image data cannot take into account the changes in bandwidth occupancy, and thus will cause unnecessary image data discard and image display errors.
[0004] Therefore, in the related art, there is a problem of poor image display effect.
[0005] With regard to the problem of poor image display effect in the related art, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present application provide a method, device, storage medium and electronic device for determining an image transmission strategy, so as to at least solve the problem of poor image display effect in the related art.
[0007] According to one embodiment of the present application, a method for determining an image transmission strategy is provided, which is applied to a baseboard management controller, wherein the baseboard management controller includes a video transmission port, and the video transmission port is used to transmit image data to a display terminal via Ethernet, and the display terminal is used to display images. The method includes: obtaining a current occupied bandwidth of the Ethernet; calculating a target occupied bandwidth required for the Ethernet to transmit target image data within a preset time period, wherein the target image data includes multiple image frames; determining an image transmission strategy of the baseboard management controller based on the current occupied bandwidth and the target occupied bandwidth, and using the image transmission strategy to transmit the target image data to the display terminal, wherein the image transmission strategy is used to filter image frames that need to be transmitted in the target image data.
[0008] In an exemplary embodiment, determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth includes: determining the total occupied bandwidth of the Ethernet according to the current occupied bandwidth and the target occupied bandwidth, and determining the bandwidth occupancy rate of the Ethernet according to the ratio of the total occupied bandwidth to the total bandwidth of the Ethernet; when it is determined that the bandwidth occupancy rate is less than a first ratio, controlling the baseboard management controller to enable a full transmission strategy, wherein the full transmission strategy indicates that all image frames in the target image data are transmitted; when it is determined that the bandwidth occupancy rate is greater than a first ratio and less than a second ratio, controlling the baseboard management controller to enable a fixed frame loss strategy, wherein the second ratio is greater than the first ratio, and the fixed frame loss strategy indicates that when transmitting the target image data In the process of transmitting the target image data, after each transmission of the first number of image frames, the second number of image frames are discarded; when it is determined that the bandwidth occupancy rate is greater than the second ratio and less than the third ratio, the baseboard management controller is controlled to enable the similar frame loss strategy, wherein the third ratio is greater than the second ratio, and the similar frame loss strategy means that in the process of transmitting the target image data, when it is determined that the similarity between the first image frame and the second image frame is greater than a first preset similarity, the second image frame is discarded, the first image frame and the second image frame are image frames transmitted continuously in the target image data, and the first image frame is transmitted before the second image frame; when it is determined that the bandwidth occupancy rate is greater than the third ratio, the baseboard management controller is controlled to enable the fixed frame loss strategy and the similar frame loss strategy at the same time.
[0009] In an exemplary embodiment, after determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, the method further includes: when the baseboard management controller has enabled the similar frame loss strategy, retaining the next image frame when a preset number of image frames are continuously discarded.
[0010] In an exemplary embodiment, after determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, the method further includes: before discarding the third image frame, calculating the similarity between the third image frame and the fourth image frame, wherein the third image frame and the fourth image frame are image frames transmitted continuously in the target image data, the fourth image frame is transmitted before the third image frame, and the fourth image frame has been transmitted; when it is determined that the similarity between the third image frame and the fourth image frame is less than a second preset similarity, retaining the third image frame and discarding the next image frame of the third image frame.
[0011] In an exemplary embodiment, calculating the target occupied bandwidth required for the Ethernet to transmit target image data within a preset time period includes: obtaining the display resolution, display frame rate, and display color depth of the display terminal; and using a preset image compression algorithm to calculate the display resolution, the display frame rate, and the display color depth to obtain the target occupied bandwidth.
[0012] In an exemplary embodiment, the display resolution, the display frame rate, and the display color depth are calculated using a preset image compression algorithm to obtain the target occupied bandwidth, including: determining an image compression ratio for compressing the target image data according to the preset image compression algorithm; determining the target occupied bandwidth according to the product of a target product and the image compression ratio, wherein the target product represents the product of the display resolution, the display frame rate, and the display color depth.
[0013] In an exemplary embodiment, after determining the target occupied bandwidth according to the product of the target product and the image compression ratio, the method further includes: comparing the target occupied bandwidth with a preset bandwidth to obtain a comparison result; determining whether to replace the preset image compression algorithm according to the comparison result; after updating the preset image compression algorithm to another image compression algorithm according to the comparison result, using the other image compression algorithm to calculate the display resolution, the display frame rate, and the display color depth to redetermine the target occupied bandwidth.
[0014] According to another embodiment of the present application, a device for determining an image transmission strategy is provided, including: an acquisition module for acquiring the current occupied bandwidth of an Ethernet; a calculation module for calculating the target occupied bandwidth required for the Ethernet to transmit target image data within a preset time period, wherein the target image data includes multiple image frames; a determination module for determining the image transmission strategy of the baseboard management controller based on the current occupied bandwidth and the target occupied bandwidth, and using the image transmission strategy to transmit the target image data to the display end, wherein the image transmission strategy is used to filter the image frames that need to be transmitted in the target image data.
[0015] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0016] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0017] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiment are implemented.
[0018] Through the present application, the image transmission strategy of the baseboard management controller can be determined by acquiring the current occupied bandwidth of the Ethernet and calculating the target occupied bandwidth required for the Ethernet to transmit the target image data within a preset time period, and the target image data can be transmitted to the display end through the determined image transmission strategy. Therefore, it is possible to flexibly control the image transmission strategy of the baseboard management controller to switch according to the bandwidth occupancy of the Ethernet and the transmitted image data, so as to maximize the image display quality while meeting the bandwidth limitation, thereby solving the problem of poor image display effect in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a hardware structure block diagram of a server device of a method for determining an image transmission strategy in an embodiment of the present application;
[0020] Figure 2 is a flow chart of a method for determining an image transmission strategy according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a method for determining an image transmission strategy according to an embodiment of the present application (I);
[0022] Figure 4 is a schematic diagram of a method for determining an image transmission strategy according to an embodiment of the present application (II);
[0023] Figure 5 It is a structural block diagram of a device for determining an image transmission strategy according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0026] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a server device of a method for determining an image transmission strategy according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the image transmission strategy in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the method for determining the above-mentioned image transmission strategy is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0028] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0029] In this embodiment, a method for determining an image transmission strategy is provided, which is applied to a baseboard management controller. The baseboard management controller includes a video transmission port. The video transmission port is used to transmit image data to a display terminal via Ethernet. The display terminal is used to display images. Figure 2 is a flow chart of a method for determining an image transmission strategy according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0030] Step S202, obtaining the currently occupied bandwidth of the Ethernet;
[0031] Step S204, calculating the target occupied bandwidth required by the Ethernet to transmit target image data within a preset time period, wherein the target image data includes a plurality of image frames;
[0032] Step S206, determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, and using the image transmission strategy to transmit the target image data to the display end, wherein the image transmission strategy is used to filter the image frames that need to be transmitted in the target image data.
[0033] Through the above steps, the image transmission strategy of the baseboard management controller can be determined by obtaining the current occupied bandwidth of the Ethernet and calculating the target occupied bandwidth required for the Ethernet to transmit the target image data within a preset time period, and the target image data can be transmitted to the display end through the determined image transmission strategy. Therefore, it is possible to flexibly control the image transmission strategy of the baseboard management controller to switch according to the bandwidth occupancy of the Ethernet and the transmitted image data, so as to maximize the image display quality while meeting the bandwidth limitation, thereby solving the problem of poor image display effect in the related technology.
[0034] In an exemplary embodiment, determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth includes: determining the total occupied bandwidth of the Ethernet according to the current occupied bandwidth and the target occupied bandwidth, and determining the bandwidth occupancy rate of the Ethernet according to the ratio of the total occupied bandwidth to the total bandwidth of the Ethernet; when it is determined that the bandwidth occupancy rate is less than a first ratio, controlling the baseboard management controller to enable a full transmission strategy, wherein the full transmission strategy indicates that all image frames in the target image data are transmitted; when it is determined that the bandwidth occupancy rate is greater than a first ratio and less than a second ratio, controlling the baseboard management controller to enable a fixed frame loss strategy, wherein the second ratio is greater than the first ratio, and the fixed frame loss strategy indicates that when transmitting the target image data In the process of transmitting the target image data, after each transmission of the first number of image frames, the second number of image frames are discarded; when it is determined that the bandwidth occupancy rate is greater than the second ratio and less than the third ratio, the baseboard management controller is controlled to enable the similar frame loss strategy, wherein the third ratio is greater than the second ratio, and the similar frame loss strategy means that in the process of transmitting the target image data, when it is determined that the similarity between the first image frame and the second image frame is greater than a first preset similarity, the second image frame is discarded, the first image frame and the second image frame are image frames transmitted continuously in the target image data, and the first image frame is transmitted before the second image frame; when it is determined that the bandwidth occupancy rate is greater than the third ratio, the baseboard management controller is controlled to enable the fixed frame loss strategy and the similar frame loss strategy at the same time.
[0035] Optionally, in the above embodiment, the first number and the second number may be adjusted according to the bandwidth occupancy rate. When the bandwidth occupancy rate is low, the first number is increased and the second number is decreased; when the bandwidth occupancy rate is high, the first number is decreased and the second number is increased.
[0036] In an optional embodiment, the image transmission strategy of the baseboard management controller may be determined in the following manner:
[0037] When the bandwidth usage is less than 80%, the full transmission strategy is enabled, that is, all image frames in the target image data are transmitted normally.
[0038] When the bandwidth usage is between 80% and 85%, a fixed frame drop strategy is enabled. For example, after every 20 frames of image data are transmitted continuously, 1 frame of image data is dropped. Or after every 30 frames of image data are transmitted, 2 frames of image data are dropped. The specific number can be set according to the bandwidth usage and the actual application scenario.
[0039] When the bandwidth occupancy rate is between 85% and 90%, a similar frame dropping strategy is enabled. For example, if the similarity between the previous frame and the next frame of image data is greater than 95% in two consecutive frames of image data, the next frame of image data is dropped.
[0040] The bandwidth usage is greater than 90%, and both the fixed frame loss policy and the similar frame loss policy are enabled.
[0041] It should be noted that the corresponding relationship between the above-mentioned bandwidth occupancy ratio and different strategies, the threshold setting of similarity, the number of lost frames and other specific values can be adaptively adjusted according to the actual application situation, and no specific restrictions are made in this application.
[0042] Through the above embodiments, it is possible to flexibly adjust the image transmission strategy of the baseboard management controller according to the network bandwidth occupancy rate, maximize the image transmission quality under different bandwidth occupancy conditions, and thus improve the display effect of the image on the display end.
[0043] In an exemplary embodiment, after determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, the method further includes: when the baseboard management controller has enabled the similar frame loss strategy, retaining the next image frame when a preset number of image frames are continuously discarded.
[0044] In an optional embodiment, when a similar frame loss strategy is enabled, a situation may occur where the similarity of multiple consecutive image frames is relatively high, for example, the similarity between the 1st frame and the 2nd frame is 95%, the similarity between the 2nd frame and the 3rd frame is 95%, ..., the similarity between the 10th frame and the 11th frame is 95%, then the pixel similarity between the 1st frame and the 11th frame is only 59%. After continuously discarding 10 frames of images, when the display screen jumps from the 1st frame to the 11th frame for display, screen tearing or stuttering may occur. Therefore, it can be set that when a similar frame loss strategy is enabled, 3 frames (equivalent to the above-mentioned preset number, which can be adjusted according to the actual application scenario) are continuously discarded and then the next frame of image is retained, thereby reducing the occurrence of screen tearing and stuttering, thereby improving the image display effect.
[0045] In an exemplary embodiment, after determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, the method further includes: before discarding the third image frame, calculating the similarity between the third image frame and the fourth image frame, wherein the third image frame and the fourth image frame are image frames transmitted continuously in the target image data, the fourth image frame is transmitted before the third image frame, and the fourth image frame has been transmitted; when it is determined that the similarity between the third image frame and the fourth image frame is less than a second preset similarity, retaining the third image frame and discarding the next image frame of the third image frame.
[0046] In an optional embodiment, in two consecutive frames of image data, the similarity between the previous frame image data and the next frame image data is less than 60%, indicating that there is a large picture change between the previous frame image and the next frame image, and therefore may include key picture information, such as key scene switching in the image, etc. At this time, if it is determined to transmit the previous frame image data and discard the next frame image data, it is likely to cause the loss of the key picture of the image, so the next frame image data can be retained and the next frame image data of the next frame image data can be discarded.
[0047] Through the above embodiments, the loss of key image frames can be reduced, thereby improving the user's viewing experience of the image frames.
[0048] In an exemplary embodiment, calculating the target occupied bandwidth required for the Ethernet to transmit target image data within a preset time period includes: obtaining the display resolution, display frame rate, and display color depth of the display terminal; and using a preset image compression algorithm to calculate the display resolution, the display frame rate, and the display color depth to obtain the target occupied bandwidth.
[0049] In an exemplary embodiment, the display resolution, the display frame rate, and the display color depth are calculated using a preset image compression algorithm to obtain the target occupied bandwidth, including: determining an image compression ratio for compressing the target image data according to the preset image compression algorithm; determining the target occupied bandwidth according to the product of a target product and the image compression ratio, wherein the target product represents the product of the display resolution, the display frame rate, and the display color depth.
[0050] In an optional embodiment, for example, the display resolution of the display end is 1920x1080, the display frame rate is 60 frames per second, the display color depth is 24 bits, the target product is 1920x1080x60x24, and the JPEG compression algorithm is used. Assuming that the algorithm can compress the image data to 50% of the original size, that is, the image compression ratio is 0.5, then the target occupied bandwidth = (1920x1080x60x24)x0.5≈6442.45Mbps.
[0051] In an exemplary embodiment, after determining the target occupied bandwidth according to the product of the target product and the image compression ratio, the method further includes: comparing the target occupied bandwidth with a preset bandwidth to obtain a comparison result; determining whether to replace the preset image compression algorithm according to the comparison result; after updating the preset image compression algorithm to another image compression algorithm according to the comparison result, using the other image compression algorithm to calculate the display resolution, the display frame rate, and the display color depth to redetermine the target occupied bandwidth.
[0052] Optionally, in the above embodiment, for example, the target occupied bandwidth is 6442.45Mbps, and the preset bandwidth expected to be allocated for the target image data is 5000Mbps, which exceeds the pre-allocated value, the preset image compression algorithm can be replaced with an image compression algorithm with a lower compression ratio to reduce bandwidth pressure.
[0053] Obviously, the embodiments described above are only some embodiments of the present application, not all embodiments. In order to better understand the verification method of the above test case, the above process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application, specifically:
[0054] In an alternative embodiment, Figure 3 is a schematic diagram of a method for determining an image transmission strategy according to an embodiment of the present application (I), such as Figure 3As shown in the figure, the image display module located on the BMC sends the target image data to the intelligent control module. The intelligent control module reads the Ethernet bandwidth occupancy and calculates the bandwidth required by the remote display terminal in the current display mode, and finally obtains an estimated bandwidth occupancy rate. Then the intelligent control module determines the image transmission strategy based on the estimated bandwidth occupancy rate and the preset occupancy rate, which specifically includes 4 modes: full transmission strategy, fixed frame loss strategy, similar frame loss strategy, and simultaneous activation of fixed frame loss strategy and similar frame loss strategy. The image frames of the target image data are filtered through the image transmission strategy, and then the filtered image frames are sent to the JPEG compression module for compression encoding, and then transmitted to the remote display terminal via Ethernet for image display. During the image transmission process, the intelligent control module monitors the current Ethernet occupancy at any time and adjusts the image transmission strategy in real time.
[0055] In the above embodiment, the intelligent control module monitors the current Ethernet occupancy at any time and adjusts the image transmission strategy in real time. Figure 4 As shown, the total occupied bandwidth is obtained according to the current network occupied bandwidth of the Ethernet and the bandwidth required for transmitting the current image data. The bandwidth occupancy rate is determined according to the total occupied bandwidth, and then the image transmission strategy is determined. Specifically, the image transmission strategy of the baseboard management controller can be determined in the following ways:
[0056] When the bandwidth usage is less than 80%, the full transmission strategy is enabled, that is, all image frames in the target image data are transmitted normally.
[0057] When the bandwidth usage is between 80% and 85%, a fixed frame drop strategy is enabled. For example, after every 20 frames of image data are transmitted continuously, 1 frame of image data is dropped. Or after every 30 frames of image data are transmitted, 2 frames of image data are dropped. The specific number can be set according to the bandwidth usage and the actual application scenario.
[0058] When the bandwidth occupancy rate is between 85% and 90%, a similar frame dropping strategy is enabled. For example, if the similarity between the previous frame and the next frame of image data is greater than 95% in two consecutive frames of image data, the next frame of image data is dropped.
[0059] The bandwidth usage is greater than 90%, and both the fixed frame loss policy and the similar frame loss policy are enabled.
[0060] It should be noted that the corresponding relationship between the above-mentioned bandwidth occupancy ratio and different strategies, the threshold setting of similarity, the number of lost frames and other specific values can be adaptively adjusted according to the actual application situation, and no specific restrictions are made in this application.
[0061] After determining the image transmission strategy of the baseboard management controller, the image data is output to the JPEG compression module. During the transmission of the image data, the image transmission strategy can be intelligently switched according to the actual bandwidth occupancy rate.
[0062] Optionally, in the above embodiment, when the remote display terminal is not in any operation, the bandwidth occupancy rate is 10%. Assuming that the display resolution of the remote display terminal is 1024×1200, the display frame rate is 60 frames per second, and the color depth is 12 bits, after calculation, the bandwidth occupancy rate of transmitting image data in this display mode is 50%, and the total bandwidth occupancy rate is 60%, which is less than 80%, and the full transmission strategy is enabled. If the remote display terminal suddenly switches the display resolution to 1920×1200, the display frame rate is 90 frames per second, and the color depth is 24 bits, after calculation, the bandwidth occupancy rate of transmitting image data in this display mode is 72%, and the total bandwidth occupancy rate is 82%, which is between 80% and 85%, and the fixed frame loss strategy is enabled.
[0063] Optionally, in the above embodiment, when the remote display terminal is not in any operation, the bandwidth occupancy rate is 10%. Assuming that the display resolution of the remote display terminal is 1024×1200, the display frame rate is 60 frames per second, and the color depth is 12 bits, after calculation, the bandwidth occupancy rate of transmitting image data in this display mode is 50%, and the total bandwidth occupancy rate is 60%, which is less than 80%, and the full transmission strategy is enabled. If the remote firmware update is performed via Ethernet at this time, an additional 35% of the total bandwidth is required, then the actual bandwidth occupancy rate reaches 95%, which is greater than 90%. At the same time, the fixed frame loss strategy and the similar frame loss strategy are enabled. After the firmware update is completed, the bandwidth occupancy rate returns to 60%, which is less than 80%, and the full transmission strategy is enabled.
[0064] Through the above embodiments, the image transmission strategy can be flexibly adjusted according to the network bandwidth occupancy, thereby achieving maximum utilization of Ethernet bandwidth to improve image display effects.
[0065] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0066] In this embodiment, a device for determining an image transmission strategy is also provided. The system is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0067] Figure 5 is a structural block diagram of a device for determining an image transmission strategy according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:
[0068] An acquisition module 52 is used to acquire the current occupied bandwidth of the Ethernet;
[0069] A calculation module 54, used to calculate the target occupied bandwidth required by the Ethernet to transmit target image data within a preset time period, wherein the target image data includes a plurality of image frames;
[0070] The determination module 56 is used to determine the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, and use the image transmission strategy to transmit the target image data to the display end, wherein the image transmission strategy is used to filter the image frames that need to be transmitted in the target image data.
[0071] Through the above-mentioned device, the image transmission strategy of the baseboard management controller can be determined by obtaining the current occupied bandwidth of the Ethernet and calculating the target occupied bandwidth required for the Ethernet to transmit the target image data within a preset time period, and the target image data can be transmitted to the display end through the determined image transmission strategy. Therefore, it is possible to flexibly control the image transmission strategy of the baseboard management controller to switch according to the bandwidth occupancy of the Ethernet and the transmitted image data, so as to maximize the image display quality while meeting the bandwidth limitation, thereby solving the problem of poor image display effect in the related technology.
[0072] In an exemplary embodiment, the determination module 56 is further used to: determine the total occupied bandwidth of the Ethernet according to the current occupied bandwidth and the target occupied bandwidth, and determine the bandwidth occupancy rate of the Ethernet according to the ratio of the total occupied bandwidth to the total bandwidth of the Ethernet; when it is determined that the bandwidth occupancy rate is less than a first ratio, control the baseboard management controller to enable a full transmission strategy, wherein the full transmission strategy indicates that all image frames in the target image data are transmitted; when it is determined that the bandwidth occupancy rate is greater than a first ratio and less than a second ratio, control the baseboard management controller to enable a fixed frame loss strategy, wherein the second ratio is greater than the first ratio, and the fixed frame loss strategy indicates that in the process of transmitting the target image data, each transmission of the first frame after transmitting the target image data, a second number of image frames are discarded; when it is determined that the bandwidth occupancy rate is greater than the second ratio and less than the third ratio, the baseboard management controller is controlled to enable the similar frame loss strategy, wherein the third ratio is greater than the second ratio, and the similar frame loss strategy means that in the process of transmitting the target image data, when it is determined that the similarity between the first image frame and the second image frame is greater than a first preset similarity, the second image frame is discarded, the first image frame and the second image frame are image frames transmitted continuously in the target image data, and the first image frame is transmitted before the second image frame; when it is determined that the bandwidth occupancy rate is greater than the third ratio, the baseboard management controller is controlled to enable the fixed frame loss strategy and the similar frame loss strategy at the same time.
[0073] In an exemplary embodiment, the determination module 56 is further configured to: when the baseboard management controller has enabled the similar frame loss strategy, retain the next image frame when a preset number of image frames are continuously discarded.
[0074] In an exemplary embodiment, the above-mentioned determination module 56 is also used to: calculate the similarity between the third image frame and the fourth image frame before discarding the third image frame, wherein the third image frame and the fourth image frame are image frames transmitted continuously in the target image data, the fourth image frame is transmitted before the third image frame, and the fourth image frame has been transmitted; when it is determined that the similarity between the third image frame and the fourth image frame is less than a second preset similarity, retain the third image frame and discard the next image frame of the third image frame.
[0075] In an exemplary embodiment, the above-mentioned calculation module 54 is also used to: obtain the display resolution, display frame rate, and display color depth of the display terminal; use a preset image compression algorithm to calculate the display resolution, the display frame rate, and the display color depth to obtain the target occupied bandwidth.
[0076] In an exemplary embodiment, the above-mentioned calculation module 54 is also used to: determine the image compression ratio for compressing the target image data according to the preset image compression algorithm; determine the target occupied bandwidth according to the product of the target product and the image compression ratio, wherein the target product represents the product of the display resolution, the display frame rate, and the display color depth.
[0077] In an exemplary embodiment, the above-mentioned calculation module 54 is also used to: compare the target occupied bandwidth with the preset bandwidth to obtain a comparison result; determine whether to replace the preset image compression algorithm based on the comparison result; after updating the preset image compression algorithm to other image compression algorithms based on the comparison result, use the other image compression algorithms to calculate the display resolution, the display frame rate, and the display color depth to redetermine the target occupied bandwidth.
[0078] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0079] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0080] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0081] S1, obtaining the currently occupied bandwidth of the Ethernet;
[0082] S2, calculating the target occupied bandwidth required by the Ethernet to transmit target image data within a preset time period, wherein the target image data includes a plurality of image frames;
[0083] S3, determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, and using the image transmission strategy to transmit the target image data to the display end, wherein the image transmission strategy is used to filter the image frames that need to be transmitted in the target image data.
[0084] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0085] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0086] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0087] S1, obtaining the currently occupied bandwidth of the Ethernet;
[0088] S2, calculating the target occupied bandwidth required by the Ethernet to transmit target image data within a preset time period, wherein the target image data includes a plurality of image frames;
[0089] S3, determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, and using the image transmission strategy to transmit the target image data to the display end, wherein the image transmission strategy is used to filter the image frames that need to be transmitted in the target image data.
[0090] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0091] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:
[0092] S1, obtaining the currently occupied bandwidth of the Ethernet;
[0093] S2, calculating the target occupied bandwidth required by the Ethernet to transmit target image data within a preset time period, wherein the target image data includes a plurality of image frames;
[0094] S3, determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, and using the image transmission strategy to transmit the target image data to the display end, wherein the image transmission strategy is used to filter the image frames that need to be transmitted in the target image data.
[0095] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0096] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0097] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining an image transmission strategy, characterized in that: Applied to a baseboard management controller, the baseboard management controller includes a video transmission port, the video transmission port is used to transmit image data to a display terminal via Ethernet, the display terminal is used to display an image, the method includes: Obtaining the currently occupied bandwidth of the Ethernet; Calculating a target occupied bandwidth required by the Ethernet to transmit target image data within a preset time period, wherein the target image data includes a plurality of image frames; The image transmission strategy of the baseboard management controller is determined according to the current occupied bandwidth and the target occupied bandwidth, and the target image data is transmitted to the display end using the image transmission strategy, wherein the image transmission strategy is used to filter the image frames that need to be transmitted in the target image data.
2. The method according to claim 1, characterized in that Determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth includes: Determine the total occupied bandwidth of the Ethernet according to the current occupied bandwidth and the target occupied bandwidth, and determine the bandwidth occupancy rate of the Ethernet according to the ratio of the total occupied bandwidth to the total bandwidth of the Ethernet; In the case of determining that the bandwidth occupancy rate is less than the first ratio, controlling the baseboard management controller to enable a full transmission strategy, wherein the full transmission strategy indicates transmitting all image frames in the target image data; When it is determined that the bandwidth occupancy rate is greater than a first ratio and less than a second ratio, controlling the baseboard management controller to enable a fixed frame loss strategy, wherein the second ratio is greater than the first ratio, and the fixed frame loss strategy indicates that in the process of transmitting the target image data, after each transmission of a first number of image frames, a second number of image frames are discarded; When it is determined that the bandwidth occupancy rate is greater than the second ratio and less than the third ratio, the baseboard management controller is controlled to enable a similar frame loss strategy, wherein the third ratio is greater than the second ratio, and the similar frame loss strategy means that in the process of transmitting the target image data, when it is determined that the similarity between the first image frame and the second image frame is greater than a first preset similarity, the second image frame is discarded, the first image frame and the second image frame are image frames that are transmitted continuously in the target image data, and the first image frame is transmitted before the second image frame; When it is determined that the bandwidth occupancy rate is greater than a third ratio, the baseboard management controller is controlled to enable the fixed frame loss strategy and the similar frame loss strategy simultaneously.
3. The method according to claim 2, characterized in that After determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, the method further includes: In the case that the baseboard management controller has enabled the similar frame dropping strategy, when a preset number of image frames are continuously dropped, the next image frame is retained.
4. The method according to claim 2, characterized in that: After determining the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, the method further includes: Before discarding the third image frame, calculating the similarity between the third image frame and the fourth image frame, wherein the third image frame and the fourth image frame are image frames that are transmitted continuously in the target image data, the fourth image frame is transmitted before the third image frame, and the fourth image frame has been completely transmitted; When it is determined that the similarity between the third image frame and the fourth image frame is less than a second preset similarity, the third image frame is retained and the next image frame of the third image frame is discarded.
5. The method according to claim 1, characterized in that Calculating the target occupied bandwidth required by the Ethernet to transmit the target image data within a preset time period includes: Obtaining the display resolution, display frame rate, and display color depth of the display terminal; The display resolution, the display frame rate, and the display color depth are calculated using a preset image compression algorithm to obtain the target occupied bandwidth.
6. The method according to claim 5, characterized in that The display resolution, the display frame rate, and the display color depth are calculated using a preset image compression algorithm to obtain the target occupied bandwidth, including: Determining an image compression ratio for compressing the target image data according to the preset image compression algorithm; The target occupied bandwidth is determined according to a target product and a product of the image compression ratio, wherein the target product represents a product of the display resolution, the display frame rate, and the display color depth.
7. The method according to claim 6, characterized in that After determining the target occupied bandwidth according to the product of the target product and the image compression ratio, the method further includes: Comparing the target occupied bandwidth with the preset bandwidth to obtain a comparison result; Determining whether to change the preset image compression algorithm according to the comparison result; After the preset image compression algorithm is updated to another image compression algorithm according to the comparison result, the display resolution, the display frame rate, and the display color depth are calculated using the other image compression algorithm to redetermine the target occupied bandwidth.
8. A device for determining an image transmission strategy, characterized in that: The device comprises: An acquisition module is used to obtain the current occupied bandwidth of the Ethernet; A calculation module, used to calculate the target occupied bandwidth required by the Ethernet to transmit target image data within a preset time period, wherein the target image data includes a plurality of image frames; A determination module is used to determine the image transmission strategy of the baseboard management controller according to the current occupied bandwidth and the target occupied bandwidth, and use the image transmission strategy to transmit the target image data to the display end, wherein the image transmission strategy is used to filter the image frames that need to be transmitted in the target image data.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
