Method and system for automatically configuring mapping of key values of remote controller keys

By establishing a standardized key mapping database and automatically updating system configuration files, the complexity and compatibility issues caused by manual operation in remote control key value configuration are resolved, achieving efficient automatic adaptation of the remote control.

CN120950146APending Publication Date: 2025-11-14PANOVASIC TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511084154.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing remote control key value configuration schemes rely on manual operation, resulting in complex processes, a high risk of errors, high maintenance costs, and poor compatibility.

Method used

By establishing a unified and standardized button mapping database, the correspondence between remote control button functions and IR scan codes is analyzed, and the system configuration file is automatically updated to achieve automatic adaptation of the remote control.

Benefits of technology

It improves the automation and accuracy of key-value mapping, shortens configuration time, reduces rework and maintenance costs caused by human error, and enhances system maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120950146A_ABST
    Figure CN120950146A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for automatically configuring mapping of key values of keys of a remote controller. By establishing the standardized key mapping database, analyzing the corresponding relation between the remote controller key function and the IR scanning code, querying the key mapping database, matching the mapping relation and automatically updating the system configuration file of each layer, the configuration time of the remote controller key mapping can be greatly shortened and the accuracy is improved in the automatic adaptation of the remote controller. According to the method, the automation degree and accuracy of key value mapping are improved, and errors caused by manual recording are avoided. Therefore, the working efficiency is improved, the configuration time for mapping the keys of the remote controller is greatly shortened, and the rework and maintenance cost caused by manual misoperation is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote control technology, and more specifically, to a method and system for automatically configuring remote control button key value mapping. Background Technology

[0002] Currently, smart TVs and set-top boxes support remote controls from different manufacturers, and these remote controls use different IR hardware scanning codes for signal transmission. Because there are many remote control manufacturers, the IR hardware scanning codes of different manufacturers' TV remote controls are also different. When it is necessary to adapt to remote controls from different manufacturers, it is necessary to map the scanning codes to the Android system, and then further convert them into Android system internal keycodes to ensure that the remote control buttons can correctly perform the corresponding functions. Existing remote control key value configuration schemes mainly rely on manual methods, completing the mapping by modifying multiple layers of system files.

[0003] In traditional solutions, whenever a remote control is replaced by a different manufacturer or the button layout is updated, technicians must manually find the corresponding Android system scan codes and keycodes for each button function based on the IR hardware scan code of each remote control, and then update the configuration files accordingly. This manual operation has the following problems:

[0004] (1) Manually mapping remote control key codes is a complex process and prone to errors;

[0005] (2) High manual maintenance costs and difficult management;

[0006] (3) Lack of standardized management and poor compatibility. Summary of the Invention

[0007] This invention overcomes the problems that arise in the manual adaptation of remote controls in the prior art, and provides a method and system for automatically configuring remote control button key value mapping, in order to solve the problems existing in the prior art.

[0008] To address the aforementioned technical problems, one aspect of the present invention provides a method for automatically configuring remote control button key value mapping.

[0009] A method for automatically configuring remote control button key value mapping includes the following steps:

[0010] S1 establishes a unified and standardized key mapping database;

[0011] S2 analyzes the correspondence between remote control button functions and IR scan codes;

[0012] S3 queries the standardized key mapping database based on the IR scan code and matches the mapping relationship;

[0013] S4 automatically modifies the system configuration file based on the mapping relationship;

[0014] The S5 reloads the driver and configuration files, and the remote control applies new button mapping rules.

[0015] By establishing a standardized button mapping database, analyzing the correspondence between remote control button functions and IR scan codes, querying the button mapping database, matching the mapping relationships, and automatically updating the configuration files of each system layer, this invention can achieve automatic remote control adaptation, significantly shorten the configuration time for remote control button mapping, and improve accuracy.

[0016] A further technical solution is that the unified standardized button mapping database is used to record the correspondence between remote control button functions and scan codes and keycodes in the Android system.

[0017] A further technical solution is that S2 specifically includes the following steps;

