Equipment key value mapping table configuration method and device, equipment and storage medium

By judging and updating the key-value mapping table after the HID device is connected to the target system device, the problem of the HID device function cannot be mapped normally is solved, and the adaptation and access of the target system device to a variety of HID devices is achieved, improving the user operation experience.

CN120498988APending Publication Date: 2025-08-15CHENGDU GREAT WALL MOTOR R&D CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510843669.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

After the HID device is connected to the target system device, it cannot use the customized key-value mapping table, resulting in some functions being unable to map normally and cannot meet the functional control needs.

Method used

After the HID device is connected to the target system device, the initial key-value mapping table is received to determine whether it meets the preset functional conditions. If it is not met, the initial key-value mapping table is updated through the preset update strategy, and the target key-value mapping table is generated and sent to the target system device to ensure that it meets the actual needs of the HID device.

Benefits of technology

Whether it is wired or wireless, the target system equipment can obtain the key-value mapping function that the HID device actually needs, solve the problem that the function cannot be mapped normally, enrich the types of control equipment of the target system equipment, and improve the user's operating experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120498988A_ABST
    Figure CN120498988A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to an equipment key value mapping table configuration method and device, equipment and a storage medium, and relates to the technical field of communication, and the method is applied to man-machine interface equipment, and comprises the following steps: receiving an initial key value mapping table sent by a target system after being connected with target system equipment in a certain connection mode, and judging whether the initial key value mapping table meets the function requirement of the man-machine interface equipment or not, if not, updating the initial key value mapping table to obtain a target key value mapping table meeting the function requirement, and sending the target key value mapping table to target system equipment to respond to an operation request of the man-machine interface equipment. According to the method, the target system equipment can acquire the key value mapping function actually required by the man-machine interface equipment regardless of wired connection or wireless connection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technologies, and in particular to a method, apparatus, device, and storage medium for configuring a device key-value mapping table. Background Art

[0002] Typically, a HID (Human Interface Device) is connected to a target system device, and then transmits HID-related values to the target system device according to the HID protocol requirements. The target system device maps the relevant key values into key codes recognized by the target system standard and performs operations related to the target system.

[0003] However, after HID is connected to the target system device, it can only use the default key-value mapping table to perform related operations, resulting in some HID functions not being mapped normally and unable to meet the HID function control requirements. Summary of the Invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a device key-value mapping table configuration method, apparatus, device and storage medium.

[0005] An embodiment of the present disclosure provides a device key-value mapping table configuration method applied to a human-machine interface device, the method comprising: after connecting to a target system device based on a preset connection method, receiving an initial key-value mapping table sent by the target system device; judging whether the initial key-value mapping table satisfies a preset functional condition, and obtaining a judgment result; when it is determined based on the judgment result that the initial key-value mapping table does not satisfy the preset functional condition, updating the initial key-value mapping table based on a preset update strategy, obtaining a target key-value mapping table, and sending it to the target system device; wherein the target key-value mapping table is used to instruct the target system device to respond to an operation request of the human-machine interface device.

[0006] Optionally, the judgment of whether the initial key-value mapping table meets the preset functional conditions and the determination result include: obtaining a scan code and a key code corresponding to the scan code based on the initial key-value mapping table, and constructing a key-value pair based on the scan code and the key code corresponding to the scan code; obtaining a scan code to be queried corresponding to each function of the human-computer interface device, and querying the key-value pair based on the scan code to be queried; when each scan code to be queried is queried in the key-value pair, and a target key code corresponding to each scan code to be queried is obtained and the target key code matches the functional information corresponding to the scan code to be queried, determining that the initial key-value mapping table meets the preset functional conditions; when no scan code to be queried is obtained in the key-value pair; and / or when the target key code corresponding to any scan code to be queried does not match the functional information corresponding to the scan code to be queried, determining that the initial key-value mapping table does not meet the preset functional conditions.

[0007] Therefore, by constructing the initial key-value mapping table into key-value pairs, matching the scan codes in the key-value pairs in sequence according to the functions of the human-machine interface device and whether the key code corresponding to each scan code is consistent with the function, it is determined whether the initial key-value mapping table meets the preset functional conditions, thereby further improving the accuracy of the judgment and ensuring the accuracy of subsequent control.

[0008] Optionally, the initial key-value mapping table is updated based on a preset update strategy to obtain a target key-value mapping table, including: when any of the scan codes to be queried cannot be obtained in the key-value pair, constructing a key code mapping relationship corresponding to the scan code to be queried and adding it to the initial key-value mapping table to obtain the target key-value mapping table; and / or, when the target key code corresponding to any of the scan codes to be queried does not match the function information corresponding to the scan code to be queried, obtaining a matching key code that matches the function information corresponding to the scan code to be queried, updating the target key code corresponding to the scan code to be queried in the initial key-value mapping table to the matching key code, and obtaining the target key code mapping table.

[0009] Therefore, when the initial key-value mapping table does not meet the preset functional conditions, the mapping relationship between the scan code and the key code corresponding to the function that is not in the initial key-value mapping table will be added, and the key code corresponding to the scan code of the function that does not match will be replaced, so as to ensure that the updated target key-value mapping table meets all functional requirements of the human-computer interface device, thereby meeting user usage needs and improving user experience.

[0010] Optionally, the method further includes: when the scan code existing in the key-value pair is not the scan code to be queried, deleting the scan code and the corresponding key code that are not the scan code to be queried in the initial key-value mapping table to obtain the target key-value mapping table.

[0011] Furthermore, redundant scan codes and corresponding key codes in the key-value pairs are deleted, thereby ensuring the accuracy of the target key-value mapping table and improving the storage efficiency and control accuracy of subsequent target system devices.

[0012] Optionally, the method further includes: when it is determined based on the judgment result that the initial key-value mapping table meets the preset functional condition, sending status information to the target system device; wherein, the status information is used to instruct the target system device to use the initial key-value mapping table as the target key-value mapping table.

