A device video processing method and device based on KVM switch control
By performing segmentation processing and distortion analysis on the device video, setting appropriate compression coefficients for synchronous compression, the problem of poor video playback effect in the prior art is solved, and more efficient video storage and better user experience are achieved.
Patent Information
- Application Number
- CN202411319485.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-09-20
AI Technical Summary
In the prior art, when processing device videos, video distortion is not considered during compression, resulting in poor playback effects and unable to adapt to users' flexible viewing needs, affecting user experience.
By segmenting the video to be processed, and setting compression coefficients to different frames in combination with distortion analysis, synchronous compression is ensured to improve the video playback effect. At the same time, the user's display requirements are controlled through the KVM switcher to optimize the video display.
It effectively reduces the footprint of video content, improves the playback effect, and improves the user's viewing experience by adapting to the user's display requirements.
Smart Images

Figure CN119342157B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video processing, and in particular to a device video processing method and apparatus based on KVM switch control. Background Art
[0002] A KVM switch is a device used to control multiple computers or servers. Through a set of keyboards, mice, and monitors, these devices can be controlled locally or remotely. It plays an important role in complex environments such as server rooms, and can easily switch between different computer sources, improve management efficiency, and save space and costs. In the process of applying KVM switches, users sometimes need to clearly know the control operations of the KVM switch and the control results based on the control operations. At this time, the control operations performed by the KVM switch and the control results generated can be recorded, so that users can view the recorded video content at any time to know the control operations and results performed.
[0003] However, as the device video clarity requirements become higher and higher, the memory occupied by the video that needs to be played is getting larger and larger, which will undoubtedly lead to insufficient memory space. At present, the common method is to directly use compression software to compress all videos, and in the compression process, it does not consider whether the video is distorted, whether it is clear when played again after compression, etc., resulting in poor video playback effect. In addition, during the playback process, since only the compressed video is played alone, it cannot adapt to the user's viewing flexibility, resulting in a poor user viewing experience.
[0004] Therefore, the present invention proposes a device video processing method and apparatus based on KVM switch control. Summary of the invention
[0005] The present invention provides a device video processing method and apparatus based on KVM switch control, which is used to segment the video to be processed and set compression coefficients for different frames in combination with distortion analysis for synchronous compression, effectively reducing the space occupied by the content and improving the subsequent playback effect. The KVM switch is further used to control and set the user's display requirements to ensure the user's experience of watching the video.
[0006] The present invention provides a device video processing method based on KVM switch control, comprising:
[0007] Step 1: obtaining a to-be-processed video of a target device, and dividing the to-be-processed video into a plurality of sub-videos according to a control logic set of a KVM switch and the target device during the process of obtaining the to-be-processed video;
[0008] Step 2: according to the video attributes and control logic attributes of each sub-video, an initial compression coefficient is set for the corresponding sub-video;
[0009] Step 3: Determine the distortion coefficient of each analysis frame according to the grayscale information and brightness distribution of each analysis frame in each sub-video, and assign an enhancement processing label to each analysis frame;
[0010] Step 4: According to the label assignment result and in combination with the initial compression coefficient, determine the current compression coefficient of each analysis frame, and classify and analyze all current compression coefficients to synchronously compress the corresponding sub-videos;
[0011] Step 5: Obtain the user's display requirements to manipulate the synchronously compressed sub-video based on the KVM switch, and transmit it to a matching display window for display based on a corresponding decoding channel.
[0012] Preferably, the video to be processed is segmented to obtain a plurality of sub-videos, including:
[0013] Acquire the control logic based on the KVM switch input instruction based on the operation-logic comparison table, and count the execution time based on the control logic;
[0014] The video to be processed is divided in sequence according to the execution time to obtain a plurality of sub-videos.
[0015] Preferably, the process of determining the distortion coefficient of each analysis frame according to the grayscale information and brightness distribution of each analysis frame in each sub-video includes:
[0016] Perform grayscale processing on each analysis frame to obtain a grayscale image;
[0017] A three-channel brightness analysis is performed on the analysis frame to obtain a brightness distribution spectrum.
[0018] Preferably, each analysis frame is assigned an enhanced processing label, including:
[0019] Compare and analyze the grayscale image and brightness distribution map of each analysis frame with the standard grayscale and standard brightness map of the preset image, determine the distorted pixel points of the corresponding analysis frame, and obtain a first offset feature value based on clarity and a second offset feature value based on color;
[0020] Obtaining a current signal difference between an output signal in a corresponding analysis frame acquisition process and an expected snapshot signal, and obtaining a third offset feature quantity based on the current signal difference;
[0021] Based on the first offset feature quantity, the second offset feature quantity and the third offset feature quantity, a distortion coefficient is determined and compared with a distortion threshold, an enhancement processing method is determined and an enhancement processing label is assigned.
[0022] Preferably, determining the current compression coefficient of each analysis frame according to the label assignment result and in combination with the initial compression coefficient includes:
[0023] According to the label assignment result, the increased storage capacity of the corresponding analysis frame is obtained;
[0024] Based on the set storage capacity, the initial compression coefficient and the increased storage capacity of all analysis frames, the current compression coefficient of the corresponding analysis frame is obtained.
[0025] Preferably, obtaining the user's display requirement to manipulate the synchronously compressed sub-video based on the KVM switch includes:
[0026] Obtaining a user's display requirement for a display window, wherein the display requirement is related to a playback time, a playback picture level, and a playback animation effect of each compressed frame in the compressed video;
[0027] Parsing the display requirement to match the frame requirement of the compressed video to obtain a processing event for each compressed frame;
[0028] Establish and count the operation instructions based on each compressed frame processing event and feed them back to the KVM switch;
[0029] When playing the video corresponding to the compressed frame, according to the operation instruction input by the user received by the KVM switch, the display window is controlled to perform corresponding display.
[0030] Preferably, performing frame requirement matching on the compressed video to obtain a processing event for each compressed frame includes:
[0031] The display requirement is analyzed according to three dimensions of playback time, playback picture level, and playback animation effect to respectively obtain a time information set, a picture level set, and an animation effect set based on the timestamp of the video to be processed;
[0032] Aligning the time information set, the picture level set, and the animation effect set according to the timestamp to obtain a processing array of the video frame at each time point;
[0033] At the same time, a first curve based on the time information set, a second curve based on the picture level set, and a third curve based on the animation effect set are sequentially drawn;
[0034] Sequentially lock the highest points in the first curve, the second curve, and the third curve, and determine the horizontal time difference and vertical value difference between each element in each processing array and the nearest highest point, and at the same time, obtain the average value of each element in the corresponding processing array in the sub-time period of the sub-video and the frequency of occurrence of the highest points of different curves intercepted in the sub-time period;
[0035] Determine the effective embodiment coefficient of the corresponding element according to the horizontal time difference, vertical value difference, average value and occurrence frequency;
[0036] Matching the initial event of the corresponding compressed frame in the array-event comparison table;
[0037] According to the event type of the initial event, obtaining a minimum trigger time interval from a type-mechanism-interval comparison table;
[0038] Determining the update time of the corresponding initial event according to the event mechanism of the initial event, the number of occurrences of the same initial event and the total number of frames of the video to be processed;
[0039] Determine the current trigger time interval according to the update time and the minimum trigger time interval;
[0040] Based on the current trigger time interval of the left adjacent frame of the corresponding compressed frame and the current trigger time interval of the right adjacent frame of the corresponding compressed frame, the left trigger time interval and the right trigger time interval of the corresponding compressed frame are obtained;
[0041] Determine the event trigger point of the corresponding compressed frame based on the left trigger time interval and the playback time point of the corresponding compressed frame;
[0042] Determine the event end point of the corresponding compressed frame based on the right trigger time interval and the playback time point of the corresponding compressed frame;
[0043] According to the three effective embodiment coefficients of the corresponding processing array, the trigger sensitivity is set for the corresponding compressed frame, and the processing event of the corresponding compressed frame is obtained in combination with the event trigger point and the event end point set for the corresponding compressed frame.
[0044] Preferably, according to the KVM switch receiving the operation instruction input by the user, controlling the display window to display accordingly also includes:
[0045] Determine whether the KVM switch captures the user triggering the corresponding processing event within the playback time period of the corresponding compressed frame and the corresponding processing event;
[0046] If the captured user trigger time point does not exceed the playback time point of the corresponding compressed frame, the corresponding frame is played;
[0047] If the user trigger time point is captured to exceed the playback time point of the corresponding compressed frame, the trigger operation is recorded, and when the to-be-processed video is completely played, the corresponding compressed frame is repeatedly played according to the recorded operation;
[0048] or
[0049] After all the remaining compressed frames before the event end point of the corresponding compressed frame are played, the compressed frame matching the corresponding event end point is re-locked and replayed according to the corresponding frame requirements.
[0050] The present invention provides a device video processing apparatus based on KVM switch control, comprising:
[0051] A segmentation processing module is used to obtain a to-be-processed video of a target device, and to segment the to-be-processed video to obtain a plurality of sub-videos according to a control logic set of a KVM switch and the target device during the process of obtaining the to-be-processed video;
[0052] A coefficient setting module, used for setting an initial compression coefficient for a corresponding sub-video according to the video attribute and control logic attribute of each sub-video;
[0053] A label assigning module, used to determine the distortion coefficient of each analysis frame according to the grayscale information and brightness distribution of each analysis frame in each sub-video, and assign an enhancement processing label to each analysis frame;
[0054] A classification analysis module, used to determine the current compression coefficient of each analysis frame according to the label assignment result and in combination with the initial compression coefficient, and to classify and analyze all the current compression coefficients to synchronously compress the corresponding sub-videos;
[0055] The display module is used to obtain the user's display requirements to manipulate the synchronously compressed sub-video based on the KVM switch, and transmit it to a matching display window for display based on a corresponding decoding channel.
[0056] The present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to execute the steps of any one of the methods.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] By segmenting the video to be processed and combining it with distortion analysis to set compression coefficients for different frames and then compressing them synchronously, the space occupied by the content can be effectively reduced and the subsequent playback effect can be improved. The user's display requirements can be further controlled and set through the KVM switch to ensure the user's video viewing experience.
[0059] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0060] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0062] Figure 1 This is a flow chart of a device video processing method based on KVM switch control in an embodiment of the present invention;
[0063] Figure 2 The structure diagram of a device video processing apparatus based on KVM switch control in an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0065] The present invention provides a device video processing method based on KVM switch control, such as Figure 1 As shown, including:
[0066] Step 1: obtaining a to-be-processed video of a target device, and dividing the to-be-processed video into a plurality of sub-videos according to a control logic set of a KVM switch and the target device during the process of obtaining the to-be-processed video;
[0067] Step 2: according to the video attributes and control logic attributes of each sub-video, an initial compression coefficient is set for the corresponding sub-video;
[0068] Step 3: Determine the distortion coefficient of each analysis frame according to the grayscale information and brightness distribution of each analysis frame in each sub-video, and assign an enhancement processing label to each analysis frame;
[0069] Step 4: According to the label assignment result and in combination with the initial compression coefficient, determine the current compression coefficient of each analysis frame, and classify and analyze all current compression coefficients to synchronously compress the corresponding sub-videos;
[0070] Step 5: Obtain the user's display requirements to manipulate the synchronously compressed sub-video based on the KVM switch, and transmit it to a matching display window for display based on a corresponding decoding channel.
[0071] In this embodiment, the target device refers to a device that has a control relationship with the KVM switch. For example, the KVM controller can control the computer a1 and the mobile phone b1. At this time, the computer a1 and the mobile phone b1 can both be regarded as target devices.
[0072] In this embodiment, the video to be processed refers to a video generated based on the target device, which can be a video being played by the target device, such as a TV series, or a video obtained by recording and broadcasting the interface of the target device, etc. That is, there is not a unique way to obtain the video, but the basis for obtaining the video is the target device itself. To further explain, the video to be processed refers to a video playback result generated by the logical operation of the target device captured based on the logical operation of the KVM switch on the corresponding target device, that is, after the video to be processed is obtained, the video is logically segmented (the video to be processed is the basis of the video that needs to be played accordingly later), and the segmented sub-videos are processed, so as to achieve subsequent reasonable display.
[0073] In this embodiment, the control logic set includes several control operations of the KVM switch. For example, in the process of acquiring TV series video for computer a1, the KVM switch performs a video playback operation at time t0, performs a video double speed playback operation at time t1, and performs a video clarity improvement operation at time t3. At this time, the video to be processed is divided into four time periods of t0-t1, t1-t2, t2-t3, and t3-end to obtain the corresponding sub-videos in each time period.
[0074] In this embodiment, the video attribute refers to the playback type of the corresponding sub-video, such as entertainment type, romance type, political type, etc., and the control logic attribute refers to the operation type of the corresponding control logic, such as pause type, acceleration type, screenshot type, clarity type, etc.
[0075] In this embodiment, the initial compression coefficient is obtained based on a dual attribute-coefficient comparison table, and the comparison table includes different combination attributes and pre-planned matching coefficients, and can be directly obtained.
[0076] For example, video attributes + control logic attributes -- entertainment type + acceleration type -- the initial compression factor is 3 times.
[0077] In this embodiment, the grayscale information refers to the grayscale value of each pixel after the analysis frame is grayscale processed, and the brightness distribution refers to the component status of the analysis frame based on the RGB channels.
[0078] In this embodiment, the purpose of the enhancement process is to restore the image and avoid distortion as much as possible.
[0079] In this embodiment, the current compression coefficient is a comprehensive result of the label assignment result and the initial compression coefficient.
[0080] In this embodiment, the classification analysis is to group the coefficients under the same level range together to take the average value of all the current compression coefficients grouped together under the statistical range to synchronously compress the corresponding sub-video. For example, the sub-video contains: frame 1, frame 2, frame 3, frame 4 and frame 5, among which frame 1 and frame 4 are one category, and frame 2, frame 3 and frame 5 are another category. At this time, the frames under the corresponding classification are synchronously compressed according to the average value coefficient, which reduces the compression time and improves the compression efficiency.
[0081] In this embodiment, the display requirement is related to the playback time, the playback picture level, and the playback animation effect, wherein the playback requirement of each frame is different and can be determined based on the user's display requirement.
[0082] In this embodiment, the purpose of the manipulation is to determine the processing events of the relevant frames and then feed back the operation instructions of the processing events to the KVM switch, so as to realize the reasonable presentation of the compressed video based on the KVM switch.
[0083] In this embodiment, the decoding channel is used to decode the compressed video to ensure the playback effect.
[0084] In this embodiment, the display window still refers to a device that has a control relationship with the KVM switch, which may be the computer a1 itself, or other devices such as the computer a3.
[0085] The beneficial effects of the above technical solution are: by segmenting the video to be processed and combining distortion analysis to set compression coefficients for different frames and then compressing them synchronously, the space occupied by the content is effectively reduced and the subsequent playback effect is improved. The user's display requirements are further controlled and set through the KVM switch to ensure the user's experience of watching the video.
[0086] The present invention provides a device video processing method based on KVM switch control, which performs segmentation processing on the video to be processed to obtain a plurality of sub-videos, including:
[0087] Acquire the control logic based on the KVM switch input instruction based on the operation-logic comparison table, and count the execution time based on the control logic;
[0088] The video to be processed is divided in sequence according to the execution time to obtain a plurality of sub-videos.
[0089] In this embodiment, the operation-logic comparison table is pre-planned. For example, when the output instruction is double-click, the corresponding control logic is the 2x speed playback logic. Similarly, the execution time under the same control logic can be obtained.
[0090] The beneficial effects of the above technical solution are: the control logic of the instruction is obtained through the comparison table, and by counting the duration, it is convenient to reasonably segment the video to be processed, which provides convenience for subsequent analysis.
[0091] The present invention provides a device video processing method based on KVM switch control, in which the distortion coefficient of each analysis frame is determined according to the grayscale information and brightness distribution of each analysis frame in each sub-video, including:
[0092] Perform grayscale processing on each analysis frame to obtain a grayscale image;
[0093] A three-channel brightness analysis is performed on the analysis frame to obtain a brightness distribution spectrum.
[0094] In this embodiment, the brightness distribution spectrum is implemented using RGB.
[0095] The beneficial effect of the above technical solution is: starting from the grayscale and brightness, it provides a basis for subsequent distortion analysis.
[0096] The present invention provides a device video processing method based on KVM switch control, which assigns an enhanced processing label to each analysis frame, including:
[0097] Compare and analyze the grayscale image and brightness distribution map of each analysis frame with the standard grayscale and standard brightness map of the preset image, determine the distorted pixel points of the corresponding analysis frame, and obtain a first offset feature value based on clarity and a second offset feature value based on color;
[0098] Obtaining a current signal difference between an output signal in a corresponding analysis frame acquisition process and an expected snapshot signal, and obtaining a third offset feature quantity based on the current signal difference;
[0099] Based on the first offset feature quantity, the second offset feature quantity and the third offset feature quantity, a distortion coefficient is determined and compared with a distortion threshold, an enhancement processing method is determined and an enhancement processing label is assigned.
[0100] In this embodiment, the preset image refers to a standard image without distortion (standard grayscale and standard brightness spectrum, pre-planned), which is used as a reference standard. Then, through image comparison and analysis, the distorted pixels can be determined, that is, the representation information of the corresponding pixels has changed, and the representation information refers to the clarity and color.
[0101] In this embodiment, the first offset characteristic quantity of definition=the average value of definition changes of all distorted pixel points+the variance of definition changes of all distorted pixel points;
[0102] The second offset characteristic quantity of chromaticity=the average value of the chromaticity variation of all distorted pixel points+the variance of the chromaticity variation of all distorted pixel points.
[0103] In this embodiment, the third offset feature quantity=the average value of all current signal differences+the variance of all current signal differences.
[0104] In this embodiment, the distortion coefficient = the first normalization coefficient × the first offset feature value + the second normalization coefficient × the second offset feature value + the third normalization coefficient × the third offset feature value, wherein the normalization coefficient is used for numerical normalization to facilitate the unification of calculation dimensions.
[0105] In this embodiment, distortion coefficient / distortion threshold = distortion level, and the enhancement processing method matching the distortion level is obtained from the level-method comparison table, wherein the distortion threshold is pre-set, and the comparison table includes different distortion levels and matching enhancement processing methods, which can be directly matched and obtained.
[0106] And the enhancement processing includes but is not limited to spatial domain enhancement, frequency domain enhancement, etc.
[0107] The beneficial effects of the above technical solution are: obtaining the corresponding offset feature quantity from clarity, color, and signal difference, ensuring the reliability of distortion coefficient acquisition, and combining the distortion threshold to effectively determine the enhancement processing method, perform video enhancement, and provide a basis for subsequent setting of compression coefficient.
[0108] The present invention provides a device video processing method based on KVM switch control, which determines the current compression coefficient of each analysis frame according to the label assignment result and in combination with the initial compression coefficient, including:
[0109] According to the label assignment result, the increased storage capacity of the corresponding analysis frame is obtained;
[0110] Based on the set storage capacity, the initial compression coefficient and the increased storage capacity of all analysis frames, the current compression coefficient of the corresponding analysis frame is obtained.
[0111] In this embodiment, the increased storage amount = the increased amount of pixel storage for the analysis frame as a result of label assignment, that is, after the analysis frame is enhanced, the memory occupied by the enhanced analysis frame minus the original memory of the analysis frame.
[0112] In this embodiment, the current compression coefficient=initial compression coefficient×(1+(increased storage capacity-variance of increased storage capacity of all analysis frames) / set storage capacity-storage error).
[0113] The beneficial effect of the above technical solution is: by obtaining the increased storage capacity of each analysis frame, and combining the initial compression coefficient and the set storage capacity, the current compression coefficient is obtained.
[0114] The present invention provides a device video processing method based on KVM switch control, which obtains the user's display requirements to manipulate the synchronously compressed sub-video based on the KVM switch, including:
[0115] Obtaining a user's display requirement for a display window, wherein the display requirement is related to a playback time, a playback picture level, and a playback animation effect of each compressed frame in the compressed video;
[0116] Parsing the display requirement to match the frame requirement of the compressed video to obtain a processing event for each compressed frame;
[0117] Establish and count the operation instructions based on each compressed frame processing event and feed them back to the KVM switch;
[0118] When playing the video corresponding to the compressed frame, according to the operation instruction input by the user received by the KVM switch, the display window is controlled to perform corresponding display.
[0119] In this embodiment, the display requirement may be specific to each compressed frame. The frame after the video is compressed is called a compressed frame, and the frame before the video is compressed is called an analysis frame.
[0120] In this embodiment, the analysis requirement refers to the way in which each compressed frame needs to be presented, for example, compressed frame 1 needs to be played for 3 seconds, and the playback screen occupies the entire display window, and there is no animation effect.
[0121] In this embodiment, the processing event can derive an operation instruction, which can be controlled based on the KVM switch and will be triggered and implemented only after receiving the instruction input by the user, so as to facilitate user control.
[0122] The beneficial effect of the above technical solution is: by analyzing the display requirements to configure processing events for each compressed frame respectively, it is convenient for users to perform reasonable operations based on the KVM switch, thereby improving the user experience.
[0123] The present invention provides a device video processing method based on KVM switch control, which performs frame requirement matching on the compressed video to obtain a processing event for each compressed frame, including:
[0124] The display requirement is analyzed according to three dimensions of playback time, playback picture level, and playback animation effect to respectively obtain a time information set, a picture level set, and an animation effect set based on the timestamp of the video to be processed;
[0125] Aligning the time information set, the picture level set, and the animation effect set according to the timestamp to obtain a processing array of the video frame at each time point;
[0126] At the same time, a first curve based on the time information set, a second curve based on the picture level set, and a third curve based on the animation effect set are sequentially drawn;
[0127] Sequentially lock the highest points in the first curve, the second curve, and the third curve, and determine the horizontal time difference and vertical value difference between each element in each processing array and the nearest highest point, and at the same time, obtain the average value of each element in the corresponding processing array in the sub-time period of the sub-video and the frequency of occurrence of the highest points of different curves intercepted in the sub-time period;
[0128] Determine the effective embodiment coefficient of the corresponding element according to the horizontal time difference, vertical value difference, average value and occurrence frequency;
[0129] Matching the initial event of the corresponding compressed frame in the array-event comparison table;
[0130] According to the event type of the initial event, obtaining a minimum trigger time interval from a type-mechanism-interval comparison table;
[0131] Determining the update time of the corresponding initial event according to the event mechanism of the initial event, the number of occurrences of the same initial event and the total number of frames of the video to be processed;
[0132] Determine the current trigger time interval according to the update time and the minimum trigger time interval;
[0133] Based on the current trigger time interval of the left adjacent frame of the corresponding compressed frame and the current trigger time interval of the right adjacent frame of the corresponding compressed frame, the left trigger time interval and the right trigger time interval of the corresponding compressed frame are obtained;
[0134] Determine the event trigger point of the corresponding compressed frame based on the left trigger time interval and the playback time point of the corresponding compressed frame;
[0135] Determine the event end point of the corresponding compressed frame based on the right trigger time interval and the playback time point of the corresponding compressed frame;
[0136] According to the three effective embodiment coefficients of the corresponding processing array, the trigger sensitivity is set for the corresponding compressed frame, and the processing event of the corresponding compressed frame is obtained in combination with the event trigger point and the event end point set for the corresponding compressed frame.
[0137] In this embodiment, each video frame in the video to be processed is always regarded as a time point, so there are as many time points as there are video frames, denoted by Zc.
[0138] In this embodiment, alignment processing refers to the alignment of time information, picture level and animation effect according to the same time point, and the processing array = {playback time, playback picture level, playback animation effect of the video frame at the same time point}, wherein the playback time, playback picture level (picture size), and playback animation effect are all adjustable, that is, processing events are set to them to meet the play requirements of the frame.
[0139] In this embodiment, the time information set includes the playback time of the video frames at different time points, the picture level set includes the playback picture size of the video frames at different time points, and the animation effect set includes the animation effects of the video frames at different time points.
[0140] In this embodiment, the curve is drawn based on the timestamp and the required value of the video frame at each time point, and the required value is used to represent the corresponding vertical value.
[0141] In this embodiment, the processing array includes three elements, namely: play time, play picture level and play animation effect.
[0142] In this embodiment, the horizontal time difference and the vertical value difference are both greater than or equal to 0. For example, the highest point of the first curve corresponds to the time point t01, and the vertical value is y1. The corresponding time point of the video frame in the processing array is t02, and the vertical value is y2. At this time, the horizontal time difference is the absolute value of t01-t02, and the vertical value difference is the absolute value of y1-y2.
[0143] In this embodiment, since the sub-video is originally obtained by segmentation, the average value of different elements in the sub-time period can be directly obtained, that is, all vertical values are accumulated and then averaged.
[0144] In this embodiment, the different intercepted curves refer to the curves in the corresponding sub-time period, and the occurrence frequency of the highest point is, for example, the occurrence frequency of y1.
[0145] In this embodiment, the array-event comparison table includes different processing arrays and pre-planned initial events that match the processing arrays, mainly for matching video frames to facilitate subsequent setting of event points.
[0146] In this embodiment, the current trigger time interval of the left adjacent frame corresponding to the compressed frame and the current trigger time interval of the right adjacent frame corresponding to the compressed frame are consistent with the calculation process of the current trigger time interval of the corresponding compressed frame, and the values of the variable parameters involved are different.
[0147] In this embodiment, the type-mechanism-interval comparison table includes the event types of different initial events, the event mechanisms matching the types, and the minimum trigger time interval, providing a data basis for subsequent calculation of the update time and the current time interval.
[0148] In this embodiment, the event mechanism refers to the set operation corresponding to the initial event, such as a single click, double click, long press, etc. of the mouse, that is, to provide a subsequent operation reference based on the KVM switch for the initial event.
[0149] In this embodiment, the calculation method of the effective embodiment coefficient of the corresponding element is as follows:
[0150]
[0151] Among them, Yx is the effective reflection coefficient of the corresponding element; St represents the corresponding vertical value difference; ave1 represents the average value of the corresponding element in the sub-time period of the sub-video; Cp1 represents the frequency of occurrence of the highest point of the corresponding curve intercepted in the corresponding sub-time period; Cp0 represents the total number of time points in the corresponding sub-time period; Ht represents the corresponding horizontal time difference; ΔT represents the time length of the corresponding sub-time period; ΔS represents the vertical value of the highest point of the corresponding curve intercepted in the corresponding sub-time period; e represents a constant, and its value is 2.7.
[0152] In this embodiment, the update time is calculated as follows:
[0153]
[0154] Among them, t inf is the update time corresponding to the initial event; T0 c It represents the setting time of the event mechanism based on the initial event; Sc represents the number of occurrences of the same initial event; Zc represents the total number of video frames to be processed; exp represents the sign of the exponential function; β represents the update error of the event mechanism of the initial event; γ1 and γ2 represent the proportion coefficients, and γ1+γ2=1.
[0155] In this embodiment, the left trigger time interval and the right trigger time interval of the compressed frame are calculated as follows:
[0156]
[0157] Among them, Tz c is the left trigger time interval of the corresponding compressed frame; a1 represents the current trigger time interval of the left adjacent frame of the corresponding compressed frame; a2 represents the current trigger time interval of the corresponding compressed frame; a3 represents the current trigger time interval of the right adjacent frame of the corresponding compressed frame; max represents the maximum value symbol; Δ min Indicates the minimum trigger time interval;
[0158]
[0159] Among them, Ty c is the right trigger time interval corresponding to the compressed frame;
[0160] In this embodiment, the event trigger point is based on the playback time point of the corresponding compressed frame, according to Tz c The time point obtained by extending the corresponding time interval to the left of the playback time point of the corresponding compressed frame is the event trigger point, and according to Ty c The event point obtained by extending the corresponding time interval to the right of the playback time point of the corresponding compressed frame is the event end point.
[0161] In this embodiment, the current trigger time interval is calculated as follows:
[0162] a2=Δ min +t inf ;
[0163] In this embodiment, the trigger sensitivity is obtained based on the matching of the three-coefficient-sensitivity comparison table, and the table is pre-planned. Under normal circumstances, the higher the sensitivity, the higher the possibility of realizing the corresponding control operation.
[0164] The beneficial effects of the above technical solution are: by analyzing the requirements in three dimensions to construct a processing array of video frames at different time points, further by drawing three-dimensional curves and performing horizontal and vertical value analysis to calculate the effective embodiment coefficient of the corresponding element, providing a basis for the subsequent setting of operation sensitivity, and then obtaining the initial event through the array and combining the relevant parameters of the left and right adjacent frames of the compressed frame to set the event trigger point and the event end point, and setting the processing event through the combination of these two aspects to ensure the reliability of control and display.
[0165] The present invention provides a device video processing method based on KVM switch control, which controls a display window to display accordingly according to an operation instruction input by a user received by the KVM switch, and also includes:
[0166] Determine whether the KVM switch captures the user triggering the corresponding processing event within the playback time period of the corresponding compressed frame and the corresponding processing event;
[0167] If the captured user trigger time point does not exceed the playback time point of the corresponding compressed frame, the corresponding frame is played;
[0168] If the user trigger time point is captured to exceed the playback time point of the corresponding compressed frame, the trigger operation is recorded, and when the to-be-processed video is completely played, the corresponding compressed frame is repeatedly played according to the recorded operation;
[0169] or
[0170] After all the remaining compressed frames before the event end point of the corresponding compressed frame are played, the compressed frame matching the corresponding event end point is re-locked and replayed according to the corresponding frame requirements.
[0171] In this embodiment, the playback time period refers to the time period between the event trigger point and the event end point of the corresponding processing event, and the normal playback point of each compressed frame based on the video to be processed is the playback time point.
[0172] However, the playback time point is determined by the actual playback status of the frame before the compressed frame after compression. For example, the original playback time point of the compressed frame A1 is r01. Later, after the frame is adjusted according to the corresponding trigger operation, the playback time point is r02, because the trigger operation will inevitably result in continuous playback or reduced playback of the same frame video.
[0173] The beneficial effect of the above technical solution is: judging whether the KVM switch captures the processing event and combining the judgment result of the playback time point to play the compressed frame accordingly, which can effectively meet user needs based on effective control.
[0174] The present invention provides a device video processing device based on KVM switch control, such as Figure 2 As shown, including:
[0175] A segmentation processing module is used to obtain a to-be-processed video of a target device, and to segment the to-be-processed video to obtain a plurality of sub-videos according to a control logic set of a KVM switch and the target device during the process of obtaining the to-be-processed video;
[0176] A coefficient setting module, used for setting an initial compression coefficient for a corresponding sub-video according to the video attribute and control logic attribute of each sub-video;
[0177] A label assigning module, used to determine the distortion coefficient of each analysis frame according to the grayscale information and brightness distribution of each analysis frame in each sub-video, and assign an enhancement processing label to each analysis frame;
[0178] A classification analysis module, used to determine the current compression coefficient of each analysis frame according to the label assignment result and in combination with the initial compression coefficient, and to classify and analyze all the current compression coefficients to synchronously compress the corresponding sub-videos;
[0179] The display module is used to obtain the user's display requirements to manipulate the synchronously compressed sub-video based on the KVM switch, and transmit it to a matching display window for display based on a corresponding decoding channel.
[0180] The beneficial effects of the above technical solution are: by segmenting the video to be processed and combining distortion analysis to set compression coefficients for different frames and then compressing them synchronously, the space occupied by the content is effectively reduced and the subsequent playback effect is improved. The user's display requirements are further controlled and set through the KVM switch to ensure the user's experience of watching the video.
[0181] The present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to execute the steps of any one of the methods.
[0182] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A device video processing method based on KVM switch control, characterized in that: include: Step 1: obtaining a to-be-processed video of a target device, and dividing the to-be-processed video into a plurality of sub-videos according to a control logic set of a KVM switch and the target device during the process of obtaining the to-be-processed video; Step 2: according to the video attributes and control logic attributes of each sub-video, an initial compression coefficient is set for the corresponding sub-video; Step 3: Determine the distortion coefficient of each analysis frame according to the grayscale information and brightness distribution of each analysis frame in each sub-video, and assign an enhancement processing label to each analysis frame; Step 4: According to the label assignment result and in combination with the initial compression coefficient, determine the current compression coefficient of each analysis frame, and classify and analyze all current compression coefficients to synchronously compress the corresponding sub-videos; Step 5: Obtain the user's display requirements to manipulate the synchronously compressed sub-video based on the KVM switch, and transmit it to a matching display window for display based on a corresponding decoding channel.
2. The device video processing method based on KVM switch control according to claim 1, characterized in that: The video to be processed is segmented to obtain a plurality of sub-videos, including: Acquire the control logic based on the KVM switch input instruction based on the operation-logic comparison table, and count the execution time based on the control logic; The video to be processed is divided in sequence according to the execution time to obtain a plurality of sub-videos.
3. The device video processing method based on KVM switch control according to claim 1, characterized in that: The process of determining the distortion coefficient of each analysis frame according to the grayscale information and brightness distribution of each analysis frame in each sub-video includes: Perform grayscale processing on each analysis frame to obtain a grayscale image; A three-channel brightness analysis is performed on the analysis frame to obtain a brightness distribution spectrum.
4. The device video processing method based on KVM switch control according to claim 3 is characterized in that: Each analyzed frame is assigned an enhanced processing label, including: Compare and analyze the grayscale image and brightness distribution map of each analysis frame with the standard grayscale and standard brightness map of the preset image, determine the distorted pixel points of the corresponding analysis frame, and obtain a first offset feature value based on clarity and a second offset feature value based on color; Obtaining a current signal difference between an output signal in a corresponding analysis frame acquisition process and an expected snapshot signal, and obtaining a third offset feature quantity based on the current signal difference; Based on the first offset feature quantity, the second offset feature quantity and the third offset feature quantity, a distortion coefficient is determined and compared with a distortion threshold, an enhancement processing method is determined and an enhancement processing label is assigned.
5. The device video processing method based on KVM switch control according to claim 1, characterized in that: According to the label assignment result and in combination with the initial compression coefficient, the current compression coefficient of each analysis frame is determined, including: According to the label assignment result, the increased storage capacity of the corresponding analysis frame is obtained; Based on the set storage capacity, the initial compression coefficient and the increased storage capacity of all analysis frames, the current compression coefficient of the corresponding analysis frame is obtained.
6. The device video processing method based on KVM switch control according to claim 1, characterized in that: Obtain the user's display requirements to manipulate the synchronously compressed sub-video based on the KVM switch, including: Obtaining a user's display requirement for a display window, wherein the display requirement is related to a playback time, a playback picture level, and a playback animation effect of each compressed frame in the compressed video; Parsing the display requirement to match the frame requirement of the compressed video to obtain a processing event for each compressed frame; Establish and count the operation instructions based on each compressed frame processing event and feed them back to the KVM switch; When playing the video corresponding to the compressed frame, according to the operation instruction input by the user received by the KVM switch, the display window is controlled to perform corresponding display.
7. The device video processing method based on KVM switch control according to claim 6, characterized in that: Performing frame requirement matching on the compressed video to obtain a processing event for each compressed frame includes: The display requirement is analyzed according to three dimensions of playback time, playback picture level, and playback animation effect to respectively obtain a time information set, a picture level set, and an animation effect set based on the timestamp of the video to be processed; Aligning the time information set, the picture level set, and the animation effect set according to the timestamp to obtain a processing array of the video frame at each time point; At the same time, a first curve based on the time information set, a second curve based on the picture level set, and a third curve based on the animation effect set are sequentially drawn; Sequentially lock the highest points in the first curve, the second curve, and the third curve, and determine the horizontal time difference and vertical value difference between each element in each processing array and the nearest highest point, and at the same time, obtain the average value of each element in the corresponding processing array in the sub-time period of the sub-video and the frequency of occurrence of the highest points of different curves intercepted in the sub-time period; Determine the effective embodiment coefficient of the corresponding element according to the horizontal time difference, vertical value difference, average value and occurrence frequency; Matching the initial event of the corresponding compressed frame in the array-event comparison table; According to the event type of the initial event, obtaining a minimum trigger time interval from a type-mechanism-interval comparison table; Determining the update time of the corresponding initial event according to the event mechanism of the initial event, the number of occurrences of the same initial event and the total number of frames of the video to be processed; Determine the current trigger time interval according to the update time and the minimum trigger time interval; Based on the current trigger time interval of the left adjacent frame of the corresponding compressed frame and the current trigger time interval of the right adjacent frame of the corresponding compressed frame, the left trigger time interval and the right trigger time interval of the corresponding compressed frame are obtained; Determine the event trigger point of the corresponding compressed frame based on the left trigger time interval and the playback time point of the corresponding compressed frame; Determine the event end point of the corresponding compressed frame based on the right trigger time interval and the playback time point of the corresponding compressed frame; According to the three effective embodiment coefficients of the corresponding processing array, the trigger sensitivity is set for the corresponding compressed frame, and the processing event of the corresponding compressed frame is obtained in combination with the event trigger point and the event end point set for the corresponding compressed frame.
8. The device video processing method based on KVM switch control according to claim 7, characterized in that: According to the operation instruction input by the user received by the KVM switch, the display window is controlled to display accordingly, and further includes: Determine whether the KVM switch captures the user triggering the corresponding processing event within the playback time period of the corresponding compressed frame and the corresponding processing event; If the captured user trigger time point does not exceed the playback time point of the corresponding compressed frame, the corresponding frame is played; If the user trigger time point is captured to exceed the playback time point of the corresponding compressed frame, the trigger operation is recorded, and when the to-be-processed video is completely played, the corresponding compressed frame is repeatedly played according to the recorded operation; or After all the remaining compressed frames before the event end point of the corresponding compressed frame are played, the compressed frame matching the corresponding event end point is re-locked and replayed according to the corresponding frame requirements.
9. A device video processing device based on KVM switch control, characterized in that: include: A segmentation processing module is used to obtain a to-be-processed video of a target device, and to segment the to-be-processed video to obtain a plurality of sub-videos according to a control logic set of a KVM switch and the target device during the process of obtaining the to-be-processed video; A coefficient setting module, used for setting an initial compression coefficient for a corresponding sub-video according to the video attribute and control logic attribute of each sub-video; A label assigning module, used to determine the distortion coefficient of each analysis frame according to the grayscale information and brightness distribution of each analysis frame in each sub-video, and assign an enhancement processing label to each analysis frame; A classification analysis module, used to determine the current compression coefficient of each analysis frame according to the label assignment result and in combination with the initial compression coefficient, and to classify and analyze all the current compression coefficients to synchronously compress the corresponding sub-videos; The display module is used to obtain the user's display requirements to manipulate the synchronously compressed sub-video based on the KVM switch, and transmit it to a matching display window for display based on a corresponding decoding channel.
10. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for outputting information
CN110248195A
Video frame compression and decompression method and equipment
CN113194313A