[0018] S21 analyzes the manufacturer's remote control mapping CSV file to extract button functions and IR hardware scan codes;

[0019] S22 verifies whether the content of the CSV file is valid, the verification includes data integrity detection and data format verification;

[0020] If S23 is valid, proceed to the next step; if invalid, display an error message and re-enter S21 to execute subsequent steps.

[0021] Since CSV files may have validity issues, validity checks can be performed before matching mapping relationships to reduce potential errors in the mapping process.

[0022] A further technical solution is that S3 specifically includes the following steps:

[0023] S31 stores the button functions and corresponding IR scan codes in the CSV file into a key-value pair mapping container;

[0024] S32 traverses the key-value pair mapping container, queries the standardized button mapping database, matches the mapping relationships, and generates a remote control button mapping table. The remote control button mapping table includes the corresponding button functions, IR hardware scan codes, Android scan codes, and Android Keycodes.

[0025] A further technical solution is that S31 specifically includes the following steps:

[0026] Split the contents of the CSV file line by line using line number delimiters;

[0027] In each line of the string, establish a correspondence between the character to the left of the first comma separator and its hexadecimal scan code, and store this correspondence in a key-value pair mapping container.

[0028] A further technical solution is that S4 specifically includes the following steps:

[0029] Using automated scripting tools, the system configuration files are automatically updated based on the matching mapping relationship generated by S3. The system configuration files include the Linux driver layer device tree file, the infrared system configuration file, and the Android key-value layout file.

[0030] A further technical solution is that step S4 includes the following steps;

[0031] S41 automatically modifies the array element list of the ir_key_table structure in the Linux driver layer device tree file to map the IR hardware scan codes to the Linux standard input scan codes;

[0032] S42 automatically modifies the corresponding Keymap mapping in the infrared system configuration file;

[0033] S43 automatically modifies the Android key-value layout file, binding the Android system scan code with the corresponding AndroidKeycode to complete the mapping.

[0034] A further technical solution is that step S4 includes the following steps;

[0035] S44 automatically modifies the configuration file and checks whether the configuration file update was successful;

[0036] If S45 is successful, proceed to step S5; otherwise, proceed to S32 and subsequent steps.

[0037] Various problems may occur during configuration file updates. By retrying the above steps, you can minimize the chances of configuration update failures.

[0038] The present invention also provides an automatic configuration system for remote control button key value mapping.

[0039] An automatic configuration system for remote control button key value mapping includes a button mapping database, a remote control parsing module, a matching module, a key value pair mapping container, a system configuration module, and a remote control.

[0040] The button mapping database is used to record the mapping relationship between remote control button functions and data codes;

[0041] The remote control parsing module is used to parse the file containing the correspondence between remote control button functions and IR scan codes, and then stores it in a key-value pair mapping container.

[0042] The key-value pair mapping container is used to temporarily store the correspondence between remote control button functions and IR scan codes;

[0043] The matching module is used to query a standardized key mapping database based on the IR scan code and match the mapping relationship;

[0044] The system configuration module is used to automatically update the configuration file according to the mapping relationship;

[0045] The remote control is used to reload the driver and configuration files.

[0046] A further technical solution is that the system configuration module includes a first configuration module, a second configuration module, and a third configuration module;

[0047] The first configuration module is used to configure the Linux device tree file;

[0048] The second configuration module is used to configure the infrared configuration file;

[0049] The third configuration module is used to configure the Android key-value layout file.

[0050] Compared with existing technologies, the present invention has at least the following beneficial effects: The present invention improves the automation and accuracy of key-value mapping by automatically matching IR hardware scan codes, Android system scan codes, and Keycodes through a standardized key mapping database, avoiding errors caused by manual recording. Furthermore, this application also improves work efficiency, significantly shortening the configuration time for remote control key mapping; it enhances system maintainability, as the unified and standardized key mapping database management standardizes the configuration of remote control mapping data, reducing rework and maintenance costs caused by human error. Attached Figure Description

[0051] Figure 1 This is a flowchart illustrating Embodiment 1 of the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0053] Example 1