[0013] Therefore, when the initial key-value mapping table meets the preset functional conditions, the target system device is notified through status information that the current initial key-value mapping table meets the functional requirements of the human-machine interface device and can be directly used for control operations, further improving control efficiency and flexibility.

[0014] Optionally, before connecting with the target system device based on the preset connection method, the method further includes: sending a connection request to the target system device; wherein, when the target system device determines that it is the first connection based on the connection request, it connects with the human-machine interface device according to the preset connection method, and sends the initial key-value mapping table to the human-machine interface device.

[0015] Therefore, only when the target system device determines that it is the first connection, the initial key-value mapping table is sent to the human-machine interface device for judgment and update, so that it can be directly used for control when it is not the first connection, further improving the efficiency and flexibility of control.

[0016] Optionally, the method further includes: sending the target key-value mapping table to the target system device; wherein the target system device stores the target key-value mapping table according to the preset connection mode.

[0017] Thus, the updated target key-value mapping table is sent to the target system device for storage, and subsequent reconnection does not require judgment and update, and can be directly used for operation requests of the human-machine interface device, further improving control efficiency.

[0018] An embodiment of the present disclosure also provides a device key-value mapping table configuration device, which is applied to a human-machine interface device, and the device includes: a receiving module, which is used to receive an initial key-value mapping table sent by a target system device after connecting to the target system device based on a preset connection method; a judgment module, which is used to judge whether the initial key-value mapping table meets the preset functional conditions and obtain a judgment result; a processing module, which is used to update the initial key-value mapping table based on a preset update strategy when it is determined that the initial key-value mapping table does not meet the preset functional conditions based on the judgment result, and obtain a target key-value mapping table and send it to the target system device; wherein, the target key-value mapping table is used to instruct the target system device to respond to the operation request of the human-machine interface device.

[0019] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing instructions executable by the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the device key-value mapping table configuration method provided in the embodiment of the present disclosure.

[0020] An embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the device key-value mapping table configuration method provided by the embodiment of the present disclosure.

[0021] The embodiments of the present disclosure further provide a computer program product, including a computer program, wherein the computer program, when executed by a processor, performs the device key-value mapping table configuration method provided in the embodiments of the present disclosure.

[0022] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art: the device key-value mapping table configuration solution provided by the embodiments of the present disclosure is applied to a human-machine interface device, and after being connected to a target system device based on a preset connection method, it receives an initial key-value mapping table sent by the target system device, judges whether the initial key-value mapping table meets the preset functional conditions, and obtains a judgment result; when it is determined based on the judgment result that the initial key-value mapping table does not meet the preset functional conditions, the initial key-value mapping table is updated based on a preset update strategy, and a target key-value mapping table is obtained and sent to the target system device; wherein, the target key-value mapping table is used to instruct the target system device to respond to the operation request of the human-machine interface device. Therefore, after the human-machine interface device is connected to the target system device, when it is determined that the initial key-value mapping table sent by the target system device does not meet the functional requirements, the initial key-value mapping table is updated to obtain the target key-value mapping table to ensure that regardless of wired connection or wireless connection, the target system device can obtain the key-value mapping function actually required by the human-machine interface device, thereby effectively solving the technical problem that some functions of the human-machine interface device cannot be mapped normally and cannot meet the functional control requirements of the human-machine interface device, realizing the adaptation and access of the target system device to a variety of human-machine interface devices, enriching the types of control devices of the target system device, meeting the different control requirements of users, and improving the user operation experience.

[0023] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0025] Figure 1 A schematic diagram of a flow chart of a device key-value mapping table configuration method provided in an embodiment of the present disclosure;

[0026] Figure 2 An example diagram of a device key-value mapping table configuration method provided in an embodiment of the present disclosure;

[0027] Figure 3 A flowchart of another device key-value mapping table configuration method provided by an embodiment of the present disclosure;

[0028] Figure 4 An example diagram of another device key-value mapping table configuration method provided in an embodiment of the present disclosure;

[0029] Figure 5 A schematic diagram of the structure of a device key-value mapping table configuration apparatus provided by an embodiment of the present disclosure;

[0030] Figure 6 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0033] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0034] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0035] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0037] In actual application scenarios, for human-machine interface devices, they can be connected to target system devices (such as Android system devices) via Bluetooth or USB (Universal Serial Bus), and then the relevant values of the human-machine interface device are transmitted to the target system device through the human-machine interface device protocol. The target system device maps the relevant key values into key codes recognized by the target system standard to perform related target system operations; among them, human-machine interface devices include handles, mice, keyboards and remote controls.

[0038] For example, when a HID device is connected to an Android system device (taking the car system as an example), the pre-defined key-value mapping table in the car system is obtained to respond to the operation request of the human-machine interface device; however, in actual applications, different HID devices may require different key-value mapping tables, and only the default key-value mapping table can be used. There is no way to customize it, resulting in some functions not being mapped normally and unable to meet the functional control requirements of HID.

[0039] In response to the technical problem that some functions of the human-machine interface device in the above-mentioned existing method cannot be mapped normally and cannot meet the functional control requirements of the human-machine interface device, the present disclosure proposes a device key-value mapping table configuration scheme, which is applied to the human-machine interface device. After connecting with the target system device based on a preset connection method, the device receives an initial key-value mapping table sent by the target system device, judges whether the initial key-value mapping table meets the preset functional conditions, and obtains a judgment result; when it is determined based on the judgment result that the initial key-value mapping table does not meet the preset functional conditions, the initial key-value mapping table is updated based on a preset update strategy, and the target key-value mapping table is obtained and sent to the target system device; wherein, the target key-value mapping table is used to instruct the target system device to respond to the operation request of the human-machine interface device. Therefore, after the human-machine interface device is connected to the target system device, when it is determined that the initial key-value mapping table sent by the target system device does not meet the functional requirements, the initial key-value mapping table is updated to obtain the target key-value mapping table to ensure that regardless of wired connection or wireless connection, the target system device can obtain the key-value mapping function actually required by the human-machine interface device, thereby effectively solving the technical problem that some functions of the human-machine interface device cannot be mapped normally and cannot meet the functional control requirements of the human-machine interface device, realizing the adaptation and access of the target system device to a variety of human-machine interface devices, enriching the types of control devices of the target system device, meeting the different control requirements of users, and improving the user operation experience.

