A method and system for previewing a KVM agent
By controlling the video screen freezing and link switching of the KVM seat system to generate a preview image, the high cost problem caused by the OSD image preview solution in the existing technology is solved, and a low-cost and stable preview function is achieved.
Patent Information
- Application Number
- CN202210670049.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-06-15
AI Technical Summary
The OSD image preview solution of the existing KVM seat system increases the complexity and cost of the codec, and the computing power of the codec chip is limited.
By controlling the freezing of the video screen of the current link, the video stream of the link to be switched is obtained and decoded, and a preview image is generated. The preview interface display is realized by utilizing the existing decoding computing power without adding additional hardware.
It reduces equipment costs, maintains equipment stability, fully utilizes existing decoding computing resources, and avoids hardware performance improvement and power consumption increase.
Smart Images

Figure CN115190252B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of KVM seat systems, and in particular to a KVM seat preview method and system. Background Art
[0002] At present, KVM seat systems mostly use a dual-stream OSD image preview method for OSD (On Screen Display) image preview. That is, the control end of the KVM seat system will receive two streams, a main stream for normal image display, and a secondary stream for OSD image preview.
[0003] The dual-stream OSD image preview solution generally requires the encoder unit to provide two video streams with different resolutions or two video streams with different encoding methods.
[0004] This implementation utilizes two compression methods: one lightly compressed stream is used for normal KVM system operation, and the other uses H.264 / 265 encoding for OSD image preview and visual control. This requires implementing two encoding methods on both the encoding and decoding ends, increasing the complexity of the codec and the product cost. Furthermore, on the KVM agent management system host, different routing methods for different streams increase the complexity and cost of the host.
[0005] This implementation involves two streams with different resolutions: one standard-resolution stream for the normal operation of the KVM agent system, and one low-resolution stream for OSD image preview. This implementation requires increased computing power on both the encoding and decoding ends, and is easily constrained by the computing power of the codec chip. For example, when the low-resolution stream is not available, the corresponding codec chip can achieve 1080p60. However, when the low-resolution stream is enabled, the frame rate of the normal stream processed by the codec chip falls below 60 frames per second. Alternatively, to achieve OSD image preview, designers are forced to increase equipment costs to ensure sufficient encoding and decoding computing power. Summary of the Invention
[0006] The present invention provides a KVM seat preview method and system, which are used to solve the defect of high cost caused by the dual-stream OSD image preview solution in the prior art.
[0007] The present invention provides a KVM seat preview method, comprising:
[0008] If you need to enter the preview or refresh the preview, freeze the video screen of the current link, obtain the video stream of the link to be switched / pushed, and decode it to obtain the preview image;
[0009] A preview interface is generated according to the preview image, and the video screen of the current link is controlled to exit freezing, thereby obtaining a video screen with the preview interface.
[0010] According to a KVM seat preview method provided by the present invention, the method of controlling the video screen of the current link to freeze, obtaining the video stream of the link to be switched / pushed and decoding it to obtain a preview image includes:
[0011] Control the video image of the current link to freeze, interrupt the USB and HID connections of the current link control end, and save the current connection relationship;
[0012] Switch links based on the link to be switched / pushed;
[0013] Obtain the video stream of the link to be switched / pushed, decode a frame of the video stream, and scale it to obtain a preview image.
[0014] According to a preview method for a KVM seat provided by the present invention, the number of links to be switched / pushed is multiple. If preview images of all links to be switched / pushed are not obtained, link switching continues; a video stream of the link to be switched / pushed is obtained, a frame of image in the video stream is decoded and scaled to obtain a preview image.
[0015] According to a KVM seat preview method provided by the present invention, the number of links to be switched / pushed is 6, and the number of preview images is 6.
[0016] According to a KVM seat preview method provided by the present invention, generating a preview interface based on the preview image, controlling the video screen of the current link to exit freezing, and obtaining a video screen with the preview interface, includes:
[0017] Embedding the preview image into a set display position to generate a preview interface;
[0018] Restoring the current connection relationship includes restoring the USB and HID connections of the current link management end, obtaining the video stream of the current link, decoding the video image in the video stream and outputting it for display, and superimposing the preview interface on the video screen to obtain a video screen with the preview interface.
[0019] According to a KVM seat preview method provided by the present invention, the preview interface includes a refresh button, and the preview is refreshed after the refresh button is clicked.
[0020] The present invention also provides a KVM seat preview system, comprising a KVM host and a plurality of control terminals connected to the KVM host;
[0021] The control end is used to control the video screen of the current link to freeze when entering the preview or refreshing the preview, obtain the video code stream of the link to be switched / pushed and decode it to obtain a preview image; generate a preview interface based on the preview image, control the video screen of the current link to exit freezing, and obtain a video screen with the preview interface.
[0022] According to a preview system for KVM seats provided by the present invention, the management and control end includes several fiber optic interfaces and several DVI / HDMI interfaces. The fiber optic interfaces are used to connect to the KVM host to transmit video code streams and related control / handshake information; the DVI / HDMI interfaces are used to output video to the display.
[0023] The present invention also provides a computer-readable storage medium having a computer program and FPGA firmware stored thereon. When the computer program and FPGA firmware are executed by a processor, the preview method of the KVM seat described in any one of the above methods is implemented.
[0024] The present invention also provides a computer program product, comprising a computer program and FPGA firmware, wherein the computer program and FPGA firmware, when executed by a processor, implement any of the above-described KVM seat preview methods.
[0025] The present invention provides a KVM seat preview method and system. When entering a preview session, the output video is frozen, and the system switches to decoding the stream to be previewed. After all streams to be previewed are decoded, the system switches back to decoding the normal stream. This eliminates the need for additional dedicated preview decoding hardware and the performance of the decoding hardware. Existing decoding computing resources are fully utilized, maintaining low device power consumption, ensuring device stability, and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 This is a flow chart of a KVM seat preview method provided by the present invention;
[0028] Figure 2 The embodiment of the present invention provides Figure 1 Schematic diagram of the process of step S1;
[0029] Figure 3 The embodiment of the present invention provides Figure 1 Schematic diagram of the process of step S2;
[0030] Figure 4 This is a structural diagram of a KVM seat preview system provided by the present invention. DETAILED DESCRIPTION
[0031] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0032] Figure 1 This is a flow chart of a KVM seat preview method provided by the present invention, referring to Figure 1 The present invention provides a preview method for KVM seats, which adds an image preview function, that is, before switching / pushing the video link, the thumbnail of the relevant video can be seen in advance; including:
[0033] S1: If you need to enter the preview or refresh the preview, freeze the video of the current link, obtain the video stream of the link to be switched / pushed, and decode it to obtain a preview image. This is achieved by taking a static screenshot.
[0034] S2, generating a preview interface according to the preview image, controlling the video screen of the current link to exit freezing, and obtaining a video screen with the preview interface.
[0035] Based on the above embodiment, as an optional embodiment, Figure 2 As shown, the video screen of the current link is frozen, the video stream of the link to be switched / pushed is obtained and decoded to obtain a preview image, including:
[0036] S110: Control the video image of the current link to freeze, disconnect the USB and HID connections of the current link control end, and save the current connection relationship. The current connection relationship refers to the corresponding relationship between the decoding device and the current link.
[0037] S120: Perform link switching according to the link to be switched / pushed.
[0038] S130 , obtaining a video stream of the link to be switched / pushed, decoding a frame of image in the video stream, and scaling it to obtain a preview image.
[0039] Based on the above embodiment, as an optional embodiment, the number of links to be switched / pushed is multiple. If preview images of all links to be switched / pushed are not obtained, link switching continues; the video stream of the link to be switched / pushed is obtained, a frame of image in the video stream is decoded and scaled to obtain a preview image.
[0040] Optionally, the number of links to be switched / pushed is 6, and the number of preview images is 6. There is no strict order restriction for generating preview images. Once a preview image is captured, a preview interface can be generated, but the interface is not complete. According to calculations, the time it takes for the control end to capture a preview image is approximately 40 milliseconds. The product design requires previewing 6 images simultaneously, so it takes approximately 240 milliseconds to complete the generation of preview data, which is less than 0.1 seconds. Therefore, the user sees the complete preview interface immediately.
[0041] Optionally, in step S130, after decoding a frame of image in the video stream and scaling it, the image can be saved as required, and all preview images can be stored in memory blocks of corresponding sizes opened up in the heap. The memory space of all preview images is uniformly managed by smart pointers, and then relevant functions are called to reorganize the data in the memory blocks to obtain a friendly OSD interface file.
[0042] Optionally, scaling the image in step S130 includes:
[0043] S131 , performing pre-processing operations such as Gaussian filtering denoising, grayscale processing, binarization processing, and data normalization on the image to obtain a binarized image with less noise interference.
[0044] S132: Pre-segment the image into several regions, for example, four regions: Region 1, Region 2, Region 3, and Region 4. Set the sampling spacing for each region based on the value change curve of the binary image within each region. Large fluctuations in the value change curve indicate large pixel changes in that region, and the sampling spacing should be correspondingly reduced, i.e., the number of sampling points should be increased. Conversely, a relatively flat value change curve indicates small pixel changes, and the sampling spacing should be correspondingly increased, i.e., the number of sampling points should be reduced. Whether to adjust the horizontal or vertical sampling spacing is determined based on the value change curves of adjacent regions. Optionally, during implementation, the boundaries of each region can also be adjusted based on a watershed algorithm.
[0045] S133: Sampling each region according to the sampling interval. Regions with larger sampling intervals may be padded with pixels based on an average method, and a scaled image is obtained based on the pixels in each region. This can minimize the technical problem of image distortion during image scaling.
[0046] Based on the above embodiment, as an optional embodiment, Figure 3 As shown, the process of generating a preview interface based on the preview image, controlling the video screen of the current link to exit freezing, and obtaining a video screen with the preview interface includes:
[0047] S210, embedding the preview image into a set display position to generate a preview interface;
[0048] S220, restore the current connection relationship, including restoring the USB and HID connections of the current link management end, obtaining the video stream of the current link, decoding the video image in the video stream and outputting it for display, superimposing the preview interface on the video screen, and obtaining a video screen with the preview interface.
[0049] Optionally, the preview interface may be superimposed on the video screen by registering a callback function. Specifically, the registered callback function is programmed through GDI+ related functions, and the member functions in the class are initialized before programming.
[0050] Based on the above embodiment, as an optional embodiment, the preview interface includes a refresh button. Clicking the refresh button refreshes the preview, making it convenient for the user to refresh.
[0051] Optionally, during preview, the position of the preview interface can be fixed or movable. First, a pane object and a position index corresponding to the pane object are created for the preview interface. If the preview interface needs to be moved, it is determined whether there is a mouse click event within the coordinate range of the preview interface. If so, the position index corresponding to the pane object is set to the mouse position index value.
[0052] A preview device for a KVM seat provided by the present invention is described below. The preview device for a KVM seat described below and the preview method for a KVM seat described above can be referred to each other.
[0053] Figure 4 This is a schematic diagram of the structure of a KVM seat preview system provided by the present invention, referring to Figure 4 The present invention also provides a KVM seat preview system, including a KVM host and several management and control terminals connected to the KVM host.
[0054] The control end is used to control the video screen of the current link to freeze when entering the preview or refreshing the preview, obtain the video code stream of the link to be switched / pushed and decode it to obtain a preview image; generate a preview interface based on the preview image, control the video screen of the current link to exit freezing, and obtain a video screen with the preview interface.
[0055] The present invention adopts a time-division multiplexing method similar to operating system process scheduling, so that the same decoder can decode normal control code streams and process OSD code streams; considering that the images previewed on the OSD interface are small and the effect of seeing dynamic images is not very good, and when calling OSD preview, whether the background picture is dynamic has little effect on the user's use, a static screenshot method is used here to implement it; that is, when the user enters the OSD preview, the output video of the seat control end is frozen, and the decoding module is used to decode the OSD code stream. After all the code streams that need to be previewed are decoded, it switches back to decoding the normal code stream.
[0056] An image preview function is added to the OSD of the control end (decoding) in the already implemented KVM seat collaboration management system, that is, thumbnails of related videos can be seen in advance before switching / pushing the video link; when implementing these functions, the decoding computing power of the decoding module (FPGA implementation) does not need to be improved, that is, there is no need to use FPGA chips with more resources; at the same time, no modifications are required to the encoding end, and no modifications are required to the hardware of the KVM host end.
[0057] Based on the above embodiment, as an optional embodiment, the control end includes several fiber optic interfaces and several DVI / HDMI interfaces. The fiber optic interfaces are used to connect to the KVM host to transmit video streams and related control / handshake information; the DVI / HDMI interfaces are used to output video to the display. The KVM host is connected to several encoder devices through several fiber optic interfaces. When the OSD preview is not entered / the OSD preview is not refreshed, a stable HID link and USB link can be established between the decoder and the encoder device. However, once the OSD preview action is performed, these two links will be interrupted. For example, when the OSD preview is entered, if the decoder and the encoder device are copying data to a USB flash drive, this copying operation will be interrupted.
[0058] The present invention provides a KVM seat preview method and system. When entering a preview session, the output video is frozen, and the system switches to decoding the stream to be previewed. After all streams to be previewed are decoded, the system switches back to decoding the normal stream. This eliminates the need for additional dedicated preview decoding hardware and the performance of the decoding hardware. Existing decoding computing resources are fully utilized, maintaining low device power consumption, ensuring device stability, and reducing costs.
[0059] On the other hand, the present invention also provides a computer program product, which includes a computer program and FPGA firmware. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program and FPGA firmware are executed by a processor, the computer can execute a KVM seat preview method provided by the above methods.
[0060] On the other hand, the present invention also provides a computer-readable storage medium having a computer program and FPGA firmware stored thereon. When the computer program and FPGA firmware are executed by a processor, a preview method for a KVM seat is implemented including executing the above-mentioned methods.
[0061] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0062] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary dedicated hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, Flash chip, optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiment.
[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A KVM seat preview method, characterized in that: include: If you need to enter the preview or refresh the preview, freeze the video screen of the current link, obtain the video stream of the link to be switched / pushed, and decode it to obtain the preview image; Generate a preview interface based on the preview image, control the video screen of the current link to exit freezing, and obtain a video screen with the preview interface; when entering the preview, control the output video to freeze and switch to decoding the stream to be previewed. After all the streams to be previewed are decoded, switch back to decoding the normal stream; The process of controlling the video image of the current link to freeze, obtaining and decoding the video stream of the link to be switched / pushed, and obtaining a preview image includes: Control the video image of the current link to freeze, interrupt the USB and HID connections of the current link control end, and save the current connection relationship; Switch links based on the link to be switched / pushed; Obtain the video stream of the link to be switched / pushed, decode a frame of the video stream, and scale it to obtain a preview image.
2. The KVM seat preview method according to claim 1, characterized in that: There are multiple links to be switched / pushed. If preview images of all links to be switched / pushed are not obtained, link switching is continued; the video stream of the link to be switched / pushed is obtained, a frame of image in the video stream is decoded and scaled to obtain a preview image.
3. The KVM seat preview method according to claim 2, characterized in that: The number of links to be switched / pushed is 6, and the number of preview images is 6.
4. The KVM seat preview method according to claim 1, characterized in that: Generating a preview interface according to the preview image, controlling the video screen of the current link to exit freezing, and obtaining a video screen with the preview interface, includes: Embedding the preview image into a set display position to generate a preview interface; Restoring the current connection relationship includes restoring the USB and HID connections of the current link management end, obtaining the video stream of the current link, decoding the video image in the video stream and outputting it for display, and superimposing the preview interface on the video screen to obtain a video screen with the preview interface.
5. The KVM seat preview method according to claim 1, characterized in that: The preview interface includes a refresh button, and the preview is refreshed after clicking the refresh button.
6. A KVM seat preview system, characterized in that: A method for implementing a preview of a KVM seat according to any one of claims 1 to 5, comprising a KVM host and a plurality of control terminals connected to the KVM host; The control end is used to control the video screen of the current link to freeze when entering the preview or refreshing the preview, obtain the video code stream of the link to be switched / pushed and decode it to obtain a preview image; generate a preview interface based on the preview image, control the video screen of the current link to exit freezing, and obtain a video screen with the preview interface.
7. The KVM seat preview system according to claim 6, characterized in that: The control end includes several fiber optic interfaces and several DVI / HDMI interfaces. The fiber optic interfaces are used to connect to the KVM host to transmit video streams and related control / handshake information; the DVI / HDMI interfaces are used to output video to the display.
8. A computer-readable storage medium having a computer program and FPGA firmware stored thereon, characterized in that: When the computer program and FPGA firmware are executed by a processor, the preview method of the KVM seat according to any one of claims 1 to 5 is implemented.
9. A computer program product comprising a computer program and FPGA firmware, characterized in that: When the computer program and FPGA firmware are executed by a processor, the KVM seat preview method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method and system for transmitting multipath video signals
CN106604097A
KVM switch
JP2018049547A