[0054] A method for automatically configuring remote control button key value mapping includes the following steps:

[0055] S1 establishes a unified and standardized key mapping database;

[0056] In this embodiment, the unified standardized button mapping database is used to record the correspondence between remote control button functions and scan codes and keycodes in the Android system.

[0057] Since the Android system's scan codes and keycodes are independent of the remote control's hardware, a standardized key mapping database can be pre-established to record the correspondence between commonly used key functions and the scan codes and keycodes in the Android system. The binding relationships between some keycodes and key functions can be based on the definitions in the Android system kernel file bionic / libc / kernel / uapi / linux / input-event-codes.h, while the binding relationships for other special keys can be set based on mapping experience from previous television products. Scan codes can be sequentially arranged to map corresponding keycodes.

[0058] The binding relationships between other button functions and Keycodes are determined based on mapping experience from previous products. Scan codes can be sequentially arranged to complete the mapping with Keycodes. In this embodiment, the standardized button mapping database format is as follows:

[0059] Button Functions Android QR code Android Keycode POWER X101 Y101 BACK X102 Y102 HOME X103 Y103 MENU X104 Y104

[0060] S2 analyzes the correspondence between remote control button functions and IR scan codes;

[0061] In a further preferred embodiment, step S2 specifically includes the following steps;

[0062] S21 analyzes the manufacturer's remote control mapping CSV file to extract button functions and IR hardware scan codes;

[0063] S22 verifies whether the content of the CSV file is valid, the verification includes data integrity detection and data format verification;

[0064] If S23 is valid, proceed to the next step; if invalid, display an error message and re-enter S21 to execute subsequent steps.

[0065] S3 queries the standardized key mapping database based on the IR scan code and matches the mapping relationship;

[0066] In a further preferred embodiment, step S3 specifically includes the following steps:

[0067] S31 stores the button functions and corresponding IR scan codes in the CSV file into a key-value pair mapping container;

[0068] S31 specifically includes the following steps:

[0069] Split the contents of the CSV file line by line using line number delimiters;

[0070] In each line of the string, the character to the left of the first comma separator and its hexadecimal scan code to the right are matched and stored in a key-value pair mapping container.

[0071] In this embodiment, the contents of the CSV file for the new manufacturer's remote control that needs to be paired are as follows:

[0072] POWER, 0X12,

[0073] BACK, 0X40

[0074] HOME, 0X51,

[0075] MENU, 0X5B

[0076] S32 traverses the key-value pair mapping container, queries the standardized button mapping database, matches the mapping relationships, and generates a remote control button mapping table. The remote control button mapping table includes the corresponding button functions, IR hardware scan codes, Android scan codes, and Android Keycodes.

[0077] The process iterates through the key-value pair mapping container containing the correspondence between IR hardware scan codes and button functions, queries the standardized button mapping database, generates the mapping relationship between the remote control IR hardware scan code and the Android system scan code / Keycode, creates a new manufacturer's remote control button mapping database table based on the remote control's system identification code, and inserts the query results into the database table. In this embodiment, the content format of the generated database table is as follows:

[0078] Button Functions IR scan code Android QR code Android Keycode POWER 0X12 X101 Y101 BACK 0X40 X102 Y102 HOME 0X51 X103 Y103 MENU 0X5B X104 Y104

[0079] S4 automatically modifies the system configuration file based on the mapping relationship;

[0080] In a further preferred embodiment, step S4 specifically includes the following steps:

[0081] Using automated scripting tools, the system configuration files are automatically updated based on the matching mapping relationship generated by S3. The system configuration files include the Linux driver layer device tree file, the infrared system configuration file, and the Android key-value layout file.

[0082] S41 automatically modifies the array element list of the ir_key_table structure in the Linux driver layer device tree file to map the IR hardware scan codes to the Linux standard input scan codes;