[0040] Figure 1 This is a flow chart of a device key-value mapping table configuration method provided by an embodiment of the present disclosure. The device key-value mapping table configuration method can be executed by a device key-value mapping table configuration device, wherein the device key-value mapping table configuration device can be implemented using software and / or hardware and can generally be integrated into an electronic device. Figure 1 As shown, the device key-value mapping table configuration method is applied to an electronic device, including:

[0041] Step 101: After connecting to a target system device based on a preset connection method, an initial key-value mapping table sent by the target system device is received.

[0042] In the embodiment of the present disclosure, the preset connection method can be a wireless connection method (such as a wireless Bluetooth connection) or a wired connection method (such as a USB connection); the human-computer interface device can be a wireless human-computer interface device (Bluetooth mouse, Bluetooth keyboard light) or a wired human-computer interface device (such as a USB connection handle).

[0043] In the embodiment of the present disclosure, the initial key-value mapping table refers to the key-value mapping table corresponding to the connected human-machine interface device stored in the target system device; the key-value mapping table includes scan codes and key codes; wherein the scan code represents the numerical value input by the human-machine interface device; the key code represents the flag key-value code defined by the target system; all applications developed based on the target system will match the corresponding key-value code to execute related operation logic.

[0044] In the embodiment of the present disclosure, after the human-machine interface device is connected to the target system device based on the preset connection method, the target system device obtains the device identification of the human-machine interface device according to the preset connection method, and obtains the corresponding initial key-value mapping table according to the device identification.

[0045] In some embodiments, the preset connection mode is a wireless connection mode, and the target system device obtains the VendorID (vendor identifier) and ProductID (product identification code) of the human-machine interface device as the device identifier, and matches it in the target system device according to the device identifier to obtain the corresponding initial key-value mapping table.

[0046] In other embodiments, the preset connection mode is a wired connection mode, and the target system device obtains the MAC (Media Access Control) address of the human-machine interface device as a device identifier, and matches it in the target system device according to the device identifier to obtain the corresponding initial key-value mapping table.

[0047] Furthermore, after obtaining the initial key-value mapping table, the target system device sends the initial key-value mapping table to the human-machine interface device through the transmission channel corresponding to the preset connection mode when determining that it is the first connection.

[0048] It should be noted that when the target system device determines that it is not the first connection, it does not send the initial key-value mapping table to the human-machine interface device, but directly uses the initial key-value mapping table to respond to the operation request of the human-machine interface device, thereby further improving control efficiency.

[0049] Step 102: determine whether the initial key-value mapping table meets the preset functional conditions and obtain a determination result.

[0050] In the embodiment of the present disclosure, a function condition is preset, and the function condition refers to a key-value mapping relationship corresponding to all functions corresponding to the human-machine interface device.

[0051] In the embodiment of the present disclosure, after obtaining the initial key-value mapping table, it is determined whether the initial key-value mapping table meets the preset functional conditions and a determination result is obtained. Specifically, a scan code to be queried corresponding to each function corresponding to the human-machine interface device is obtained, and it is determined whether the initial key-value mapping table contains all the scan codes to be queried. If any scan code to be queried cannot be found in the initial key-value mapping table, it indicates that the initial key-value mapping table does not meet the preset functional conditions; if all scan codes to be queried can be found in the initial key-value mapping table, it is determined whether the key code corresponding to the scan code to be queried in the initial key-value mapping table matches the corresponding function. If any key code does not match the corresponding function, the preset functional conditions are not met.

[0052] That is, the initial key-value mapping table can query the scan code to be queried corresponding to each function of the human-machine interface device and if the corresponding key code matches each function, it is determined that the preset function condition is met, otherwise the preset function condition is not met.

[0053] Step 103: When it is determined based on the judgment result that the initial key-value mapping table does not meet the preset functional conditions, the initial key-value mapping table is updated based on the preset update strategy to obtain a target key-value mapping table and send it to the target system device; wherein the target key-value mapping table is used to instruct the target system device to respond to the operation request of the human-machine interface device.

[0054] In an embodiment of the present disclosure, when it is determined based on the judgment result that the initial key-value mapping table does not meet the preset functional conditions, it means that the initial key-value mapping table cannot meet the key-value mapping function actually required by the human-computer interface device. Therefore, the initial key-value mapping table needs to be updated based on the preset update strategy to obtain the target key-value mapping table.

[0055] Specifically, the initial key-value mapping table is updated based on a preset update strategy to obtain a target key-value mapping table.

[0056] In some embodiments, when no scan code to be queried is obtained in the key-value pair, a key code mapping relationship corresponding to the scan code to be queried is constructed and added to the initial key-value mapping table to obtain a target key-value mapping table.

[0057] In other embodiments, when the target key code corresponding to any scan code to be queried does not match the function information corresponding to the scan code to be queried, a matching key code that matches the function information corresponding to the scan code to be queried is obtained, and the target key code corresponding to the scan code to be queried in the initial key-value mapping table is updated to the matching key code to obtain the target key-value mapping table.

[0058] It should be noted that if the connected human-machine interface device cannot recognize the device identifier on the target system, the default key-value mapping table is transmitted to the connected human-machine interface device as the initial key-value mapping table, further ensuring subsequent normal judgment updates to ensure that regardless of wired or wireless connection, the target system device can obtain the key-value mapping function actually required by the human-machine interface device.

[0059] Furthermore, the target key-value mapping table is sent to the target system device, so as to instruct the target system device to respond to the operation request of the human-machine interface device through the target key-value mapping table.

