WO2023160210A1 - 提高kvm显示数据实时性的方法、系统、设备和存储介质 - Google Patents

提高kvm显示数据实时性的方法、系统、设备和存储介质 Download PDF

Info

Publication number
WO2023160210A1
WO2023160210A1 PCT/CN2022/142090 CN2022142090W WO2023160210A1 WO 2023160210 A1 WO2023160210 A1 WO 2023160210A1 CN 2022142090 W CN2022142090 W CN 2022142090W WO 2023160210 A1 WO2023160210 A1 WO 2023160210A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
port number
image file
buffer
jpeg
Prior art date
Application number
PCT/CN2022/142090
Other languages
English (en)
French (fr)
Inventor
曲燕
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2023160210A1 publication Critical patent/WO2023160210A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Definitions

  • the present application relates to the field of data display, and more specifically refers to a method, system, device and storage medium for improving the real-time performance of KVM display data.
  • the server HOST (host) side OS (Operating System, operating system) can directly output and display through the VGA (Video Graphics Array, video graphics array) display interface, and can also use H5/JAVA remote display through console redirection. That is, the KVM (Kernel-based Virtual Machine, kernel-based virtual machine) function.
  • VGA Video Graphics Array, video graphics array
  • KVM Kernel-based Virtual Machine, kernel-based virtual machine
  • the server BMC Board Management Controller, Baseboard Management Controller
  • technical video data is transmitted to the KVM front-end display in YUV (a color coding method) compressed format, which limits the video output format of the hardware chip to YUV format.
  • YUV a color coding method
  • Supporting YUV format video data output requires software for format conversion, which will reduce the real-time performance of KVM display data.
  • the purpose of the embodiment of the present application is to propose a method, system, computer equipment and non-volatile readable storage medium for improving the real-time performance of KVM display data.
  • the function for managing the input and output channels captures the original compressed data on the hardware and saves it as a JPEG (Joint Photographic Experts Group, a standard for continuous-tone static image compression) compression format image file, using JPEG Direct transmission of KVM display, JPEG data transmission will occupy less bandwidth in terms of compression rate, and the transmission rate is faster.
  • JPEG Joint Photographic Experts Group
  • an aspect of the embodiment of the present application provides a method for improving the real-time performance of KVM display data, including the following steps: creating a websocket on the server side to monitor a fixed port number; creating a thread for grabbing video data, and grabbing video data
  • the function that manages the input and output channels is called cyclically in the thread, captures the original compressed data on the hardware and saves it as a JPEG compressed image file; reads the JPEG compressed image file into the buffer corresponding to the port number; and responds to the client Access to a fixed port number, and capture JPEG compressed image files in the buffer in real time through socket communication for display.
  • capturing the original compressed data on the hardware and storing it as a JPEG compressed image file includes: mapping the physical address corresponding to the original compressed data on the hardware to an operable virtual address, capturing the data in the virtual address, And the data of captured picture resolution size is stored as a picture file in JPEG compression format.
  • reading the image file in JPEG compression format to the buffer corresponding to the port number includes: using the send function to read the socket pointing to the buffer corresponding to the port number.
  • capturing and displaying the JPEG compressed image file in the buffer in real time through socket communication includes: using the recv function on the port monitored by the server to receive the image data and display it to the Kvm client component.
  • Another aspect of the embodiment of the present application provides a system for improving the real-time performance of KVM display data, including: a monitoring module configured to create a websocket on the server side to monitor a fixed port number; a capture module configured to create a capture The video data thread, in the capture video data thread, cyclically calls the function that manages the input and output channels, captures the original compressed data on the hardware and saves it as a JPEG compression format image file; the reading module is configured to convert the JPEG compression format image file The file is read into the buffer corresponding to the port number; and the display module is configured to respond to the client accessing the fixed port number, and capture the JPEG compressed image file in the buffer in real time through socket communication for display.
  • the capture module is configured to: map the physical address corresponding to the original compressed data on the hardware to an operable virtual address, capture the data in the virtual address, and convert the captured image resolution size
  • the data is stored as image files in JPEG compression format.
  • the reading module is configured to: use the send function to read the socket pointing to the cache corresponding to the port number.
  • the display module is configured to: use the recv function on the port monitored by the server to receive image data and display it to the Kvm client component.
  • a computer device including: at least one processor; and a memory, the memory stores computer instructions that can be run on the processor, and when the instructions are executed by the processor, the above method is implemented. step.
  • a non-volatile readable storage medium stores a computer program that implements the above method steps when executed by a processor.
  • the application has the following beneficial technical effects: the KVM supports real-time capture of JPEG picture compression format data, and reduces the bandwidth occupation of remote control redirection.
  • Fig. 1 is the schematic diagram of the embodiment of the method for improving the real-time performance of KVM display data provided by the application;
  • Fig. 2 is the schematic diagram of the embodiment of the system that improves the real-time performance of KVM display data provided by the application;
  • Fig. 3 is the hardware structure schematic diagram of the embodiment of the computer equipment that improves the real-time performance of KVM display data provided by the application;
  • FIG. 4 is a schematic diagram of an embodiment of a computer storage medium for improving the real-time performance of KVM display data provided by the present application.
  • FIG. 1 is a schematic diagram of an embodiment of a method for improving the real-time performance of KVM display data provided by the present application. As shown in Figure 1, the embodiment of the present application includes the following steps:
  • the image file in JPEG compression format is captured in the buffer zone in real time through socket communication for display.
  • the WebSocket protocol is a new network protocol based on TCP (Transmission Control Protocol, Transmission Control Protocol). It implements full-duplex (full-duplex) communication between the browser and the server - allowing the server to actively send information to the client.
  • the WebSocket protocol supports full-duplex communication between a client (running untrusted code in a controlled environment) and a remote host (who has opted in to that code's communication).
  • the security model used for this is the primitive-based security model commonly used by Web (web) browsers.
  • the protocol consists of an opening handshake followed by message frames on the TCP layer.
  • the goal of this technology is to provide browser-based, two-way communication with the server (the server cannot rely on opening multiple HTTP (Hyper Text Transfer Protocol, Hypertext Transfer Protocol) connections (for example, using XMLHttpRequest or ⁇ iframe> and long Polling)) applications provide a communication mechanism.
  • HTTP Hyper Text Transfer Protocol
  • Hypertext Transfer Protocol Hypertext Transfer Protocol
  • IOCTL is a function for managing the I/O (Input/Output, input/output) channel of the device in the device driver. The so-called management of the I/O channel is to control some characteristics of the device, such as the transmission baud rate of the serial port, the speed of the motor, and so on.
  • the IOCTL function is an attribute component in the file structure, that is to say, if the driver provides support for IOCTL, the user can use the IOCTL function to control the I/O channel of the device in the user program.
  • capturing the original compressed data on the hardware and storing it as a JPEG compressed image file includes: mapping the physical address corresponding to the original compressed data on the hardware to an operable virtual address, capturing the data in the virtual address, And the data of captured picture resolution size is stored as a picture file in JPEG compression format.
  • Framebuffer is the original compressed data on the hardware (the type of compression format is determined according to the hardware encoder of the chip). In this case, it is the JPEG compression format.
  • the physical address corresponding to the framebuffer is mapped to an operable virtual address, and the virtual address is captured.
  • the data is to operate the data in the framebuffer, and store the captured image resolution size data as a .JPEG compressed image file (for example, 800*600).
  • Reading the image file in JPEG compression format to the buffer corresponding to the port number includes: using the send function to read the socket pointing to the buffer corresponding to the port number.
  • the socket corresponding to the port number points to the buffer.
  • (socket pointing to buffer is a buffer that can receive and send data through the recv (receive)/send function). Socket is an abstraction layer between the application layer and the transport layer.
  • Socket originated in UNIX. Under the idea that everything in Unix is a file, inter-process communication is named as a file descriptor (file descriptor). Socket is an implementation of the "open-read/write-close" mode. Servers and clients Each end maintains a "file”. After the connection is established and opened, it can write content to the file for the other party to read or read the content of the other party, and close the file when the communication ends.
  • the image file in JPEG compression format is captured and displayed in the buffer in real time through socket communication.
  • the web-side listening port uses recv to receive image data and display it to the Kvm client component.
  • capturing and displaying the JPEG compressed image file in the buffer in real time through socket communication includes: using the recv function on the port monitored by the server to receive the image data and display it to the Kvm client component.
  • This application captures the original compressed data on the hardware and saves it as a JPEG compressed image file by cyclically calling the function that manages the input and output channels in the video data capture thread, and uses JPEG to directly transmit KVM display.
  • JPEG data transmission It will take up less bandwidth, and the transfer rate is faster.
  • each step in each embodiment of the above-mentioned method for improving the real-time performance of KVM display data can intersect, replace, increase, and delete each other.
  • the specific methods should also belong to the protection scope of the present application, and the protection scope of the present application should not be limited to the embodiments.
  • the second aspect of the embodiments of the present application proposes a system for improving the real-time performance of KVM display data.
  • the system 200 includes the following modules: a monitoring module configured to create a websocket on the server side to monitor a fixed port number; a grabbing module configured to create a thread for grabbing video data, which loops in the thread for grabbing video data Call the function that manages the input and output channels, capture the original compressed data on the hardware and save it as a JPEG compressed image file; the reading module is configured to read the JPEG compressed image file to the buffer corresponding to the port number; and The display module is configured to respond to the client accessing the fixed port number, and capture the JPEG compressed image file in the buffer in real time through socket communication for display.
  • the capture module is configured to: map the physical address corresponding to the original compressed data on the hardware to an operable virtual address, capture the data in the virtual address, and convert the captured image resolution size
  • the data is stored as image files in JPEG compression format.
  • the reading module is configured to: use the send function to read the socket pointing to the cache corresponding to the port number.
  • the display module is configured to: use the recv function on the port monitored by the server to receive image data and display it to the Kvm client component.
  • the third aspect of the embodiments of the present application proposes a computer device, including: at least one processor; and a memory, the memory stores computer instructions that can run on the processor, and the instructions are executed by the processor to The following steps are implemented: S1. Create a websocket on the server side to listen to a fixed port number; S2.
  • the data is stored as a JPEG compressed image file; S3, read the JPEG compressed image file into the buffer corresponding to the port number; and S4, in response to the client accessing the fixed port number, capture the JPEG compression in the buffer in real time through socket communication format image file for display.
  • capturing the original compressed data on the hardware and storing it as a JPEG compressed image file includes: mapping the physical address corresponding to the original compressed data on the hardware to an operable virtual address, capturing the data in the virtual address, And the data of captured picture resolution size is stored as a picture file in JPEG compression format.
  • reading the image file in JPEG compression format to the buffer corresponding to the port number includes: using the send function to read the socket pointing to the buffer corresponding to the port number.
  • capturing and displaying the JPEG compressed image file in the buffer in real time through socket communication includes: using the recv function on the port monitored by the server to receive the image data and display it to the Kvm client component.
  • FIG. 3 it is a schematic diagram of the hardware structure of an embodiment of the computer device for improving the real-time performance of KVM display data provided by the present application.
  • the device includes a processor 301 and a memory 302 .
  • the processor 301 and the memory 302 may be connected through a bus or in other ways, and the connection through a bus is taken as an example in FIG. 3 .
  • the memory 302 as a non-volatile non-volatile readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as improving the KVM display data in the embodiment of the present application.
  • the program instructions/modules corresponding to the real-time method.
  • the processor 301 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 302, that is, to realize the method of improving the real-time performance of KVM display data.
  • the memory 302 can include a program storage area and a data storage area, wherein the program storage area can store the operating system and at least one application program required by the function; data etc.
  • the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices.
  • the memory 302 may optionally include memory that is remotely located relative to the processor 301, and these remote memories may be connected to the local module through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • One or more computer instructions 303 corresponding to the method for improving the real-time performance of KVM display data are stored in the memory 302, and when executed by the processor 301, the method for improving the real-time performance of KVM display data in any of the above method embodiments is executed.
  • Any one embodiment of the computer device that executes the above-mentioned method for improving the real-time performance of KVM display data can achieve the same or similar effects as any of the above-mentioned method embodiments corresponding thereto.
  • the present application also provides a non-volatile readable storage medium.
  • the non-volatile readable storage medium stores a computer program for executing the method for improving the real-time performance of KVM display data when executed by a processor.
  • FIG. 4 it is a schematic diagram of an embodiment of the computer storage medium for improving the real-time performance of KVM display data provided by the present application.
  • the non-volatile readable storage medium 401 stores a computer program 402 for executing the above method when executed by a processor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请提供一种提高KVM显示数据实时性的方法、系统、设备和存储介质,方法包括:在服务器端创建websocket监听固定端口号;创建抓取视频数据线程,在抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件;将JPEG压缩格式图片文件读取到对应端口号的缓冲区;以及响应于客户端访问固定端口号,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示。本发明能够实时抓取JPEG压缩格式图片数据,并降低远程控制重定向带宽占用。

Description

提高KVM显示数据实时性的方法、系统、设备和存储介质
相关申请的交叉引用
本申请要求于2022年02月22日提交中国专利局,申请号为202210161592.X,申请名称为“提高KVM显示数据实时性的方法、系统、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据显示领域,更具体地,特别是指一种提高KVM显示数据实时性的方法、系统、设备和存储介质。
背景技术
服务器HOST(主机)端OS(Operating System,操作系统)可以通过VGA(Video Graphics Array,视频图形阵列)显示器接口直接输出显示,还可以通过控制台重定向的方式,使用H5/JAVA远端显示,即KVM(Kernel-based Virtual Machine,基于内核的虚拟机)功能。
目前服务器BMC(Board Management Controller,基板管理控制器)技术视频数据是以YUV(一种颜色编码方法)压缩格式传输至KVM前端显示,这就限定了硬件芯片的视频输出格式为YUV格式,若不支持YUV格式视频数据输出,则需要软件进行格式转化,会降低KVM显示数据的实时性。
发明内容
有鉴于此,本申请实施例的目的在于提出一种提高KVM显示数据实时性的方法、系统、计算机设备及非易失性可读存储介质,本申请通过在抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG(Joint Photographic Experts Group,联合图像专家组,是用于连续色调静态图像压缩的一种标准)压缩格式图片文件,使用JPEG直接传送KVM显示,压缩率方面JPEG数据传递会占用较少的带宽,而且传输速率较快。
基于上述目的,本申请实施例的一方面提供了一种提高KVM显示数据实时性的方法,包括如下步骤:在服务器端创建websocket监听固定端口号;创建抓取视频数据线程,在抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件;将JPEG压缩格式图片文件读取到对应端口号的缓冲区;以及响应于客户端访问固定端口号,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示。
在一些实施方式中,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件包括:将硬件上的原始压缩数据对应的物理地址映射为能够操作的虚拟地址,抓取虚拟地址中的数据,并将抓取到的图片分辨率大小的数据存储为JPEG压缩格式的图片文件。
在一些实施方式中,将JPEG压缩格式图片文件读取到对应端口号的缓冲区包括:使用send函数读取到对应端口号的socket指向缓存。
在一些实施方式中,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示包括:服务器端监听的端口使用recv函数接收图片数据显示至Kvm客户端组件。
本申请实施例的另一方面,提供了一种提高KVM显示数据实时性的系统,包括:监听模块,配置用于在服务器端创建websocket监听固定端口号;抓取模块,配置用于创建抓取视频数据线程,在抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件;读取模块,配置用于将JPEG压缩格式图片文件读取到对应端口号的缓冲区;以及显示模块,配置用于响应于客户端访问固定端口号,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示。
在一些实施方式中,抓取模块配置用于:将硬件上的原始压缩数据对应的物理地址映射为能够操作的虚拟地址,抓取虚拟地址中的数据,并将抓取到的图片分辨率大小的数据存储为JPEG压缩格式的图片文件。
在一些实施方式中,读取模块配置用于:使用send函数读取到对应端口号的socket指向缓存。
在一些实施方式中,显示模块配置用于:服务器端监听的端口使用recv函数接收图片数据显示至Kvm客户端组件。
本申请实施例的又一方面,还提供了一种计算机设备,包括:至少一个处理器;以及存储器,存储器存储有可在处理器上运行的计算机指令,指令由处理器执行时实现如上方法的步骤。
本申请实施例的再一方面,还提供了一种非易失性可读存储介质,非易失性可读存储介质存储有被处理器执行时实现如上方法步骤的计算机程序。
本申请具有以下有益技术效果:KVM支持实时抓取JPEG图片压缩格式数据,并降低远程控制重定向带宽占用。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1为本申请提供的提高KVM显示数据实时性的方法的实施例的示意图;
图2为本申请提供的提高KVM显示数据实时性的系统的实施例的示意图;
图3为本申请提供的提高KVM显示数据实时性的计算机设备的实施例的硬件结构示意图;
图4为本申请提供的提高KVM显示数据实时性的计算机存储介质的实施例的示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本申请实施例进一步详细说明。
需要说明的是,本申请实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本申请实施例的限定,后续实施例对此不再一一说明。
本申请实施例的第一个方面,提出了一种提高KVM显示数据实时性的方法的实施例。图1示出的是本申请提供的提高KVM显示数据实时性的方法的实施例的示意图。如图1所示,本申请实施例包括如下步骤:
S1、在服务器端创建websocket监听固定端口号;
S2、创建抓取视频数据线程,在抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件;
S3、将JPEG压缩格式图片文件读取到对应端口号的缓冲区;以及
S4、响应于客户端访问固定端口号,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示。
在服务器端创建websocket监听固定端口号。远端KVM以H5为例,web服务器端创建websocket监听固定端口号。WebSocket协议是基于TCP(Transmission Control Protocol,传输控制协议)的一种新的网络协议。它实现了浏览器与服务器全双工(full-duplex)通信——允许服务器主动发送信息给客户端。WebSocket协议支持(在受控环境中运行不受信任的代码的)客户端与(选择加入该代码的通信的)远程主机之间进行全双工通信。用于此的安全模型是Web(网页)浏览器常用的基于原始的安全模式。协议包括一个开放的握手以及随后的TCP层上的消息帧。该技术的目标是为基于浏览器的、需要和服务器进行双向通信的(服务器不能依赖于打开多个HTTP(Hyper Text Transfer Protocol,超文本传输协议)连接(例如,使用XMLHttpRequest或<iframe>和长轮询))应用程序提供一种通信机制。本申请实施例对端口号没有特别要求,但需要是个固定的端口号(比如8811,web服务器与客户端可以按端口号进行socket通信)。
创建抓取视频数据线程,在抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件。服务器端创建抓取视频数据线程,线程中循环调用video驱动的IOCTL,将framebuffer数据即JPEG数据抓取并存为.JPEG压缩格式图片文件。IOCTL是设备驱动程序中对设备的I/O(Input/Output,输入/输出)通道进行管理的函数。所谓对I/O通道进行管理,就是对设备的一些特性进行控制,例如串口的传输波特率、马达的转速等等。它的参数个数如下:int ioctl(int fd,int cmd,…);其中fd就是用户程序打开设备时使用open函数返回的文件标示符,cmd就是用户程序对设备的控制命令,至于后面的省略号,那是一些补充参数,一般最多一个,有或没有是和cmd的意义相关的。IOCTL函数是文件结构中的一个属性分量,就是说如果驱动程序提供了对IOCTL的支持,用户就能在用户程序中使用IOCTL函数控制设备的I/O通道。
在一些实施方式中,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件包括:将硬件上的原始压缩数据对应的物理地址映射为能够操作的虚拟地址,抓取虚拟地址中的数据,并将抓取到的图片分辨率大小的数据存储为JPEG压缩格式的图片文件。Framebuffer为硬件上的原始压缩数据(根据芯片的硬件编码器决定压缩格式的类型),本案例中为JPEG压缩格式,将framebuffer对应的物理地址映射为可以操作的虚拟地址,抓取虚拟地址中的 数据即操作framebuffer中的数据,将抓取图片分辨率大小的数据存储为.JPEG压缩格式的图片文件(例如800*600)。
将JPEG压缩格式图片文件读取到对应端口号的缓冲区。在一些实施方式中,将JPEG压缩格式图片文件读取到对应端口号的缓冲区包括:使用send函数读取到对应端口号的socket指向缓存。将抓取的JPEG压缩格式图片文件读取到socket(套接字)指向buffer(缓存),由于图片通过web显示是需要socket通信,所以图片抓取后使用标准的send(发送)函数读取到对应端口号的socket指向buffer。(socket指向buffer是可以通过recv(接收)/send函数进行接收和发送数据的缓冲区)。Socket是在应用层和传输层之间的一个抽象层,它把TCP/IP层复杂的操作抽象为几个简单的接口,供应用层调用实现进程在网络中的通信。Socket起源于UNIX,在Unix一切皆文件的思想下,进程间通信就被冠名为文件描述符(file desciptor),Socket是一种“打开—读/写—关闭”模式的实现,服务器和客户端各自维护一个“文件”,在建立连接打开后,可以向文件写入内容供对方读取或者读取对方内容,通讯结束时关闭文件。
响应于客户端访问固定端口号,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示。web端监听端口使用recv接收图片数据显示至Kvm客户端组件。
在一些实施方式中,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示包括:服务器端监听的端口使用recv函数接收图片数据显示至Kvm客户端组件。
本申请通过在抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件,使用JPEG直接传送KVM显示,压缩率方面JPEG数据传递会占用较少的带宽,而且传输速率较快。
需要特别指出的是,上述提高KVM显示数据实时性的方法的各个实施例中的各个步骤均可以相互交叉、替换、增加、删减,因此,这些合理的排列组合变换之于提高KVM显示数据实时性的方法也应当属于本申请的保护范围,并且不应将本申请的保护范围局限在实施例之上。
基于上述目的,本申请实施例的第二个方面,提出了一种提高KVM显示数据实时性的系统。如图2所示,系统200包括如下模块:监听模块,配置用于在服务器端创建websocket监听固定端口号;抓取模块,配置用于创建抓取视频数据线程,在抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件;读取模块,配置用于将JPEG压缩格式图片文件读取到对应端口号的缓冲区;以及显示模块,配置用于响应于客户端访问固定端口号,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示。
在一些实施方式中,抓取模块配置用于:将硬件上的原始压缩数据对应的物理地址映射为能够操作的虚拟地址,抓取虚拟地址中的数据,并将抓取到的图片分辨率大小的数据存储为JPEG压缩格式的图片文件。
在一些实施方式中,读取模块配置用于:使用send函数读取到对应端口号的socket指向缓存。
在一些实施方式中,显示模块配置用于:服务器端监听的端口使用recv函数接收图片数据显示至Kvm客户端组件。
基于上述目的,本申请实施例的第三个方面,提出了一种计算机设备,包括:至少一个处理器;以及存储器,存储器存储有可在处理器上运行的计算机指令,指令由处理器执行以实现如下步骤:S1、在服务器端创建websocket监听固定端口号;S2、创建抓取视频数据线程,在抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件;S3、将JPEG压缩格式图片文件读取到对应端口号的缓冲区;以及S4、响应于客户端访问固定端口号,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示。
在一些实施方式中,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件包括:将硬件上的原始压缩数据对应的物理地址映射为能够操作的虚拟地址,抓取虚拟地址中的数据,并将抓取到的图片分辨率大小的数据存储为JPEG压缩格式的图片文件。
在一些实施方式中,将JPEG压缩格式图片文件读取到对应端口号的缓冲区包括:使用send函数读取到对应端口号的socket指向缓存。
在一些实施方式中,通过socket通信在缓冲区实时抓取JPEG压缩格式图片文件进行显示包括:服务器端监听的端口使用recv函数接收图片数据显示至Kvm客户端组件。
如图3所示,为本申请提供的上述提高KVM显示数据实时性的计算机设备的一个实施例的硬件结构示意图。
以如图3所示的装置为例,在该装置中包括一个处理器301以及一个存储器302。
处理器301和存储器302可以通过总线或者其他方式连接,图3中以通过总线连接为例。
存储器302作为一种非易失性非易失性可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的提高KVM显示数据实时性的方法对应的程序指令/模块。处理器301通过运行存储在存储器302中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现提高KVM显示数据实时性的方法。
存储器302可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据提高KVM显示数据实时性的方法的使用所创建的数据等。此外,存储器302可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器302可选包括相对于处理器301远程设置的存储器,这些远程存储器可以通过网络连接至本地模块。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
一个或者多个提高KVM显示数据实时性的方法对应的计算机指令303存储在存储器302中,当被处理器301执行时,执行上述任意方法实施例中的提高KVM显示数据实时性的方法。
执行上述提高KVM显示数据实时性的方法的计算机设备的任何一个实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
本申请还提供了一种非易失性可读存储介质,非易失性可读存储介质存储有被处理器执行时执行提高KVM显示数据实时性的方法的计算机程序。
如图4所示,为本申请提供的上述提高KVM显示数据实时性的计算机存储介质的一个实施例的示意图。以如图4所示的计算机存储介质为例,非易失性可读存储介质401存储有被处理器执行时执行如上方法的计算机程序402。
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关硬件来完成,提高KVM显示数据实时性的方法的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,程序的存储介质可为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。上述计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
以上是本申请公开的示例性实施例,但是应当注意,在不背离权利要求限定的本申请实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本申请实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本申请实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,程序可以存储于一种非易失性可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本申请实施例公开的范围(包括权利要求)被限于这些例子;在本申请实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本申请实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本申请实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。

Claims (20)

  1. 一种提高基于内核的虚拟机显示数据实时性的方法,其特征在于,包括如下步骤:
    在服务器端创建websocket监听固定端口号;
    创建抓取视频数据线程,在所述抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件;
    将所述JPEG压缩格式图片文件读取到对应端口号的缓冲区;以及
    响应于客户端访问所述固定端口号,通过socket通信在所述缓冲区实时抓取JPEG压缩格式图片文件进行显示。
  2. 根据权利要求1所述的方法,其特征在于,所述抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件包括:
    将硬件上的原始压缩数据对应的物理地址映射为能够操作的虚拟地址,抓取虚拟地址中的数据,并将抓取到的图片分辨率大小的数据存储为JPEG压缩格式的图片文件。
  3. 根据权利要求1所述的方法,其特征在于,所述将所述JPEG压缩格式图片文件读取到对应端口号的缓冲区包括:
    使用send函数读取到对应端口号的socket指向缓存。
  4. 根据权利要求1所述的方法,其特征在于,所述通过socket通信在所述缓冲区实时抓取JPEG压缩格式图片文件进行显示包括:
    服务器端监听的端口使用recv函数接收图片数据显示至Kvm客户端组件。
  5. 根据权利要求1所述的方法,其特征在于,所述通过socket通信在所述缓冲区实时抓取JPEG压缩格式图片文件进行显示包括:
    web端监听端口使用recv接收图片数据显示至KVM客户端组件。
  6. 根据权利要求1所述的方法,其特征在于,所述远端KVM为H5,所述在服务器端创建websocket监听固定端口号包括:
    在web服务器端创建websocket监听固定端口号。
  7. 根据权利要求1所述的方法,其特征在于,所述创建抓取视频数据线程,在所述抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件:
    创建抓取视频数据线程,在线程中循环调用video驱动的IOCTL,抓取framebuffer数据并存为JPEG压缩格式图片文件。
  8. 根据权利要求7所述的方法,其特征在于,所述IOCTL为用于设备驱动程序中对设备的I/O通道进行管理的函数。
  9. 根据权利要求8所述的方法,其特征在于,所述对I/O通道进行管理为对设备的特性进行控制。
  10. 根据权利要求9所述的方法,其特征在于,所述特性至少包括如下的一种:串口的传输波特率、马达的转速。
  11. 根据权利要求3所述的方法,其特征在于,所述使用send函数读取到对应端口号的socket指向缓存包括:
    将抓取的所述JPEG压缩格式图片文件读取到socket指向缓存,并使用标准的send 函数读取到对应端口号的socket指向缓存。
  12. 根据权利要求11所述的方法,其特征在于,socket指向缓存为通过recv函数进行接收和发送数据的缓冲区。
  13. 根据权利要求11所述的方法,其特征在于,socket指向缓存为通过send函数进行接收和发送数据的缓冲区。
  14. 根据权利要求1所述的方法,其特征在于,所述websocket用于支持所述客户端与所述服务器段之间的全双工通信。
  15. 根据权利要求1所述的方法,其特征在于,所述websocket包括一个开放的握手以及随后的TCP层上的消息帧。
  16. 根据权利要求15所述的方法,其特征在于,Socket为在应用层和传输层之间的一个抽象层,用于将所述TCP层中的复杂操作抽象为简单接口,以供所述应用层调用实现进程在网络中的通信。
  17. 根据权利要求1至16任一所述的方法,其特征在于,所述JPEG压缩格式图片文件的分辨率为800*600。
  18. 一种提高基于内核的虚拟机显示数据实时性的系统,其特征在于,包括:
    监听模块,配置用于在服务器端创建websocket监听固定端口号;
    抓取模块,配置用于创建抓取视频数据线程,在所述抓取视频数据线程中循环调用对输入输出通道进行管理的函数,抓取硬件上的原始压缩数据并存为JPEG压缩格式图片文件;
    读取模块,配置用于将所述JPEG压缩格式图片文件读取到对应端口号的缓冲区;以及
    显示模块,配置用于响应于客户端访问所述固定端口号,通过socket通信在所述缓冲区实时抓取JPEG压缩格式图片文件进行显示。
  19. 一种计算机设备,其特征在于,包括:
    至少一个处理器;以及
    存储器,所述存储器存储有可在所述处理器上运行的计算机指令,所述指令由所述处理器执行时实现权利要求1-17任意一项所述方法的步骤。
  20. 一种非易失性可读存储介质,所述非易失性可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-17任意一项所述方法的步骤。
PCT/CN2022/142090 2022-02-22 2022-12-26 提高kvm显示数据实时性的方法、系统、设备和存储介质 WO2023160210A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210161592.X 2022-02-22
CN202210161592.XA CN114217997B (zh) 2022-02-22 2022-02-22 提高kvm显示数据实时性的方法、系统、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2023160210A1 true WO2023160210A1 (zh) 2023-08-31

Family

ID=80709235

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/142090 WO2023160210A1 (zh) 2022-02-22 2022-12-26 提高kvm显示数据实时性的方法、系统、设备和存储介质

Country Status (2)

Country Link
CN (1) CN114217997B (zh)
WO (1) WO2023160210A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114217997B (zh) * 2022-02-22 2022-06-21 苏州浪潮智能科技有限公司 提高kvm显示数据实时性的方法、系统、设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881189A (zh) * 2005-06-17 2006-12-20 杭州波导软件有限公司 一种电脑接收带摄像头手机输入视频数据的方法及系统
US20100303146A1 (en) * 2009-05-26 2010-12-02 Yaniv Kamay Mechanism for dynamically changing streaming video quality
CN107995524A (zh) * 2017-12-07 2018-05-04 郑州云海信息技术有限公司 一种连接网络视频服务器的客户端系统及其设计、数据处理方法
CN114217997A (zh) * 2022-02-22 2022-03-22 苏州浪潮智能科技有限公司 提高kvm显示数据实时性的方法、系统、设备和存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11983641B2 (en) * 2017-06-05 2024-05-14 Umajin Inc. Asset tracking system and methods
CN113568734A (zh) * 2020-04-29 2021-10-29 安徽寒武纪信息科技有限公司 基于多核处理器的虚拟化方法、系统、多核处理器和电子设备
CN112153042A (zh) * 2020-09-21 2020-12-29 苏州浪潮智能科技有限公司 Web端音频在线播放防止下载的方法、系统、设备及介质
CN113709493B (zh) * 2021-07-23 2024-02-09 山东云海国创云计算装备产业创新中心有限公司 一种kvm系统的视频流数据加密装置、方法及设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1881189A (zh) * 2005-06-17 2006-12-20 杭州波导软件有限公司 一种电脑接收带摄像头手机输入视频数据的方法及系统
US20100303146A1 (en) * 2009-05-26 2010-12-02 Yaniv Kamay Mechanism for dynamically changing streaming video quality
CN107995524A (zh) * 2017-12-07 2018-05-04 郑州云海信息技术有限公司 一种连接网络视频服务器的客户端系统及其设计、数据处理方法
CN114217997A (zh) * 2022-02-22 2022-03-22 苏州浪潮智能科技有限公司 提高kvm显示数据实时性的方法、系统、设备和存储介质

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Master's Thesis", 15 January 2015, BEIJING UNIVERSITY OF POSTS AND TELECOMMUNICATIONS, CN, article XUAN, RUNTANG: "Design and Implementation of Image Transmission and Distribution System for Real-Time Video Surveillance", pages: 1 - 83, XP009548642 *
"Master's Thesis", 9 June 2017, QUFU NORMAL UNIVERSITY, CN, article ZHAI, HENGZHI: "Design of intelligent security system based on wireless network", pages: 1 - 59, XP009548643 *
AI, FANGZHE ET AL.: "Realization of Wireless Controllable Network Camera", ELECTRONIC TECHNOLOGY, no. 3, 31 March 2017 (2017-03-31), XP009548548, ISSN: 1000-0755 *

Also Published As

Publication number Publication date
CN114217997B (zh) 2022-06-21
CN114217997A (zh) 2022-03-22

Similar Documents

Publication Publication Date Title
US6353848B1 (en) Method and system allowing a client computer to access a portable digital image capture unit over a network
US8458280B2 (en) Apparatus and method for packet transmission over a high speed network supporting remote direct memory access operations
US7761619B2 (en) Method and system for parallelizing completion event processing
US7554976B2 (en) Method and system for transferring a packet stream to RDMA
US8726149B2 (en) Method and system for providing reduced-size hypertext content to a limited-display client device
CN104580192B (zh) 应用程序的网络访问请求的处理方法和装置
WO2020207091A1 (zh) 一种管理客户端、设备监控系统及方法
US9124494B2 (en) Method and apparatus of performing remote management of a managed machine
US20030145230A1 (en) System for exchanging data utilizing remote direct memory access
CN101702121B (zh) Windows系统中程序网络流速控制装置
US20060259570A1 (en) Method and system for closing an RDMA connection
US20050267980A1 (en) Regulating client requests in an electronic messaging environment
EP3032838A1 (en) Message processing method, device, gateway, set-top box and internet protocol television system
KR20070086492A (ko) 카메라핸드폰을 컴퓨터의 카메라로 사용하여비디오데이터를 취득하는 방법
US10594768B2 (en) Method and apparatus of performing remote command dispatching
WO2023160210A1 (zh) 提高kvm显示数据实时性的方法、系统、设备和存储介质
US10574518B2 (en) Method and apparatus of performing remote management of a managed machine
US20130111009A1 (en) Method and System for Indirectly Establishing a Unique Communication Channel Between a Plurality of Devices
CN105190530B (zh) 传输硬件渲染的图形数据
WO2023125269A1 (zh) 物联网设备控制方法、装置及系统
WO2024061308A1 (zh) 通知处理方法、终端设备、服务端及计算机存储介质
US20080313309A1 (en) Client-server data transfer control
WO2016177257A1 (zh) 一种数据分享的方法和装置
CN113176957B (zh) 一种基于rpc的远程应用自动化系统
CN111818070B (zh) 一种windows系统下的录屏方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22928450

Country of ref document: EP

Kind code of ref document: A1