[0083] For example, update the Linux driver layer device tree file. Based on the manufacturer's remote control button mapping database table generated in the previous step, use a script tool to automatically modify the list of elements in the `ir_key_table` structure array in the file `vendor / mediatek / tv / tvconfig / super / bsp / dtbo / ir / ir_customize_*.dtso`, completing the mapping from IR hardware scan codes to Linux standard input scan codes. The final result is:

[0084] ir_key_table =

[0085] <

[0086] KEY_POWER 0x12 / / IR_POWER

[0087] KEY_BACK 0x40 / / IR_BACK

[0088] KEY_HOME 0x51 / / IR_HOME

[0089] KEY_MENU 0x5B / / IR_MENU

[0090]

[0091] >

[0092] S42 automatically modifies the corresponding Keymap mapping in the infrared system configuration file;

[0093] For example, use a scripting tool to modify automatically:

[0094] The keymap in the vendor / mediatek / tv / misdk / mi / mi / platform / mt_xxx / linux / board_cfg / board_xxx / ir_config.ini file will ultimately result in:

[0095] [KIR_Changhong_Keymap]

[0096] KEY_POWER = 0x12 / / IR_POWER

[0097] KEY_BACK = 0x40 / / IR_BACK

[0098] KEY_HOME = 0x51 / / IR_HOME

[0099] KEY_MENU = 0x5B / / IR_MENU

[0100] S43 automatically modifies the Android key-value layout file, binding the Android system scan code with the corresponding AndroidKeycode to complete the mapping.

[0101] For example, use a scripting tool to modify automatically:

[0102] The final result of the vendor / super / xxx / keylayout / Vendor_xxx_Product_xxx.kl file is:

[0103] key X101 POWER

[0104] key X102 BACK

[0105] key X103 HOME

[0106] key X104 MENU

[0107] Where key is the keyword at the beginning of the line, X101 and X102 are Android system scan codes, and POWER is a custom key value of Android system, which can be converted into a numerical form of Android system Keycode by Android system internally.

[0108] It should be noted that the automation scripting tool can be written in various scripting languages; in this embodiment, Python is used.

[0109] S44 automatically modifies the configuration file and checks whether the configuration file update was successful;

[0110] If S45 is successful, proceed to step S5; otherwise, proceed to S32 and subsequent steps.

[0111] The S5 reloads the driver and configuration files, and the remote control applies new button mapping rules.

[0112] Example 2

[0113] An automatic configuration system for remote control button key value mapping includes a button mapping database, a remote control parsing module, a matching module, a key value pair mapping container, a system configuration module, and a remote control.

[0114] The button mapping database is used to record the mapping relationship between remote control button functions and data codes;

[0115] The remote control parsing module is used to parse the file containing the correspondence between remote control button functions and IR scan codes, and then stores it in a key-value pair mapping container.

[0116] The key-value pair mapping container is used to temporarily store the correspondence between remote control button functions and IR scan codes;

[0117] The matching module is used to query a standardized key mapping database based on the IR scan code and match the mapping relationship;

[0118] The system configuration module is used to automatically update the configuration file according to the mapping relationship;

[0119] The remote control is used to reload the driver and configuration files.

[0120] The system configuration module includes a first configuration module, a second configuration module, and a third configuration module;

[0121] The first configuration module is used to configure the Linux device tree file;

[0122] The second configuration module is used to configure the infrared configuration file;

[0123] The third configuration module is used to configure the Android key-value layout file.

[0124] Although the invention has been described herein with reference to illustrative embodiments, it should be understood that many other modifications and implementations can be devised by those skilled in the art, which will fall within the scope and spirit of the principles disclosed herein. More specifically, various variations and modifications can be made to the components and / or layout of the subject matter combination within the scope of this disclosure. Besides variations and modifications to the components and / or layout, other uses will be apparent to those skilled in the art.

Claims

1. A method for automatically configuring remote control button key value mapping, characterized in that, Includes the following steps: S1 establishes a unified and standardized key mapping database; S2 analyzes the correspondence between remote control button functions and IR scan codes; S3 queries the standardized key mapping database based on the IR scan code and matches the mapping relationship; S4 automatically modifies the system configuration file based on the mapping relationship; The S5 reloads the driver and configuration files, and the remote control applies new button mapping rules.