[0060] The device key-value mapping table configuration scheme provided by the embodiment of the present disclosure is applied to a human-machine interface device. After connecting to a target system device based on a preset connection method, the device receives an initial key-value mapping table sent by the target system device, determines whether the initial key-value mapping table meets preset functional conditions, and obtains a judgment result; when it is determined based on the judgment result that the initial key-value mapping table does not meet the preset functional conditions, the initial key-value mapping table is updated based on a preset update strategy, and a target key-value mapping table is obtained and sent to the target system device; wherein, the target key-value mapping table is used to instruct the target system device to respond to an operation request of the human-machine interface device. Therefore, after the human-machine interface device is connected to the target system device, when it is determined that the initial key-value mapping table sent by the target system device does not meet the functional requirements, the initial key-value mapping table is updated to obtain the target key-value mapping table to ensure that regardless of wired connection or wireless connection, the target system device can obtain the key-value mapping function actually required by the human-machine interface device, thereby effectively solving the technical problem that some functions of the human-machine interface device cannot be mapped normally and cannot meet the functional control requirements of the human-machine interface device, realizing the adaptation and access of the target system device to a variety of human-machine interface devices, enriching the types of control devices of the target system device, meeting the different control requirements of users, and improving the user operation experience.

[0061] In some embodiments, whether the initial key-value mapping table meets the preset functional conditions is determined to obtain a judgment result, including: obtaining a scan code and a key code corresponding to the scan code based on the initial key-value mapping table, and constructing a key-value pair based on the scan code and the key code corresponding to the scan code; obtaining a scan code to be queried corresponding to each function of the human-computer interface device, and querying the key-value pair based on the scan code to be queried; when each scan code to be queried is queried in the key-value pair, and a target key code corresponding to each scan code to be queried is obtained and the target key code matches the functional information corresponding to the scan code to be queried, it is determined that the initial key-value mapping table meets the preset functional conditions; when no scan code to be queried is obtained in the key-value pair; and / or when the target key code corresponding to any scan code to be queried does not match the functional information corresponding to the scan code to be queried, it is determined that the initial key-value mapping table does not meet the preset functional conditions.

[0062] In the embodiment of the present disclosure, the initial key-value mapping table is traversed to obtain each scan code and the key code corresponding to the scan code to construct a key-value pair, that is, each scan code and the key code corresponding to the scan code are stored in the form of a Key-Value key-value pair, and then the key-value pair is queried according to the scan code to be queried corresponding to each function of the human-computer interface device. When no scan code to be queried is obtained in the key-value pair, it is determined that the preset function condition is not met; when the target key code corresponding to any scan code to be queried does not match the function information corresponding to the scan code to be queried, it is determined that the initial key-value mapping table does not meet the preset function condition.

[0063] It should be noted that when each scan code to be queried is found in the key-value pair and the target key code corresponding to each scan code to be queried matches the function information corresponding to the scan code to be queried, it is determined that the initial key-value mapping table meets the preset function condition.

[0064] For example, the initial key-value mapping table is shown in Table 1.

[0065] Table 1 Initial key-value mapping table

[0066] Scan code Key Code 304 BUTTON_A 305 BUTTON_B 307 BUTTON_X 308 BUTTON_Y 310 BUTTON_L1

[0067] Specifically, the scan code is the value sent by the human-machine interface device, and the key code is the key value function corresponding to the target system; for example, 304 in Table 1 represents the number sent by the human-machine interface device after a certain key is pressed, and BUTTON_A is the key value function corresponding to the target system, which means entering the letter A.

[0068] It can be understood that after the human-machine interface device receives the initial key-value mapping table transmitted to it by the target system (such as the Android system), the human-machine interface device will parse and identify the initial key-value mapping table line by line to obtain the corresponding scan code and key code respectively; the scan code and key code are stored in the form of key-value pairs, and after the storage is completed, the verification function is started. The human-machine interface device will query the scan codes corresponding to all supported functions one by one against the stored key-value pair information. If the scan code can be queried and the key code corresponding to the scan code is completely matched with the function of the human-machine interface device, it is considered that the initial key-value mapping table meets the functional requirements; if the scan code cannot be queried, or the key code queried according to the scan code does not match the current function of the human-machine interface device, the update logic is started.

[0069] In the above scheme, by constructing the initial key-value mapping table into key-value pairs, matching the scan codes in the key-value pairs in sequence according to the functions of the human-machine interface device and whether the key code corresponding to each scan code is consistent with the function, it is determined whether the initial key-value mapping table meets the preset functional conditions, thereby further improving the accuracy of the judgment and ensuring the accuracy of subsequent control.

[0070] In some embodiments, the initial key-value mapping table is updated based on a preset update strategy to obtain a target key-value mapping table, including: when no scan code to be queried is obtained in the key-value pair, a key code mapping relationship corresponding to the scan code to be queried is constructed and added to the initial key-value mapping table to obtain a target key-value mapping table; and / or, when the target key code corresponding to any scan code to be queried does not match the function information corresponding to the scan code to be queried, a matching key code that matches the function information corresponding to the scan code to be queried is obtained, and the target key code corresponding to the scan code to be queried in the initial key-value mapping table is updated to a matching key code to obtain a target key-value mapping table.

[0071] Specifically, if all the scan codes in the currently stored key-value pairs are traversed and updated, and the human-machine interface device still has a new scan code that cannot be found in the key-value pair, then the newly added scan code and key code of the human-machine interface device are written into the storage file in the form of a key-value pair; if the scan code is found to have a corresponding key code, but the key code and the current function of the human-machine interface device cannot correspond, then the function value of the human-machine interface device is updated to the corresponding value of this key code in the stored data, and the stored data information is updated, that is, the initial key-value mapping table is updated.

[0072] Therefore, when the initial key-value mapping table does not meet the preset functional conditions, the mapping relationship between the scan code and the key code corresponding to the function that is not in the initial key-value mapping table will be added, and the key code corresponding to the scan code of the function that does not match will be replaced, so as to ensure that the updated target key-value mapping table meets all functional requirements of the human-computer interface device, thereby meeting user usage needs and improving user experience.

