Keyboard message control method and apparatus, and KVM system and storage medium
By simulating a keyboard device and a virtual storage device between the input node and the terminal device, and listening to and judging keyboard messages in real time, the problem of keyboard message loss during transmission is solved, and more reliable message transmission is achieved.
Patent Information
- Application Number
- PCT/CN2024/143712
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-09
- Filing Date
- 2024-12-30
- Publication Date
- 2026-02-12
AI Technical Summary
In existing technologies, after an input node sends keyboard key messages to a personal computer, it cannot guarantee that the messages will not be lost during transmission, resulting in a poor user experience.
When the input node establishes a communication connection with the terminal device, it simulates a keyboard device and a virtual storage device with a binding relationship, listens for and stores the target keyboard messages in real time, and determines whether the initial keyboard messages are included. If not, it resends them.
This improves the reliability of keyboard message transmission from the input node to the terminal device, ensuring that messages are not lost during transmission and enhancing the user experience.
Smart Images

Figure CN2024143712_12022026_PF_FP_ABST
Abstract
Description
Keyboard message control method and device, KVM system and storage medium
[0001] The present application claims priority to the Chinese patent application No. 202411089595.2, filed on August 9, 2024, to the Chinese Patent Office, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of computer, for example, to a keyboard message control method and device, KVM system and storage medium. BACKGROUND
[0003] The distributed KVM (Keyboard Video Mouse) system is a high-performance integrated distributed system integrating high-quality network codec, network KVM seat management, network distributed video switching matrix, and large-screen splicing control. Users can perform human-computer interaction through the keyboard and mouse connected by the seat output node, for example, by controlling the keyboard and mouse to log in to the user interface (UI) on the display output by the seat and display the local signal source picture on the display. The keyboard and mouse information of the local signal source is sent to the universal serial bus (USB) port of the input node of the distributed KVM system, and the keyboard and mouse can be directly used to control the remote local signal source on the seat OSD (on-screen display) interface.
[0004] The input node is simulated as a keyboard device accessing a personal computer (PC) end by the distributed KVM system when sending the received event message to the connected computer. In the USB protocol, the keyboard device is a human interface device (HID) class device, which works by sending keyboard key message to the PC end, and the PC end is responsible for parsing and processing the keyboard key message. However, the main task of the keyboard device is to send data rather than to receive data, so after the input node is simulated as a keyboard device and sends the keyboard key message to the PC end, the input node cannot directly obtain the confirmation information of whether the PC end successfully receives the keyboard key message. In the related art, the keyboard data is generally logically verified after being obtained in a network environment, but there is no targeted solution for how to ensure the correctness of the keyboard data in transmission. However, in the actual control process, some external factors may cause the input node to have sent the keyboard key message to the PC end, but the keyboard key message is lost in the transmission process, resulting in that the PC end does not process the keyboard key message. For example, the original "a" key is pressed, and the input node now sends the "a" key release message to the PC end. Due to the loss of the keyboard key message in the transmission process, the "a" key is always pressed on the PC end, which causes a poor user experience. SUMMARY
[0005] The application provides a keyboard message control method and device, a KVM system and a storage medium, to improve the reliability of the input node in transmitting keyboard messages to a terminal device.
[0006] According to an aspect of the application, a keyboard message control method is provided, applied to an input node, and the method comprises:
[0007] In response to the input node establishing a communication connection with a terminal device, the input node is simulated as a keyboard device and a virtual storage device having a binding relationship; wherein the storage space of the virtual storage device is a subspace of the storage space of the input node;
[0008] An initial keyboard message is sent to the terminal device through the keyboard device; wherein the terminal device listens to a target keyboard message reported by the keyboard device in real time, and stores the target keyboard message into the virtual storage device;
[0009] The target keyboard message is obtained from the virtual storage device, and it is determined whether the target keyboard message contains the initial keyboard message. In response to the target keyboard message not containing the initial keyboard message, it is determined that the initial keyboard message fails to be sent, and the initial keyboard message is re-sent to the terminal device.
[0010] According to another aspect of the present application, a keyboard message control method applied to a terminal device is provided, the method comprising:
[0011] determining that an input node establishes a communication connection with the terminal device; wherein when the input node establishes the communication connection with the terminal device, the input node is simulated into a keyboard device and a virtual storage device having a binding relationship, and a storage space of the virtual storage device is a subspace of a storage space of the input node;
[0012] real-time monitoring of a target keyboard message reported by the keyboard device and storing the target keyboard message into the virtual storage device having the binding relationship with the keyboard device, so that the input node acquires the target keyboard message from the virtual storage device and determines whether the target keyboard message contains an initial keyboard message sent to the terminal device through the keyboard device, and in response to the target keyboard message not containing the initial keyboard message sent to the terminal device through the keyboard device, determining that the initial keyboard message fails to be sent and re-sending the initial keyboard message to the terminal device through the keyboard device.
[0013] According to another aspect of the present application, a keyboard message control device applied to an input node is provided, the device comprising:
[0014] a device simulation module configured to simulate the input node into a keyboard device and a virtual storage device having a binding relationship in response to the input node establishing a communication connection with a terminal device; wherein a storage space of the virtual storage device is a subspace of a storage space of the input node;
[0015] an initial keyboard message sending module configured to send an initial keyboard message to a terminal device through the keyboard device; wherein the terminal device real-time monitors a target keyboard message reported by the keyboard device and stores the target keyboard message into the virtual storage device;
[0016] a keyboard message determination module configured to acquire the target keyboard message from the virtual storage device and determine whether the target keyboard message contains the initial keyboard message, and in response to the target keyboard message not containing the initial keyboard message, determine that the initial keyboard message fails to be sent and re-send the initial keyboard message to the terminal device.
[0017] According to another aspect of the present application, a keyboard message control device applied to a terminal device is provided, the device comprising:
[0018] The communication connection establishing module is configured to determine that the input node establishes a communication connection with the terminal device; wherein when the input node establishes the communication connection with the terminal device, the input node is simulated as a keyboard device and a virtual storage device having a binding relationship, and a storage space of the virtual storage device is a subspace of a storage space of the input node;
[0019] The target keyboard message storage module is configured to listen to a target keyboard message reported by the keyboard device in real time, and store the target keyboard message into a virtual storage device having a binding relationship with the keyboard device, so that the input node acquires the target keyboard message from the virtual storage device, and determines whether the target keyboard message contains an initial keyboard message sent to the terminal device through the keyboard device; in response to the target keyboard message not containing the initial keyboard message sent to the terminal device through the keyboard device, it is determined that the initial keyboard message fails to be sent, and the initial keyboard message is re-sent to the terminal device through the keyboard device.
[0020] According to another aspect of the present application, a KVM system is provided, which comprises:
[0021] at least one processor; and
[0022] a memory in communication connection with the at least one processor; wherein,
[0023] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the keyboard message control method applied to an input node or the keyboard message control method applied to a terminal device according to any one of the embodiments of the present application.
[0024] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to execute the keyboard message control method applied to an input node or the keyboard message control method applied to a terminal device according to any one of the embodiments of the present application when executed by the processor. BRIEF DESCRIPTION OF DRAWINGS
[0025] Fig. 1 is a flowchart of a keyboard message control method applied to an input node according to an embodiment of the present application;
[0026] Fig. 2 is a networking schematic diagram of a KVM system according to an embodiment of the present application;
[0027] Fig. 3 is a flowchart of a keyboard message control method applied to a terminal device according to another embodiment of the present application;
[0028] Fig. 4 is a keyboard message generated by pressing and releasing a key once according to an embodiment of the present application;
[0029] Fig. 5 is a structure diagram of a keyboard message control device applied to an input node according to an embodiment of the present application;
[0030] Fig. 6 is a structure diagram of a keyboard message control device applied to a terminal device according to another embodiment of the present application;
[0031] Fig. 7 is a structure diagram of a KVM system according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application.
[0033] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.
[0034] Fig. 1 is a flow chart of a keyboard message control method applied to an input node according to an embodiment of the present application. The embodiment can be applied to the case of controlling a keyboard message. The method can be executed by a keyboard message control device, which can be realized in the form of hardware and / or software, and can be configured in an input node.
[0035] Fig. 2 is a networking diagram of a KVM system according to an embodiment of the present application. As shown in Fig. 2, an output node can obtain an event message generated when a keyboard and / or a mouse performs a user operation through a USB bus controller, and send the message to an application layer. The application layer sends the event message to a corresponding input node through a network according to the KVM system networking and the control mode of the keyboard and the mouse. After receiving the event message, the input node simulates the input node as a keyboard device, so as to send a USB signal to a terminal device connected to the input node through a hardware chip interface in the form of a keyboard message, so as to make the terminal device process the keyboard message and the like.
[0036] As shown in FIG. 1, the keyboard message control method comprises the following steps:
[0037] S110, when a communication connection is established between an input node and a terminal device, the input node is simulated as a keyboard device and a virtual storage device having a binding relationship; wherein a storage space of the virtual storage device is a subspace of a storage space of the input node. As shown in FIG. 2, in a KVM system, a user inputs data to an output node by operating a man-machine interactive device such as a keyboard and / or a mouse connected to the output node, so as to realize man-machine interaction. When the user operates the man-machine interactive device such as the keyboard and / or the mouse, the man-machine interactive device generates an event message, the output node acquires the event message, and sends the event message to the input node through a local area network. After the input node receives the event message, the input node needs to send the event message to a terminal device connected to the input node.
[0038] In the embodiment of the present application, the input node can establish a communication connection with the terminal device through an OTG (On The Go) port. Since the OTG port can simulate a plurality of types of USB devices, when the input node establishes a communication connection with the terminal device through the OTG port, the input node can be simulated as a keyboard device and a virtual storage device through the OTG port. The keyboard device and the virtual storage device have a binding relationship, and the virtual storage device can be a virtual U disk. The storage space of the virtual storage device is a subspace of the storage space of the input node, that is, when the input node is simulated as the keyboard device and the virtual storage device having the binding relationship, a small memory area is divided from the storage space of the input node as the storage space of the virtual storage device. It should be noted that the keyboard device obtained by simulating the input node in the present application and the keyboard connected to the output node in FIG. 2 have different meanings. The keyboard device is obtained by simulating the input node, while the keyboard in FIG. 2 is a man-machine interactive device for user operation.
[0039] For example, the input node is simulated as a keyboard device, specifically: the input node is simulated as a standard USB keyboard device through a USB protocol, simulates a standard keyboard function and sends a keyboard input signal to a host system, which is used to expand the functionality of the device, so that the device can provide the ability of keyboard input without a physical keyboard.
[0040] S120, an initial keyboard message is sent to the terminal device through the keyboard device; wherein the terminal device listens to a target keyboard message reported by the keyboard device in real time, and stores the target keyboard message into the virtual storage device.
[0041] In the embodiment of the present application, after the input node is simulated as a keyboard device and a virtual storage device having a binding relationship, the input node receives an event message from the output node as an initial keyboard message, and sends the initial keyboard message to the terminal device through the keyboard device. After the initial keyboard message is sent to the terminal device through the keyboard device, the terminal device listens to the keyboard message reported by the keyboard device in real time, and takes the keyboard message listened to from the keyboard device as a target keyboard message. The terminal device stores the target keyboard message listened to from the keyboard device into the virtual storage device having the binding relationship with the keyboard device.
[0042] In S130, the target keyboard message is acquired from the virtual storage device, and it is determined whether the target keyboard message contains the initial keyboard message. In response to the target keyboard message not containing the initial keyboard message, it is determined that the initial keyboard message fails to be sent, and the initial keyboard message is re-sent to the terminal device.
[0043] Since the storage space of the virtual storage device is a subspace of the storage space of the input node, the input node can acquire the target keyboard message stored in the virtual storage device by accessing the storage space of the virtual storage device. Whether the target keyboard message contains the initial keyboard message can be determined by, for example, parsing the target keyboard message and the initial keyboard message respectively, and determining whether the keyboard control data corresponding to the target keyboard message contains the keyboard control data corresponding to the initial keyboard message. In the case where the keyboard control data corresponding to the target keyboard message contains the keyboard control data corresponding to the initial keyboard message, it is indicated that the initial keyboard message is successfully transmitted to the terminal device through the keyboard device, that is, the initial keyboard message is not lost in the transmission process. In the case where the keyboard control data corresponding to the target keyboard message does not contain the keyboard control data corresponding to the initial keyboard message, it is determined that the initial keyboard message fails to be sent, that is, the initial keyboard message is lost in the transmission process. When it is determined that the initial keyboard message fails to be sent, the input node re-sends the initial keyboard message to the terminal device, so as to enable the terminal device to successfully receive the initial keyboard message sent by the input node as much as possible, thereby processing the initial keyboard message.
[0044] Optionally, before the initial keyboard message is re-sent to the terminal device, the method further includes:
[0045] The method further includes: determining a sending number of the initial keyboard message; and re-sending the initial keyboard message to the terminal device, including: when the sending number is less than a preset number threshold, re-sending the initial keyboard message to the terminal device.
[0046] For example, the input node counts the number of times of sending the initial keyboard message to the terminal device through the keyboard device. When it is determined that the initial keyboard message fails to be sent, the input node determines the number of times of sending the current initial keyboard message, and judges whether the number of times of sending the current initial keyboard message is less than a preset number threshold. In response to the number of times of sending the current initial keyboard message being less than or equal to the preset number threshold, the input node re-sends the initial keyboard message to the terminal device through the keyboard device. In response to the number of times of sending the current initial keyboard message being greater than the preset number threshold, it indicates that the terminal device still fails to successfully receive the initial keyboard message after the input node repeatedly sends the initial keyboard message to the terminal device for multiple times. At this time, the input node sends an alarm prompt information to the user end (such as the user's mobile phone) to enable the user to troubleshoot the hardware link between the input node and the terminal device based on the alarm prompt information.
[0047] The keyboard message control method of the embodiment of the present application, when applied to an input node, includes: when a communication connection is established between the input node and a terminal device, the input node is simulated into a keyboard device and a virtual storage device having a binding relationship; wherein the storage space of the virtual storage device is a subspace of the storage space of the input node; an initial keyboard message is sent to the terminal device through the keyboard device; wherein the terminal device listens to a target keyboard message reported by the keyboard device in real time, and stores the target keyboard message into the virtual storage device; the target keyboard message is acquired from the virtual storage device, and it is judged whether the target keyboard message contains the initial keyboard message. In response to the target keyboard message not containing the initial keyboard message, it is determined that the initial keyboard message fails to be sent, and the initial keyboard message is re-sent to the terminal device. Through the technical solution provided by the embodiment of the present application, it can be judged in real time whether the keyboard data sent by the input node to the terminal device is safely received. If not, the keyboard data is re-sent to the terminal device, thereby effectively improving the reliability of the input node in transmitting the keyboard message to the terminal device.
[0048] In some embodiments, it also includes receiving a target event message sent by an output node, and saving the target event message in a global variable, so that the output node reads the target event message from the global variable, and judges whether the target event message contains an initial event message sent by the output node to the input node. In response to the target event message not containing the initial event message sent by the output node to the input node, the output node re-sends the initial event message to the input node. The advantage of such a setting is that it can effectively improve the reliability of the output node in transmitting the message event to the input node.
[0049] In the embodiment of the present application, when the output node sends the event message generated by the human-computer interaction device such as the user operation keyboard and / or the mouse to the input node through the network, the data loss phenomenon may exist, therefore, the input node saves the target event message received from the output node in a global variable. In addition, the output node saves the initial event message in another global variable when sending the initial event message to the input node. In response to the event message control event being triggered, the output node sends the message acquisition instruction to the input node in time to read the target event message from the global variable of the input node, and judges whether the target event message contains the initial event message. If the target event message contains the initial event message, it means that the output node has successfully sent the initial event message to the input node. If the target event message does not contain the initial event message, it means that the output node has not successfully sent the initial event message to the input node, at this time, the output node re-sends the initial event message to the input node. Optionally, before the output node re-sends the initial event message to the input node, it further includes: judging whether the sending times of the initial event message are less than a preset threshold. If the sending times of the initial event message are less than or equal to the preset threshold, the output node re-sends the initial event message to the input node; if the sending times of the initial event message are greater than the preset threshold, the output node sends the alarm prompt to the user terminal to make the user exclude the network between the output node and the input node.
[0050] Fig. 3 is a flow chart of a keyboard message control method applied to a terminal device according to another embodiment of the present application. The embodiment can be applied to the case of controlling the keyboard message. The method can be executed by a keyboard message control device which can be realized in the form of hardware and / or software, and can be configured in the terminal device. As shown in Fig. 3, the method includes:
[0051] S310, determining that the input node establishes the communication connection with the terminal device; wherein when the input node establishes the communication connection with the terminal device, the input node is simulated into the keyboard device and the virtual storage device having the binding relationship, and the storage space of the virtual storage device is the subspace of the storage space of the input node.
[0052] In the embodiment of the present application, when it is detected that the input node is inserted into the terminal device through the OTG port, it is determined that the input node establishes a communication connection with the terminal device. Wherein, when the input node establishes a communication connection with the terminal device through the OTG port, the input node can be simulated as a keyboard device and a virtual storage device having a binding relationship through the OTG port, for example, the virtual storage device can be a virtual U disk. Wherein, the storage space of the virtual storage device is a subspace of the storage space of the input node, that is, when the input node is simulated as a keyboard device and a virtual storage device having a binding relationship, a small memory area is divided from the storage space of the input node as the storage space of the virtual storage device.
[0053] S320, real-time monitoring the target keyboard message reported by the keyboard device, and storing the target keyboard message into the virtual storage device having a binding relationship with the keyboard device, so that the input node acquires the target keyboard message from the virtual storage device, and judges whether the target keyboard message contains the initial keyboard message sent to the terminal device through the keyboard device, in response to the target keyboard message not containing the initial keyboard message sent to the terminal device through the keyboard device, it is determined that the initial keyboard message fails to be sent, and the initial keyboard message is re-sent to the terminal device through the keyboard device.
[0054] In the embodiment of the present application, when the input node establishes a communication connection with the terminal device, the input node is simulated as a keyboard device and a virtual storage device having a binding relationship, and then the initial keyboard message is sent to the terminal device through the keyboard device. The terminal device real-time monitors the target keyboard message reported by the keyboard device, and stores the target keyboard message into the virtual storage device having a binding relationship with the keyboard device, so that the input node acquires the target keyboard message from the virtual storage device, and compares the target keyboard message with the initial keyboard message sent to the terminal device through the keyboard device, to judge whether the initial keyboard message fails to be sent, if yes, the input node re-sends the initial keyboard message to the terminal device.
[0055] Optionally, before real-time monitoring the target keyboard message reported by the keyboard device, it further includes: acquiring the simulation device information corresponding to the input node; and determining the keyboard device corresponding to the input node based on the simulation device information. Optionally, determining the keyboard device corresponding to the input node based on the simulation device information includes: acquiring the running environment information of the terminal device, and determining the operating system type of the terminal device based on the pre-set hot plug configuration information and the running environment information; determining the keyboard device search path based on the operating system type; and searching the keyboard device corresponding to the input node in the keyboard device search path based on the simulation device information.
[0056] In the embodiments of the present application, after the input node is simulated as a keyboard device and a virtual storage device, the simulation device information corresponding to the input node simulated as the keyboard device and the virtual storage device is obtained. For example, the simulation device information refers to the configuration and attribute data describing the specific type of peripheral device (such as a keyboard, a mouse, a storage device, etc.) that the input node can simulate, which is used to determine the specific behavior and function of the input node in the simulation mode and ensure the correct interaction between the input node and the terminal device. In addition, when it is detected that the input node is inserted into the terminal device through the OTG port, the running environment information of the terminal device and the pre-set hot plug configuration information are obtained, and the operating system type of the terminal device is determined according to the running environment information and the pre-set hot plug configuration information. The running environment information of the terminal device can be stored in the script file in the form of code, thereby generating an operating system determination script file. Optionally, after the input node is simulated as a keyboard device and a virtual storage device, the operating system determination script file is stored in the virtual storage device. When it is detected that the input node is inserted into the terminal device through the OTG port, the terminal device runs the operating system determination script file based on the pre-set hot plug configuration information (also referred to as udev rule), and determines the operating system type of the terminal device according to the running result. The hot plug configuration information is used to indicate the running directory information of the script file. The operating system type can include a Linux operating system and a Windows operating system. For example, the operating system type can be determined by the environment variable $OSTYPE in the running result. When the environment variable $OSTYPE is a string starting with “linux-gnu”, it is determined that the terminal device is a Linux operating system; when the environment variable $OSTYPE is a string starting with “msys” or “cygwin”, it is determined that the terminal device is a Windows operating system. The keyboard device search path is determined based on the operating system type, for example, when the operating system of the terminal device is a Linux operating system, it is determined that the keyboard device search path is “proc / bus / input / devices”, and therefore, the keyboard device corresponding to the input node is searched in the keyboard device search path “proc / bus / input / devices” based on the simulation device information. For example, the devices under proc / bus / input / devices are traversed, and the device matching the simulation device information is searched as the keyboard device corresponding to the input node according to the Name field, for example, event1 in the Handlers field is the listening target, and therefore, dev / input / event1 is taken as the keyboard device simulated by the input node.
[0057] For example, the hexdump tool on the terminal device is used to listen to the message reported on dev / input / event1, and the listened message is saved into the virtual storage device having the binding relationship with the keyboard device, wherein the message reported on event1 is the target keyboard message reported by the keyboard device. For example, FIG. 4 is the keyboard message generated by one-time key pressing and releasing according to an embodiment of the present application. As shown in FIG. 4, there are three messages for pressing and releasing. In the event message generated by one-time key pressing, the first line is the time stamp, the second line includes the event type, object, value and time stamp of the input device, the third line includes the time stamp and the message indicating the key pressing, and the fourth line includes the synchronization control message indicating the end of the event message. The time stamp in the first line occupies 16 bytes, the event type, object, value and other messages in the second line occupy 16 bytes, and the message indicating the key pressing in the third line occupies only 8 bytes. In the third line message "0001 001e 0001 0000", "0001" indicates the key event, "001e" indicates the key a, and "0001" indicates the pressing. Similarly, in the eighth line message "0001 001e 0000 0000", "0001" indicates the key event, "001e" indicates the key a, and "0000" indicates the releasing.
[0058] The keyboard message control scheme according to an embodiment of the present application, when applied to a terminal device, includes: determining that an input node establishes a communication connection with the terminal device; wherein when the input node establishes the communication connection with the terminal device, the input node is simulated into a keyboard device and a virtual storage device having a binding relationship, and the storage space of the virtual storage device is a subspace of the storage space of the input node; listening to the target keyboard message reported by the keyboard device in real time, and storing the target keyboard message into the virtual storage device having the binding relationship with the keyboard device, so that the input node acquires the target keyboard message from the virtual storage device, and determines whether the target keyboard message contains the initial keyboard message sent to the terminal device through the keyboard device. In response to the target keyboard message not containing the initial keyboard message sent to the terminal device through the keyboard device, it is determined that the initial keyboard message fails to be sent, and the initial keyboard message is re-sent to the terminal device through the keyboard device. According to the technical scheme provided by the embodiment of the present application, it can be determined in real time whether the keyboard data sent by the input node to the terminal device is safely received. If not, the keyboard data is re-sent to the terminal device, thereby greatly improving the reliability of the input node transmitting the keyboard message to the terminal device.
[0059] FIG. 5 is a structural schematic diagram of a keyboard message control device applied to an input node according to an embodiment of the present application. As shown in FIG. 5, the device includes:
[0060] The device simulation module 510 is configured to simulate the input node as a keyboard device and a virtual storage device having a binding relationship when the input node establishes a communication connection with the terminal device, and a storage space of the virtual storage device is a subspace of a storage space of the input node.
[0061] The initial keyboard message sending module 520 is configured to send an initial keyboard message to the terminal device through the keyboard device, the terminal device listens to a target keyboard message reported by the keyboard device in real time, and stores the target keyboard message in the virtual storage device.
[0062] The keyboard message judging module 530 is configured to acquire the target keyboard message from the virtual storage device, judge whether the target keyboard message contains the initial keyboard message, and in response to the target keyboard message not containing the initial keyboard message, determine that the initial keyboard message sending fails, and resend the initial keyboard message to the terminal device.
[0063] Optionally, the apparatus further comprises:
[0064] The sending times determining module is configured to determine a sending times of the initial keyboard message before resending the initial keyboard message to the terminal device.
[0065] The keyboard message judging module is configured to:
[0066] resend the initial keyboard message to the terminal device when the sending times is less than a preset times threshold.
[0067] Optionally, the apparatus further comprises:
[0068] The target event message saving module is configured to receive a target event message sent by an output node, save the target event message in a global variable, so that the output node reads the target event message from the global variable, judges whether the target event message contains an initial event message sent by the output node to the input node, and in response to the target event message not containing the initial event message sent by the output node to the input node, the output node resends the initial event message to the input node.
[0069] The keyboard message control apparatus provided in the embodiments of the present application can perform the keyboard message control method performed by the input node provided in any of the embodiments of the present application, and has the function modules corresponding to the execution method.
[0070] FIG. 6 is a structural schematic diagram of a keyboard message control apparatus applied to a terminal device according to another embodiment of the present application. As shown in FIG. 6, the apparatus comprises:
[0071] The communication connection establishing module 610 is configured to determine that the input node establishes a communication connection with the terminal device; wherein when the input node establishes the communication connection with the terminal device, the input node is simulated as a keyboard device and a virtual storage device having a binding relationship, and a storage space of the virtual storage device is a subspace of a storage space of the input node;
[0072] The target keyboard message storage module 620 is configured to listen to a target keyboard message reported by the keyboard device in real time, and store the target keyboard message into a virtual storage device having a binding relationship with the keyboard device, so that the input node acquires the target keyboard message from the virtual storage device, and determines whether the target keyboard message contains an initial keyboard message sent to the terminal device through the keyboard device; in response to the target keyboard message not containing the initial keyboard message sent to the terminal device through the keyboard device, it is determined that the initial keyboard message fails to be sent, and the initial keyboard message is re-sent to the terminal device through the keyboard device.
[0073] Optionally, the apparatus further comprises:
[0074] The simulated device information acquisition module is configured to acquire simulated device information corresponding to the input node before listening to the target keyboard message reported by the keyboard device in real time;
[0075] The keyboard device determination module is configured to determine the keyboard device corresponding to the input node based on the simulated device information.
[0076] Optionally, the keyboard device determination module is configured to:
[0077] acquire running environment information of the terminal device, and determine an operating system type of the terminal device based on pre-set hot plug configuration information and the running environment information;
[0078] determine a keyboard device search path based on the operating system type;
[0079] search for the keyboard device corresponding to the input node based on the simulated device information in the keyboard device search path.
[0080] The keyboard message control apparatus provided in the embodiments of the present application can execute the keyboard message control method executed by the terminal device provided in any of the embodiments of the present application, and has the function modules corresponding to the execution method.
[0081] FIG. 7 is a structural schematic diagram of a KVM system provided by an embodiment of the present application. The KVM system 10 is intended to represent a variety of forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The KVM system 10 can also represent a variety of forms of mobile devices, such as personal digital assistants, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.
[0082] As shown in FIG. 7, the KVM system 10 includes at least one processor 11, and memories, such as a Read-Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., connected to the at least one processor 11 in communication, wherein the memories store computer programs executable by the at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer programs stored in the Read-Only Memory (ROM) 12 or loaded into the Random Access Memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the KVM system 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An Input / Output (I / O) interface 15 is also connected to the bus 14.
[0083] A plurality of components in the KVM system 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the KVM system 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0084] The processor 11 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various special-purpose Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the keyboard message control method performed by the input node or the keyboard message control method performed by the terminal device.
[0085] In some embodiments, the keyboard message control method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the KVM system 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the keyboard message control method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured, by way of firmware or otherwise, to execute the keyboard message control method.
[0086] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a Field-Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Parts (ASSP), a System on Chip (SOC), a Complex Programming Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0087] Computer programs implementing methods of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor of the machine, implements the functions / acts specified in the flow diagrams and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as part of a standalone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0088] In the context of this application, a computer readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium can be a machine readable signal medium. More specific examples of a machine readable storage medium will include one or more lines of a program of instructions in a transitory signal form, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0089] To provide for interaction with a user, the systems and techniques described here can be implemented on a KVM system having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the KVM system. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0090] The systems and techniques described herein can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0091] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, and solves the defects of large management difficulty and weak business scalability in traditional physical host and virtual private server (VPS) services.
[0092] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in different orders, as long as the desired results of the technical solutions of the present disclosure can be achieved, and the present disclosure is not limited herein.
[0093] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A keyboard message control method applied to an input node, the method comprising: in response to the input node establishing a communication connection with a terminal device, the input node being simulated into a keyboard device and a virtual storage device having a binding relationship; wherein a storage space of the virtual storage device is a subspace of a storage space of the input node; sending an initial keyboard message to the terminal device through the keyboard device; wherein the terminal device listens to a target keyboard message reported by the keyboard device in real time, and stores the target keyboard message into the virtual storage device; obtaining the target keyboard message from the virtual storage device, and determining whether the target keyboard message contains the initial keyboard message, in response to the target keyboard message not containing the initial keyboard message, determining that the initial keyboard message fails to be sent, and resending the initial keyboard message to the terminal device. 2.The method of claim 1, before resending the initial keyboard message to the terminal device, further comprising: determining a sending number of the initial keyboard message; and resending the initial keyboard message to the terminal device, comprising: in response to the sending number being less than a preset number threshold, resending the initial keyboard message to the terminal device. 3.The method of claim 1, further comprising: receiving a target event message sent by an output node, and saving the target event message in a global variable, so that the output node reads the target event message from the global variable, and determines whether the target event message contains an initial event message sent by the output node to the input node, in response to the target event message not containing the initial event message sent by the output node to the input node, the output node resending the initial event message to the input node. 4.A keyboard message control method applied to a terminal device, the method comprising: determining that an input node establishes a communication connection with the terminal device; wherein when the input node establishes the communication connection with the terminal device, the input node is simulated into a keyboard device and a virtual storage device having a binding relationship, and a storage space of the virtual storage device is a subspace of a storage space of the input node; listening to a target keyboard message reported by the keyboard device in real time, and storing the target keyboard message into a virtual storage device having a binding relationship with the keyboard device, so that the input node obtains the target keyboard message from the virtual storage device, and determines whether the target keyboard message contains an initial keyboard message sent to the terminal device through the keyboard device, in response to the target keyboard message not containing the initial keyboard message sent to the terminal device through the keyboard device, determining that the initial keyboard message fails to be sent, and resending the initial keyboard message to the terminal device through the keyboard device. 5.The method of claim 4, before listening to the target keyboard message reported by the keyboard device in real time, further comprising: obtaining simulated device information corresponding to the input node. determine the keyboard device corresponding to the input node based on the simulation device information.
6. The method of claim 5, wherein, determine the keyboard device corresponding to the input node based on the simulation device information, comprising: obtain the running environment information of the terminal device, and determine the operating system type of the terminal device based on the pre-set hot plug configuration information and the running environment information; determine the keyboard device search path based on the operating system type; search for the keyboard device corresponding to the input node under the keyboard device search path based on the simulation device information. 7.A keyboard message control apparatus, applied to an input node, the apparatus comprising: a device simulation module, configured to simulate the input node into a keyboard device and a virtual storage device with a binding relationship in response to the input node establishing a communication connection with a terminal device; wherein the storage space of the virtual storage device is a subspace of the storage space of the input node; an initial keyboard message sending module, configured to send an initial keyboard message to the terminal device through the keyboard device; wherein the terminal device listens to a target keyboard message reported by the keyboard device in real time, and stores the target keyboard message into the virtual storage device; a keyboard message judgment module, configured to obtain the target keyboard message from the virtual storage device, and judge whether the target keyboard message contains the initial keyboard message, in response to the target keyboard message not containing the initial keyboard message, determine that the initial keyboard message sending fails, and resend the initial keyboard message to the terminal device. 8.A keyboard message control apparatus, applied to a terminal device, the apparatus comprising: a communication connection establishment module, configured to determine that an input node establishes a communication connection with the terminal device; wherein when the input node establishes a communication connection with the terminal device, the input node is simulated into a keyboard device and a virtual storage device with a binding relationship, and the storage space of the virtual storage device is a subspace of the storage space of the input node; a target keyboard message storage module, configured to listen to a target keyboard message reported by the keyboard device in real time, and store the target keyboard message into a virtual storage device with a binding relationship with the keyboard device, so that the input node obtains the target keyboard message from the virtual storage device, and judges whether the target keyboard message contains an initial keyboard message sent to the terminal device through the keyboard device, in response to the target keyboard message not containing the initial keyboard message sent to the terminal device through the keyboard device, determines that the initial keyboard message sending fails, and resends the initial keyboard message to the terminal device through the keyboard device. 9.A keyboard, video or mouse (KVM) system, comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute a keyboard message control method applied to an input node or a keyboard message control method applied to a terminal device; The keyboard message control method applied to the input node comprises: In response to the input node establishing a communication connection with the terminal device, the input node is simulated into a keyboard device and a virtual storage device having a binding relationship; wherein the storage space of the virtual storage device is a subspace of the storage space of the input node; An initial keyboard message is sent to the terminal device through the keyboard device; wherein the terminal device listens to a target keyboard message reported by the keyboard device in real time and stores the target keyboard message into the virtual storage device; The target keyboard message is obtained from the virtual storage device, and it is determined whether the target keyboard message contains the initial keyboard message; in response to the target keyboard message not containing the initial keyboard message, it is determined that the initial keyboard message fails to be sent, and the initial keyboard message is re-sent to the terminal device; The keyboard message control method applied to the terminal device comprises: It is determined that the input node establishes a communication connection with the terminal device; wherein when the input node establishes a communication connection with the terminal device, the input node is simulated into a keyboard device and a virtual storage device having a binding relationship, and the storage space of the virtual storage device is a subspace of the storage space of the input node; A target keyboard message reported by the keyboard device is listened to in real time, and the target keyboard message is stored into a virtual storage device having a binding relationship with the keyboard device, so that the input node obtains the target keyboard message from the virtual storage device and determines whether the target keyboard message contains an initial keyboard message sent to the terminal device through the keyboard device; in response to the target keyboard message not containing the initial keyboard message sent to the terminal device through the keyboard device, it is determined that the initial keyboard message fails to be sent, and the initial keyboard message is re-sent to the terminal device through the keyboard device.
10. The system of claim 9, wherein The keyboard message control method applied to the input node further comprises: Before the initial keyboard message is re-sent to the terminal device, it is determined that the initial keyboard message is sent for a number of times; The initial keyboard message is re-sent to the terminal device, comprising: In response to the number of times being less than a preset number threshold, the initial keyboard message is re-sent to the terminal device.
11. The system of claim 9, wherein, The keyboard message control method applied to the input node further comprises: The target event message sent by the output node is received and saved in a global variable, so that the output node reads the target event message from the global variable and judges whether the target event message contains the initial event message sent by the output node to the input node, and in response to the target event message not containing the initial event message sent by the output node to the input node, the output node re-sends the initial event message to the input node.
12. The system of claim 9, wherein, The keyboard message control method applied to the terminal device further includes: Before the real-time monitoring of the target keyboard message reported by the keyboard device, the analog device information corresponding to the input node is acquired; The keyboard device corresponding to the input node is determined based on the analog device information.
13. The system of claim 12, wherein, The determination of the keyboard device corresponding to the input node based on the analog device information includes: The operating system type of the terminal device is determined based on the pre-set hot plug configuration information and the running environment information of the terminal device; The keyboard device search path is determined based on the operating system type; The keyboard device corresponding to the input node is searched in the keyboard device search path based on the analog device information. 14.A computer readable storage medium storing computer instructions, the computer instructions being used to make a processor execute the keyboard message control method applied to the input node in any one of claims 1-3, or execute the keyboard message control method applied to the terminal device in any one of claims 4-6.
Citation Information
Patent Citations
Wireless keyboard realization method based on cell phone client and wireless local area network (WLAN)
CN102215283A
A system and method for controlling a controlled end using a remote control input controller
CN109358759A
Keyboard input method and device and electronic equipment
CN111190529A
Remote control's controller can carry out computer
CN205388742U
Method for processing data quantifying force applied to one or more keys of a computer keyboard
US20050057521A1