2. The method for automatically configuring remote control button key value mapping as described in claim 1, characterized in that, The unified standardized button mapping database is used to record the correspondence between remote control button functions and scan codes and keycodes in the Android system.

3. The method for automatically configuring remote control button key value mapping as described in claim 1, characterized in that, S2 specifically includes the following steps; S21 analyzes the manufacturer's remote control mapping CSV file to extract button functions and IR hardware scan codes; S22 verifies whether the content of the CSV file is valid, the verification includes data integrity detection and data format verification; If S23 is valid, proceed to the next step; if invalid, display an error message and re-enter S21 to execute subsequent steps.

4. The method for automatically configuring remote control button key value mapping as described in claim 1, characterized in that, S3 specifically includes the following steps: S31 stores the button functions and corresponding IR scan codes in the CSV file into a key-value pair mapping container; S32 traverses the key-value pair mapping container, queries the standardized button mapping database, matches the mapping relationships, and generates a remote control button mapping table. The remote control button mapping table includes the corresponding button functions, IR hardware scan codes, Android scan codes, and Android Keycodes.

5. The method for automatically configuring remote control button key value mapping as described in claim 4, characterized in that, S31 specifically includes the following steps: Split the contents of the CSV file line by line using line number delimiters; In each line of the string, the character to the left of the first comma separator and its hexadecimal scan code to the right are matched and stored in a key-value pair mapping container.

6. The method for automatically configuring remote control button key value mapping as described in claim 1, characterized in that, S4 specifically includes the following steps: Using automated scripting tools, the system configuration files are automatically updated based on the matching mapping relationship generated by S3. The system configuration files include the Linux driver layer device tree file, the infrared system configuration file, and the Android key-value layout file.

7. The method for automatically configuring remote control button key value mapping as described in claim 1, characterized in that, S4 includes the following steps; S41 automatically modifies the array element list of the ir_key_table structure in the Linux driver layer device tree file to map the IR hardware scan codes to the Linux standard input scan codes; S42 automatically modifies the corresponding Keymap mapping in the infrared system configuration file; S43 automatically modifies the Android key-value layout file to bind the Android system scan code with the corresponding Android Keycode to complete the mapping.

8. The method for automatically configuring remote control button key value mapping as described in claim 4, characterized in that, S4 includes the following steps; S44 automatically modifies the configuration file and checks whether the configuration file update was successful; If S45 is successful, proceed to step S5; otherwise, proceed to S32 and subsequent steps.

9. An automatic configuration system for remote control button key value mapping, characterized in that, This includes a button mapping database, a remote control parsing module, a matching module, a key-value pair mapping container, a system configuration module, and a remote control. The button mapping database is used to record the mapping relationship between remote control button functions and data codes; The remote control parsing module is used to parse the file containing the correspondence between remote control button functions and IR scan codes, and then stores it in a key-value pair mapping container. The key-value pair mapping container is used to temporarily store the correspondence between remote control button functions and IR scan codes; The matching module is used to query a standardized key mapping database based on the IR scan code and match the mapping relationship; The system configuration module is used to automatically update the configuration file according to the mapping relationship; The remote control is used to reload the driver and configuration files.

10. The automatic configuration remote control button key value mapping system as described in claim 9, characterized in that, The system configuration module includes a first configuration module, a second configuration module, and a third configuration module; The first configuration module is used to configure the Linux device tree file; The second configuration module is used to configure the infrared configuration file; The third configuration module is used to configure the Android key-value layout file.

Citation Information

Patent Citations

  • Android system based infrared remote control responding method and device and smart television

    CN103648009A

  • Method and apparatus for adapting remote controller to intelligent electronic equipment

    CN106920384A

  • Method and device for setting Android equipment remote controller keys and electronic device

    CN112950917A

  • Automatic generation system of robot configuration file under edge computing system

    CN117742806A

  • Configuration method of remote controller, electronic equipment and storage medium

    CN119440603A