[0073] In some embodiments, when the scan code in the key-value pair is not the scan code to be queried, the scan code and the corresponding key code that are not the scan code to be queried in the initial key-value mapping table are deleted to obtain a target key-value mapping table.

[0074] Specifically, if the scan code cannot be found in the key-value pair, the key-value pair corresponding to the scan code in the stored data is deleted.

[0075] Therefore, redundant scan codes and corresponding key codes in the key-value pairs are deleted, thereby ensuring the accuracy of the target key-value mapping table and improving the storage efficiency and control accuracy of subsequent target system devices.

[0076] Based on the description of the above embodiment, the human-machine interface device parses the initial key-value mapping table, determines whether the mapped key value meets the functional requirements, and updates the initial key-value mapping table if it is determined that the mapped key value does not meet the functional requirements.

[0077] For example, Figure 2 As shown, the method includes step 2.1, wherein the human-machine interface device receives an initial key-value mapping table sent by the target system device; step 2.2, parsing the initial key-value mapping table to obtain a scan code and a key code, and storing them in a memory in the form of a key-value pair; step 2.3, querying the key-value pair using the scan code; step 2.4, determining whether there is a scan code corresponding to each function of the human-machine interface device in the key-value pair; if not, executing step 2.5, storing the scan code and key code corresponding to the function in the form of a key-value pair in the memory; step 2.6, deleting the scan code and the corresponding key code of the human-machine interface device function that do not exist in the initial key-value pair; if so, executing step 2.7, determining whether the key code and function corresponding to the scan code match; if not, that is, the key code and the current function of the human-machine interface device cannot correspond, executing step 2.8, updating the function value of the human-machine interface device to the corresponding value of the scan code in the stored data, and updating the stored data information; if they match, executing step 2.9, traversing all the scan codes and completing the update; step 2.10, storing all the data, generating a target key-value mapping table, and transmitting the new target key-value mapping table to the target system device.

[0078] Therefore, by using the human-machine interface device and the target system device to interactively transmit key-value mapping table data in advance after the connection, and the handshake verification and correction of the data at both ends, the compatibility problem of the human-machine interface device can be effectively solved, the user experience can be improved, and the complex process of the target system needing to completely upgrade the system in order to adapt to the human-machine interface device can be avoided.

[0079] In some embodiments, the method further includes: when it is determined based on the judgment result that the initial key-value mapping table meets the preset functional conditions, sending status information to the target system device; wherein the status information is used to instruct the target system device to use the initial key-value mapping table as the target key-value mapping table.

[0080] In the embodiment of the present disclosure, the status information is a notification message, and the user notifies the target system device that the initial key-value mapping table meets the preset functional conditions, so that the target system device uses the initial key-value mapping table as the target key-value mapping table to respond to the operation request of the human-machine interface device.

[0081] Therefore, when the initial key-value mapping table meets the preset functional conditions, the target system device is notified through status information that the current initial key-value mapping table meets the functional requirements of the human-machine interface device and can be directly used for control operations, further improving control efficiency and flexibility.

[0082] In some embodiments, before connecting to the target system device based on a preset connection method, the method further includes: sending a connection request to the target system device; wherein, when the target system device determines that it is the first connection based on the connection request, it connects to the human-computer interface device according to the preset connection method and sends an initial key-value mapping table to the human-computer interface device.

[0083] Specifically, the human-machine interface device sends a connection request to the target system device. After receiving the connection request, the target system device connects to the human-machine interface device in a preset manner and obtains the human-machine interface device identification according to the preset connection method. More specifically, the target system device obtains the VendorID and ProductID of the human-machine interface device as the device identification, and matches them in the target system device according to the device identification to obtain the corresponding initial key-value mapping table; or the target system device obtains the MAC address of the human-machine interface device as the device identification, and matches them in the target system device according to the device identification to obtain the corresponding initial key-value mapping table.

[0084] It should be noted that if the connected human-machine interface device cannot recognize the device identifier on the target system, the default "Generic.kl" file is transmitted to the connected human-machine interface device as the initial key-value mapping table, further ensuring subsequent normal judgment updates to ensure that the target system device can obtain the key-value mapping function actually required by the human-machine interface device regardless of wired or wireless connection.

[0085] Furthermore, it is determined whether it is the first connection, and when the connection is made for the first time, the initial key-value mapping table is sent to the human-machine interface device via a transmission channel corresponding to a preset connection mode.

[0086] It should be noted that when the target system device determines that it is not the first connection, it does not send the initial key-value mapping table to the human-machine interface device, but directly uses the initial key-value mapping table to respond to the operation request of the human-machine interface device.

[0087] Therefore, only when the target system device determines that it is the first connection, the initial key-value mapping table is sent to the human-machine interface device for judgment and update, so that it can be directly used for control when it is not the first connection, further improving the efficiency and flexibility of control.

[0088] In some embodiments, the method further includes: sending the target key-value mapping table to the target system device; wherein the target system device stores the target key-value mapping table according to a preset connection mode.

[0089] Specifically, after obtaining the target key-value mapping table, the target key-value mapping table is sent to the target system device, so that the target system device stores the target key-value mapping table according to the preset connection method. After subsequent reconnection, the corresponding target key-value mapping table is obtained according to the preset connection method to directly respond to the operation request of the human-computer interface device.

[0090] Thus, the updated target key-value mapping table is sent to the target system device for storage, and subsequent reconnection does not require judgment and update, and can be directly used for operation requests of the human-machine interface device, further improving control efficiency.

[0091] Figure 3 This is a flow chart of another method for configuring a device key-value mapping table provided by the present disclosure. This embodiment further optimizes the above-mentioned method for configuring a device key-value mapping table based on the above-mentioned embodiment. Figure 3 As shown, the method includes:

[0092] Step 301: Send a connection request to a target system device; when the target system device determines that the connection is the first time based on the connection request, it connects to the human-machine interface device according to a preset connection method and sends an initial key-value mapping table to the human-machine interface device.

[0093] Step 302: After connecting to the target system device based on the preset connection mode, receive the initial key-value mapping table sent by the target system device.

[0094] Step 303: Obtain the scan code and the key code corresponding to the scan code based on the initial key-value mapping table, construct a key-value pair based on the scan code and the key code corresponding to the scan code, obtain the scan code to be queried corresponding to each function of the human-machine interface device, and query the key-value pair based on the scan code to be queried.

[0095] Step 304: when no scan code to be queried is obtained in the key-value pair; and / or when the target key corresponding to any scan code to be queried does not match the function information corresponding to the scan code to be queried, it is determined that the initial key-value mapping table does not meet the preset function condition.

[0096] Step 305: When no scan code to be queried is found in the key-value pair, a key code mapping relationship corresponding to the scan code to be queried is constructed and added to the initial key-value mapping table to obtain a target key-value mapping table.

[0097] Step 306: When the target key code corresponding to any scan code to be queried does not match the function information corresponding to the scan code to be queried, obtain the matching key code that matches the function information corresponding to the scan code to be queried, update the target key code corresponding to the scan code to be queried in the initial key-value mapping table to the matching key code, and obtain the target key-value mapping table.

[0098] Step 307: When the scan code in the key-value pair is not the scan code to be queried, the scan code and the corresponding key code that are not the scan code to be queried in the initial key-value mapping table are deleted to obtain a target key-value mapping table.

[0099] Step 308: Send the target key-value mapping table to the target system device; wherein the target system device stores the target key-value mapping table according to a preset connection mode.

[0100] After step 303 , steps 309 to 310 and / or steps 304 to 308 are executed. Figure 3 The execution steps are only examples and can be adjusted as needed.

[0101] Step 309: When each scan code to be queried is obtained from the key-value pair, and the target key code corresponding to each scan code to be queried is obtained and the target key code matches the function information corresponding to the scan code to be queried, it is determined that the initial key-value mapping table meets the preset function condition.

[0102] Step 310: Send status information to the target system device; wherein the status information is used to instruct the target system device to use the initial key-value mapping table as the target key-value mapping table.

[0103] Specifically, after the human-machine interface device and the target system device are connected, the target system first transmits the preset key-value mapping table data to the human-machine interface device through the transmission channel, such as through USB data connection, and can obtain the VendorID and ProductID of the human-machine interface device. Then, based on the VendorID and ProductID, the preset initial key-value mapping table in the target system, such as the "Vendor_xxxx_Product_xxxx.kl" file, is identified, and the file is transferred to the connected human-machine interface device.

[0104] Furthermore, after the human-machine interface device receives the initial key-value mapping table, it parses the file content and identifies whether the mapping key value of the initial key-value mapping table meets the current functional requirements based on the current function of its own device; if it meets the functional requirements of the current human-machine interface device, the status is returned to the target system, and the target system will subsequently use the corresponding key-value mapping table for subsequent key-value mapping and functional logic; if the initial key-value mapping table provided by the target system cannot meet the functional requirements of the human-machine interface device, the human-machine interface device updates the mapping table content of the initial key-value mapping table and returns the updated key-value mapping table to the target system. After receiving the new key-value mapping table, the target system saves it for responding to the operation request of the human-machine interface device.

[0105] Among them, the new key-value mapping table is saved. There are many ways to save files, which can be selected according to the preset connection method, such as USB connection, "Vendor_xxxx_Product_xxxx.k" defined by VendorID and ProductID; for example, Bluetooth connection, the human-machine interface device connected via Bluetooth, then the saved file is a name defined by the Bluetooth name of the human-machine interface device plus the last four digits of the Bluetooth MAC address, such as "XXX_MAC_07b7.kl"; the subsequent target system will use this target key-value mapping table to perform key-value mapping and functional logic of the corresponding human-machine interface device.

[0106] It should be noted that the key-value mapping table is sent, determined, and updated when the human-machine interface device and the target system device are connected for the first time. In subsequent connections, if the target system device already has a key-value mapping table related to the human-machine interface device saved, it can be used directly.

[0107] Therefore, when any human-machine interface device is connected, whether it is a wired connection or a wireless connection, the key-value mapping function actually required by the actual human-machine interface device can be obtained, avoiding the situation where the default key-value mapping causes some functions to fail to map normally.

[0108] In the above embodiment, in order to solve the compatibility problem of abnormal functions after the human-machine interface device is connected to the target system device, a key-value mapping table transmission handshake process is added after the connection, and both parties confirm the function key-value mapping in advance. For example, the target system device is an Android system device, that is, an Android system, such as Figure 4As shown, step 4.1 device connection, the HID device establishes a connection with the Android system; step 4.2 obtains device information, the Android system obtains the device identifier of the HID device, such as VendorID and ProductID or MAC address, through a transmission channel (such as USB or Bluetooth); step 4.3 file identification, determines whether the device identifier, such as VendorID and ProductID, is recognized; if so, that is, the device identifiers such as VendorID and ProductID are recognized, execute step 4.4 to obtain the key-value mapping table according to the device identifier, and the corresponding "Vendor_xxxx_Product_xxxx.kl" file can be found; if it cannot be recognized, execute step 4.5 to use the default key-value mapping table, such as the "Generic.kl" file; step 4.6 File transfer, the Android system transfers the "kl" file to the HID device; further, file parsing and verification, step 4.7 the HID device parses the "kl" file; step 4.8 determines whether the mapping key value meets the functional requirements; if it does, execute step 4.9 to return the status to the Android system; if not, execute step 4.10 the HID device updates the "kl" file and returns it to the Android system; finally, the file is saved, step 4.11 the Android system saves the new "kl" file, and the saving method is determined by the connection method (USB or Bluetooth, etc.); among them, it is determined whether the connection method is USB or Bluetooth. If it is a USB connection, it is saved as "Vendor_xxxx_Product_xxxx.kl"; if it is a Bluetooth connection, it is saved as "XXX_MAC_07b7.kl".

[0109] Specifically, for subsequent usage scenarios, if the HID device is connected to the Android system for the first time, the Android system uses a new "kl" file; if it is not the first time the HID device is connected to the Android system, the saved "kl" file is used directly; among them, the Android system uses the "kl" file for key-value mapping and functional logic processing.

[0110] The disclosed embodiments provide a device key-value mapping table configuration scheme. After a human-machine interface device is connected to a target system device via a specific connection method, it receives an initial key-value mapping table sent by the target system, determines whether the initial key-value mapping table meets the functional requirements of the human-machine interface device, and if not, updates the initial key-value mapping table to obtain a target key-value mapping table that meets the functional requirements and sends it to the target system device for use in responding to operation requests from the human-machine interface device. This method enables the target system device to obtain the key-value mapping functions actually required by the human-machine interface device, regardless of whether the connection is wired or wireless.

[0111] Figure 5 This is a schematic structural diagram of a device key-value mapping table configuration apparatus provided by an embodiment of the present disclosure. The apparatus can be implemented by software and / or hardware and can generally be integrated into an electronic device.

[0112] like Figure 4 As shown, the device is applied to a human-machine interface device, and the device includes:

[0113] The receiving module 501 is configured to receive an initial key-value mapping table sent by a target system device after connecting to the target system device based on a preset connection mode.

[0114] The judgment module 502 is used to judge whether the initial key-value mapping table meets the preset functional conditions and obtain a judgment result.

[0115] Processing module 503 is used to update the initial key-value mapping table based on a preset update strategy when it is determined based on the judgment result that the initial key-value mapping table does not meet the preset functional conditions, and obtain a target key-value mapping table and send it to the target system device; wherein, the target key-value mapping table is used to instruct the target system device to respond to the operation request of the human-machine interface device.

[0116] Optionally, the judgment module 502 is specifically used to: obtain a scan code and a key code corresponding to the scan code based on the initial key-value mapping table, and construct a key-value pair based on the scan code and the key code corresponding to the scan code; obtain the scan code to be queried corresponding to each function of the human-computer interface device, and query the key-value pair based on the scan code to be queried; when each of the scan codes to be queried is queried in the key-value pair, and the target key code corresponding to each of the scan codes to be queried is obtained and the target key code matches the function information corresponding to the scan code to be queried, it is determined that the initial key-value mapping table meets the preset function condition; when any of the scan codes to be queried cannot be obtained in the key-value pair; and / or when the target key code corresponding to any of the scan codes to be queried does not match the function information corresponding to the scan code to be queried, it is determined that the initial key-value mapping table does not meet the preset function condition.

[0117] Therefore, by constructing the initial key-value mapping table into key-value pairs, matching the scan codes in the key-value pairs in sequence according to the functions of the human-machine interface device and whether the key code corresponding to each scan code is consistent with the function, it is determined whether the initial key-value mapping table meets the preset functional conditions, thereby further improving the accuracy of the judgment and ensuring the accuracy of subsequent control.

[0118] Optionally, the processing module 503 is specifically used to: when any of the scan codes to be queried is not obtained in the key-value pair, construct a key code mapping relationship corresponding to the scan code to be queried and add it to the initial key-value mapping table to obtain the target key-value mapping table; and / or, when the target key code corresponding to any of the scan codes to be queried does not match the function information corresponding to the scan code to be queried, obtain a matching key code that matches the function information corresponding to the scan code to be queried, update the target key code corresponding to the scan code to be queried in the initial key-value mapping table to the matching key code, and obtain the target key code mapping table.

[0119] Therefore, when the initial key-value mapping table does not meet the preset functional conditions, the mapping relationship between the scan code and the key code corresponding to the function that is not in the initial key-value mapping table will be added, and the key code corresponding to the scan code of the function that does not match will be replaced, so as to ensure that the updated target key-value mapping table meets all functional requirements of the human-computer interface device, thereby meeting user usage needs and improving user experience.

[0120] Optionally, the processing module 503 is further specifically used to: when the scan code existing in the key-value pair is not the scan code to be queried, delete the scan code and the corresponding key code in the initial key-value mapping table that are not the scan code to be queried, and obtain the target key-value mapping table.

[0121] Furthermore, redundant scan codes and corresponding key codes in the key-value pairs are deleted, thereby ensuring the accuracy of the target key-value mapping table and improving the storage efficiency and control accuracy of subsequent target system devices.

[0122] Optionally, the processing module 503 is further specifically used to: when it is determined based on the judgment result that the initial key-value mapping table meets the preset functional conditions, send status information to the target system device; wherein, the status information is used to instruct the target system device to use the initial key-value mapping table as the target key-value mapping table.

[0123] Therefore, when the initial key-value mapping table meets the preset functional conditions, the target system device is notified through status information that the current initial key-value mapping table meets the functional requirements of the human-machine interface device and can be directly used for control operations, further improving control efficiency and flexibility.

[0124] Optionally, the device also includes: a first sending module, used to send a connection request to the target system device; wherein, when the target system device determines that it is the first connection based on the connection request, it connects to the human-computer interface device according to the preset connection method, and sends the initial key-value mapping table to the human-computer interface device.

[0125] Therefore, only when the target system device determines that it is the first connection, the initial key-value mapping table is sent to the human-machine interface device for judgment and update, so that it can be directly used for control when it is not the first connection, further improving the efficiency and flexibility of control.

[0126] Optionally, the apparatus further includes: a second sending module, configured to send the target key-value mapping table to the target system device; wherein the target system device stores the target key-value mapping table according to the preset connection mode.

[0127] Thus, the updated target key-value mapping table is sent to the target system device for storage, and subsequent reconnection does not require judgment and update, and can be directly used for operation requests of the human-machine interface device, further improving control efficiency.

[0128] The device key-value mapping table configuration apparatus provided in the embodiments of the present disclosure can execute the device key-value mapping table configuration method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0129] An embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the device key-value mapping table configuration method provided by any embodiment of the present disclosure.

[0130] Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure.

[0131] For example, Figure 6 As shown, the electronic device includes: a memory 601 and a processor 602, wherein the memory 601 stores an executable program code 6011, and the processor 602 is used to call and execute the executable program code 6011 to perform the device key-value mapping table configuration method.

[0132] In this embodiment, the electronic device can be divided into functional modules according to the above-described method example. For example, each functional module can be mapped to a specific function, or two or more functions can be integrated into a single processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and represents only a logical functional division. In actual implementation, other division methods may be used.

[0133] In the case of dividing each functional module into corresponding functional modules, the electronic device may include: a receiving and obtaining module, a calculation module, and an early warning module. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0134] The electronic device provided in this embodiment is used to execute the above-mentioned device key-value mapping table configuration method, and thus can achieve the same effect as the above-mentioned implementation method.

[0135] In the case of an integrated unit, the electronic device may include a processing module and a storage module. The processing module may be used to control and manage the operation of the electronic device, and the storage module may be used to support the electronic device in executing mutual program codes and data.

[0136] The processing module may be a processor or controller that implements or executes various exemplary logic blocks, modules, and circuits described herein. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor (DSP) and a microprocessor, and the storage module may be a memory.

[0137] This embodiment also provides a computer-readable storage medium, which stores computer program code (including but not limited to disk storage, CD-ROM, optical storage, etc.). When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a device key-value mapping table configuration method provided in the above embodiment.

[0138] This embodiment further provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement a device key-value mapping table configuration method provided by the above embodiment.

[0139] Among them, the beneficial effects of the above embodiments can refer to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0140] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0141] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0142] In the description of the present disclosure, it should be understood that if the terms "up", "down", "front", "back", "left" and "right" are used to indicate directions or positional relationships, they are based on the directions or positional relationships shown in the accompanying drawings. They are only used to facilitate the description of the present invention and simplify the description, and do not indicate or imply that the positions or elements referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, they should not be understood as limitations of the present disclosure.

[0143] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. It should also be noted that the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, commodity, or device comprising the element.

[0144] The above are merely examples of the present disclosure and are not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.

Claims

1. A device key-value mapping table configuration method, characterized in that: Applied to a human-machine interface device, the method comprises: After connecting to the target system device based on a preset connection mode, receiving an initial key-value mapping table sent by the target system device; Determine whether the initial key-value mapping table meets the preset functional conditions and obtain a determination result; When it is determined based on the judgment result that the initial key-value mapping table does not meet the preset functional conditions, the initial key-value mapping table is updated based on the preset update strategy to obtain a target key-value mapping table and send it to the target system device; wherein, the target key-value mapping table is used to instruct the target system device to respond to the operation request of the human-machine interface device.

2. The method according to claim 1, characterized in that The determining whether the initial key-value mapping table satisfies a preset functional condition and obtaining a determination result includes: Acquire a scan code and a key code corresponding to the scan code based on the initial key-value mapping table, and construct a key-value pair based on the scan code and the key code corresponding to the scan code; Obtaining a scan code to be queried corresponding to each function of the human-machine interface device, and querying the key-value pair based on the scan code to be queried; When each scan code to be queried is queried in the key-value pair, and a target key code corresponding to each scan code to be queried is obtained and the target key code matches the function information corresponding to the scan code to be queried, determining that the initial key-value mapping table meets the preset function condition; When no scan code to be queried is obtained in the key-value pair; and / or when the target key code corresponding to any scan code to be queried does not match the function information corresponding to the scan code to be queried, it is determined that the initial key-value mapping table does not meet the preset function condition.

3. The method according to claim 2, characterized in that The updating of the initial key-value mapping table based on a preset updating strategy to obtain a target key-value mapping table includes: When no scan code to be queried is found in the key-value pair, a key code mapping relationship corresponding to the scan code to be queried is constructed and added to the initial key-value mapping table to obtain the target key-value mapping table; and / or, When the target key code corresponding to any of the scan codes to be queried does not match the function information corresponding to the scan code to be queried, obtain the matching key code that matches the function information corresponding to the scan code to be queried, update the target key code corresponding to the scan code to be queried in the initial key-value mapping table to the matching key code, and obtain the target key-value mapping table.

4. The method according to claim 3, characterized in that The method further comprises: When the scan code in the key-value pair is not the scan code to be queried, the scan codes and corresponding key codes that are not the scan code to be queried in the initial key-value mapping table are deleted to obtain the target key-value mapping table.

5. The method according to claim 1, wherein The method further comprises: When it is determined based on the judgment result that the initial key-value mapping table meets the preset functional condition, status information is sent to the target system device; wherein the status information is used to instruct the target system device to use the initial key-value mapping table as the target key-value mapping table.

6. The method according to claim 1, characterized in that Before connecting with the target system device based on the preset connection mode, the method further includes: Sending a connection request to the target system device; wherein, when the target system device determines that it is the first connection based on the connection request, connecting to the human-machine interface device according to the preset connection mode, and sending the initial key-value mapping table to the human-machine interface device.

7. The method according to claim 1, characterized in that The method further comprises: The target key-value mapping table is sent to the target system device; wherein the target system device stores the target key-value mapping table according to the preset connection mode.

8. A device key-value mapping table configuration device, characterized in that: Applied to a human-machine interface device, the device comprises: A receiving module, configured to receive an initial key-value mapping table sent by a target system device after connecting to the target system device based on a preset connection mode; A judgment module, configured to judge whether the initial key-value mapping table meets a preset functional condition and obtain a judgment result; A processing module is used to update the initial key-value mapping table based on a preset update strategy when it is determined based on the judgment result that the initial key-value mapping table does not meet the preset functional conditions, and obtain a target key-value mapping table and send it to the target system device; wherein, the target key-value mapping table is used to instruct the target system device to respond to the operation request of the human-machine interface device.

9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.